refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
parent
61f3a631c3
commit
643362d697
189 changed files with 783 additions and 775 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue