fix(Scripts/ZulAman): Store chest count in DB (#21160)

This commit is contained in:
Andrew
2025-01-14 07:12:15 -03:00
committed by GitHub
parent 29f9187882
commit c16af59b5f
2 changed files with 9 additions and 5 deletions

View File

@@ -112,7 +112,6 @@ public:
LoadBossBoundaries(boundaries);
LoadDoorData(doorData);
LoadSummonData(summonData);
_chestLooted = 0;
for (uint8 i = 0; i < RAND_VENDOR; ++i)
RandVendor[i] = NOT_STARTED;
@@ -211,7 +210,10 @@ public:
_akilzonGauntlet = DONE;
}
else if (type == DATA_CHEST_LOOTED)
++_chestLooted;
{
uint8 chestCount = GetPersistentData(DATA_CHEST_COUNT);
StorePersistentData(DATA_CHEST_COUNT, ++chestCount);
}
}
void StartAkilzonGauntlet()
@@ -337,7 +339,7 @@ public:
else if (type == TYPE_AKILZON_GAUNTLET)
return _akilzonGauntlet;
else if (type == DATA_CHEST_LOOTED)
return _chestLooted;
return GetPersistentData(DATA_CHEST_COUNT);
return 0;
}
@@ -348,7 +350,6 @@ public:
}
private:
uint16 _chestLooted;
uint32 RandVendor[RAND_VENDOR];
GuidSet AkilzonTrash;
EncounterState _akilzonGauntlet = NOT_STARTED;

View File

@@ -90,14 +90,17 @@ enum GameobjectIds
enum MiscIds
{
// Persistent data
DATA_TIMED_RUN = 0,
DATA_CHEST_COUNT = 1,
ACTION_START_TIMED_RUN = 0,
ACTION_START_AKILZON_GAUNTLET = 1,
ACTION_RESET_AKILZON_GAUNTLET = 2,
GROUP_TIMED_RUN = 1
};
uint32 constexpr PersistentDataCount = 1;
uint32 constexpr PersistentDataCount = 2;
template <class AI, class T>
inline AI* GetZulAmanAI(T* obj)