AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
AchievementMgr.h File Reference
#include "Common.h"
#include "DBCEnums.h"
#include "DBCStores.h"
#include "DatabaseEnv.h"
#include "ObjectGuid.h"
#include <chrono>
#include <map>
#include <string>

Go to the source code of this file.

Classes

struct  AchievementOfflinePlayerUpdate
 
struct  CriteriaProgress
 
struct  AchievementCriteriaData
 
struct  AchievementCriteriaDataSet
 
struct  AchievementReward
 
struct  AchievementRewardLocale
 
struct  CompletedAchievementData
 
class  AchievementMgr
 
class  AchievementGlobalMgr
 

Macros

#define MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE   26
 
#define sAchievementMgr   AchievementGlobalMgr::instance()
 

Typedefs

typedef std::list< AchievementCriteriaEntry const * > AchievementCriteriaEntryList
 
typedef std::list< AchievementEntry const * > AchievementEntryList
 
typedef std::unordered_map< uint32, AchievementCriteriaEntryListAchievementCriteriaListByAchievement
 
typedef std::map< uint32, AchievementEntryListAchievementListByReferencedId
 
typedef std::map< uint32, AchievementCriteriaDataSetAchievementCriteriaDataMap
 
typedef std::map< uint32, AchievementRewardAchievementRewards
 
typedef std::map< uint32, AchievementRewardLocaleAchievementRewardLocales
 
typedef std::unordered_map< uint32, CriteriaProgressCriteriaProgressMap
 
typedef std::unordered_map< uint32, CompletedAchievementDataCompletedAchievementMap
 

Enumerations

enum  AchievementOfflinePlayerUpdateType {
  ACHIEVEMENT_OFFLINE_PLAYER_UPDATE_TYPE_COMPLETE_ACHIEVEMENT = 1 ,
  ACHIEVEMENT_OFFLINE_PLAYER_UPDATE_TYPE_UPDATE_CRITERIA = 2
}
 
enum  AchievementCriteriaDataType {
  ACHIEVEMENT_CRITERIA_DATA_TYPE_NONE = 0 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_T_CREATURE = 1 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE = 2 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_LESS_HEALTH = 3 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD = 4 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA = 5 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA = 6 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA = 7 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE = 8 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL = 9 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER = 10 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT = 11 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY = 12 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT = 13 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM = 14 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK = 15 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY = 16 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_LOSS_TEAM_SCORE = 17 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_INSTANCE_SCRIPT = 18 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM = 19 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_ID = 20 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE = 21 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_NTH_BIRTHDAY = 22 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_S_KNOWN_TITLE = 23 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_TEAMS_SCORES = 24 ,
  ACHIEVEMENT_CRITERIA_DATA_TYPE_S_ITEM_QUALITY = 25
}
 
enum  AchievementCommonCategories {
  ACHIEVEMENT_CATEOGRY_GENERAL = -1 ,
  ACHIEVEMENT_CATEGORY_STATISTICS = 1
}
 

Macro Definition Documentation

◆ MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE

#define MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE   26

◆ sAchievementMgr

#define sAchievementMgr   AchievementGlobalMgr::instance()

Typedef Documentation

◆ AchievementCriteriaDataMap

◆ AchievementCriteriaEntryList

◆ AchievementCriteriaListByAchievement

◆ AchievementEntryList

typedef std::list<AchievementEntry const*> AchievementEntryList

◆ AchievementListByReferencedId

◆ AchievementRewardLocales

◆ AchievementRewards

◆ CompletedAchievementMap

◆ CriteriaProgressMap

typedef std::unordered_map<uint32, CriteriaProgress> CriteriaProgressMap

Enumeration Type Documentation

◆ AchievementCommonCategories

Enumerator
ACHIEVEMENT_CATEOGRY_GENERAL 
ACHIEVEMENT_CATEGORY_STATISTICS 
90{
93};
@ ACHIEVEMENT_CATEGORY_STATISTICS
Definition: AchievementMgr.h:92
@ ACHIEVEMENT_CATEOGRY_GENERAL
Definition: AchievementMgr.h:91

◆ AchievementCriteriaDataType

Enumerator
ACHIEVEMENT_CRITERIA_DATA_TYPE_NONE 
ACHIEVEMENT_CRITERIA_DATA_TYPE_T_CREATURE 
ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE 
ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_LESS_HEALTH 
ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD 
ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA 
ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA 
ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA 
ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE 
ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL 
ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER 
ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT 
ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY 
ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT 
ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM 
ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK 
ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY 
ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_LOSS_TEAM_SCORE 
ACHIEVEMENT_CRITERIA_DATA_TYPE_INSTANCE_SCRIPT 
ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM 
ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_ID 
ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE 
ACHIEVEMENT_CRITERIA_DATA_TYPE_NTH_BIRTHDAY 
ACHIEVEMENT_CRITERIA_DATA_TYPE_S_KNOWN_TITLE 
ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_TEAMS_SCORES 
ACHIEVEMENT_CRITERIA_DATA_TYPE_S_ITEM_QUALITY 
58{
59 // value1 value2 comment
64 ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD = 4, // own_team 0 not corpse (not released body), own_team == false if enemy team expected
65 ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA = 5, // spell_id effect_idx
67 ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA = 7, // spell_id effect_idx
68 ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE = 8, // minvalue value provided with achievement update must be not less that limit
69 ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL = 9, // minlevel minlevel of target
70 ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER = 10, // gender 0=male; 1=female
71 ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT = 11, // scripted requirement
72 ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY = 12, // difficulty normal/heroic difficulty for current event map
73 ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT = 13, // count "with less than %u people in the zone"
74 ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM = 14, // team HORDE(67), ALLIANCE(469)
75 ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK = 15, // drunken_state 0 (enum DrunkenState) of player
76 ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY = 16, // holiday_id 0 event in holiday time
77 ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_LOSS_TEAM_SCORE = 17, // min_score max_score player's team win bg and opposition team have team score in range
78 ACHIEVEMENT_CRITERIA_DATA_TYPE_INSTANCE_SCRIPT = 18, // 0 0 maker instance script call for check current criteria requirements fit
79 ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM = 19, // item_level item_quality for equipped item in slot to check item level and quality
80 ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_ID = 20, // map_id 0 player must be on map with id in map_id
82 ACHIEVEMENT_CRITERIA_DATA_TYPE_NTH_BIRTHDAY = 22, // N login on day of N-th Birthday
83 ACHIEVEMENT_CRITERIA_DATA_TYPE_S_KNOWN_TITLE = 23, // title_id known (pvp) title, values from dbc
84 ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_TEAMS_SCORES = 24, // winner_score loser score player's team win bg and their teams have exact scores
86};
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_NTH_BIRTHDAY
Definition: AchievementMgr.h:82
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT
Definition: AchievementMgr.h:71
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT
Definition: AchievementMgr.h:73
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER
Definition: AchievementMgr.h:70
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_S_KNOWN_TITLE
Definition: AchievementMgr.h:83
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA
Definition: AchievementMgr.h:66
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE
Definition: AchievementMgr.h:62
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE
Definition: AchievementMgr.h:68
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY
Definition: AchievementMgr.h:72
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM
Definition: AchievementMgr.h:79
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK
Definition: AchievementMgr.h:75
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_ID
Definition: AchievementMgr.h:80
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA
Definition: AchievementMgr.h:65
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY
Definition: AchievementMgr.h:76
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA
Definition: AchievementMgr.h:67
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE
Definition: AchievementMgr.h:81
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_LOSS_TEAM_SCORE
Definition: AchievementMgr.h:77
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL
Definition: AchievementMgr.h:69
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_CREATURE
Definition: AchievementMgr.h:61
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_LESS_HEALTH
Definition: AchievementMgr.h:63
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM
Definition: AchievementMgr.h:74
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_INSTANCE_SCRIPT
Definition: AchievementMgr.h:78
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD
Definition: AchievementMgr.h:64
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_NONE
Definition: AchievementMgr.h:60
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_S_ITEM_QUALITY
Definition: AchievementMgr.h:85
@ ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_TEAMS_SCORES
Definition: AchievementMgr.h:84

◆ AchievementOfflinePlayerUpdateType

Enumerator
ACHIEVEMENT_OFFLINE_PLAYER_UPDATE_TYPE_COMPLETE_ACHIEVEMENT 
ACHIEVEMENT_OFFLINE_PLAYER_UPDATE_TYPE_UPDATE_CRITERIA 
37{
40};
@ ACHIEVEMENT_OFFLINE_PLAYER_UPDATE_TYPE_COMPLETE_ACHIEVEMENT
Definition: AchievementMgr.h:38
@ ACHIEVEMENT_OFFLINE_PLAYER_UPDATE_TYPE_UPDATE_CRITERIA
Definition: AchievementMgr.h:39