diff options
Diffstat (limited to 'src/game/GameObject.h')
-rw-r--r-- | src/game/GameObject.h | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/src/game/GameObject.h b/src/game/GameObject.h index afeaba98cc9..8269487240c 100644 --- a/src/game/GameObject.h +++ b/src/game/GameObject.h @@ -336,12 +336,12 @@ struct GameObjectInfo uint32 mapID; //0 uint32 difficulty; //1 } dungeonDifficulty; - //32 GAMEOBJECT_TYPE_DO_NOT_USE_YET + //32 GAMEOBJECT_TYPE_BARBER_CHAIR struct { - uint32 mapID; //0 - uint32 difficulty; //1 - } doNotUseYet; + uint32 chairheight; //0 + uint32 heightOffset; //1 + } barberChair; //33 GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING struct { @@ -350,6 +350,13 @@ struct GameObjectInfo uint32 state1Name; //2 uint32 state2Name; //3 } destructibleBuilding; + //34 GAMEOBJECT_TYPE_TRAPDOOR + struct + { + uint32 whenToPause; // 0 + uint32 startOpen; // 1 + uint32 autoClose; // 2 + } trapDoor; // not use for specific field access (only for output with loop by all filed), also this determinate max union size struct // GAMEOBJECT_TYPE_SPELLCASTER @@ -370,7 +377,8 @@ struct GameObjectLocale struct GameObjectData { uint32 id; // entry in gamobject_template - uint32 mapid; + uint16 mapid; + uint16 phaseMask; float posX; float posY; float posZ; @@ -419,7 +427,7 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject void AddToWorld(); void RemoveFromWorld(); - 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, uint32 go_state, uint32 ArtKit = 0); + bool Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, uint32 go_state, uint32 ArtKit = 0); void Update(uint32 p_time); static GameObject* GetGameObject(WorldObject& object, uint64 guid); GameObjectInfo const* GetGOInfo() const; @@ -449,7 +457,7 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject const char* GetNameForLocaleIdx(int32 locale_idx) const; void SaveToDB(); - void SaveToDB(uint32 mapid, uint8 spawnMask); + void SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask); bool LoadFromDB(uint32 guid, Map *map); void DeleteFromDB(); void SetLootState(LootState s) { m_lootState = s; } @@ -504,14 +512,14 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject void SetSpellId(uint32 id) { m_spellId = id;} uint32 GetSpellId() const { return m_spellId;} void getFishLoot(Loot *loot); - GameobjectTypes GetGoType() const { return GameobjectTypes(GetUInt32Value(GAMEOBJECT_TYPE_ID)); } - void SetGoType(GameobjectTypes type) { SetUInt32Value(GAMEOBJECT_TYPE_ID, type); } - uint32 GetGoState() const { return GetUInt32Value(GAMEOBJECT_STATE); } - void SetGoState(uint32 state) { SetUInt32Value(GAMEOBJECT_STATE, state); } - uint32 GetGoArtKit() const { return GetUInt32Value(GAMEOBJECT_ARTKIT); } - void SetGoArtKit(uint32 artkit); - uint32 GetGoAnimProgress() const { return GetUInt32Value(GAMEOBJECT_ANIMPROGRESS); } - void SetGoAnimProgress(uint32 animprogress) { SetUInt32Value(GAMEOBJECT_ANIMPROGRESS, animprogress); } + GameobjectTypes GetGoType() const { return GameobjectTypes(GetByteValue(GAMEOBJECT_BYTES_1, 1)); } + void SetGoType(GameobjectTypes type) { SetByteValue(GAMEOBJECT_BYTES_1, 1, type); } + uint8 GetGoState() const { return GetByteValue(GAMEOBJECT_BYTES_1, 0); } + void SetGoState(uint8 state) { SetByteValue(GAMEOBJECT_BYTES_1, 0, state); } + uint8 GetGoArtKit() const { return GetByteValue(GAMEOBJECT_BYTES_1, 2); } + void SetGoArtKit(uint8 artkit); + uint8 GetGoAnimProgress() const { return GetByteValue(GAMEOBJECT_BYTES_1, 3); } + void SetGoAnimProgress(uint8 animprogress) { SetByteValue(GAMEOBJECT_BYTES_1, 3, animprogress); } void Use(Unit* user); |