Core/Battlefield: Add missing stuff for wintergrasp

This commit is contained in:
Vincent-Michael
2012-08-21 23:01:24 +02:00
parent 984493108b
commit 6891fe6248
20 changed files with 139 additions and 106 deletions
@@ -854,6 +854,13 @@ bool GameObject::IsDynTransport() const
return gInfo->type == GAMEOBJECT_TYPE_MO_TRANSPORT || (gInfo->type == GAMEOBJECT_TYPE_TRANSPORT && !gInfo->transport.pause);
}
bool GameObject::IsDestructibleBuilding() const
{
GameObjectTemplate const* gInfo = GetGOInfo();
if (!gInfo) return false;
return gInfo->type == GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING;
}
Unit* GameObject::GetOwner() const
{
return ObjectAccessor::GetUnit(*this, GetOwnerGUID());
@@ -870,7 +877,7 @@ bool GameObject::IsAlwaysVisibleFor(WorldObject const* seer) const
if (WorldObject::IsAlwaysVisibleFor(seer))
return true;
if (IsTransport())
if (IsTransport() || IsDestructibleBuilding())
return true;
if (!seer)