mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 09:39:11 +00:00
refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
@@ -510,7 +510,7 @@ void GameObject::Update(uint32 diff)
|
||||
{
|
||||
// splash bobber (bobber ready now)
|
||||
Unit* caster = GetOwner();
|
||||
if (caster && caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if (caster && caster->IsPlayer())
|
||||
{
|
||||
SetGoState(GO_STATE_ACTIVE);
|
||||
ReplaceAllGameObjectFlags(GO_FLAG_NODESPAWN);
|
||||
@@ -634,7 +634,7 @@ void GameObject::Update(uint32 diff)
|
||||
case GAMEOBJECT_TYPE_FISHINGNODE: // can't fish now
|
||||
{
|
||||
Unit* caster = GetOwner();
|
||||
if (caster && caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if (caster && caster->IsPlayer())
|
||||
{
|
||||
caster->ToPlayer()->RemoveGameObject(this, false);
|
||||
|
||||
@@ -1635,7 +1635,7 @@ void GameObject::Use(Unit* user)
|
||||
if (HasGameObjectFlag(GO_FLAG_IN_USE))
|
||||
return;
|
||||
|
||||
if (user->GetTypeId() == TYPEID_PLAYER)
|
||||
if (user->IsPlayer())
|
||||
{
|
||||
Player* player = user->ToPlayer();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user