feat(gameobject): allow gameobjects to loot money + align table with TC (#1368)

This commit is contained in:
Francesco Borzì
2019-01-28 20:24:43 +01:00
committed by GitHub
parent 1905c36353
commit 38b368e909
8 changed files with 146 additions and 18 deletions

View File

@@ -532,8 +532,19 @@ struct GameObjectTemplate
}
};
// From `gameobject_template_addon`
struct GameObjectTemplateAddon
{
uint32 entry;
uint32 faction;
uint32 flags;
uint32 mingold;
uint32 maxgold;
};
// Benchmarked: Faster than std::map (insert/find)
typedef UNORDERED_MAP<uint32, GameObjectTemplate> GameObjectTemplateContainer;
typedef UNORDERED_MAP<uint32, GameObjectTemplateAddon> GameObjectTemplateAddonContainer;
class OPvPCapturePoint;
struct TransportAnimation;
@@ -646,6 +657,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Mov
virtual bool Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMask, float x, float y, float z, float ang, G3D::Quat const& rotation, uint32 animprogress, GOState go_state, uint32 artKit = 0);
void Update(uint32 p_time);
GameObjectTemplate const* GetGOInfo() const { return m_goInfo; }
GameObjectTemplateAddon const* GetTemplateAddon() const;
GameObjectData const* GetGOData() const { return m_goData; }
GameObjectValue const* GetGOValue() const { return &m_goValue; }