Skip to content

Commit

Permalink
Fix crash when caster is not a unit
Browse files Browse the repository at this point in the history
  • Loading branch information
StadenElysium committed Jul 19, 2017
1 parent 7b31cf3 commit 162a512
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game/Handlers/SpellHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,10 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
return;
}
}
else
else if (caster->GetTypeId() == TYPEID_UNIT)
{
// not have spell in spellbook or spell passive and not casted by client
if (!((Creature*)caster)->HasSpell(spellId) || IsPassiveSpell(spellInfo))
if (!caster->HasSpell(spellId) || IsPassiveSpell(spellInfo))
{
//cheater? kick? ban?
recvPacket.rpos(recvPacket.wpos()); // prevent spam at ignore packet
Expand Down

0 comments on commit 162a512

Please sign in to comment.