AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "AchievementMgr.h"
Static Public Member Functions | |
static AchievementGlobalMgr * | instance () |
Private Types | |
typedef std::unordered_map< uint32, SystemTimePoint > | AllCompletedAchievements |
Private Member Functions | |
AchievementGlobalMgr ()=default | |
~AchievementGlobalMgr ()=default | |
|
private |
|
privatedefault |
|
privatedefault |
void AchievementGlobalMgr::CompletedAchievementForOfflinePlayer | ( | ObjectGuid::LowType | playerLowGuid, |
AchievementEntry const * | entry | ||
) |
References ACHIEVEMENT_OFFLINE_PLAYER_UPDATE_TYPE_COMPLETE_ACHIEVEMENT, CHAR_INS_CHAR_ACHIEVEMENT_OFFLINE_UPDATES, CharacterDatabase, AchievementEntry::ID, and PreparedStatementBase::SetData().
AchievementEntry const * AchievementGlobalMgr::GetAchievement | ( | uint32 | achievementId | ) | const |
References sAchievementStore.
Referenced by LoadAchievementCriteriaList().
|
inline |
References _achievementListByReferencedId.
Referenced by IsAverageCriteria().
|
inline |
References _achievementCriteriaListByAchievement.
|
inline |
References _achievementCriteriasByCondition.
|
inline |
References _achievementCriteriasByType.
|
inline |
References _achievementRewards, and AchievementEntry::ID.
|
inline |
References _achievementRewardLocales, and AchievementEntry::ID.
|
inline |
References _criteriaDataMap, and AchievementCriteriaEntry::ID.
Referenced by LoadAchievementCriteriaData().
|
inline |
References _specialList.
|
inline |
References _achievementCriteriasByTimedType.
|
static |
References instance().
Referenced by instance().
bool AchievementGlobalMgr::IsAverageCriteria | ( | AchievementCriteriaEntry const * | criteria | ) | const |
References ACHIEVEMENT_FLAG_AVERAGE, GetAchievementByReferencedId(), AchievementCriteriaEntry::referredAchievement, and sAchievementStore.
bool AchievementGlobalMgr::IsRealmCompleted | ( | AchievementEntry const * | achievement | ) | const |
References _allCompletedAchievements, ACHIEVEMENT_FLAG_REALM_FIRST_KILL, AchievementEntry::flags, GameTime::GetSystemTime(), AchievementEntry::ID, and sScriptMgr.
Referenced by SetRealmCompleted().
bool AchievementGlobalMgr::IsStatisticAchievement | ( | AchievementEntry const * | achievement | ) | const |
References ACHIEVEMENT_CATEGORY_STATISTICS, ACHIEVEMENT_CATEOGRY_GENERAL, AchievementEntry::categoryId, AchievementCategoryEntry::ID, AchievementCategoryEntry::parentCategory, and sAchievementCategoryStore.
Referenced by IsStatisticCriteria().
bool AchievementGlobalMgr::IsStatisticCriteria | ( | AchievementCriteriaEntry const * | achievementCriteria | ) | const |
References IsStatisticAchievement(), AchievementCriteriaEntry::referredAchievement, and sAchievementStore.
void AchievementGlobalMgr::LoadAchievementCriteriaData | ( | ) |
References _criteriaDataMap, ACHIEVEMENT_CRITERIA_CONDITION_NO_LOSE, ACHIEVEMENT_CRITERIA_DATA_TYPE_NONE, ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT, ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2, ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE, ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL, ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2, ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST, ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST, ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE, ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM, ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING, ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL, ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE, ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE, ACHIEVEMENT_CRITERIA_TYPE_ON_LOGIN, ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK, ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT, ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT, ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL, ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM, ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL, ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, AchievementCriteriaDataSet::Add(), AchievementCriteriaEntry::additionalRequirement_type, AchievementCriteriaEntry::additionalRequirements, CATEGORY_CHILDRENS_WEEK, AchievementEntry::categoryId, AchievementCriteriaEntry::count, AchievementCriteriaData::dataType, DISABLE_TYPE_ACHIEVEMENT_CRITERIA, AchievementCriteriaEntry::do_emote, AchievementCriteriaEntry::duelCount, Field::Get(), GetCriteriaDataSet(), getMSTime(), GetMSTimeDiffToNow(), AchievementEntry::ID, AchievementCriteriaEntry::ID, DisableMgr::IsDisabledFor(), AchievementCriteriaData::IsValid(), LOG_ERROR, LOG_INFO, LOG_WARN, AchievementCriteriaEntry::loot_type, AchievementCriteriaEntry::lootTypeCount, AchievementCriteriaEntry::referredAchievement, AchievementCriteriaEntry::requiredType, sAchievementCriteriaStore, sAchievementStore, AchievementCriteriaDataSet::SetCriteriaId(), sObjectMgr, AchievementCriteriaEntry::win_duel, and WorldDatabase.
void AchievementGlobalMgr::LoadAchievementCriteriaList | ( | ) |
References _achievementCriteriaListByAchievement, _achievementCriteriasByCondition, _achievementCriteriasByTimedType, _achievementCriteriasByType, _specialList, ACHIEVEMENT_CRITERIA_CONDITION_NONE, ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2, ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE, ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL, ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2, ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT, ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND, ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST, ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE, ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE, ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM, ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM, ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA, ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT, ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION, ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS, ACHIEVEMENT_CRITERIA_TYPE_HK_RACE, ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA, ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE, ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL, ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE, ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS, ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL, ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE, ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM, ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL, ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT, ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM, ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, AchievementCriteriaEntry::additionalRequirement_type, AchievementCriteriaEntry::additionalRequirement_value, AchievementCriteriaEntry::additionalRequirements, AchievementCriteriaEntry::areaID, AchievementCriteriaEntry::areaReference, WorldMapOverlayEntry::areatableID, AchievementCriteriaEntry::be_spell_target, AchievementCriteriaEntry::bg_objective, AchievementCriteriaEntry::bgMapID, AchievementCriteriaEntry::cast_spell, AchievementCriteriaEntry::classID, AchievementCriteriaEntry::complete_achievement, AchievementCriteriaEntry::complete_battleground, AchievementCriteriaEntry::complete_quest, AchievementCriteriaEntry::complete_quests_in_zone, AchievementCriteriaEntry::creatureEntry, AchievementCriteriaEntry::creatureID, AchievementCriteriaEntry::do_emote, AchievementCriteriaEntry::emoteID, AchievementCriteriaEntry::equip_epic_item, AchievementCriteriaEntry::equip_item, AchievementCriteriaEntry::explore_area, AchievementCriteriaEntry::factionID, AchievementCriteriaEntry::fish_in_gameobject, AchievementCriteriaEntry::gain_reputation, GetAchievement(), getMSTime(), GetMSTimeDiffToNow(), AchievementCriteriaEntry::goEntry, AchievementCriteriaEntry::hk_class, AchievementCriteriaEntry::hk_race, AchievementCriteriaEntry::honorable_kill_at_area, AchievementCriteriaEntry::ID, AchievementCriteriaEntry::itemID, AchievementCriteriaEntry::itemSlot, AchievementCriteriaEntry::kill_creature, AchievementCriteriaEntry::killed_by_creature, AchievementCriteriaEntry::learn_skill_level, AchievementCriteriaEntry::learn_skill_line, AchievementCriteriaEntry::learn_skillline_spell, AchievementCriteriaEntry::learn_spell, AchievementCriteriaEntry::linkedAchievement, LOG_DEBUG, LOG_INFO, LOG_WARN, AchievementCriteriaEntry::loot_type, AchievementCriteriaEntry::lootType, AchievementCriteriaEntry::mapID, MAX_WORLD_MAP_OVERLAY_AREA_IDX, AchievementCriteriaEntry::objectiveId, AchievementCriteriaEntry::own_item, AchievementCriteriaEntry::questID, AchievementCriteriaEntry::raceID, AchievementCriteriaEntry::reach_skill_level, AchievementCriteriaEntry::referredAchievement, AchievementCriteriaEntry::requiredType, sAchievementCriteriaStore, AchievementCriteriaEntry::skillID, AchievementCriteriaEntry::skillLine, AchievementCriteriaEntry::spellID, sWorldMapOverlayStore, AchievementCriteriaEntry::timedType, AchievementCriteriaEntry::timeLimit, AchievementCriteriaEntry::use_gameobject, AchievementCriteriaEntry::use_item, AchievementCriteriaEntry::win_bg, and AchievementCriteriaEntry::zoneID.
void AchievementGlobalMgr::LoadAchievementReferenceList | ( | ) |
References _achievementListByReferencedId, getMSTime(), GetMSTimeDiffToNow(), LOG_INFO, LOG_WARN, AchievementEntry::refAchievement, and sAchievementStore.
void AchievementGlobalMgr::LoadCompletedAchievements | ( | ) |
References _allCompletedAchievements, ACHIEVEMENT_FLAG_REALM_FIRST_KILL, ACHIEVEMENT_FLAG_REALM_FIRST_REACH, CHAR_DEL_INVALID_ACHIEVMENT, CharacterDatabase, Field::Get(), getMSTime(), GetMSTimeDiffToNow(), LOG_ERROR, LOG_INFO, LOG_WARN, sAchievementStore, and PreparedStatementBase::SetData().
void AchievementGlobalMgr::LoadRewardLocales | ( | ) |
References _achievementRewardLocales, _achievementRewards, ObjectMgr::AddLocaleString(), Field::Get(), GetLocaleByName(), getMSTime(), GetMSTimeDiffToNow(), LOCALE_enUS, LOG_ERROR, LOG_INFO, LOG_WARN, AchievementRewardLocale::Subject, AchievementRewardLocale::Text, and WorldDatabase.
void AchievementGlobalMgr::LoadRewards | ( | ) |
References _achievementRewards, ACHIEVEMENT_FACTION_ANY, Field::Get(), getMSTime(), GetMSTimeDiffToNow(), AchievementReward::itemId, LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARN, AchievementReward::mailTemplate, sAchievementStore, sCharTitlesStore, AchievementReward::sender, sMailTemplateStore, sObjectMgr, AchievementReward::subject, AchievementReward::text, AchievementReward::titleId, and WorldDatabase.
void AchievementGlobalMgr::SetRealmCompleted | ( | AchievementEntry const * | achievement | ) |
References _allCompletedAchievements, GameTime::GetSystemTime(), AchievementEntry::ID, and IsRealmCompleted().
void AchievementGlobalMgr::UpdateAchievementCriteriaForOfflinePlayer | ( | ObjectGuid::LowType | playerLowGuid, |
AchievementCriteriaTypes | type, | ||
uint32 | miscValue1 = 0 , |
||
uint32 | miscValue2 = 0 |
||
) |
References ACHIEVEMENT_OFFLINE_PLAYER_UPDATE_TYPE_UPDATE_CRITERIA, CHAR_INS_CHAR_ACHIEVEMENT_OFFLINE_UPDATES, CharacterDatabase, and PreparedStatementBase::SetData().
|
private |
Referenced by GetAchievementCriteriaByAchievement(), and LoadAchievementCriteriaList().
|
private |
Referenced by GetAchievementCriteriaByCondition(), and LoadAchievementCriteriaList().
|
private |
Referenced by GetTimedAchievementCriteriaByType(), and LoadAchievementCriteriaList().
|
private |
Referenced by GetAchievementCriteriaByType(), and LoadAchievementCriteriaList().
|
private |
Referenced by GetAchievementByReferencedId(), and LoadAchievementReferenceList().
|
private |
Referenced by GetAchievementRewardLocale(), and LoadRewardLocales().
|
private |
Referenced by GetAchievementReward(), LoadRewardLocales(), and LoadRewards().
|
private |
Referenced by IsRealmCompleted(), LoadCompletedAchievements(), and SetRealmCompleted().
|
private |
Referenced by GetCriteriaDataSet(), and LoadAchievementCriteriaData().
|
private |
Referenced by GetSpecialAchievementCriteriaByType(), and LoadAchievementCriteriaList().