This is more of a windower question than a gearswap question but I'm sure someone here knows (or Byrth will see it) and the answer is probably good to know. I added the following to my ninja gearswap today.
Code:
function job_setup()
state.Utsusemi = 3
end
local utsusemi = {
["Utsusemi: Ichi"] = 1,
["Utsusemi: Ni"] = 2,
["Utsusemi: San"] = 3,
}
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function job_midcast(spell, action, spellMap, eventArgs)
if spellMap == 'Utsusemi' then
if state.Utsusemi > utsusemi[spell.name] then
if buffactive['Copy Image'] then
windower.ffxi.cancel_buff(66)
elseif buffactive['Copy Image (2)'] then
windower.ffxi.cancel_buff(444)
elseif buffactive['Copy Image (3)'] then
windower.ffxi.cancel_buff(445)
elseif buffactive['Copy Image (4+)'] then
windower.ffxi.cancel_buff(446)
end
end
end
end
function job_aftercast(spell, action, spellMap, eventArgs)
if (not spell.interrupted) and spellMap == 'Utsusemi' then
state.Utsusemi = utsusemi[spell.name]
end
end
It seems to work okay. My question is regarding the packet ordering that is produced. Is the cancel inserted before or after spell packet? If it's after then I can't use quick cast gear without additional modification.
Thanks