Implement CDZoneTable PlayerLoseCoinsOnDeath (#251)

* Implement ZoneTable PlayerLoseCoinsOnDeath

- Adds a check on death if the character should drop coins in the current zone

* Refactored PlayerLoseCoinOnDeath into dZoneManager

* Coin death drops use LootGenerator

* Refactored again with use of CDZoneTableTable

* Remove duplicate CDZone call during initialization
This commit is contained in:
cooltrain7
2022-02-05 12:27:24 +00:00
committed by GitHub
parent f7009b499b
commit 579cf590b4
3 changed files with 35 additions and 29 deletions

View File

@@ -42,6 +42,7 @@ public:
std::vector<Spawner*> GetSpawnersInGroup(std::string group);
void Update(float deltaTime);
Entity* GetZoneControlObject() { return m_ZoneControlObject; }
bool GetPlayerLoseCoinOnDeath() { return m_PlayerLoseCoinsOnDeath; }
private:
/**
@@ -57,6 +58,7 @@ private:
static dZoneManager* m_Address; //Singleton
Zone* m_pZone;
LWOZONEID m_ZoneID;
bool m_PlayerLoseCoinsOnDeath; //Do players drop coins in this zone when smashed
std::map<LWOOBJID, Spawner*> m_Spawners;
Entity* m_ZoneControlObject;