Core/Battlefield: Add missing stuff for wintergrasp

This commit is contained in:
Vincent-Michael committed 2012-08-21 23:03:30 +02:00
1 parent 984493108b
commit 6891fe6248
20 files changed
+139 -106

No files matched your search

@@ -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)