mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 16:43:47 +00:00
feat(Core): move achievement manager and criteria progress getters to public (#14387)
This commit is contained in:
@@ -299,11 +299,12 @@ public:
|
|||||||
void RemoveTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry); // used for quest and scripted timed achievements
|
void RemoveTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry); // used for quest and scripted timed achievements
|
||||||
|
|
||||||
void RemoveCriteriaProgress(AchievementCriteriaEntry const* entry);
|
void RemoveCriteriaProgress(AchievementCriteriaEntry const* entry);
|
||||||
|
CriteriaProgress* GetCriteriaProgress(AchievementCriteriaEntry const* entry);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum ProgressType { PROGRESS_SET, PROGRESS_ACCUMULATE, PROGRESS_HIGHEST, PROGRESS_RESET };
|
enum ProgressType { PROGRESS_SET, PROGRESS_ACCUMULATE, PROGRESS_HIGHEST, PROGRESS_RESET };
|
||||||
void SendAchievementEarned(AchievementEntry const* achievement) const;
|
void SendAchievementEarned(AchievementEntry const* achievement) const;
|
||||||
void SendCriteriaUpdate(AchievementCriteriaEntry const* entry, CriteriaProgress const* progress, uint32 timeElapsed, bool timedCompleted) const;
|
void SendCriteriaUpdate(AchievementCriteriaEntry const* entry, CriteriaProgress const* progress, uint32 timeElapsed, bool timedCompleted) const;
|
||||||
CriteriaProgress* GetCriteriaProgress(AchievementCriteriaEntry const* entry);
|
|
||||||
void SetCriteriaProgress(AchievementCriteriaEntry const* entry, uint32 changeValue, ProgressType ptype = PROGRESS_SET);
|
void SetCriteriaProgress(AchievementCriteriaEntry const* entry, uint32 changeValue, ProgressType ptype = PROGRESS_SET);
|
||||||
void CompletedCriteriaFor(AchievementEntry const* achievement);
|
void CompletedCriteriaFor(AchievementEntry const* achievement);
|
||||||
bool IsCompletedCriteria(AchievementCriteriaEntry const* achievementCriteria, AchievementEntry const* achievement);
|
bool IsCompletedCriteria(AchievementCriteriaEntry const* achievementCriteria, AchievementEntry const* achievement);
|
||||||
|
|||||||
@@ -2482,6 +2482,7 @@ public:
|
|||||||
void StartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry, uint32 timeLost = 0);
|
void StartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry, uint32 timeLost = 0);
|
||||||
void RemoveTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry);
|
void RemoveTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry);
|
||||||
void CompletedAchievement(AchievementEntry const* entry);
|
void CompletedAchievement(AchievementEntry const* entry);
|
||||||
|
[[nodiscard]] AchievementMgr* GetAchievementMgr() const { return m_achievementMgr; }
|
||||||
|
|
||||||
[[nodiscard]] bool HasTitle(uint32 bitIndex) const;
|
[[nodiscard]] bool HasTitle(uint32 bitIndex) const;
|
||||||
bool HasTitle(CharTitlesEntry const* title) const { return HasTitle(title->bit_index); }
|
bool HasTitle(CharTitlesEntry const* title) const { return HasTitle(title->bit_index); }
|
||||||
@@ -2852,8 +2853,6 @@ public:
|
|||||||
|
|
||||||
bool m_needZoneUpdate;
|
bool m_needZoneUpdate;
|
||||||
|
|
||||||
[[nodiscard]] AchievementMgr* GetAchievementMgr() const { return m_achievementMgr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// internal common parts for CanStore/StoreItem functions
|
// internal common parts for CanStore/StoreItem functions
|
||||||
InventoryResult CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVec& dest, ItemTemplate const* pProto, uint32& count, bool swap, Item* pSrcItem) const;
|
InventoryResult CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVec& dest, ItemTemplate const* pProto, uint32& count, bool swap, Item* pSrcItem) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user