diff options
| author | joschiwald <joschiwald.trinity@gmail.com> | 2015-01-26 12:59:18 +0100 |
|---|---|---|
| committer | joschiwald <joschiwald.trinity@gmail.com> | 2015-01-26 12:59:18 +0100 |
| commit | b8b30799174eea9ef706f26721a64660363ada6f (patch) | |
| tree | 2d12302372e7aaa1e440cff023d0ea8a139746fd /src/server/game/Handlers/SpellHandler.cpp | |
| parent | c61bcf12067c6e510386f8ddb61629ed189a0065 (diff) | |
Core/Packets: moved CMSG_AUTOSTORE_BAG_ITEM, CMSG_CANCEL_AURA, CMSG_CHAR_UNDELETE_ENUM, CMSG_GET_UNDELETE_COOLDOWN_STATUS, CMSG_UI_TIME_REQUEST to packet classes
Diffstat (limited to 'src/server/game/Handlers/SpellHandler.cpp')
| -rw-r--r-- | src/server/game/Handlers/SpellHandler.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 25a185896ee..e1459f696f9 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -451,16 +451,9 @@ void WorldSession::HandleCancelCastOpcode(WorldPacket& recvPacket) _player->InterruptNonMeleeSpells(false, spellId, false); } -void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket) +void WorldSession::HandleCancelAuraOpcode(WorldPackets::Spells::CancelAura& cancelAura) { - uint32 spellId; - recvPacket >> spellId; - - ObjectGuid guid; - recvPacket >> guid; - - - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(cancelAura.SpellID); if (!spellInfo) return; @@ -472,7 +465,7 @@ void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket) if (spellInfo->IsChanneled()) { if (Spell* curSpell = _player->GetCurrentSpell(CURRENT_CHANNELED_SPELL)) - if (curSpell->m_spellInfo->Id == spellId) + if (curSpell->GetSpellInfo()->Id == cancelAura.SpellID) _player->InterruptSpell(CURRENT_CHANNELED_SPELL); return; } @@ -483,8 +476,7 @@ void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket) if (!spellInfo->IsPositive() || spellInfo->IsPassive()) return; - // maybe should only remove one buff when there are multiple? - _player->RemoveOwnedAura(spellId, ObjectGuid::Empty, 0, AURA_REMOVE_BY_CANCEL); + _player->RemoveOwnedAura(cancelAura.SpellID, cancelAura.CasterGUID, 0, AURA_REMOVE_BY_CANCEL); // If spell being removed is a resource tracker, see if player was tracking both (herbs / minerals) and remove the other if (sWorld->getBoolConfig(CONFIG_ALLOW_TRACK_BOTH_RESOURCES) && spellInfo->HasAura(DIFFICULTY_NONE, SPELL_AURA_TRACK_RESOURCES)) @@ -501,7 +493,7 @@ void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket) // Remove all auras related to resource tracking (only Herbs and Minerals in 3.3.5a) for (std::list<uint32>::iterator it = spellIDs.begin(); it != spellIDs.end(); ++it) - _player->RemoveOwnedAura(*it, ObjectGuid::Empty, 0, AURA_REMOVE_BY_CANCEL); + _player->RemoveOwnedAura(*it, cancelAura.CasterGUID, 0, AURA_REMOVE_BY_CANCEL); } } } |
