Skip to content
Snippets Groups Projects
Commit 1ec216d0 authored by dg's avatar dg
Browse files

maybe fix something

git-svn-id: http://svn.net-core.org/repos/t-engine4@6117 51575b47-30f0-44d4-a5cc-537603b46e54
parent 42c91fab
No related branches found
No related tags found
No related merge requests found
......@@ -148,23 +148,25 @@ function _M:display()
if ts[3] == "talent" then
local tid = ts[1]
local t = a:getTalentFromId(tid)
display_entity = t.display_entity
if a:isTalentCoolingDown(t) then
if not a:preUseTalent(t, true, true) then
if t then
display_entity = t.display_entity
if a:isTalentCoolingDown(t) then
if not a:preUseTalent(t, true, true) then
color = {190,190,190}
frame = "disabled"
else
frame = "cooldown"
color = {255,0,0}
angle = 360 * (1 - (a.talents_cd[t.id] / a:getTalentCooldown(t)))
end
txt = tostring(a:isTalentCoolingDown(t))
elseif a:isTalentActive(t.id) then
color = {255,255,0}
frame = "sustain"
elseif not a:preUseTalent(t, true, true) then
color = {190,190,190}
frame = "disabled"
else
frame = "cooldown"
color = {255,0,0}
angle = 360 * (1 - (a.talents_cd[t.id] / a:getTalentCooldown(t)))
end
txt = tostring(a:isTalentCoolingDown(t))
elseif a:isTalentActive(t.id) then
color = {255,255,0}
frame = "sustain"
elseif not a:preUseTalent(t, true, true) then
color = {190,190,190}
frame = "disabled"
end
elseif ts[3] == "inventory" then
local o = a:findInAllInventories(ts[1], {no_add_name=true, force_id=true, no_count=true})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment