6#ifndef SKYFIRESERVER_GAMEOBJECT_H
7#define SKYFIRESERVER_GAMEOBJECT_H
20#define MAX_GAMEOBJECT_QUEST_ITEMS 6
399 default:
return false;
411 default:
return false;
444 default:
return true;
626#define FISHING_BOBBER_READY_TIME 5
640 bool Create(
uint32 guidlow,
uint32 name_id,
Map* map,
float x,
float y,
float z,
float ang,
float rotation0,
float rotation1,
float rotation2,
float rotation3,
uint32 animprogress,
GOState go_state,
uint32 artKit = 0);
692 time_t now = time(NULL);
757 if (*i == PlayerGuidLow)
797 return owner->getLevelForTarget(target);
806 bool IsInRange(
float x,
float y,
float z,
float radius)
const;
890 return IsInRange(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), dist2compare);
std::vector< std::string > StringVector
static constexpr LootState GO_READY
static constexpr GOState GO_STATE_ACTIVE_ALTERNATIVE
static constexpr LootState GO_NOT_READY
static constexpr LootState GO_JUST_DEACTIVATED
static constexpr GOState GO_STATE_ACTIVE
static constexpr GOState GO_STATE_READY
static constexpr LootState GO_ACTIVATED
UNORDERED_MAP< uint32, GameObjectTemplate > GameObjectTemplateContainer
#define MAX_GAMEOBJECT_QUEST_ITEMS
@ GO_STATE_TRANSPORT_ACTIVE
@ GO_STATE_PREPARE_TRANSPORT
@ GO_STATE_TRANSPORT_STOPPED
bool IS_MO_TRANSPORT_GUID(uint64 guid)
bool IS_PLAYER_GUID(uint64 guid)
@ GAMEOBJECT_TYPE_SPELL_FOCUS
@ GAMEOBJECT_TYPE_MO_TRANSPORT
@ GAMEOBJECT_TYPE_TRANSPORT
@ GAMEOBJECT_TYPE_FISHINGHOLE
@ GAMEOBJECT_TYPE_FLAGDROP
@ GAMEOBJECT_TYPE_QUESTGIVER
@ GAMEOBJECT_TYPE_SPELLCASTER
@ GAMEOBJECT_TYPE_FLAGSTAND
@ GAMEOBJECT_TYPE_AREADAMAGE
@ GAMEOBJECT_TYPE_GUARDPOST
#define MAX_GAMEOBJECT_DATA
GameObjectDestructibleState
@ GO_DESTRUCTIBLE_DESTROYED
@ GO_DESTRUCTIBLE_DAMAGED
@ GAMEOBJECT_FIELD_PERCENT_HEALTH
@ GAMEOBJECT_FIELD_DISPLAY_ID
@ GAMEOBJECT_FIELD_CREATED_BY
@ GAMEOBJECT_FIELD_STATE_SPELL_VISUAL_ID
std::vector< uint32 > m_transportPauseTimes
uint32 GetRespawnDelay() const
void SetGoState(GOState state)
void UpdateLegacyTransportPathProgress()
GameObjectValue m_goValue
std::string const & GetNameForLocaleIdx(LocaleConstant locale_idx) const OVERRIDE
void AddLootMode(uint16 lootMode)
GameObjectTemplate const * GetGOInfo() const
uint32 GetTransportPathProgress() const
uint32 GetDBTableGUIDLow() const
GOState GetGoState() const
void RemoveFromWorld() OVERRIDE
void SetGoArtKit(uint8 artkit)
GameObjectData const * m_goData
LootState getLootState() const
uint32 GetSpellId() const
bool IsAlwaysVisibleFor(WorldObject const *seer) const OVERRIDE
void SetOwnerGUID(uint64 owner)
uint8 GetGoAnimProgress() const
uint64 GetOwnerGUID() const
Position m_stationaryPosition
float GetStationaryY() const OVERRIDE
bool IsInvisibleDueToDespawn() const OVERRIDE
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=NULL)
bool hasInvolvedQuest(uint32 quest_id) const OVERRIDE
void UpdateWorldRotationField()
Group * GetLootRecipientGroup() const
uint32 GetUniqueUseCount() const
void UpdateRotationFields(float rotation2=0.0f, float rotation3=0.0f)
void SetGameobjectTransparence(uint8 transparency)
void EnableCollision(bool enable)
uint8 GetGoArtKit() const
void SetGoAnimProgress(uint8 animprogress)
uint32 m_DBTableGuid
For new or temporary gameobjects is 0 for saved it is lowguid.
void AddToSkillupList(uint32 PlayerGuidLow)
void InitializeLegacyTransport()
bool isSpawnedByDefault() const
ChairSlotAndUser ChairListSlots
uint32 GetTransportPeriod() const
bool HasLootMode(uint16 lootMode) const
void MarkLegacyTransportPathProgressChanged()
GameObjectData const * GetGOData() const
GameObjectValue const * GetGOValue() const
Player * GetLootRecipient() const
GameObjectModel * CreateModel()
bool _IsWithinDist(WorldObject const *obj, float dist2compare, bool) const OVERRIDE
Object distance/size - overridden from Object::_IsWithinDist. Needs to take in account proper GO size...
time_t GetRespawnTime() const
bool Create(uint32 guidlow, uint32 name_id, Map *map, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state, uint32 artKit=0)
bool HasLootRecipient() const
void CleanupsBeforeDelete(bool finalCleanup=true) OVERRIDE
uint32 m_respawnDelayTime
GameObjectAI * AI() const
void SetLegacyTransportTravelTime(uint32 travelTime)
void SetLegacyTransportStopped(bool stopped)
bool IsInRange(float x, float y, float z, float radius) const
void RemoveLootMode(uint16 lootMode)
static GameObject * GetGameObject(WorldObject &object, uint64 guid)
void SetRespawnTime(int32 respawn)
void SetSpawnedByDefault(bool b)
void TriggeringLinkedGameObject(uint32 trapEntry, Unit *target)
GameobjectTypes GetGoType() const
Transport const * ToTransport() const
void SetGoType(GameobjectTypes type)
void StartLegacyTransportToFirstStop(uint32 travelTime)
bool LoadGameObjectFromDB(uint32 guid, Map *map, bool addToMap=true)
bool ActivateToQuest(Player *target) const
void SetTransportPathProgress(uint32 pathProgress)
void AddToWorld() OVERRIDE
void StopLegacyTransportAtInitialStop()
void SetPhaseMask(uint32 newPhaseMask, bool update) OVERRIDE
uint8 getLevelForTarget(WorldObject const *target) const OVERRIDE
void HandleLegacyTransportStateChange(GOState oldState, GOState newState)
void SaveRespawnTime() OVERRIDE
void SendCustomAnim(uint32 anim)
time_t GetRespawnTimeEx() const
void SetLootRecipient(Unit *unit)
uint32 GetDisplayId() const
GameObjectModel * m_model
void EventInform(uint32 eventId)
virtual uint32 GetScriptId() const
void UpdateModelPosition()
bool SetPhased(uint32 id, bool update, bool apply) OVERRIDE
void Update(uint32 p_time) OVERRIDE
float GetStationaryZ() const OVERRIDE
void SetLootMode(uint16 lootMode)
GameObject * LookupFishingHoleAround(float range)
void BuildValuesUpdate(uint8 updatetype, ByteBuffer *data, Player *target) const OVERRIDE
uint32 GetUseCount() const
uint64 GetRotation() const
void SetDisplayId(uint32 displayid)
GameObjectTemplate const * m_goInfo
uint32 GetGOStateValue(GOState state)
std::string GetAIName() const
void SetLootState(LootState s, Unit *unit=NULL)
float GetStationaryO() const OVERRIDE
bool LoadFromDB(uint32 guid, Map *map)
void StopLegacyTransportAtCurrentProgress()
void SetDestructibleState(GameObjectDestructibleState state, Player *eventInvoker=NULL, bool setHealth=false)
bool IsDynTransport() const
void SwitchDoorOrButton(bool activate, bool alternative=false)
uint32 m_lootRecipientGroup
bool IsDestructibleBuilding() const
std::list< uint32 > m_SkillupList
void CastSpell(Unit *target, uint32 spell)
void ModifyHealth(int32 change, Unit *attackerOrHealer=NULL, uint32 spellId=0)
uint16 GetLootMode() const
std::set< uint64 > m_unique_users
void getFishLoot(Loot *loot, Player *loot_owner)
Transport * ToTransport()
uint32 lootingGroupLowGUID
void SetGoHealth(uint8 health)
void GetRespawnPosition(float &x, float &y, float &z, float *ori=NULL) const
uint32 GetLegacyTransportTargetProgress(GOState state) const
GameObjectDestructibleState GetDestructibleState() const
bool IsLootAllowedFor(Player const *player) const
void AddUniqueUse(Player *player)
bool hasQuest(uint32 quest_id) const OVERRIDE
bool IsInSkillupList(uint32 PlayerGuidLow) const
float GetStationaryX() const OVERRIDE
void SetSpellId(uint32 id)
std::vector< uint32 > const * GetPauseTimes() const
std::map< uint32, uint64 > ChairSlotAndUser
uint8 GetByteValue(uint16 index, uint8 offset) const
void SetByteValue(uint16 index, uint8 offset, uint8 value)
uint32 GetUInt32Value(uint16 index) const
uint64 GetUInt64Value(uint16 index) const
bool HasFlag(uint16 index, uint32 flag) const
void SetUInt64Value(uint16 index, uint64 value)
WorldObject(bool isWorldObject)
StringVector CastBarCaption
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@114312050106372302366137106154036240136321221160 barberChair
uint32 questItems[MAX_GAMEOBJECT_QUEST_ITEMS]
uint32 GetAutoCloseTime() const
uint32 data[MAX_GAMEOBJECT_DATA]
uint32 debuildingTimeSecs
uint32 GetGossipMenuId() const
bool IsUsableMounted() const
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@076042223047135343272115231235004103107103052206 raw
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@305170115206217123075252230002031012374050120223 _generic
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@253305212064111242104116123236360243075266147175 flagstand
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@152130076372303155010023156377005036224346144151 camera
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@154136051106040324176270267211357174344063050360 chest
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@006357112111137007236202170023313137143054376130 meetingstone
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@133216107201365043142154201341232071301300107152 transport
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@123226111052016276351151304242210263221014374335 miniGame
bool IsDespawnAtAction() const
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@320106322155335070244355001342376316375133154215 guardpost
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@076241013146174060203322361030304357327036335177 spellFocus
uint32 GetCharges() const
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@155125343144143170177322306114162367114353163373 capturePoint
uint32 GetEventScriptId() const
uint32 GetCooldown() const
bool GetDespawnPossibility() const
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@334327144355150311317234223372371064337023010042 trap
uint32 GetLinkedGameObjectEntry() const
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@105243172300324111262263021120111346345123061033 summoningRitual
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@316034272062200025205312222263007157266267301257 chair
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@243266127071011160240350104214013054067132104252 fishinghole
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@372164005374162031007145203130116023353076041117 text
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@110054372326320106132141070072073073207136033072 areadamage
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@355120113310341064010230330064160137211072063155 auraGenerator
uint32 creditProxyCreature
uint32 casterTargetSpellTargets
uint32 ritualNoTargetCheck
std::string castBarCaption
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@315077355127077256043020131262337362171234125061 spellcaster
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@041347154150020206261150105351300331163012356113 flagdrop
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@030154355127376377116310314155367165157323234200 door
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@373071171166305347132053276077134300330265313251 trapDoor
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@051373074222356223242007054322075203035261000330 dungeonDifficulty
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@240010171105306235035040051230330371375266145364 building
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@316212233253022127367165230227137227160036113140 moTransport
uint32 destroyedDisplayId
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@336001126101306307066053364273045317014372227110 questgiver
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@336060043160212225074214221232260020127013174055 goober
uint32 WorldStateSetsState
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@035305233304037036156142147071371001131016202245 button
float GetPositionZ() const
float GetOrientation() const
float GetPositionX() const
float GetPositionY() const
OPvPCapturePoint * OPvPObj
struct GameObjectValue::@066256034265023241167237377333252073230363372212 Building
uint32 StateChangeProgress
struct GameObjectValue::@350066061234367104023065253003102330370272142167 FishingHole
TransportAnimation const * AnimationInfo
struct GameObjectValue::@025075162376101103170270322056027246243136234264 CapturePoint
uint32 StateChangeEndTime