Core: Add wintergrasp-patch to wintergrasp_cleanup branch - resurrected from an old work-repository, now over as a branch to work on.

Original patch by socolin, cand a ton of contributors :
mathman, joda, spp, silinoron, josh, malcrom, shauren, machiavelli, click, rat, leak, tobmaps, _manuel_, the tcfr team (via socolin), and tons of others for chiming in.

NOTE: THIS IS A WORKING-BRANCH, AND _NOT_ MENT FOR PUBLIC USE OR EVEN CONSIDERED STABLE!
This commit is contained in:
click
2011-06-28 00:56:29 +02:00
parent e2f49f63bc
commit f580cddc09
49 changed files with 6739 additions and 83 deletions
@@ -831,6 +831,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());
@@ -847,7 +854,7 @@ bool GameObject::isAlwaysVisibleFor(WorldObject const* seer) const
if (WorldObject::isAlwaysVisibleFor(seer))
return true;
if (IsTransport())
if (IsTransport() || IsDestructibleBuilding())
return true;
return false;
@@ -631,6 +631,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>
bool IsTransport() const;
bool IsDynTransport() const;
bool IsDestructibleBuilding() const;
uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; }