Apply #412.
Add support to gameobject type Transport (11) that should stop like Orgrimmar arena Elevators or pilars. Patch by Spp and Opterman --HG-- branch : trunk
This commit is contained in:
@@ -194,6 +194,11 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
|
||||
case GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING:
|
||||
m_goValue->building.health = goinfo->building.intactNumHits + goinfo->building.damagedNumHits;
|
||||
break;
|
||||
case GAMEOBJECT_TYPE_TRANSPORT:
|
||||
SetUInt32Value(GAMEOBJECT_LEVEL, goinfo->transport.pause);
|
||||
if (goinfo->transport.startOpen)
|
||||
SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
}
|
||||
|
||||
SetZoneScript();
|
||||
@@ -713,6 +718,16 @@ bool GameObject::IsTransport() const
|
||||
return gInfo->type == GAMEOBJECT_TYPE_TRANSPORT || gInfo->type == GAMEOBJECT_TYPE_MO_TRANSPORT;
|
||||
}
|
||||
|
||||
// is Dynamic transport = non-stop Transport
|
||||
bool GameObject::IsDynTransport() const
|
||||
{
|
||||
// If something is marked as a transport, don't transmit an out of range packet for it.
|
||||
GameObjectInfo const * gInfo = GetGOInfo();
|
||||
if(!gInfo) return false;
|
||||
return gInfo->type == GAMEOBJECT_TYPE_MO_TRANSPORT || (gInfo->type == GAMEOBJECT_TYPE_TRANSPORT && !gInfo->transport.pause);
|
||||
}
|
||||
|
||||
|
||||
Unit* GameObject::GetOwner(bool inWorld) const
|
||||
{
|
||||
if (inWorld)
|
||||
|
||||
@@ -590,6 +590,7 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject
|
||||
GameObjectValue * GetGOValue() const { return m_goValue; }
|
||||
|
||||
bool IsTransport() const;
|
||||
bool IsDynTransport() const;
|
||||
|
||||
uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; }
|
||||
|
||||
|
||||
+1
-1
@@ -481,7 +481,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
||||
bool IsActivateToQuest = false;
|
||||
if (updatetype == UPDATETYPE_CREATE_OBJECT || updatetype == UPDATETYPE_CREATE_OBJECT2)
|
||||
{
|
||||
if (isType(TYPEMASK_GAMEOBJECT) && !((GameObject*)this)->IsTransport())
|
||||
if (isType(TYPEMASK_GAMEOBJECT) && !((GameObject*)this)->IsDynTransport())
|
||||
{
|
||||
if ( ((GameObject*)this)->ActivateToQuest(target) || target->isGameMaster())
|
||||
IsActivateToQuest = true;
|
||||
|
||||
Reference in New Issue
Block a user