mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
fix: match spell ID in handleSpellGo to prevent proc spells triggering gather loot
wasInTimedCast checked casting == true but not whether the completing spell was actually the gather cast. A triggered/proc spell (SMSG_SPELL_GO with a different spellId) could arrive while a gather cast is active (casting==true), satisfying the old guard and firing lootTarget prematurely. Require data.spellId == currentCastSpellId so only the spell that started the cast bar triggers the post-gather CMSG_LOOT dispatch.
This commit is contained in:
parent
f44defec38
commit
48bcee32b4
1 changed files with 6 additions and 5 deletions
|
|
@ -16318,11 +16318,12 @@ void GameHandler::handleSpellGo(network::Packet& packet) {
|
||||||
meleeSwingCallback_();
|
meleeSwingCallback_();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Capture cast state before clearing: SMSG_SPELL_GO for instant casts and
|
// Capture cast state before clearing. Guard with spellId match so that
|
||||||
// proc/triggered spells arrives while casting == false (they never go through
|
// proc/triggered spells (which fire SMSG_SPELL_GO while a gather cast is
|
||||||
// handleSpellStart with castTime > 0). We must NOT send CMSG_LOOT for a
|
// still active and casting == true) do NOT trigger premature CMSG_LOOT.
|
||||||
// gather node in those cases — only when a real timed gather cast completes.
|
// Only the spell that originally started the cast bar (currentCastSpellId)
|
||||||
const bool wasInTimedCast = casting;
|
// should count as "gather cast completed".
|
||||||
|
const bool wasInTimedCast = casting && (data.spellId == currentCastSpellId);
|
||||||
|
|
||||||
casting = false;
|
casting = false;
|
||||||
castIsChannel = false;
|
castIsChannel = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue