mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +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_();
|
||||
}
|
||||
|
||||
// Capture cast state before clearing: SMSG_SPELL_GO for instant casts and
|
||||
// proc/triggered spells arrives while casting == false (they never go through
|
||||
// handleSpellStart with castTime > 0). We must NOT send CMSG_LOOT for a
|
||||
// gather node in those cases — only when a real timed gather cast completes.
|
||||
const bool wasInTimedCast = casting;
|
||||
// Capture cast state before clearing. Guard with spellId match so that
|
||||
// proc/triggered spells (which fire SMSG_SPELL_GO while a gather cast is
|
||||
// still active and casting == true) do NOT trigger premature CMSG_LOOT.
|
||||
// Only the spell that originally started the cast bar (currentCastSpellId)
|
||||
// should count as "gather cast completed".
|
||||
const bool wasInTimedCast = casting && (data.spellId == currentCastSpellId);
|
||||
|
||||
casting = false;
|
||||
castIsChannel = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue