feat(Core): move achievement manager and criteria progress getters to public (#14387)

This commit is contained in:
Axel Cocat 2022-12-29 13:41:47 +01:00 committed by GitHub
parent 64be224683
commit a104f397d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -299,11 +299,12 @@ public:
void RemoveTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry); // used for quest and scripted timed achievements
void RemoveCriteriaProgress(AchievementCriteriaEntry const* entry);
CriteriaProgress* GetCriteriaProgress(AchievementCriteriaEntry const* entry);
private:
enum ProgressType { PROGRESS_SET, PROGRESS_ACCUMULATE, PROGRESS_HIGHEST, PROGRESS_RESET };
void SendAchievementEarned(AchievementEntry const* achievement) 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 CompletedCriteriaFor(AchievementEntry const* achievement);
bool IsCompletedCriteria(AchievementCriteriaEntry const* achievementCriteria, AchievementEntry const* achievement);

View file

@ -2482,6 +2482,7 @@ public:
void StartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry, uint32 timeLost = 0);
void RemoveTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry);
void CompletedAchievement(AchievementEntry const* entry);
[[nodiscard]] AchievementMgr* GetAchievementMgr() const { return m_achievementMgr; }
[[nodiscard]] bool HasTitle(uint32 bitIndex) const;
bool HasTitle(CharTitlesEntry const* title) const { return HasTitle(title->bit_index); }
@ -2852,8 +2853,6 @@ public:
bool m_needZoneUpdate;
[[nodiscard]] AchievementMgr* GetAchievementMgr() const { return m_achievementMgr; }
private:
// 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;