mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[8381] Some refactoring work in Unit::m_currentSpells code.
* Restrict access, use enum args, move some repeated code parts to function. * Make m_selfContainer set only part of Unit::SetCurrentCastedSpell
This commit is contained in:
parent
1b1d013623
commit
74d27294aa
10 changed files with 70 additions and 69 deletions
|
|
@ -402,9 +402,9 @@ void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket)
|
|||
// channeled spell case (it currently casted then)
|
||||
if (IsChanneledSpell(spellInfo))
|
||||
{
|
||||
if (_player->m_currentSpells[CURRENT_CHANNELED_SPELL] &&
|
||||
_player->m_currentSpells[CURRENT_CHANNELED_SPELL]->m_spellInfo->Id==spellId)
|
||||
_player->InterruptSpell(CURRENT_CHANNELED_SPELL);
|
||||
if (Spell* curSpell = _player->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
|
||||
if (curSpell->m_spellInfo->Id==spellId)
|
||||
_player->InterruptSpell(CURRENT_CHANNELED_SPELL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue