aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/SpellHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/SpellHandler.cpp')
-rw-r--r--src/server/game/Handlers/SpellHandler.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index e5336d4af21..fc43628ace5 100644
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -409,7 +409,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
Spell* spell = new Spell(caster, spellInfo, TRIGGERED_NONE, ObjectGuid::Empty, false);
spell->m_cast_count = castCount; // set count of casts
- spell->prepare(&targets);
+ spell->prepare(targets);
}
void WorldSession::HandleCancelCastOpcode(WorldPacket& recvPacket)
@@ -562,12 +562,9 @@ void WorldSession::HandleSelfResOpcode(WorldPacket & /*recvData*/)
if (_player->HasAuraType(SPELL_AURA_PREVENT_RESURRECTION))
return; // silent return, client should display error by itself and not send this opcode
- if (_player->GetUInt32Value(PLAYER_SELF_RES_SPELL))
+ if (uint32 spellId = _player->GetUInt32Value(PLAYER_SELF_RES_SPELL))
{
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(_player->GetUInt32Value(PLAYER_SELF_RES_SPELL));
- if (spellInfo)
- _player->CastSpell(_player, spellInfo, false, nullptr);
-
+ _player->CastSpell(_player, spellId);
_player->SetUInt32Value(PLAYER_SELF_RES_SPELL, 0);
}
}