Riposte without Riposte
ennvina opened this issue · 2 comments
Even without the Riposte talent, the Riposte SAO shows up after a parry.
It probably should not happen because we track the spell based on IsUsableSpell
which, in theory, should return false because the player doesn’t know the spell.
Suggestion to solve this issue:
- add a
talent
parameter to the RegisterCounter method, e.g.
function SAO.RegisterCounter(self, auraID, talent)
- if
talent
is nil, talent is not checked (= current behavior) - if
talent
is not nil, it should be an object{ tab, index }
and will be checked before every proc tab
andindex
can be fetched withSAO:GetTalentByName(spellName)
This would be an addition to the Counter system in counter.lua
.
Then, in rogue.lua
, call something like this:
local riposteSpellID = 14251;
local riposteSpellName = GetSpellInfo(riposteSpellID);
local _, _, tab, index = SAO:GetTalentByName(riposteSpellName);
self:RegisterAura("riposte", 0, riposteSpellID, "bandits_guile", "Top (CW)", 1, 255, 255, 255, true, { riposteSpellID });
self:RegisterCounter("riposte", { tab, index }); -- Must match name from above call
Implemented in #73.