mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
@@ -351,7 +351,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
|
||||
|
||||
// ignore for remote control state (for player case)
|
||||
Unit* mover = _player->m_mover;
|
||||
if (mover != _player && mover->GetTypeId() == TYPEID_PLAYER)
|
||||
if (mover != _player && mover->IsPlayer())
|
||||
{
|
||||
recvPacket.rfinish(); // prevent spam at ignore packet
|
||||
return;
|
||||
@@ -372,7 +372,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
|
||||
HandleClientCastFlags(recvPacket, castFlags, targets);
|
||||
|
||||
// not have spell in spellbook
|
||||
if (mover->GetTypeId() == TYPEID_PLAYER)
|
||||
if (mover->IsPlayer())
|
||||
{
|
||||
// not have spell in spellbook or spell passive and not casted by client
|
||||
if( !(spellInfo->Targets & TARGET_FLAG_GAMEOBJECT_ITEM) && (!mover->ToPlayer()->HasActiveSpell(spellId) || spellInfo->IsPassive()) )
|
||||
@@ -688,7 +688,7 @@ void WorldSession::HandleMirrorImageDataRequest(WorldPacket& recvData)
|
||||
data << uint8(creator->getGender());
|
||||
data << uint8(creator->getClass());
|
||||
|
||||
if (creator->GetTypeId() == TYPEID_PLAYER)
|
||||
if (creator->IsPlayer())
|
||||
{
|
||||
Player* player = creator->ToPlayer();
|
||||
data << uint8(player->GetByteValue(PLAYER_BYTES, 0)); // skin
|
||||
|
||||
Reference in New Issue
Block a user