Professional Documents
Culture Documents
Victory Rush
Victory Rush
trigger:
function()
if timestamp!=nil
if GetTime()-timestamp<=20
return true
else
timestamp=nil
end
return false
OR
TRIG 1 on COMBAT_LOG_EVENT
trigger:
function()
if event=killedAnything
if berserker/battle stance
if IsSpellUsable
timestamp=GetTime()
end
else if defensive stance
timestamp = GetTime()
end
else if event spell victory rush
timestamp=nil
end
return false
OR
TRIG 3 on UPDATE_SHAPESHIFT_FORM
trig at get(variableVictory)==true
untrig at usedVictory
Duration: TimeRemaining
----------------------
unitaura/ever frame
function()
local stance = GetShapeshiftForm()
if stance~=2 then
local usable, _ = IsUsableSpell("Victory Rush")
if usable==nil and timestamp ~=nil then
backup = timestamp
print("unusable, bkup: "..backup)
timestamp = nil
elseif timestamp==nil and backup~=nil then
timestamp=backup
print("usable, timestamp backed up"..timestamp)
else print ("other weird condition")
end
end
if timestamp ~= nil then
if GetTime() - timestamp <= 20 then
print(GetTime()-timestamp)
return true
else
print("Time elapsed. timestamp=nil")
timestamp = nil
backup=nil
end
end
return false
end
untrig
function()
if timestamp==nil then
return true
end
end
trig2
combat log event
function (...)
local event = select(3, ...)
local src = select(4, ...)