mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
Small vehicle related code cleanup.
This commit is contained in:
parent
3f4821acfb
commit
0798b151cc
7 changed files with 14 additions and 12 deletions
|
|
@ -128,7 +128,7 @@ ObjectAccessor::GetNPCIfCanInteractWith(Player const &player, uint64 guid, uint3
|
|||
}
|
||||
|
||||
Creature*
|
||||
ObjectAccessor::GetCreatureOrPet(WorldObject const &u, uint64 guid)
|
||||
ObjectAccessor::GetCreatureOrPetOrVehicle(WorldObject const &u, uint64 guid)
|
||||
{
|
||||
if(Creature *unit = GetPet(guid))
|
||||
return unit;
|
||||
|
|
@ -164,7 +164,7 @@ ObjectAccessor::GetUnit(WorldObject const &u, uint64 guid)
|
|||
if(IS_PLAYER_GUID(guid))
|
||||
return FindPlayer(guid);
|
||||
|
||||
return GetCreatureOrPet(u, guid);
|
||||
return GetCreatureOrPetOrVehicle(u, guid);
|
||||
}
|
||||
|
||||
Corpse*
|
||||
|
|
@ -187,7 +187,7 @@ Object* ObjectAccessor::GetObjectByTypeMask(Player const &p, uint64 guid, uint32
|
|||
|
||||
if(typemask & TYPEMASK_UNIT)
|
||||
{
|
||||
obj = GetCreatureOrPet(p,guid);
|
||||
obj = GetCreatureOrPetOrVehicle(p,guid);
|
||||
if(obj) return obj;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue