mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Some Creature* casts moved to new ToCreature.
Added const Creature* ToCreature() --HG-- branch : trunk
This commit is contained in:
@@ -324,7 +324,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
|
||||
else
|
||||
{
|
||||
// not have spell in spellbook or spell passive and not casted by client
|
||||
if ((mover->GetTypeId() == TYPEID_UNIT && !((Creature*)mover)->HasSpell(spellId)) || IsPassiveSpell(spellId))
|
||||
if ((mover->GetTypeId() == TYPEID_UNIT && !mover->ToCreature()->HasSpell(spellId)) || IsPassiveSpell(spellId))
|
||||
{
|
||||
//cheater? kick? ban?
|
||||
recvPacket.rpos(recvPacket.wpos()); // prevent spam at ignore packet
|
||||
|
||||
Reference in New Issue
Block a user