TrinityCore
Loading...
Searching...
No Matches
Transport Class Reference

#include <Transport.h>

+ Inheritance diagram for Transport:

Public Types

typedef std::set< WorldObject * > PassengerSet
 

Public Member Functions

 ~Transport ()
 
bool Create (ObjectGuid::LowType guidlow, uint32 entry, uint32 mapid, float x, float y, float z, float ang, uint32 animprogress)
 
void CleanupsBeforeDelete (bool finalCleanup=true) override
 
void Update (uint32 diff) override
 
void DelayedUpdate (uint32 diff)
 
void BuildUpdate (UpdateDataMapType &data_map) override
 
void AddPassenger (WorldObject *passenger)
 
void RemovePassenger (WorldObject *passenger)
 
PassengerSet const & GetPassengers () const
 
CreatureCreateNPCPassenger (ObjectGuid::LowType guid, CreatureData const *data)
 
GameObjectCreateGOPassenger (ObjectGuid::LowType guid, GameObjectData const *data)
 
TempSummonSummonPassenger (uint32 entry, Position const &pos, TempSummonType summonType, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, Unit *summoner=nullptr, uint32 spellId=0, uint32 vehId=0)
 Temporarily summons a creature as passenger on this transport.
 
void CalculatePassengerPosition (float &x, float &y, float &z, float *o=nullptr) const override
 This method transforms supplied transport offsets into global coordinates.
 
void CalculatePassengerOffset (float &x, float &y, float &z, float *o=nullptr) const override
 This method transforms supplied global coordinates into local offsets.
 
uint32 GetTransportPeriod () const override
 
void SetPeriod (uint32 period)
 
uint32 GetTimer () const
 
KeyFrameVec const & GetKeyFrames () const
 
void UpdatePosition (float x, float y, float z, float o)
 
void LoadStaticPassengers ()
 Needed when transport moves from inactive to active grid.
 
void UnloadStaticPassengers ()
 Needed when transport enters inactive grid.
 
void EnableMovement (bool enabled)
 
void SetDelayedAddModelToMap ()
 
TransportTemplate const * GetTransportTemplate () const
 
std::string GetDebugInfo () const override
 
- Public Member Functions inherited from GameObject
 GameObject ()
 
 ~GameObject ()
 
void BuildValuesUpdate (uint8 updatetype, ByteBuffer *data, Player const *target) const override
 
void AddToWorld () override
 
void RemoveFromWorld () override
 
uint32 GetDynamicFlags () const override
 
void ReplaceAllDynamicFlags (uint32 flag) override
 
bool Create (ObjectGuid::LowType guidlow, uint32 name_id, Map *map, uint32 phaseMask, Position const &pos, QuaternionData const &rotation, uint32 animprogress, GOState go_state, uint32 artKit=0, bool dynamic=false, ObjectGuid::LowType spawnid=0)
 
GameObjectTemplate const * GetGOInfo () const
 
GameObjectTemplateAddon const * GetTemplateAddon () const
 
GameObjectOverride const * GetGameObjectOverride () const
 
GameObjectData const * GetGameObjectData () const
 
GameObjectValue const * GetGOValue () const
 
bool IsTransport () const
 
bool IsDynTransport () const
 
bool IsDestructibleBuilding () const
 
ObjectGuid::LowType GetSpawnId () const
 
void SetLocalRotationAngles (float z_rot, float y_rot, float x_rot)
 
void SetLocalRotation (float qx, float qy, float qz, float qw)
 
void SetParentRotation (QuaternionData const &rotation)
 
QuaternionData const & GetLocalRotation () const
 
int64 GetPackedLocalRotation () const
 
QuaternionData GetWorldRotation () const
 
std::string const & GetNameForLocaleIdx (LocaleConstant locale) const override
 
void SaveToDB ()
 
void SaveToDB (uint32 mapid, uint8 spawnMask, uint32 phaseMask)
 
bool LoadFromDB (ObjectGuid::LowType spawnId, Map *map, bool addToMap, bool=true)
 
void SetOwnerGUID (ObjectGuid owner)
 
ObjectGuid GetOwnerGUID () const override
 
void SetSpellId (uint32 id)
 
uint32 GetSpellId () const
 
time_t GetRespawnTime () const
 
time_t GetRespawnTimeEx () const
 
void SetRespawnTime (int32 respawn)
 
void Respawn ()
 
bool isSpawned () const
 
bool isSpawnedByDefault () const
 
void SetSpawnedByDefault (bool b)
 
uint32 GetRespawnDelay () const
 
void Refresh ()
 
void DespawnOrUnsummon (Milliseconds delay=0ms, Seconds forceRespawnTime=0s)
 
void Delete ()
 
void getFishLoot (Loot *loot, Player *loot_owner)
 
void getFishLootJunk (Loot *loot, Player *loot_owner)
 
bool HasFlag (GameObjectFlags flags) const
 
void SetFlag (GameObjectFlags flags)
 
void RemoveFlag (GameObjectFlags flags)
 
void ReplaceAllFlags (GameObjectFlags flags)
 
void SetLevel (uint32 level)
 
GameobjectTypes GetGoType () const
 
void SetGoType (GameobjectTypes type)
 
GOState GetGoState () const
 
void SetGoState (GOState state)
 
uint8 GetGoArtKit () const
 
void SetGoArtKit (uint8 artkit)
 
uint8 GetGoAnimProgress () const
 
void SetGoAnimProgress (uint8 animprogress)
 
void SetPhaseMask (uint32 newPhaseMask, bool update) override
 
void EnableCollision (bool enable)
 
void Use (Unit *user)
 
LootState getLootState () const
 
void SetLootState (LootState s, Unit *unit=nullptr)
 
uint16 GetLootMode () const
 
bool HasLootMode (uint16 lootMode) const
 
void SetLootMode (uint16 lootMode)
 
void AddLootMode (uint16 lootMode)
 
void RemoveLootMode (uint16 lootMode)
 
void ResetLootMode ()
 
void SetLootGenerationTime ()
 
uint32 GetLootGenerationTime () const
 
void AddToSkillupList (ObjectGuid const &PlayerGuidLow)
 
bool IsInSkillupList (ObjectGuid const &playerGuid) const
 
void ClearSkillupList ()
 
void AddUniqueUse (Player *player)
 
void AddUse ()
 
uint32 GetUseCount () const
 
uint32 GetUniqueUseCount () const
 
void SaveRespawnTime (uint32 forceDelay=0)
 
PlayerGetLootRecipient () const
 
GroupGetLootRecipientGroup () const
 
void SetLootRecipient (Unit *unit, Group *group=nullptr)
 
bool IsLootAllowedFor (Player const *player) const
 
bool HasLootRecipient () const
 
GameObjectGetLinkedTrap ()
 
void SetLinkedTrap (GameObject *linkedTrap)
 
bool hasQuest (uint32 quest_id) const override
 
bool hasInvolvedQuest (uint32 quest_id) const override
 
bool ActivateToQuest (Player const *target) const
 
void UseDoorOrButton (uint32 time_to_restore=0, bool alternative=false, Unit *user=nullptr)
 
void ResetDoorOrButton ()
 
void ActivateObject (GameObjectActions action, WorldObject *spellCaster=nullptr, uint32 spellId=0, int32 effectIndex=-1)
 
void TriggeringLinkedGameObject (uint32 trapEntry, Unit *target)
 
bool IsNeverVisible (bool allowServersideObjects) const override
 
bool IsAlwaysVisibleFor (WorldObject const *seer) const override
 
bool IsInvisibleDueToDespawn () const override
 
uint8 GetLevelForTarget (WorldObject const *target) const override
 
GameObjectLookupFishingHoleAround (float range)
 
void SendCustomAnim (uint32 anim)
 
bool IsInRange (float x, float y, float z, float radius) const
 
void ModifyHealth (int32 change, WorldObject *attackerOrHealer=nullptr, uint32 spellId=0)
 
void SetDestructibleState (GameObjectDestructibleState state, WorldObject *attackerOrHealer=nullptr, bool setHealth=false)
 
GameObjectDestructibleState GetDestructibleState () const
 
void EventInform (uint32 eventId, WorldObject *invoker=nullptr)
 
void SetRespawnCompatibilityMode (bool mode=true)
 
bool GetRespawnCompatibilityMode ()
 
std::string const & GetAIName () const
 
uint32 GetScriptId () const
 
GameObjectAIAI () const
 
void InheritStringIds (GameObject const *parent)
 
bool HasStringId (std::string_view id) const
 
void SetScriptStringId (std::string id)
 
std::string_view GetStringId (StringIdType type) const
 
void SetDisplayId (uint32 displayid)
 
uint32 GetDisplayId () const
 
uint32 GetFaction () const override
 
void SetFaction (uint32 faction) override
 
void GetRespawnPosition (float &x, float &y, float &z, float *ori=nullptr) const
 
TransportToTransport ()
 
Transport const * ToTransport () const
 
float GetStationaryX () const override
 
float GetStationaryY () const override
 
float GetStationaryZ () const override
 
float GetStationaryO () const override
 
void RelocateStationaryPosition (float x, float y, float z, float o)
 
float GetInteractionDistance () const
 
void UpdateModelPosition ()
 
bool IsAtInteractDistance (Position const &pos, float radius) const
 
bool IsAtInteractDistance (Player const *player, SpellInfo const *spell=nullptr) const
 
bool IsWithinDistInMap (Player const *player) const
 
SpellInfo const * GetSpellForLock (Player const *player) const
 
void AIM_Destroy ()
 
bool AIM_Initialize ()
 
bool IsWithinDistInMap (WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
 
- Public Member Functions inherited from WorldObject
virtual ~WorldObject ()
 
void AddToWorld () override
 
void RemoveFromWorld () override
 
void GetNearPoint2D (WorldObject const *searcher, float &x, float &y, float distance, float absAngle) const
 
void GetNearPoint (WorldObject const *searcher, float &x, float &y, float &z, float distance2d, float absAngle) const
 
void GetClosePoint (float &x, float &y, float &z, float size, float distance2d=0, float relAngle=0) const
 
void MovePosition (Position &pos, float dist, float angle)
 
Position GetNearPosition (float dist, float angle)
 
void MovePositionToFirstCollision (Position &pos, float dist, float angle)
 
Position GetFirstCollisionPosition (float dist, float angle)
 
Position GetRandomNearPosition (float radius)
 
void GetContactPoint (WorldObject const *obj, float &x, float &y, float &z, float distance2d=CONTACT_DISTANCE) const
 
virtual float GetCombatReach () const
 
void UpdateGroundPositionZ (float x, float y, float &z) const
 
void UpdateAllowedPositionZ (float x, float y, float &z, float *groundZ=nullptr) const
 
void GetRandomPoint (Position const &srcPos, float distance, float &rand_x, float &rand_y, float &rand_z) const
 
Position GetRandomPoint (Position const &srcPos, float distance) const
 
uint32 GetInstanceId () const
 
uint32 GetPhaseMask () const
 
bool InSamePhase (uint32 phasemask) const
 
bool InSamePhase (WorldObject const *obj) const
 
uint32 GetZoneId () const
 
uint32 GetAreaId () const
 
void GetZoneAndAreaId (uint32 &zoneid, uint32 &areaid) const
 
bool IsInWorldPvpZone () const
 
bool IsOutdoors () const
 
ZLiquidStatus GetLiquidStatus () const
 
InstanceScriptGetInstanceScript () const
 
std::string const & GetName () const
 
void SetName (std::string newname)
 
float GetDistance (WorldObject const *obj) const
 
float GetDistance (Position const &pos) const
 
float GetDistance (float x, float y, float z) const
 
float GetDistance2d (WorldObject const *obj) const
 
float GetDistance2d (float x, float y) const
 
float GetDistanceZ (WorldObject const *obj) const
 
bool IsSelfOrInSameMap (WorldObject const *obj) const
 
bool IsInMap (WorldObject const *obj) const
 
bool IsWithinDist3d (float x, float y, float z, float dist) const
 
bool IsWithinDist3d (Position const *pos, float dist) const
 
bool IsWithinDist2d (float x, float y, float dist) const
 
bool IsWithinDist2d (Position const *pos, float dist) const
 
bool IsWithinDist (WorldObject const *obj, float dist2compare, bool is3D=true) const
 
bool IsWithinDistInMap (WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
 
bool IsWithinLOS (float x, float y, float z, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
 
bool IsWithinLOSInMap (WorldObject const *obj, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
 
Position GetHitSpherePointFor (Position const &dest) const
 
void GetHitSpherePointFor (Position const &dest, float &x, float &y, float &z) const
 
bool GetDistanceOrder (WorldObject const *obj1, WorldObject const *obj2, bool is3D=true) const
 
bool IsInRange (WorldObject const *obj, float minRange, float maxRange, bool is3D=true) const
 
bool IsInRange2d (float x, float y, float minRange, float maxRange) const
 
bool IsInRange3d (float x, float y, float z, float minRange, float maxRange) const
 
bool isInFront (WorldObject const *target, float arc=float(M_PI)) const
 
bool isInBack (WorldObject const *target, float arc=float(M_PI)) const
 
bool IsInBetween (Position const &pos1, Position const &pos2, float size=0) const
 
bool IsInBetween (WorldObject const *obj1, WorldObject const *obj2, float size=0) const
 
virtual void SendMessageToSet (WorldPacket const *data, bool self) const
 
virtual void SendMessageToSetInRange (WorldPacket const *data, float dist, bool self) const
 
virtual void SendMessageToSet (WorldPacket const *data, Player const *skipped_rcvr) const
 
void PlayDistanceSound (uint32 soundId, Player *target=nullptr)
 
void PlayDirectSound (uint32 soundId, Player *target=nullptr)
 
void PlayDirectMusic (uint32 musicId, Player *target=nullptr)
 
void SendObjectDeSpawnAnim (ObjectGuid guid)
 
void AddObjectToRemoveList ()
 
float GetGridActivationRange () const
 
float GetVisibilityRange () const
 
float GetSightRange (WorldObject const *target=nullptr) const
 
bool CanSeeOrDetect (WorldObject const *obj, bool implicitDetect=false, bool distanceCheck=false, bool checkAlert=false) const
 
virtual void SetMap (Map *map)
 
virtual void ResetMap ()
 
MapGetMap () const
 
MapFindMap () const
 
void SetZoneScript ()
 
void ClearZoneScript ()
 
ZoneScriptGetZoneScript () const
 
TempSummonSummonCreature (uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
 
TempSummonSummonCreature (uint32 entry, float x, float y, float z, float o=0, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
 
GameObjectSummonGameObject (uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
 
GameObjectSummonGameObject (uint32 entry, float x, float y, float z, float ang, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
 
CreatureSummonTrigger (float x, float y, float z, float ang, Milliseconds despawnTime, CreatureAI *(*GetAI)(Creature *)=nullptr)
 
void SummonCreatureGroup (uint8 group, std::list< TempSummon * > *list=nullptr)
 
CreatureFindNearestCreature (uint32 entry, float range, bool alive=true) const
 
CreatureFindNearestCreatureWithOptions (float range, FindCreatureOptions const &options) const
 
GameObjectFindNearestGameObject (uint32 entry, float range, bool spawnedOnly=true) const
 
GameObjectFindNearestGameObjectWithOptions (float range, FindGameObjectOptions const &options) const
 
GameObjectFindNearestUnspawnedGameObject (uint32 entry, float range) const
 
GameObjectFindNearestGameObjectOfType (GameobjectTypes type, float range) const
 
PlayerSelectNearestPlayer (float distance) const
 
virtual ObjectGuid GetCharmerOrOwnerGUID () const
 
ObjectGuid GetCharmerOrOwnerOrOwnGUID () const
 
UnitGetOwner () const
 
UnitGetCharmerOrOwner () const
 
UnitGetCharmerOrOwnerOrSelf () const
 
PlayerGetCharmerOrOwnerPlayerOrPlayerItself () const
 
PlayerGetAffectingPlayer () const
 
PlayerGetSpellModOwner () const
 
int32 CalculateSpellDamage (SpellEffectInfo const &spellEffectInfo, int32 const *basePoints=nullptr) const
 
float GetSpellMaxRangeForTarget (Unit const *target, SpellInfo const *spellInfo) const
 
float GetSpellMinRangeForTarget (Unit const *target, SpellInfo const *spellInfo) const
 
float ApplyEffectModifiers (SpellInfo const *spellInfo, uint8 effIndex, float value) const
 
int32 CalcSpellDuration (SpellInfo const *spellInfo) const
 
int32 ModSpellDuration (SpellInfo const *spellInfo, WorldObject const *target, int32 duration, bool positive, uint32 effectMask) const
 
void ModSpellCastTime (SpellInfo const *spellInfo, int32 &castTime, Spell *spell=nullptr) const
 
void ModSpellDurationTime (SpellInfo const *spellInfo, int32 &durationTime, Spell *spell=nullptr) const
 
virtual float MeleeSpellMissChance (Unit const *victim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const
 
virtual SpellMissInfo MeleeSpellHitResult (Unit *victim, SpellInfo const *spellInfo) const
 
SpellMissInfo MagicSpellHitResult (Unit *victim, SpellInfo const *spellInfo) const
 
SpellMissInfo SpellHitResult (Unit *victim, SpellInfo const *spellInfo, bool canReflect=false) const
 
void SendSpellMiss (Unit *target, uint32 spellID, SpellMissInfo missInfo)
 
FactionTemplateEntry const * GetFactionTemplateEntry () const
 
ReputationRank GetReactionTo (WorldObject const *target) const
 
bool IsHostileTo (WorldObject const *target) const
 
bool IsHostileToPlayers () const
 
bool IsFriendlyTo (WorldObject const *target) const
 
bool IsNeutralToAll () const
 
SpellCastResult CastSpell (CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
 
bool IsValidAttackTarget (WorldObject const *target, SpellInfo const *bySpell=nullptr) const
 
bool IsValidAssistTarget (WorldObject const *target, SpellInfo const *bySpell=nullptr) const
 
UnitGetMagicHitRedirectTarget (Unit *victim, SpellInfo const *spellInfo)
 
template<typename Container >
void GetGameObjectListWithEntryInGrid (Container &gameObjectContainer, uint32 entry, float maxSearchRange=250.0f) const
 
template<typename Container >
void GetGameObjectListWithOptionsInGrid (Container &gameObjectContainer, float maxSearchRange, FindGameObjectOptions const &options) const
 
template<typename Container >
void GetCreatureListWithEntryInGrid (Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
 
template<typename Container >
void GetCreatureListWithOptionsInGrid (Container &creatureContainer, float maxSearchRange, FindCreatureOptions const &options) const
 
template<typename Container >
void GetPlayerListInGrid (Container &playerContainer, float maxSearchRange, bool alive=true) const
 
void DestroyForNearbyPlayers ()
 
virtual void UpdateObjectVisibility (bool forced=true)
 
virtual void UpdateObjectVisibilityOnCreate ()
 
void UpdatePositionData ()
 
void BuildUpdate (UpdateDataMapType &) override
 
bool AddToObjectUpdate () override
 
void RemoveFromObjectUpdate () override
 
void AddToNotify (uint16 f)
 
bool isNeedNotify (uint16 f) const
 
uint16 GetNotifyFlags () const
 
void ResetAllNotifies ()
 
bool isActiveObject () const
 
void setActive (bool isActiveObject)
 
bool IsFarVisible () const
 
void SetFarVisible (bool on)
 
bool IsVisibilityOverridden () const
 
void SetVisibilityDistanceOverride (VisibilityDistanceType type)
 
void SetIsStoredInWorldObjectGridContainer (bool apply)
 
bool IsAlwaysStoredInWorldObjectGridContainer () const
 
bool IsStoredInWorldObjectGridContainer () const
 
TransportGetTransport () const
 
float GetTransOffsetX () const
 
float GetTransOffsetY () const
 
float GetTransOffsetZ () const
 
float GetTransOffsetO () const
 
Position const & GetTransOffset () const
 
uint32 GetTransTime () const
 
int8 GetTransSeat () const
 
virtual ObjectGuid GetTransGUID () const
 
void SetTransport (Transport *t)
 
float GetFloorZ () const
 
virtual float GetCollisionHeight () const
 
float GetMapWaterOrGroundLevel (float x, float y, float z, float *ground=nullptr) const
 
float GetMapHeight (float x, float y, float z, bool vmap=true, float distanceToSearch=50.0f) const
 
std::string GetDebugInfo () const override
 
bool IsPrivateObject () const
 
ObjectGuid GetPrivateObjectOwner () const
 
void SetPrivateObjectOwner (ObjectGuid const &owner)
 
bool CheckPrivateObjectOwnerVisibility (WorldObject const *seer) const
 
- Public Member Functions inherited from Object
virtual ~Object ()
 
bool IsInWorld () const
 
ObjectGuid GetGUID () const
 
PackedGuid const & GetPackGUID () const
 
uint32 GetEntry () const
 
void SetEntry (uint32 entry)
 
float GetObjectScale () const
 
virtual void SetObjectScale (float scale)
 
bool HasDynamicFlag (uint32 flag) const
 
virtual void SetDynamicFlag (uint32 flag)
 
virtual void RemoveDynamicFlag (uint32 flag)
 
TypeID GetTypeId () const
 
bool isType (uint16 mask) const
 
virtual void BuildCreateUpdateBlockForPlayer (UpdateData *data, Player *target) const
 
void SendUpdateToPlayer (Player *player)
 
void BuildValuesUpdateBlockForPlayer (UpdateData *data, Player const *target) const
 
void BuildOutOfRangeUpdateBlock (UpdateData *data) const
 
void BuildMovementUpdateBlock (UpdateData *data, uint32 flags=0) const
 
virtual void DestroyForPlayer (Player *target, bool onDeath=false) const
 
int32 GetInt32Value (uint16 index) const
 
uint32 GetUInt32Value (uint16 index) const
 
uint64 GetUInt64Value (uint16 index) const
 
float GetFloatValue (uint16 index) const
 
uint8 GetByteValue (uint16 index, uint8 offset) const
 
uint16 GetUInt16Value (uint16 index, uint8 offset) const
 
ObjectGuid GetGuidValue (uint16 index) const
 
void SetInt32Value (uint16 index, int32 value)
 
void SetUInt32Value (uint16 index, uint32 value)
 
void UpdateUInt32Value (uint16 index, uint32 value)
 
void SetUInt64Value (uint16 index, uint64 value)
 
void SetFloatValue (uint16 index, float value)
 
void SetByteValue (uint16 index, uint8 offset, uint8 value)
 
void SetUInt16Value (uint16 index, uint8 offset, uint16 value)
 
void SetInt16Value (uint16 index, uint8 offset, int16 value)
 
void SetGuidValue (uint16 index, ObjectGuid value)
 
void SetStatFloatValue (uint16 index, float value)
 
void SetStatInt32Value (uint16 index, int32 value)
 
bool AddGuidValue (uint16 index, ObjectGuid value)
 
bool RemoveGuidValue (uint16 index, ObjectGuid value)
 
void ApplyModUInt32Value (uint16 index, int32 val, bool apply)
 
void ApplyModInt32Value (uint16 index, int32 val, bool apply)
 
void ApplyModPositiveFloatValue (uint16 index, float val, bool apply)
 
void ApplyModSignedFloatValue (uint16 index, float val, bool apply)
 
void SetFlag (uint16 index, uint32 newFlag)
 
void RemoveFlag (uint16 index, uint32 oldFlag)
 
void ToggleFlag (uint16 index, uint32 flag)
 
bool HasFlag (uint16 index, uint32 flag) const
 
void ApplyModFlag (uint16 index, uint32 flag, bool apply)
 
void SetByteFlag (uint16 index, uint8 offset, uint8 newFlag)
 
void RemoveByteFlag (uint16 index, uint8 offset, uint8 newFlag)
 
void ToggleByteFlag (uint16 index, uint8 offset, uint8 flag)
 
bool HasByteFlag (uint16 index, uint8 offset, uint8 flag) const
 
void ApplyModByteFlag (uint16 index, uint8 offset, uint8 flag, bool apply)
 
void SetFlag64 (uint16 index, uint64 newFlag)
 
void RemoveFlag64 (uint16 index, uint64 oldFlag)
 
void ToggleFlag64 (uint16 index, uint64 flag)
 
bool HasFlag64 (uint16 index, uint64 flag) const
 
void ApplyModFlag64 (uint16 index, uint64 flag, bool apply)
 
void ClearUpdateMask (bool remove)
 
uint16 GetValuesCount () const
 
void SetIsNewObject (bool enable)
 
void BuildFieldsUpdate (Player *, UpdateDataMapType &) const
 
void SetFieldNotifyFlag (uint16 flag)
 
void RemoveFieldNotifyFlag (uint16 flag)
 
void ForceValuesUpdateAtIndex (uint32)
 
bool IsWorldObject () const
 
WorldObjectToWorldObject ()
 
WorldObject const * ToWorldObject () const
 
bool IsItem () const
 
ItemToItem ()
 
Item const * ToItem () const
 
bool IsPlayer () const
 
PlayerToPlayer ()
 
Player const * ToPlayer () const
 
bool IsCreature () const
 
CreatureToCreature ()
 
Creature const * ToCreature () const
 
bool IsUnit () const
 
UnitToUnit ()
 
Unit const * ToUnit () const
 
bool IsGameObject () const
 
GameObjectToGameObject ()
 
GameObject const * ToGameObject () const
 
bool IsCorpse () const
 
CorpseToCorpse ()
 
Corpse const * ToCorpse () const
 
bool IsDynObject () const
 
DynamicObjectToDynObject ()
 
DynamicObject const * ToDynObject () const
 
Trinity::unique_weak_ptr< ObjectGetWeakPtr () const
 
- Public Member Functions inherited from WorldLocation
 WorldLocation ()
 
 WorldLocation (uint32 _mapId, float x, float y, float z=0.0f, float o=0.0f)
 
 WorldLocation (uint32 mapId, Position const &position)
 
void WorldRelocate (WorldLocation const &loc)
 
void WorldRelocate (WorldLocation const *loc)
 
void WorldRelocate (uint32 mapId, Position const &pos)
 
void WorldRelocate (uint32 mapId=MAPID_INVALID, float x=0.f, float y=0.f, float z=0.f, float o=0.f)
 
WorldLocation GetWorldLocation () const
 
uint32 GetMapId () const
 
std::string GetDebugInfo () const
 
- Public Member Functions inherited from Position
 Position ()
 
 Position (float x, float y, float z=0.0f, float o=0.0f)
 
bool operator== (Position const &a) const
 
void Relocate (float x, float y)
 
void Relocate (float x, float y, float z)
 
void Relocate (float x, float y, float z, float o)
 
void Relocate (Position const &pos)
 
void Relocate (Position const *pos)
 
void RelocateOffset (Position const &offset)
 
void SetOrientation (float orientation)
 
float GetPositionX () const
 
float GetPositionY () const
 
float GetPositionZ () const
 
float GetOrientation () const
 
void GetPosition (float &x, float &y) const
 
void GetPosition (float &x, float &y, float &z) const
 
void GetPosition (float &x, float &y, float &z, float &o) const
 
Position GetPosition () const
 
Streamer< XY > PositionXYStream ()
 
ConstStreamer< XY > PositionXYStream () const
 
Streamer< XYZ > PositionXYZStream ()
 
ConstStreamer< XYZ > PositionXYZStream () const
 
Streamer< XYZO > PositionXYZOStream ()
 
ConstStreamer< XYZO > PositionXYZOStream () const
 
Streamer< PackedXYZ > PositionPackedXYZStream ()
 
ConstStreamer< PackedXYZ > PositionPackedXYZStream () const
 
bool IsPositionValid () const
 
float GetExactDist2dSq (const float x, const float y) const
 
float GetExactDist2dSq (Position const &pos) const
 
float GetExactDist2dSq (Position const *pos) const
 
float GetExactDist2d (const float x, const float y) const
 
float GetExactDist2d (Position const &pos) const
 
float GetExactDist2d (Position const *pos) const
 
float GetExactDistSq (float x, float y, float z) const
 
float GetExactDistSq (Position const &pos) const
 
float GetExactDistSq (Position const *pos) const
 
float GetExactDist (float x, float y, float z) const
 
float GetExactDist (Position const &pos) const
 
float GetExactDist (Position const *pos) const
 
void GetPositionOffsetTo (Position const &endPos, Position &retOffset) const
 
Position GetPositionWithOffset (Position const &offset) const
 
float GetAbsoluteAngle (float x, float y) const
 
float GetAbsoluteAngle (Position const &pos) const
 
float GetAbsoluteAngle (Position const *pos) const
 
float ToAbsoluteAngle (float relAngle) const
 
float ToRelativeAngle (float absAngle) const
 
float GetRelativeAngle (float x, float y) const
 
float GetRelativeAngle (Position const &pos) const
 
float GetRelativeAngle (Position const *pos) const
 
void GetSinCos (float x, float y, float &vsin, float &vcos) const
 
bool IsInDist2d (float x, float y, float dist) const
 
bool IsInDist2d (Position const *pos, float dist) const
 
bool IsInDist (float x, float y, float z, float dist) const
 
bool IsInDist (Position const &pos, float dist) const
 
bool IsInDist (Position const *pos, float dist) const
 
bool IsWithinBox (Position const &center, float xradius, float yradius, float zradius) const
 
bool IsWithinDoubleVerticalCylinder (Position const *center, float radius, float height) const
 
bool HasInArc (float arcangle, Position const *pos, float border=2.0f) const
 
bool HasInLine (Position const *pos, float objSize, float width) const
 
std::string ToString () const
 
- Public Member Functions inherited from GridObject< GameObject >
virtual ~GridObject ()
 
bool IsInGrid () const
 
void AddToGrid (GridRefManager< GameObject > &m)
 
void RemoveFromGrid ()
 

Private Member Functions

 Transport ()
 
void MoveToNextWaypoint ()
 
float CalculateSegmentPos (float perc)
 
bool TeleportTransport (uint32 newMapid, float x, float y, float z, float o)
 
void DelayedTeleportTransport ()
 
void UpdatePassengerPositions (PassengerSet &passengers)
 
void DoEventIfAny (KeyFrame const &node, bool departure)
 
bool IsMoving () const
 Helpers to know if stop frame was reached.
 
void SetMoving (bool val)
 

Private Attributes

TransportTemplate const * _transportInfo
 
KeyFrameVec::const_iterator _currentFrame
 
KeyFrameVec::const_iterator _nextFrame
 
TimeTracker _positionChangeTimer
 
bool _isMoving
 
bool _pendingStop
 
bool _triggeredArrivalEvent
 These are needed to properly control events triggering only once for each frame.
 
bool _triggeredDepartureEvent
 
PassengerSet _passengers
 
PassengerSet::iterator _passengerTeleportItr
 
PassengerSet _staticPassengers
 
bool _delayedAddModel
 
bool _delayedTeleport
 

Friends

TransportTransportMgr::CreateTransport (uint32, ObjectGuid::LowType, Map *)
 

Additional Inherited Members

- Static Public Member Functions inherited from GameObject
static bool DeleteFromDB (ObjectGuid::LowType spawnId)
 
static void SetGoArtKit (uint8 artkit, GameObject *go, ObjectGuid::LowType lowguid=0)
 
- Static Public Member Functions inherited from WorldObject
static bool InSamePhase (WorldObject const *a, WorldObject const *b)
 
static ReputationRank GetFactionReactionTo (FactionTemplateEntry const *factionTemplateEntry, WorldObject const *target)
 
- Static Public Member Functions inherited from Object
static ObjectGuid GetGUID (Object const *o)
 
static WorldObjectToWorldObject (Object *o)
 
static WorldObject const * ToWorldObject (Object const *o)
 
static ItemToItem (Object *o)
 
static Item const * ToItem (Object const *o)
 
static PlayerToPlayer (Object *o)
 
static Player const * ToPlayer (Object const *o)
 
static CreatureToCreature (Object *o)
 
static Creature const * ToCreature (Object const *o)
 
static UnitToUnit (Object *o)
 
static Unit const * ToUnit (Object const *o)
 
static GameObjectToGameObject (Object *o)
 
static GameObject const * ToGameObject (Object const *o)
 
static CorpseToCorpse (Object *o)
 
static Corpse const * ToCorpse (Object const *o)
 
static DynamicObjectToDynObject (Object *o)
 
static DynamicObject const * ToDynObject (Object const *o)
 
- Static Public Member Functions inherited from Position
static float NormalizeOrientation (float o)
 
- Public Attributes inherited from GameObject
Loot loot
 
uint32 m_groupLootTimer
 
ObjectGuid lootingGroupLowGUID
 
GameObjectModelm_model
 
- Public Attributes inherited from WorldObject
FlaggedValuesArray32< int32, uint32, StealthType, TOTAL_STEALTH_TYPESm_stealth
 
FlaggedValuesArray32< int32, uint32, StealthType, TOTAL_STEALTH_TYPESm_stealthDetect
 
FlaggedValuesArray32< int32, uint32, InvisibilityType, TOTAL_INVISIBILITY_TYPESm_invisibility
 
FlaggedValuesArray32< int32, uint32, InvisibilityType, TOTAL_INVISIBILITY_TYPESm_invisibilityDetect
 
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPESm_serverSideVisibility
 
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPESm_serverSideVisibilityDetect
 
uint32 LastUsedScriptID
 
MovementInfo m_movementInfo
 
EventProcessor m_Events
 
- Public Attributes inherited from WorldLocation
uint32 m_mapId
 
- Public Attributes inherited from Position
float m_positionX
 
float m_positionY
 
float m_positionZ
 
- Protected Types inherited from GameObject
typedef std::map< uint32, ObjectGuidChairSlotAndUser
 
- Protected Member Functions inherited from GameObject
void CreateModel ()
 
void UpdateModel ()
 
- Protected Member Functions inherited from WorldObject
 WorldObject (bool isWorldObject)
 
virtual void ProcessPositionDataChanged (PositionFullTerrainStatus const &data)
 
void SetLocationMapId (uint32 _mapId)
 
void SetLocationInstanceId (uint32 _instanceId)
 
virtual bool IsAlwaysDetectableFor (WorldObject const *) const
 
virtual void Heartbeat ()
 
- Protected Member Functions inherited from Object
 Object ()
 
void _InitValues ()
 
void _Create (ObjectGuid const &guid)
 
std::string _ConcatFields (uint16 startIndex, uint16 size) const
 
bool _LoadIntoDataField (std::string const &data, uint32 startOffset, uint32 count)
 
uint32 GetUpdateFieldData (Player const *target, uint32 *&flags) const
 
void BuildMovementUpdate (ByteBuffer *data, uint16 flags) const
 
void AddToObjectUpdateIfNeeded ()
 
- Protected Member Functions inherited from MapObject
 MapObject ()
 
- Protected Member Functions inherited from TransportBase
 TransportBase ()
 
virtual ~TransportBase ()
 
- Static Protected Member Functions inherited from TransportBase
static void CalculatePassengerPosition (float &x, float &y, float &z, float *o, float transX, float transY, float transZ, float transO)
 
static void CalculatePassengerOffset (float &x, float &y, float &z, float *o, float transX, float transY, float transZ, float transO)
 
- Protected Attributes inherited from GameObject
uint32 m_spellId
 
time_t m_respawnTime
 
uint32 m_respawnDelayTime
 
uint32 m_despawnDelay
 
Seconds m_despawnRespawnTime
 
LootState m_lootState
 
ObjectGuid m_lootStateUnitGUID
 
bool m_spawnedByDefault
 
time_t m_restockTime
 
time_t m_cooldownTime
 
GOState m_prevGoState
 
GuidSet m_SkillupList
 
ObjectGuid m_ritualOwnerGUID
 
GuidSet m_unique_users
 
uint32 m_usetimes
 
ChairSlotAndUser ChairListSlots
 
ObjectGuid::LowType m_spawnId
 For new or temporary gameobjects is 0 for saved it is lowguid.
 
GameObjectTemplate const * m_goInfo
 
GameObjectTemplateAddon const * m_goTemplateAddon
 
GameObjectData const * m_goData
 
GameObjectValue m_goValue
 
std::array< std::string const *, 3 > m_stringIds
 
Optional< std::string > m_scriptStringId
 
int64 m_packedRotation
 
QuaternionData m_localRotation
 
Position m_stationaryPosition
 
ObjectGuid m_lootRecipient
 
ObjectGuid m_lootRecipientGroup
 
uint16 m_LootMode
 
uint32 m_lootGenerationTime
 
ObjectGuid m_linkedTrap
 
- Protected Attributes inherited from WorldObject
std::string m_name
 
bool m_isActive
 
bool m_isFarVisible
 
Optional< float > m_visibilityDistanceOverride
 
bool const m_isStoredInWorldObjectGridContainer
 
ZoneScriptm_zoneScript
 
Transportm_transport
 
uint32 m_zoneId
 
uint32 m_areaId
 
float m_staticFloorZ
 
bool m_outdoors
 
ZLiquidStatus m_liquidStatus
 
- Protected Attributes inherited from Object
uint16 m_objectType
 
TypeID m_objectTypeId
 
uint16 m_updateFlag
 
union { 
 
   int32 *   m_int32Values 
 
   uint32 *   m_uint32Values 
 
   float *   m_floatValues 
 
};  
 
UpdateMask _changesMask
 
uint16 m_valuesCount
 
uint16 _fieldNotifyFlags
 
bool m_objectUpdated
 

Detailed Description

Definition at line 27 of file Transport.h.

Member Typedef Documentation

◆ PassengerSet

Definition at line 33 of file Transport.h.

Constructor & Destructor Documentation

◆ Transport()

Transport::Transport ( )
private

Definition at line 35 of file Transport.cpp.

◆ ~Transport()

Transport::~Transport ( )

Definition at line 43 of file Transport.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ AddPassenger()

void Transport::AddPassenger ( WorldObject passenger)

Definition at line 249 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildUpdate()

void Transport::BuildUpdate ( UpdateDataMapType data_map)
overridevirtual

Reimplemented from Object.

Definition at line 759 of file Transport.cpp.

+ Here is the call graph for this function:

◆ CalculatePassengerOffset()

void Transport::CalculatePassengerOffset ( float &  x,
float &  y,
float &  z,
float *  o = nullptr 
) const
inlineoverridevirtual

This method transforms supplied global coordinates into local offsets.

Implements TransportBase.

Definition at line 77 of file Transport.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalculatePassengerPosition()

void Transport::CalculatePassengerPosition ( float &  x,
float &  y,
float &  z,
float *  o = nullptr 
) const
inlineoverridevirtual

This method transforms supplied transport offsets into global coordinates.

Implements TransportBase.

Definition at line 71 of file Transport.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalculateSegmentPos()

float Transport::CalculateSegmentPos ( float  perc)
private

Definition at line 584 of file Transport.cpp.

+ Here is the caller graph for this function:

◆ CleanupsBeforeDelete()

void Transport::CleanupsBeforeDelete ( bool  finalCleanup = true)
overridevirtual

Reimplemented from GameObject.

Definition at line 109 of file Transport.cpp.

+ Here is the call graph for this function:

◆ Create()

bool Transport::Create ( ObjectGuid::LowType  guidlow,
uint32  entry,
uint32  mapid,
float  x,
float  y,
float  z,
float  ang,
uint32  animprogress 
)

Definition at line 49 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateGOPassenger()

GameObject * Transport::CreateGOPassenger ( ObjectGuid::LowType  guid,
GameObjectData const *  data 
)

Definition at line 347 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateNPCPassenger()

Creature * Transport::CreateNPCPassenger ( ObjectGuid::LowType  guid,
CreatureData const *  data 
)

@HACK - transport models are not added to map's dynamic LoS calculations because the current GameObjectModel cannot be moved without recreating

Definition at line 299 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DelayedTeleportTransport()

void Transport::DelayedTeleportTransport ( )
private

Definition at line 651 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DelayedUpdate()

void Transport::DelayedUpdate ( uint32  diff)

Definition at line 241 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoEventIfAny()

void Transport::DoEventIfAny ( KeyFrame const &  node,
bool  departure 
)
private

Definition at line 749 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnableMovement()

void Transport::EnableMovement ( bool  enabled)

Definition at line 564 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDebugInfo()

std::string Transport::GetDebugInfo ( ) const
overridevirtual

Reimplemented from GameObject.

Definition at line 771 of file Transport.cpp.

+ Here is the call graph for this function:

◆ GetKeyFrames()

KeyFrameVec const & Transport::GetKeyFrames ( ) const
inline

Definition at line 86 of file Transport.h.

+ Here is the caller graph for this function:

◆ GetPassengers()

PassengerSet const & Transport::GetPassengers ( ) const
inline

Definition at line 47 of file Transport.h.

◆ GetTimer()

uint32 Transport::GetTimer ( ) const
inline

Definition at line 84 of file Transport.h.

+ Here is the call graph for this function:

◆ GetTransportPeriod()

uint32 Transport::GetTransportPeriod ( ) const
inlineoverridevirtual

Reimplemented from GameObject.

Definition at line 82 of file Transport.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTransportTemplate()

TransportTemplate const * Transport::GetTransportTemplate ( ) const
inline

Definition at line 100 of file Transport.h.

◆ IsMoving()

bool Transport::IsMoving ( ) const
inlineprivate

Helpers to know if stop frame was reached.

Definition at line 113 of file Transport.h.

+ Here is the caller graph for this function:

◆ LoadStaticPassengers()

void Transport::LoadStaticPassengers ( )

Needed when transport moves from inactive to active grid.

Definition at line 533 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MoveToNextWaypoint()

void Transport::MoveToNextWaypoint ( )
private

Definition at line 572 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemovePassenger()

void Transport::RemovePassenger ( WorldObject passenger)

Definition at line 266 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetDelayedAddModelToMap()

void Transport::SetDelayedAddModelToMap ( )
inline

Definition at line 98 of file Transport.h.

◆ SetMoving()

void Transport::SetMoving ( bool  val)
inlineprivate

Definition at line 114 of file Transport.h.

+ Here is the caller graph for this function:

◆ SetPeriod()

void Transport::SetPeriod ( uint32  period)
inline

Definition at line 83 of file Transport.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SummonPassenger()

bool Transport::SummonPassenger ( uint32  entry,
Position const &  pos,
TempSummonType  summonType,
SummonPropertiesEntry const *  properties = nullptr,
uint32  duration = 0,
Unit summoner = nullptr,
uint32  spellId = 0,
uint32  vehId = 0 
)

Temporarily summons a creature as passenger on this transport.

Parameters
entryId of the creature from creature_template table
posInitial position of the creature (transport offsets)
summonType
properties
durationDetermines how long the creauture will exist in world depending on @summonType (in milliseconds)
summonerSummoner of the creature (for AI purposes)
spellId
vehIdIf set, this value overrides vehicle id from creature_template that the creature will use
Returns
Summoned creature.

@HACK - transport models are not added to map's dynamic LoS calculations because the current GameObjectModel cannot be moved without recreating

Definition at line 390 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TeleportTransport()

bool Transport::TeleportTransport ( uint32  newMapid,
float  x,
float  y,
float  z,
float  o 
)
private

Definition at line 615 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UnloadStaticPassengers()

void Transport::UnloadStaticPassengers ( )

Needed when transport enters inactive grid.

Definition at line 555 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Update()

void Transport::Update ( uint32  diff)
overridevirtual

Reimplemented from GameObject.

Definition at line 121 of file Transport.cpp.

+ Here is the call graph for this function:

◆ UpdatePassengerPositions()

void Transport::UpdatePassengerPositions ( PassengerSet passengers)
private

Definition at line 693 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdatePosition()

void Transport::UpdatePosition ( float  x,
float  y,
float  z,
float  o 
)

Definition at line 508 of file Transport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ TransportMgr::CreateTransport

Member Data Documentation

◆ _currentFrame

KeyFrameVec::const_iterator Transport::_currentFrame
private

Definition at line 118 of file Transport.h.

◆ _delayedAddModel

bool Transport::_delayedAddModel
private

Definition at line 132 of file Transport.h.

◆ _delayedTeleport

bool Transport::_delayedTeleport
private

Definition at line 133 of file Transport.h.

◆ _isMoving

bool Transport::_isMoving
private

Definition at line 121 of file Transport.h.

◆ _nextFrame

KeyFrameVec::const_iterator Transport::_nextFrame
private

Definition at line 119 of file Transport.h.

◆ _passengers

PassengerSet Transport::_passengers
private

Definition at line 128 of file Transport.h.

◆ _passengerTeleportItr

PassengerSet::iterator Transport::_passengerTeleportItr
private

Definition at line 129 of file Transport.h.

◆ _pendingStop

bool Transport::_pendingStop
private

Definition at line 122 of file Transport.h.

◆ _positionChangeTimer

TimeTracker Transport::_positionChangeTimer
private

Definition at line 120 of file Transport.h.

◆ _staticPassengers

PassengerSet Transport::_staticPassengers
private

Definition at line 130 of file Transport.h.

◆ _transportInfo

TransportTemplate const* Transport::_transportInfo
private

Definition at line 116 of file Transport.h.

◆ _triggeredArrivalEvent

bool Transport::_triggeredArrivalEvent
private

These are needed to properly control events triggering only once for each frame.

Definition at line 125 of file Transport.h.

◆ _triggeredDepartureEvent

bool Transport::_triggeredDepartureEvent
private

Definition at line 126 of file Transport.h.


The documentation for this class was generated from the following files: