TrinityCore
Player.h File Reference
#include "GridObject.h"
#include "Unit.h"
#include "CUFProfile.h"
#include "DatabaseEnvFwd.h"
#include "DBCEnums.h"
#include "EquipmentSet.h"
#include "GroupReference.h"
#include "Hash.h"
#include "ItemDefines.h"
#include "ItemEnchantmentMgr.h"
#include "MapReference.h"
#include "PetDefines.h"
#include "PlayerTaxi.h"
#include "QuestDef.h"
#include "SceneMgr.h"
+ Include dependency graph for Player.h:

Go to the source code of this file.

Classes

struct  PlayerSpell
 
struct  StoredAuraTeleportLocation
 
struct  SpellModifier
 
struct  SpellModifierByClassMask
 
struct  SpellModifierByLabel< T >
 
struct  PlayerCurrency
 
struct  ActionButton
 
struct  PvPInfo
 
struct  DuelInfo
 
struct  Areas
 
struct  Runes
 
struct  EnchantDuration
 
struct  QuestObjectiveStatusData
 
struct  SkillStatusData
 
struct  ItemPosCount
 
struct  InstancePlayerBind
 
struct  BGData
 Holder for Battleground data. More...
 
struct  VoidStorageItem
 
struct  ResurrectionData
 
struct  GroupUpdateCounter
 
struct  SpecializationInfo
 
class  Player
 
struct  Player::ValuesUpdateForPlayerWithMaskSender
 
struct  Player::ChatFloodThrottle
 
struct  Player::BgBattlegroundQueueID_Rec
 

Namespaces

 BattlePets
 
 WorldPackets
 
 WorldPackets::Character
 
 WorldPackets::Movement
 

Macros

#define PLAYER_MAX_SKILLS   256
 
#define PLAYER_EXPLORED_ZONES_SIZE   192
 
#define ACTION_BUTTON_ACTION(X)   (uint64(X) & 0x00000000FFFFFFFF)
 
#define ACTION_BUTTON_TYPE(X)   ((uint64(X) & 0xFFFFFFFF00000000) >> 56)
 
#define MAX_ACTION_BUTTON_ACTION_VALUE   (0xFFFFFFFF)
 
#define MAX_ACTION_BUTTONS   132
 
#define MAX_RUNES   7
 
#define MAX_RECHARGING_RUNES   3
 
#define MAX_DRUNKEN   4
 
#define MAX_TIMERS   3
 
#define DISABLED_MIRROR_TIMER   -1
 
#define QUESTS_COMPLETED_BITS_SIZE   1750
 
#define MAX_QUEST_COUNTS   24
 
#define MAX_QUEST_OFFSET   16
 
#define INVENTORY_SLOT_BAG_0   255
 
#define INVENTORY_DEFAULT_SIZE   16
 
#define VISIBLE_ITEM_ENTRY_OFFSET   0
 
#define VISIBLE_ITEM_ENCHANTMENT_OFFSET   1
 
#define MAX_PLAYED_TIME_INDEX   2
 
#define MAX_PLAYER_SUMMON_DELAY   (2*MINUTE)
 

Typedefs

typedef std::deque< Mail * > PlayerMails
 
using SpellFlatModifierByLabel = SpellModifierByLabel< UF::SpellFlatModByLabel >
 
using SpellPctModifierByLabel = SpellModifierByLabel< UF::SpellPctModByLabel >
 
typedef std::unordered_map< uint32, PlayerSpellStatePlayerTalentMap
 
typedef std::array< uint32, MAX_PVP_TALENT_SLOTSPlayerPvpTalentMap
 
typedef std::unordered_map< uint32, PlayerSpellPlayerSpellMap
 
typedef std::unordered_set< SpellModifier * > SpellModContainer
 
typedef std::unordered_map< uint32, PlayerCurrencyPlayerCurrenciesMap
 
typedef std::unordered_map< uint32, time_t > InstanceTimeMap
 
typedef std::map< uint8, ActionButtonActionButtonList
 
typedef std::list< EnchantDurationEnchantDurationList
 
typedef std::list< Item * > ItemDurationList
 
typedef std::map< uint32, QuestStatusDataQuestStatusMap
 
using QuestObjectiveStatusMap = std::unordered_multimap< std::pair< QuestObjectiveType, int32 >, QuestObjectiveStatusData >
 
typedef std::set< uint32RewardedQuestSet
 
typedef std::map< uint32, QuestSaveTypeQuestStatusSaveMap
 
typedef std::unordered_map< uint32, SkillStatusDataSkillStatusMap
 
typedef std::vector< ItemPosCountItemPosCountVec
 

Enumerations

enum  SkillFieldOffset : uint16 {
  SKILL_ID_OFFSET = 0, SKILL_STEP_OFFSET = SKILL_ID_OFFSET + CalculateSkillFieldArraySize<uint16>(), SKILL_RANK_OFFSET = SKILL_STEP_OFFSET + CalculateSkillFieldArraySize<uint16>(), SUBSKILL_START_RANK_OFFSET = SKILL_RANK_OFFSET + CalculateSkillFieldArraySize<uint16>(),
  SKILL_MAX_RANK_OFFSET = SUBSKILL_START_RANK_OFFSET + CalculateSkillFieldArraySize<uint16>(), SKILL_TEMP_BONUS_OFFSET = SKILL_MAX_RANK_OFFSET + CalculateSkillFieldArraySize<uint16>(), SKILL_PERM_BONUS_OFFSET = SKILL_TEMP_BONUS_OFFSET + CalculateSkillFieldArraySize<uint16>()
}
 
enum  SpellModType : uint8 {
  SPELLMOD_FLAT = 0, SPELLMOD_PCT = 1, SPELLMOD_LABEL_FLAT = 2, SPELLMOD_LABEL_PCT = 3,
  SPELLMOD_END
}
 
enum  PlayerUnderwaterState {
  UNDERWATER_NONE = 0x00, UNDERWATER_INWATER = 0x01, UNDERWATER_INLAVA = 0x02, UNDERWATER_INSLIME = 0x04,
  UNDERWATER_INDARKWATER = 0x08, UNDERWATER_EXIST_TIMERS = 0x10
}
 
enum  BuyBankSlotResult { ERR_BANKSLOT_FAILED_TOO_MANY = 0, ERR_BANKSLOT_INSUFFICIENT_FUNDS = 1, ERR_BANKSLOT_NOTBANKER = 2, ERR_BANKSLOT_OK = 3 }
 
enum  PlayerSpellState : uint8 {
  PLAYERSPELL_UNCHANGED = 0, PLAYERSPELL_CHANGED = 1, PLAYERSPELL_NEW = 2, PLAYERSPELL_REMOVED = 3,
  PLAYERSPELL_TEMPORARY = 4
}
 
enum  TalentSpecialization {
  TALENT_SPEC_MAGE_ARCANE = 62, TALENT_SPEC_MAGE_FIRE = 63, TALENT_SPEC_MAGE_FROST = 64, TALENT_SPEC_PALADIN_HOLY = 65,
  TALENT_SPEC_PALADIN_PROTECTION = 66, TALENT_SPEC_PALADIN_RETRIBUTION = 70, TALENT_SPEC_WARRIOR_ARMS = 71, TALENT_SPEC_WARRIOR_FURY = 72,
  TALENT_SPEC_WARRIOR_PROTECTION = 73, TALENT_SPEC_DRUID_BALANCE = 102, TALENT_SPEC_DRUID_CAT = 103, TALENT_SPEC_DRUID_BEAR = 104,
  TALENT_SPEC_DRUID_RESTORATION = 105, TALENT_SPEC_DEATHKNIGHT_BLOOD = 250, TALENT_SPEC_DEATHKNIGHT_FROST = 251, TALENT_SPEC_DEATHKNIGHT_UNHOLY = 252,
  TALENT_SPEC_HUNTER_BEASTMASTER = 253, TALENT_SPEC_HUNTER_MARKSMAN = 254, TALENT_SPEC_HUNTER_SURVIVAL = 255, TALENT_SPEC_PRIEST_DISCIPLINE = 256,
  TALENT_SPEC_PRIEST_HOLY = 257, TALENT_SPEC_PRIEST_SHADOW = 258, TALENT_SPEC_ROGUE_ASSASSINATION = 259, TALENT_SPEC_ROGUE_COMBAT = 260,
  TALENT_SPEC_ROGUE_SUBTLETY = 261, TALENT_SPEC_SHAMAN_ELEMENTAL = 262, TALENT_SPEC_SHAMAN_ENHANCEMENT = 263, TALENT_SPEC_SHAMAN_RESTORATION = 264,
  TALENT_SPEC_WARLOCK_AFFLICTION = 265, TALENT_SPEC_WARLOCK_DEMONOLOGY = 266, TALENT_SPEC_WARLOCK_DESTRUCTION = 267, TALENT_SPEC_MONK_BREWMASTER = 268,
  TALENT_SPEC_MONK_BATTLEDANCER = 269, TALENT_SPEC_MONK_MISTWEAVER = 270, TALENT_SPEC_DEMON_HUNTER_HAVOC = 577, TALENT_SPEC_DEMON_HUNTER_VENGEANCE = 581
}
 
enum  SpecResetType { SPEC_RESET_TALENTS = 0, SPEC_RESET_SPECIALIZATION = 1, SPEC_RESET_GLYPHS = 2, SPEC_RESET_PET_TALENTS = 3 }
 
enum  PlayerCurrencyState { PLAYERCURRENCY_UNCHANGED = 0, PLAYERCURRENCY_CHANGED = 1, PLAYERCURRENCY_NEW = 2, PLAYERCURRENCY_REMOVED = 3 }
 
enum  ActionButtonUpdateState { ACTIONBUTTON_UNCHANGED = 0, ACTIONBUTTON_CHANGED = 1, ACTIONBUTTON_NEW = 2, ACTIONBUTTON_DELETED = 3 }
 
enum  ActionButtonType {
  ACTION_BUTTON_SPELL = 0x00, ACTION_BUTTON_C = 0x01, ACTION_BUTTON_EQSET = 0x20, ACTION_BUTTON_DROPDOWN = 0x30,
  ACTION_BUTTON_MACRO = 0x40, ACTION_BUTTON_CMACRO = ACTION_BUTTON_C | ACTION_BUTTON_MACRO, ACTION_BUTTON_MOUNT = 0x60, ACTION_BUTTON_ITEM = 0x80
}
 
enum  ReputationSource {
  REPUTATION_SOURCE_KILL, REPUTATION_SOURCE_QUEST, REPUTATION_SOURCE_DAILY_QUEST, REPUTATION_SOURCE_WEEKLY_QUEST,
  REPUTATION_SOURCE_MONTHLY_QUEST, REPUTATION_SOURCE_REPEATABLE_QUEST, REPUTATION_SOURCE_SPELL
}
 
enum  DuelState { DUEL_STATE_CHALLENGED, DUEL_STATE_COUNTDOWN, DUEL_STATE_IN_PROGRESS, DUEL_STATE_COMPLETED }
 
enum  RuneCooldowns { RUNE_BASE_COOLDOWN = 10000, RUNE_MISS_COOLDOWN = 1500 }
 
enum  DrunkenState { DRUNKEN_SOBER = 0, DRUNKEN_TIPSY = 1, DRUNKEN_DRUNK = 2, DRUNKEN_SMASHED = 3 }
 
enum  PlayerFlags {
  PLAYER_FLAGS_GROUP_LEADER = 0x00000001, PLAYER_FLAGS_AFK = 0x00000002, PLAYER_FLAGS_DND = 0x00000004, PLAYER_FLAGS_GM = 0x00000008,
  PLAYER_FLAGS_GHOST = 0x00000010, PLAYER_FLAGS_RESTING = 0x00000020, PLAYER_FLAGS_VOICE_CHAT = 0x00000040, PLAYER_FLAGS_UNK7 = 0x00000080,
  PLAYER_FLAGS_CONTESTED_PVP = 0x00000100, PLAYER_FLAGS_IN_PVP = 0x00000200, PLAYER_FLAGS_WAR_MODE_ACTIVE = 0x00000400, PLAYER_FLAGS_WAR_MODE_DESIRED = 0x00000800,
  PLAYER_FLAGS_PLAYED_LONG_TIME = 0x00001000, PLAYER_FLAGS_PLAYED_TOO_LONG = 0x00002000, PLAYER_FLAGS_IS_OUT_OF_BOUNDS = 0x00004000, PLAYER_FLAGS_DEVELOPER = 0x00008000,
  PLAYER_FLAGS_LOW_LEVEL_RAID_ENABLED = 0x00010000, PLAYER_FLAGS_TAXI_BENCHMARK = 0x00020000, PLAYER_FLAGS_PVP_TIMER = 0x00040000, PLAYER_FLAGS_UBER = 0x00080000,
  PLAYER_FLAGS_UNK20 = 0x00100000, PLAYER_FLAGS_UNK21 = 0x00200000, PLAYER_FLAGS_COMMENTATOR2 = 0x00400000, PLAYER_FLAGS_HIDE_ACCOUNT_ACHIEVEMENTS = 0x00800000,
  PLAYER_FLAGS_PET_BATTLES_UNLOCKED = 0x01000000, PLAYER_FLAGS_NO_XP_GAIN = 0x02000000, PLAYER_FLAGS_UNK26 = 0x04000000, PLAYER_FLAGS_AUTO_DECLINE_GUILD = 0x08000000,
  PLAYER_FLAGS_GUILD_LEVEL_ENABLED = 0x10000000, PLAYER_FLAGS_VOID_UNLOCKED = 0x20000000, PLAYER_FLAGS_TIMEWALKING = 0x40000000, PLAYER_FLAGS_COMMENTATOR_CAMERA = 0x80000000
}
 
enum  PlayerFlagsEx {
  PLAYER_FLAGS_EX_REAGENT_BANK_UNLOCKED = 0x0001, PLAYER_FLAGS_EX_MERCENARY_MODE = 0x0002, PLAYER_FLAGS_EX_ARTIFACT_FORGE_CHEAT = 0x0004, PLAYER_FLAGS_EX_IN_PVP_COMBAT = 0x0040,
  PLAYER_FLAGS_EX_MENTOR = 0x0080, PLAYER_FLAGS_EX_NEWCOMER = 0x0100, PLAYER_FLAGS_EX_UNLOCKED_AOE_LOOT = 0x0200
}
 
enum  PlayerLocalFlags {
  PLAYER_LOCAL_FLAG_CONTROLLING_PET = 0x00000001, PLAYER_LOCAL_FLAG_TRACK_STEALTHED = 0x00000002, PLAYER_LOCAL_FLAG_RELEASE_TIMER = 0x00000008, PLAYER_LOCAL_FLAG_NO_RELEASE_WINDOW = 0x00000010,
  PLAYER_LOCAL_FLAG_NO_PET_BAR = 0x00000020, PLAYER_LOCAL_FLAG_OVERRIDE_CAMERA_MIN_HEIGHT = 0x00000040, PLAYER_LOCAL_FLAG_NEWLY_BOOSTED_CHARACTER = 0x00000080, PLAYER_LOCAL_FLAG_USING_PARTY_GARRISON = 0x00000100,
  PLAYER_LOCAL_FLAG_CAN_USE_OBJECTS_MOUNTED = 0x00000200, PLAYER_LOCAL_FLAG_CAN_VISIT_PARTY_GARRISON = 0x00000400, PLAYER_LOCAL_FLAG_WAR_MODE = 0x00000800, PLAYER_LOCAL_FLAG_ACCOUNT_SECURED = 0x00001000,
  PLAYER_LOCAL_FLAG_OVERRIDE_TRANSPORT_SERVER_TIME = 0x00008000, PLAYER_LOCAL_FLAG_MENTOR_RESTRICTED = 0x00020000, PLAYER_LOCAL_FLAG_WEEKLY_REWARD_AVAILABLE = 0x00040000
}
 
enum  PlayerFieldByte2Flags { PLAYER_FIELD_BYTE2_NONE = 0x00, PLAYER_FIELD_BYTE2_STEALTH = 0x20, PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW = 0x40 }
 
enum  MirrorTimerType { FATIGUE_TIMER = 0, BREATH_TIMER = 1, FIRE_TIMER = 2 }
 
enum  PlayerExtraFlags {
  PLAYER_EXTRA_GM_ON = 0x0001, PLAYER_EXTRA_ACCEPT_WHISPERS = 0x0004, PLAYER_EXTRA_TAXICHEAT = 0x0008, PLAYER_EXTRA_GM_INVISIBLE = 0x0010,
  PLAYER_EXTRA_GM_CHAT = 0x0020, PLAYER_EXTRA_PVP_DEATH = 0x0100, PLAYER_EXTRA_HAS_RACE_CHANGED = 0x0200, PLAYER_EXTRA_GRANTED_LEVELS_FROM_RAF = 0x0400,
  PLAYER_EXTRA_LEVEL_BOOSTED = 0x0800
}
 
enum  AtLoginFlags {
  AT_LOGIN_NONE = 0x000, AT_LOGIN_RENAME = 0x001, AT_LOGIN_RESET_SPELLS = 0x002, AT_LOGIN_RESET_TALENTS = 0x004,
  AT_LOGIN_CUSTOMIZE = 0x008, AT_LOGIN_RESET_PET_TALENTS = 0x010, AT_LOGIN_FIRST = 0x020, AT_LOGIN_CHANGE_FACTION = 0x040,
  AT_LOGIN_CHANGE_RACE = 0x080, AT_LOGIN_RESURRECT = 0x100
}
 
enum  QuestSaveType { QUEST_DEFAULT_SAVE_TYPE = 0, QUEST_DELETE_SAVE_TYPE, QUEST_FORCE_DELETE_SAVE_TYPE }
 
enum  QuestSlotOffsets { QUEST_ID_OFFSET = 0, QUEST_STATE_OFFSET = 1, QUEST_COUNTS_OFFSET = 2, QUEST_TIME_OFFSET = 14 }
 
enum  QuestSlotStateMask { QUEST_STATE_NONE = 0x0000, QUEST_STATE_COMPLETE = 0x0001, QUEST_STATE_FAIL = 0x0002 }
 
enum  SkillUpdateState { SKILL_UNCHANGED = 0, SKILL_CHANGED = 1, SKILL_NEW = 2, SKILL_DELETED = 3 }
 
enum  PlayerSlots { PLAYER_SLOT_START = 0, PLAYER_SLOT_END = 199, PLAYER_SLOTS_COUNT = (PLAYER_SLOT_END - PLAYER_SLOT_START) }
 
enum  EquipmentSlots : uint8 {
  EQUIPMENT_SLOT_START = 0, EQUIPMENT_SLOT_HEAD = 0, EQUIPMENT_SLOT_NECK = 1, EQUIPMENT_SLOT_SHOULDERS = 2,
  EQUIPMENT_SLOT_BODY = 3, EQUIPMENT_SLOT_CHEST = 4, EQUIPMENT_SLOT_WAIST = 5, EQUIPMENT_SLOT_LEGS = 6,
  EQUIPMENT_SLOT_FEET = 7, EQUIPMENT_SLOT_WRISTS = 8, EQUIPMENT_SLOT_HANDS = 9, EQUIPMENT_SLOT_FINGER1 = 10,
  EQUIPMENT_SLOT_FINGER2 = 11, EQUIPMENT_SLOT_TRINKET1 = 12, EQUIPMENT_SLOT_TRINKET2 = 13, EQUIPMENT_SLOT_BACK = 14,
  EQUIPMENT_SLOT_MAINHAND = 15, EQUIPMENT_SLOT_OFFHAND = 16, EQUIPMENT_SLOT_RANGED = 17, EQUIPMENT_SLOT_TABARD = 18,
  EQUIPMENT_SLOT_END = 19
}
 
enum  InventorySlots : uint8 { INVENTORY_SLOT_BAG_START = 19, INVENTORY_SLOT_BAG_END = 23 }
 
enum  InventoryPackSlots : uint8 { INVENTORY_SLOT_ITEM_START = 23, INVENTORY_SLOT_ITEM_END = 51 }
 
enum  BankItemSlots { BANK_SLOT_ITEM_START = 51, BANK_SLOT_ITEM_END = 79 }
 
enum  BankBagSlots { BANK_SLOT_BAG_START = 79, BANK_SLOT_BAG_END = 86 }
 
enum  BuyBackSlots { BUYBACK_SLOT_START = 86, BUYBACK_SLOT_END = 98 }
 
enum  ReagentSlots { REAGENT_SLOT_START = 98, REAGENT_SLOT_END = 196 }
 
enum  ChildEquipmentSlots { CHILD_EQUIPMENT_SLOT_START = 196, CHILD_EQUIPMENT_SLOT_END = 199 }
 
enum  ItemSearchLocation {
  ItemSearchLocation::Equipment = 0x01, ItemSearchLocation::Inventory = 0x02, ItemSearchLocation::Bank = 0x04, ItemSearchLocation::ReagentBank = 0x08,
  ItemSearchLocation::Default = Equipment | Inventory, ItemSearchLocation::Everywhere = Equipment | Inventory | Bank | ReagentBank
}
 
enum  ItemSearchCallbackResult { ItemSearchCallbackResult::Stop, ItemSearchCallbackResult::Continue }
 
enum  TransferAbortReason {
  TRANSFER_ABORT_NONE = 0, TRANSFER_ABORT_ERROR = 1, TRANSFER_ABORT_MAX_PLAYERS = 2, TRANSFER_ABORT_NOT_FOUND = 3,
  TRANSFER_ABORT_TOO_MANY_INSTANCES = 4, TRANSFER_ABORT_ZONE_IN_COMBAT = 6, TRANSFER_ABORT_INSUF_EXPAN_LVL = 7, TRANSFER_ABORT_DIFFICULTY = 8,
  TRANSFER_ABORT_UNIQUE_MESSAGE = 9, TRANSFER_ABORT_TOO_MANY_REALM_INSTANCES = 10, TRANSFER_ABORT_NEED_GROUP = 11, TRANSFER_ABORT_NOT_FOUND_2 = 12,
  TRANSFER_ABORT_NOT_FOUND_3 = 13, TRANSFER_ABORT_NOT_FOUND_4 = 14, TRANSFER_ABORT_REALM_ONLY = 15, TRANSFER_ABORT_MAP_NOT_ALLOWED = 16,
  TRANSFER_ABORT_LOCKED_TO_DIFFERENT_INSTANCE = 18, TRANSFER_ABORT_ALREADY_COMPLETED_ENCOUNTER = 19, TRANSFER_ABORT_DIFFICULTY_NOT_FOUND = 22, TRANSFER_ABORT_XREALM_ZONE_DOWN = 24,
  TRANSFER_ABORT_SOLO_PLAYER_SWITCH_DIFFICULTY = 26
}
 
enum  NewWorldReason { NEW_WORLD_NORMAL = 16, NEW_WORLD_SEAMLESS = 21 }
 
enum  InstanceResetWarningType {
  RAID_INSTANCE_WARNING_HOURS = 1, RAID_INSTANCE_WARNING_MIN = 2, RAID_INSTANCE_WARNING_MIN_SOON = 3, RAID_INSTANCE_WELCOME = 4,
  RAID_INSTANCE_EXPIRED = 5
}
 
enum  ArenaTeamInfoType {
  ARENA_TEAM_ID = 0, ARENA_TEAM_TYPE = 1, ARENA_TEAM_MEMBER = 2, ARENA_TEAM_GAMES_WEEK = 3,
  ARENA_TEAM_GAMES_SEASON = 4, ARENA_TEAM_WINS_SEASON = 5, ARENA_TEAM_PERSONAL_RATING = 6, ARENA_TEAM_END = 7
}
 
enum  TeleportToOptions {
  TELE_TO_GM_MODE = 0x01, TELE_TO_NOT_LEAVE_TRANSPORT = 0x02, TELE_TO_NOT_LEAVE_COMBAT = 0x04, TELE_TO_NOT_UNSUMMON_PET = 0x08,
  TELE_TO_SPELL = 0x10, TELE_TO_TRANSPORT_TELEPORT = 0x20, TELE_REVIVE_AT_TELEPORT = 0x40, TELE_TO_SEAMLESS = 0x80
}
 
enum  EnviromentalDamage : uint8 {
  DAMAGE_EXHAUSTED = 0, DAMAGE_DROWNING = 1, DAMAGE_FALL = 2, DAMAGE_LAVA = 3,
  DAMAGE_SLIME = 4, DAMAGE_FIRE = 5, DAMAGE_FALL_TO_VOID = 6
}
 Type of environmental damages. More...
 
enum  PlayedTimeIndex { PLAYED_TIME_TOTAL = 0, PLAYED_TIME_LEVEL = 1 }
 
enum  PlayerLoginQueryIndex {
  PLAYER_LOGIN_QUERY_LOAD_FROM, PLAYER_LOGIN_QUERY_LOAD_CUSTOMIZATIONS, PLAYER_LOGIN_QUERY_LOAD_GROUP, PLAYER_LOGIN_QUERY_LOAD_BOUND_INSTANCES,
  PLAYER_LOGIN_QUERY_LOAD_AURAS, PLAYER_LOGIN_QUERY_LOAD_AURA_EFFECTS, PLAYER_LOGIN_QUERY_LOAD_AURA_STORED_LOCATIONS, PLAYER_LOGIN_QUERY_LOAD_SPELLS,
  PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS, PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_OBJECTIVES, PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_OBJECTIVES_CRITERIA, PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_OBJECTIVES_CRITERIA_PROGRESS,
  PLAYER_LOGIN_QUERY_LOAD_DAILY_QUEST_STATUS, PLAYER_LOGIN_QUERY_LOAD_REPUTATION, PLAYER_LOGIN_QUERY_LOAD_INVENTORY, PLAYER_LOGIN_QUERY_LOAD_ARTIFACTS,
  PLAYER_LOGIN_QUERY_LOAD_AZERITE, PLAYER_LOGIN_QUERY_LOAD_AZERITE_MILESTONE_POWERS, PLAYER_LOGIN_QUERY_LOAD_AZERITE_UNLOCKED_ESSENCES, PLAYER_LOGIN_QUERY_LOAD_AZERITE_EMPOWERED,
  PLAYER_LOGIN_QUERY_LOAD_ACTIONS, PLAYER_LOGIN_QUERY_LOAD_MAILS, PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS, PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_ARTIFACT,
  PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_AZERITE, PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_AZERITE_MILESTONE_POWER, PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_AZERITE_UNLOCKED_ESSENCE, PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_AZERITE_EMPOWERED,
  PLAYER_LOGIN_QUERY_LOAD_SOCIAL_LIST, PLAYER_LOGIN_QUERY_LOAD_HOME_BIND, PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS, PLAYER_LOGIN_QUERY_LOAD_SPELL_CHARGES,
  PLAYER_LOGIN_QUERY_LOAD_DECLINED_NAMES, PLAYER_LOGIN_QUERY_LOAD_GUILD, PLAYER_LOGIN_QUERY_LOAD_ARENA_INFO, PLAYER_LOGIN_QUERY_LOAD_ACHIEVEMENTS,
  PLAYER_LOGIN_QUERY_LOAD_CRITERIA_PROGRESS, PLAYER_LOGIN_QUERY_LOAD_EQUIPMENT_SETS, PLAYER_LOGIN_QUERY_LOAD_TRANSMOG_OUTFITS, PLAYER_LOGIN_QUERY_LOAD_BG_DATA,
  PLAYER_LOGIN_QUERY_LOAD_GLYPHS, PLAYER_LOGIN_QUERY_LOAD_TALENTS, PLAYER_LOGIN_QUERY_LOAD_PVP_TALENTS, PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA,
  PLAYER_LOGIN_QUERY_LOAD_SKILLS, PLAYER_LOGIN_QUERY_LOAD_WEEKLY_QUEST_STATUS, PLAYER_LOGIN_QUERY_LOAD_RANDOM_BG, PLAYER_LOGIN_QUERY_LOAD_BANNED,
  PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_REW, PLAYER_LOGIN_QUERY_LOAD_INSTANCE_LOCK_TIMES, PLAYER_LOGIN_QUERY_LOAD_SEASONAL_QUEST_STATUS, PLAYER_LOGIN_QUERY_LOAD_MONTHLY_QUEST_STATUS,
  PLAYER_LOGIN_QUERY_LOAD_VOID_STORAGE, PLAYER_LOGIN_QUERY_LOAD_CURRENCY, PLAYER_LOGIN_QUERY_LOAD_CUF_PROFILES, PLAYER_LOGIN_QUERY_LOAD_CORPSE_LOCATION,
  PLAYER_LOGIN_QUERY_LOAD_PET_SLOTS, PLAYER_LOGIN_QUERY_LOAD_GARRISON, PLAYER_LOGIN_QUERY_LOAD_GARRISON_BLUEPRINTS, PLAYER_LOGIN_QUERY_LOAD_GARRISON_BUILDINGS,
  PLAYER_LOGIN_QUERY_LOAD_GARRISON_FOLLOWERS, PLAYER_LOGIN_QUERY_LOAD_GARRISON_FOLLOWER_ABILITIES, MAX_PLAYER_LOGIN_QUERY
}
 
enum  PlayerDelayedOperations {
  DELAYED_SAVE_PLAYER = 0x01, DELAYED_RESURRECT_PLAYER = 0x02, DELAYED_SPELL_CAST_DESERTER = 0x04, DELAYED_BG_MOUNT_RESTORE = 0x08,
  DELAYED_BG_TAXI_RESTORE = 0x10, DELAYED_BG_GROUP_RESTORE = 0x20, DELAYED_END
}
 
enum  BindExtensionState { EXTEND_STATE_EXPIRED = 0, EXTEND_STATE_NORMAL = 1, EXTEND_STATE_EXTENDED = 2, EXTEND_STATE_KEEP = 255 }
 
enum  CharDeleteMethod { CHAR_DELETE_REMOVE = 0, CHAR_DELETE_UNLINK = 1 }
 
enum  ReferAFriendError {
  ERR_REFER_A_FRIEND_NONE = 0, ERR_REFER_A_FRIEND_NOT_REFERRED_BY = 1, ERR_REFER_A_FRIEND_TARGET_TOO_HIGH = 2, ERR_REFER_A_FRIEND_INSUFFICIENT_GRANTABLE_LEVELS = 3,
  ERR_REFER_A_FRIEND_TOO_FAR = 4, ERR_REFER_A_FRIEND_DIFFERENT_FACTION = 5, ERR_REFER_A_FRIEND_NOT_NOW = 6, ERR_REFER_A_FRIEND_GRANT_LEVEL_MAX_I = 7,
  ERR_REFER_A_FRIEND_NO_TARGET = 8, ERR_REFER_A_FRIEND_NOT_IN_GROUP = 9, ERR_REFER_A_FRIEND_SUMMON_LEVEL_MAX_I = 10, ERR_REFER_A_FRIEND_SUMMON_COOLDOWN = 11,
  ERR_REFER_A_FRIEND_INSUF_EXPAN_LVL = 12, ERR_REFER_A_FRIEND_SUMMON_OFFLINE_S = 13, ERR_REFER_A_FRIEND_NO_XREALM = 14, ERR_REFER_A_FRIEND_MAP_INCOMING_TRANSFER_NOT_ALLOWED = 15
}
 
enum  PlayerCommandStates {
  CHEAT_NONE = 0x00, CHEAT_GOD = 0x01, CHEAT_CASTTIME = 0x02, CHEAT_COOLDOWN = 0x04,
  CHEAT_POWER = 0x08, CHEAT_WATERWALK = 0x10
}
 
enum  PlayerLogXPReason : uint8 { LOG_XP_REASON_KILL = 0, LOG_XP_REASON_NO_KILL = 1 }
 
enum  DisplayToastType : uint8 { DisplayToastType::NewItem = 0, DisplayToastType::NewCurrency = 1, DisplayToastType::Money = 2, DisplayToastType::Honor = 3 }
 
enum  DisplayToastMethod : uint8 {
  DisplayToastMethod::DoNotDisplay = 0, DisplayToastMethod::Loot = 1, DisplayToastMethod::PetBattle = 2, DisplayToastMethod::PersonalLoot = 3,
  DisplayToastMethod::GarrisonMissionLoot = 4, DisplayToastMethod::QuestUpgrade = 5, DisplayToastMethod::QuestUpgradeEpic = 6, DisplayToastMethod::Shipment = 7,
  DisplayToastMethod::GarrisonMissionSalvage = 8, DisplayToastMethod::PvPFactionReward = 9, DisplayToastMethod::GarrisonCurrency = 10, DisplayToastMethod::LessAwesomeLoot = 11,
  DisplayToastMethod::UpgradedLoot = 12, DisplayToastMethod::LegendaryLoot = 13, DisplayToastMethod::InvasionLoot = 14, DisplayToastMethod::Default = 15,
  DisplayToastMethod::QuestComplete = 16, DisplayToastMethod::RatedPvPReward = 17, DisplayToastMethod::CorruptedLoot = 19
}
 
enum  TalentLearnResult {
  TALENT_LEARN_OK = 0, TALENT_FAILED_UNKNOWN = 1, TALENT_FAILED_NOT_ENOUGH_TALENTS_IN_PRIMARY_TREE = 2, TALENT_FAILED_NO_PRIMARY_TREE_SELECTED = 3,
  TALENT_FAILED_CANT_DO_THAT_RIGHT_NOW = 4, TALENT_FAILED_AFFECTING_COMBAT = 5, TALENT_FAILED_CANT_REMOVE_TALENT = 6, TALENT_FAILED_CANT_DO_THAT_CHALLENGE_MODE_ACTIVE = 7,
  TALENT_FAILED_REST_AREA = 8
}
 
enum  ZonePVPTypeOverride : uint32 {
  ZonePVPTypeOverride::None = 0, ZonePVPTypeOverride::Friendly = 1, ZonePVPTypeOverride::Hostile = 2, ZonePVPTypeOverride::Contested = 3,
  ZonePVPTypeOverride::Combat = 4
}
 

Functions

TC_GAME_API uint32 GetBagSize (Bag const *bag)
 
TC_GAME_API ItemGetItemInBag (Bag const *bag, uint8 slot)
 
template<typename SkillArrayType >
constexpr std::size_t CalculateSkillFieldArraySize ()
 
 DEFINE_ENUM_FLAG (PlayerFlags)
 
 DEFINE_ENUM_FLAG (PlayerFlagsEx)
 
 DEFINE_ENUM_FLAG (PlayerLocalFlags)
 
 DEFINE_ENUM_FLAG (ItemSearchLocation)
 
TC_GAME_API void AddItemsSetItem (Player *player, Item const *item)
 
TC_GAME_API void RemoveItemsSetItem (Player *player, Item const *item)
 
template<typename Container >
Trinity::IteratorPair< UF::ChrCustomizationChoice const * > MakeChrCustomizationChoiceRange (Container const &container)
 

Variables

TC_GAME_API uint64 const MAX_MONEY_AMOUNT
 
uint32 constexpr PLAYER_MAX_HONOR_LEVEL = 500
 
uint8 constexpr PLAYER_LEVEL_MIN_HONOR = 10
 
uint32 constexpr SPELL_PVP_RULES_ENABLED = 134735
 

Macro Definition Documentation

◆ ACTION_BUTTON_ACTION

#define ACTION_BUTTON_ACTION (   X)    (uint64(X) & 0x00000000FFFFFFFF)

◆ ACTION_BUTTON_TYPE

#define ACTION_BUTTON_TYPE (   X)    ((uint64(X) & 0xFFFFFFFF00000000) >> 56)

◆ DISABLED_MIRROR_TIMER

#define DISABLED_MIRROR_TIMER   -1

◆ INVENTORY_DEFAULT_SIZE

#define INVENTORY_DEFAULT_SIZE   16

◆ INVENTORY_SLOT_BAG_0

#define INVENTORY_SLOT_BAG_0   255

◆ MAX_ACTION_BUTTON_ACTION_VALUE

#define MAX_ACTION_BUTTON_ACTION_VALUE   (0xFFFFFFFF)

◆ MAX_ACTION_BUTTONS

#define MAX_ACTION_BUTTONS   132

◆ MAX_DRUNKEN

#define MAX_DRUNKEN   4

◆ MAX_PLAYED_TIME_INDEX

#define MAX_PLAYED_TIME_INDEX   2

◆ MAX_PLAYER_SUMMON_DELAY

#define MAX_PLAYER_SUMMON_DELAY   (2*MINUTE)

◆ MAX_QUEST_COUNTS

#define MAX_QUEST_COUNTS   24

◆ MAX_QUEST_OFFSET

#define MAX_QUEST_OFFSET   16

◆ MAX_RECHARGING_RUNES

#define MAX_RECHARGING_RUNES   3

◆ MAX_RUNES

#define MAX_RUNES   7

◆ MAX_TIMERS

#define MAX_TIMERS   3

◆ PLAYER_EXPLORED_ZONES_SIZE

#define PLAYER_EXPLORED_ZONES_SIZE   192

◆ PLAYER_MAX_SKILLS

#define PLAYER_MAX_SKILLS   256

◆ QUESTS_COMPLETED_BITS_SIZE

#define QUESTS_COMPLETED_BITS_SIZE   1750

◆ VISIBLE_ITEM_ENCHANTMENT_OFFSET

#define VISIBLE_ITEM_ENCHANTMENT_OFFSET   1

◆ VISIBLE_ITEM_ENTRY_OFFSET

#define VISIBLE_ITEM_ENTRY_OFFSET   0

Typedef Documentation

◆ ActionButtonList

typedef std::map<uint8, ActionButton> ActionButtonList

◆ EnchantDurationList

◆ InstanceTimeMap

typedef std::unordered_map<uint32 , time_t> InstanceTimeMap

◆ ItemDurationList

typedef std::list<Item*> ItemDurationList

◆ ItemPosCountVec

typedef std::vector<ItemPosCount> ItemPosCountVec

◆ PlayerCurrenciesMap

typedef std::unordered_map<uint32, PlayerCurrency> PlayerCurrenciesMap

◆ PlayerMails

typedef std::deque<Mail*> PlayerMails

◆ PlayerPvpTalentMap

◆ PlayerSpellMap

typedef std::unordered_map<uint32, PlayerSpell> PlayerSpellMap

◆ PlayerTalentMap

typedef std::unordered_map<uint32, PlayerSpellState> PlayerTalentMap

◆ QuestObjectiveStatusMap

◆ QuestStatusMap

◆ QuestStatusSaveMap

◆ RewardedQuestSet

typedef std::set<uint32> RewardedQuestSet

◆ SkillStatusMap

typedef std::unordered_map<uint32, SkillStatusData> SkillStatusMap

◆ SpellFlatModifierByLabel

◆ SpellModContainer

typedef std::unordered_set<SpellModifier*> SpellModContainer

◆ SpellPctModifierByLabel

Enumeration Type Documentation

◆ ActionButtonType

Enumerator
ACTION_BUTTON_SPELL 
ACTION_BUTTON_C 
ACTION_BUTTON_EQSET 
ACTION_BUTTON_DROPDOWN 
ACTION_BUTTON_MACRO 
ACTION_BUTTON_CMACRO 
ACTION_BUTTON_MOUNT 
ACTION_BUTTON_ITEM 
317 {
318  ACTION_BUTTON_SPELL = 0x00,
319  ACTION_BUTTON_C = 0x01, // click?
320  ACTION_BUTTON_EQSET = 0x20,
321  ACTION_BUTTON_DROPDOWN = 0x30,
322  ACTION_BUTTON_MACRO = 0x40,
324  ACTION_BUTTON_MOUNT = 0x60,
325  ACTION_BUTTON_ITEM = 0x80
326 };
Definition: Player.h:322
Definition: Player.h:318
Definition: Player.h:321
Definition: Player.h:324
Definition: Player.h:319
Definition: Player.h:323
Definition: Player.h:325
Definition: Player.h:320

◆ ActionButtonUpdateState

Enumerator
ACTIONBUTTON_UNCHANGED 
ACTIONBUTTON_CHANGED 
ACTIONBUTTON_NEW 
ACTIONBUTTON_DELETED 
309 {
312  ACTIONBUTTON_NEW = 2,
314 };
Definition: Player.h:310
Definition: Player.h:311
Definition: Player.h:313
Definition: Player.h:312

◆ ArenaTeamInfoType

Enumerator
ARENA_TEAM_ID 
ARENA_TEAM_TYPE 
ARENA_TEAM_MEMBER 
ARENA_TEAM_GAMES_WEEK 
ARENA_TEAM_GAMES_SEASON 
ARENA_TEAM_WINS_SEASON 
ARENA_TEAM_PERSONAL_RATING 
ARENA_TEAM_END 
794 {
795  ARENA_TEAM_ID = 0,
796  ARENA_TEAM_TYPE = 1, // new in 3.2 - team type?
797  ARENA_TEAM_MEMBER = 2, // 0 - captain, 1 - member
802  ARENA_TEAM_END = 7
803 };
Definition: Player.h:795
Definition: Player.h:800
Definition: Player.h:801
Definition: Player.h:798
Definition: Player.h:802
Definition: Player.h:797
Definition: Player.h:799
Definition: Player.h:796

◆ AtLoginFlags

Enumerator
AT_LOGIN_NONE 
AT_LOGIN_RENAME 
AT_LOGIN_RESET_SPELLS 
AT_LOGIN_RESET_TALENTS 
AT_LOGIN_CUSTOMIZE 
AT_LOGIN_RESET_PET_TALENTS 
AT_LOGIN_FIRST 
AT_LOGIN_CHANGE_FACTION 
AT_LOGIN_CHANGE_RACE 
AT_LOGIN_RESURRECT 
561 {
562  AT_LOGIN_NONE = 0x000,
563  AT_LOGIN_RENAME = 0x001,
564  AT_LOGIN_RESET_SPELLS = 0x002,
565  AT_LOGIN_RESET_TALENTS = 0x004,
566  AT_LOGIN_CUSTOMIZE = 0x008,
568  AT_LOGIN_FIRST = 0x020,
569  AT_LOGIN_CHANGE_FACTION = 0x040,
570  AT_LOGIN_CHANGE_RACE = 0x080,
571  AT_LOGIN_RESURRECT = 0x100,
572 };
Definition: Player.h:570
Definition: Player.h:571
Definition: Player.h:569
Definition: Player.h:566
Definition: Player.h:568
Definition: Player.h:567
Definition: Player.h:565
Definition: Player.h:563
Definition: Player.h:562
Definition: Player.h:564

◆ BankBagSlots

Enumerator
BANK_SLOT_BAG_START 
BANK_SLOT_BAG_END 
700 {
701  BANK_SLOT_BAG_START = 79,
702  BANK_SLOT_BAG_END = 86
703 };
Definition: Player.h:701
Definition: Player.h:702

◆ BankItemSlots

Enumerator
BANK_SLOT_ITEM_START 
BANK_SLOT_ITEM_END 
694 {
696  BANK_SLOT_ITEM_END = 79
697 };
Definition: Player.h:695
Definition: Player.h:696

◆ BindExtensionState

Enumerator
EXTEND_STATE_EXPIRED 
EXTEND_STATE_NORMAL 
EXTEND_STATE_EXTENDED 
EXTEND_STATE_KEEP 
924 {
928  EXTEND_STATE_KEEP = 255 // special state: keep current save type
929 };
Definition: Player.h:928
Definition: Player.h:927
Definition: Player.h:925
Definition: Player.h:926

◆ BuyBackSlots

Enumerator
BUYBACK_SLOT_START 
BUYBACK_SLOT_END 
706 {
707  // stored in m_buybackitems
708  BUYBACK_SLOT_START = 86,
709  BUYBACK_SLOT_END = 98
710 };
Definition: Player.h:709
Definition: Player.h:708

◆ BuyBankSlotResult

Enumerator
ERR_BANKSLOT_FAILED_TOO_MANY 
ERR_BANKSLOT_INSUFFICIENT_FUNDS 
ERR_BANKSLOT_NOTBANKER 
ERR_BANKSLOT_OK 
168 {
172  ERR_BANKSLOT_OK = 3
173 };
Definition: Player.h:170
Definition: Player.h:171
Definition: Player.h:169
Definition: Player.h:172

◆ CharDeleteMethod

Enumerator
CHAR_DELETE_REMOVE 
CHAR_DELETE_UNLINK 
947 {
948  CHAR_DELETE_REMOVE = 0, // Completely remove from the database
949  CHAR_DELETE_UNLINK = 1 // The character gets unlinked from the account,
950  // the name gets freed up and appears as deleted ingame
951 };
Definition: Player.h:949
Definition: Player.h:948

◆ ChildEquipmentSlots

Enumerator
CHILD_EQUIPMENT_SLOT_START 
CHILD_EQUIPMENT_SLOT_END 
719 {
722 };
Definition: Player.h:720
Definition: Player.h:721

◆ DisplayToastMethod

enum DisplayToastMethod : uint8
strong
Enumerator
DoNotDisplay 
Loot 
PetBattle 
PersonalLoot 
GarrisonMissionLoot 
QuestUpgrade 
QuestUpgradeEpic 
Shipment 
GarrisonMissionSalvage 
PvPFactionReward 
GarrisonCurrency 
LessAwesomeLoot 
UpgradedLoot 
LegendaryLoot 
InvasionLoot 
Default 
QuestComplete 
RatedPvPReward 
CorruptedLoot 

◆ DisplayToastType

enum DisplayToastType : uint8
strong
Enumerator
NewItem 
NewCurrency 
Money 
Honor 
989  : uint8
990 {
991  NewItem = 0,
992  NewCurrency = 1,
993  Money = 2,
994  Honor = 3
995 };
uint8_t uint8
Definition: Define.h:145

◆ DrunkenState

Enumerator
DRUNKEN_SOBER 
DRUNKEN_TIPSY 
DRUNKEN_DRUNK 
DRUNKEN_SMASHED 
442 {
443  DRUNKEN_SOBER = 0,
444  DRUNKEN_TIPSY = 1,
445  DRUNKEN_DRUNK = 2,
446  DRUNKEN_SMASHED = 3
447 };
Definition: Player.h:443
Definition: Player.h:446
Definition: Player.h:444
Definition: Player.h:445

◆ DuelState

enum DuelState
Enumerator
DUEL_STATE_CHALLENGED 
DUEL_STATE_COUNTDOWN 
DUEL_STATE_IN_PROGRESS 
DUEL_STATE_COMPLETED 
381 {
386 };
Definition: Player.h:385
Definition: Player.h:384
Definition: Player.h:382
Definition: Player.h:383

◆ EnviromentalDamage

Type of environmental damages.

Enumerator
DAMAGE_EXHAUSTED 
DAMAGE_DROWNING 
DAMAGE_FALL 
DAMAGE_LAVA 
DAMAGE_SLIME 
DAMAGE_FIRE 
DAMAGE_FALL_TO_VOID 
820  : uint8
821 {
822  DAMAGE_EXHAUSTED = 0,
823  DAMAGE_DROWNING = 1,
824  DAMAGE_FALL = 2,
825  DAMAGE_LAVA = 3,
826  DAMAGE_SLIME = 4,
827  DAMAGE_FIRE = 5,
828  DAMAGE_FALL_TO_VOID = 6 // custom case for fall without durability loss
829 };
Definition: Player.h:825
Definition: Player.h:822
Definition: Player.h:823
Definition: Player.h:828
Definition: Player.h:826
Definition: Player.h:827
Definition: Player.h:824
uint8_t uint8
Definition: Define.h:145

◆ EquipmentSlots

Enumerator
EQUIPMENT_SLOT_START 
EQUIPMENT_SLOT_HEAD 
EQUIPMENT_SLOT_NECK 
EQUIPMENT_SLOT_SHOULDERS 
EQUIPMENT_SLOT_BODY 
EQUIPMENT_SLOT_CHEST 
EQUIPMENT_SLOT_WAIST 
EQUIPMENT_SLOT_LEGS 
EQUIPMENT_SLOT_FEET 
EQUIPMENT_SLOT_WRISTS 
EQUIPMENT_SLOT_HANDS 
EQUIPMENT_SLOT_FINGER1 
EQUIPMENT_SLOT_FINGER2 
EQUIPMENT_SLOT_TRINKET1 
EQUIPMENT_SLOT_TRINKET2 
EQUIPMENT_SLOT_BACK 
EQUIPMENT_SLOT_MAINHAND 
EQUIPMENT_SLOT_OFFHAND 
EQUIPMENT_SLOT_RANGED 
EQUIPMENT_SLOT_TABARD 
EQUIPMENT_SLOT_END 
653  : uint8 // 19 slots
654 {
670  EQUIPMENT_SLOT_BACK = 14,
675  EQUIPMENT_SLOT_END = 19
676 };
Definition: Player.h:658
Definition: Player.h:656
Definition: Player.h:661
Definition: Player.h:674
Definition: Player.h:672
Definition: Player.h:660
Definition: Player.h:666
Definition: Player.h:662
Definition: Player.h:673
Definition: Player.h:657
Definition: Player.h:667
Definition: Player.h:659
Definition: Player.h:668
Definition: Player.h:671
Definition: Player.h:669
Definition: Player.h:655
Definition: Player.h:670
uint8_t uint8
Definition: Define.h:145
Definition: Player.h:663
Definition: Player.h:665
Definition: Player.h:675
Definition: Player.h:664

◆ InstanceResetWarningType

Enumerator
RAID_INSTANCE_WARNING_HOURS 
RAID_INSTANCE_WARNING_MIN 
RAID_INSTANCE_WARNING_MIN_SOON 
RAID_INSTANCE_WELCOME 
RAID_INSTANCE_EXPIRED 
784 {
785  RAID_INSTANCE_WARNING_HOURS = 1, // WARNING! %s is scheduled to reset in %d hour(s).
786  RAID_INSTANCE_WARNING_MIN = 2, // WARNING! %s is scheduled to reset in %d minute(s)!
787  RAID_INSTANCE_WARNING_MIN_SOON = 3, // WARNING! %s is scheduled to reset in %d minute(s). Please exit the zone or you will be returned to your bind location!
788  RAID_INSTANCE_WELCOME = 4, // Welcome to %s. This raid instance is scheduled to reset in %s.
790 };
Definition: Player.h:787
Definition: Player.h:785
Definition: Player.h:786
Definition: Player.h:789
Definition: Player.h:788

◆ InventoryPackSlots

Enumerator
INVENTORY_SLOT_ITEM_START 
INVENTORY_SLOT_ITEM_END 
687  : uint8 // 28 slots
688 {
691 };
Definition: Player.h:690
Definition: Player.h:689
uint8_t uint8
Definition: Define.h:145

◆ InventorySlots

Enumerator
INVENTORY_SLOT_BAG_START 
INVENTORY_SLOT_BAG_END 
681  : uint8 // 4 slots
682 {
685 };
Definition: Player.h:683
Definition: Player.h:684
uint8_t uint8
Definition: Define.h:145

◆ ItemSearchCallbackResult

Enumerator
Stop 
Continue 

◆ ItemSearchLocation

enum ItemSearchLocation
strong
Enumerator
Equipment 
Inventory 
Bank 
ReagentBank 
Default 
Everywhere 

◆ MirrorTimerType

Enumerator
FATIGUE_TIMER 
BREATH_TIMER 
FIRE_TIMER 
532 {
533  FATIGUE_TIMER = 0,
534  BREATH_TIMER = 1,
535  FIRE_TIMER = 2 // feign death
536 };
Definition: Player.h:534
Definition: Player.h:535
Definition: Player.h:533

◆ NewWorldReason

Enumerator
NEW_WORLD_NORMAL 
NEW_WORLD_SEAMLESS 
778 {
779  NEW_WORLD_NORMAL = 16, // Normal map change
780  NEW_WORLD_SEAMLESS = 21, // Teleport to another map without a loading screen, used for outdoor scenarios
781 };
Definition: Player.h:780
Definition: Player.h:779

◆ PlayedTimeIndex

Enumerator
PLAYED_TIME_TOTAL 
PLAYED_TIME_LEVEL 
832 {
833  PLAYED_TIME_TOTAL = 0,
835 };
Definition: Player.h:833
Definition: Player.h:834

◆ PlayerCommandStates

Enumerator
CHEAT_NONE 
CHEAT_GOD 
CHEAT_CASTTIME 
CHEAT_COOLDOWN 
CHEAT_POWER 
CHEAT_WATERWALK 
974 {
975  CHEAT_NONE = 0x00,
976  CHEAT_GOD = 0x01,
977  CHEAT_CASTTIME = 0x02,
978  CHEAT_COOLDOWN = 0x04,
979  CHEAT_POWER = 0x08,
980  CHEAT_WATERWALK = 0x10
981 };
Definition: Player.h:978
Definition: Player.h:976
Definition: Player.h:979
Definition: Player.h:975
Definition: Player.h:980
Definition: Player.h:977

◆ PlayerCurrencyState

Enumerator
PLAYERCURRENCY_UNCHANGED 
PLAYERCURRENCY_CHANGED 
PLAYERCURRENCY_NEW 
PLAYERCURRENCY_REMOVED 
284 {
287  PLAYERCURRENCY_NEW = 2,
288  PLAYERCURRENCY_REMOVED = 3 //not removed just set count == 0
289 };
Definition: Player.h:286
Definition: Player.h:288
Definition: Player.h:285
Definition: Player.h:287

◆ PlayerDelayedOperations

Enumerator
DELAYED_SAVE_PLAYER 
DELAYED_RESURRECT_PLAYER 
DELAYED_SPELL_CAST_DESERTER 
DELAYED_BG_MOUNT_RESTORE 

Flag to restore mount state after teleport from BG.

DELAYED_BG_TAXI_RESTORE 

Flag to restore taxi state after teleport from BG.

DELAYED_BG_GROUP_RESTORE 

Flag to restore group state after teleport from BG.

DELAYED_END 
908 {
909  DELAYED_SAVE_PLAYER = 0x01,
912  DELAYED_BG_MOUNT_RESTORE = 0x08,
913  DELAYED_BG_TAXI_RESTORE = 0x10,
914  DELAYED_BG_GROUP_RESTORE = 0x20,
916 };
Definition: Player.h:911
Flag to restore group state after teleport from BG.
Definition: Player.h:914
Flag to restore taxi state after teleport from BG.
Definition: Player.h:913
Definition: Player.h:910
Flag to restore mount state after teleport from BG.
Definition: Player.h:912
Definition: Player.h:909
Definition: Player.h:915

◆ PlayerExtraFlags

Enumerator
PLAYER_EXTRA_GM_ON 
PLAYER_EXTRA_ACCEPT_WHISPERS 
PLAYER_EXTRA_TAXICHEAT 
PLAYER_EXTRA_GM_INVISIBLE 
PLAYER_EXTRA_GM_CHAT 
PLAYER_EXTRA_PVP_DEATH 
PLAYER_EXTRA_HAS_RACE_CHANGED 
PLAYER_EXTRA_GRANTED_LEVELS_FROM_RAF 
PLAYER_EXTRA_LEVEL_BOOSTED 
542 {
543  // gm abilities
544  PLAYER_EXTRA_GM_ON = 0x0001,
546  PLAYER_EXTRA_TAXICHEAT = 0x0008,
547  PLAYER_EXTRA_GM_INVISIBLE = 0x0010,
548  PLAYER_EXTRA_GM_CHAT = 0x0020, // Show GM badge in chat messages
549 
550  // other states
551  PLAYER_EXTRA_PVP_DEATH = 0x0100, // store PvP death status until corpse creating.
552 
553  // Character services markers
557 };
Definition: Player.h:546
Definition: Player.h:544
Definition: Player.h:545
Definition: Player.h:551
Definition: Player.h:547
Definition: Player.h:548
Definition: Player.h:554
Definition: Player.h:556
Definition: Player.h:555

◆ PlayerFieldByte2Flags

Enumerator
PLAYER_FIELD_BYTE2_NONE 
PLAYER_FIELD_BYTE2_STEALTH 
PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW 
525 {
529 };
Definition: Player.h:526
Definition: Player.h:527
Definition: Player.h:528

◆ PlayerFlags

Enumerator
PLAYER_FLAGS_GROUP_LEADER 
PLAYER_FLAGS_AFK 
PLAYER_FLAGS_DND 
PLAYER_FLAGS_GM 
PLAYER_FLAGS_GHOST 
PLAYER_FLAGS_RESTING 
PLAYER_FLAGS_VOICE_CHAT 
PLAYER_FLAGS_UNK7 
PLAYER_FLAGS_CONTESTED_PVP 
PLAYER_FLAGS_IN_PVP 
PLAYER_FLAGS_WAR_MODE_ACTIVE 
PLAYER_FLAGS_WAR_MODE_DESIRED 
PLAYER_FLAGS_PLAYED_LONG_TIME 
PLAYER_FLAGS_PLAYED_TOO_LONG 
PLAYER_FLAGS_IS_OUT_OF_BOUNDS 
PLAYER_FLAGS_DEVELOPER 
PLAYER_FLAGS_LOW_LEVEL_RAID_ENABLED 
PLAYER_FLAGS_TAXI_BENCHMARK 
PLAYER_FLAGS_PVP_TIMER 
PLAYER_FLAGS_UBER 
PLAYER_FLAGS_UNK20 
PLAYER_FLAGS_UNK21 
PLAYER_FLAGS_COMMENTATOR2 
PLAYER_FLAGS_HIDE_ACCOUNT_ACHIEVEMENTS 
PLAYER_FLAGS_PET_BATTLES_UNLOCKED 
PLAYER_FLAGS_NO_XP_GAIN 
PLAYER_FLAGS_UNK26 
PLAYER_FLAGS_AUTO_DECLINE_GUILD 
PLAYER_FLAGS_GUILD_LEVEL_ENABLED 
PLAYER_FLAGS_VOID_UNLOCKED 
PLAYER_FLAGS_TIMEWALKING 
PLAYER_FLAGS_COMMENTATOR_CAMERA 
452 {
453  PLAYER_FLAGS_GROUP_LEADER = 0x00000001,
454  PLAYER_FLAGS_AFK = 0x00000002,
455  PLAYER_FLAGS_DND = 0x00000004,
456  PLAYER_FLAGS_GM = 0x00000008,
457  PLAYER_FLAGS_GHOST = 0x00000010,
458  PLAYER_FLAGS_RESTING = 0x00000020,
459  PLAYER_FLAGS_VOICE_CHAT = 0x00000040,
460  PLAYER_FLAGS_UNK7 = 0x00000080, // pre-3.0.3 PLAYER_FLAGS_FFA_PVP flag for FFA PVP state
461  PLAYER_FLAGS_CONTESTED_PVP = 0x00000100, // Player has been involved in a PvP combat and will be attacked by contested guards
462  PLAYER_FLAGS_IN_PVP = 0x00000200,
463  PLAYER_FLAGS_WAR_MODE_ACTIVE = 0x00000400,
464  PLAYER_FLAGS_WAR_MODE_DESIRED = 0x00000800,
465  PLAYER_FLAGS_PLAYED_LONG_TIME = 0x00001000, // played long time
466  PLAYER_FLAGS_PLAYED_TOO_LONG = 0x00002000, // played too long time
467  PLAYER_FLAGS_IS_OUT_OF_BOUNDS = 0x00004000,
468  PLAYER_FLAGS_DEVELOPER = 0x00008000, // <Dev> prefix for something?
469  PLAYER_FLAGS_LOW_LEVEL_RAID_ENABLED = 0x00010000, // pre-3.0.3 PLAYER_FLAGS_SANCTUARY flag for player entered sanctuary
470  PLAYER_FLAGS_TAXI_BENCHMARK = 0x00020000, // taxi benchmark mode (on/off) (2.0.1)
471  PLAYER_FLAGS_PVP_TIMER = 0x00040000, // 3.0.2, pvp timer active (after you disable pvp manually)
472  PLAYER_FLAGS_UBER = 0x00080000,
473  PLAYER_FLAGS_UNK20 = 0x00100000,
474  PLAYER_FLAGS_UNK21 = 0x00200000,
475  PLAYER_FLAGS_COMMENTATOR2 = 0x00400000,
476  PLAYER_FLAGS_HIDE_ACCOUNT_ACHIEVEMENTS = 0x00800000, // do not send account achievments in inspect packets
477  PLAYER_FLAGS_PET_BATTLES_UNLOCKED = 0x01000000, // enables pet battles
478  PLAYER_FLAGS_NO_XP_GAIN = 0x02000000,
479  PLAYER_FLAGS_UNK26 = 0x04000000,
480  PLAYER_FLAGS_AUTO_DECLINE_GUILD = 0x08000000, // Automatically declines guild invites
481  PLAYER_FLAGS_GUILD_LEVEL_ENABLED = 0x10000000, // Lua_GetGuildLevelEnabled() - enables guild leveling related UI
482  PLAYER_FLAGS_VOID_UNLOCKED = 0x20000000, // void storage
483  PLAYER_FLAGS_TIMEWALKING = 0x40000000,
485 };
Definition: Player.h:461
Definition: Player.h:484
Definition: Player.h:454
Definition: Player.h:462
Definition: Player.h:457
Definition: Player.h:469
Definition: Player.h:460
Definition: Player.h:473
Definition: Player.h:463
Definition: Player.h:459
Definition: Player.h:471
Definition: Player.h:479
Definition: Player.h:480
Definition: Player.h:477
Definition: Player.h:453
Definition: Player.h:481
Definition: Player.h:483
Definition: Player.h:468
Definition: Player.h:465
Definition: Player.h:475
Definition: Player.h:455
Definition: Player.h:478
Definition: Player.h:456
Definition: Player.h:464
Definition: Player.h:472
Definition: Player.h:470
Definition: Player.h:474
Definition: Player.h:482
Definition: Player.h:466
Definition: Player.h:458
Definition: Player.h:467

◆ PlayerFlagsEx

Enumerator
PLAYER_FLAGS_EX_REAGENT_BANK_UNLOCKED 
PLAYER_FLAGS_EX_MERCENARY_MODE 
PLAYER_FLAGS_EX_ARTIFACT_FORGE_CHEAT 
PLAYER_FLAGS_EX_IN_PVP_COMBAT 
PLAYER_FLAGS_EX_MENTOR 
PLAYER_FLAGS_EX_NEWCOMER 
PLAYER_FLAGS_EX_UNLOCKED_AOE_LOOT 
490 {
494  PLAYER_FLAGS_EX_IN_PVP_COMBAT = 0x0040, // Forbids /follow
495  PLAYER_FLAGS_EX_MENTOR = 0x0080,
496  PLAYER_FLAGS_EX_NEWCOMER = 0x0100,
498 };
Definition: Player.h:496
Definition: Player.h:493
Definition: Player.h:495
Definition: Player.h:497
Definition: Player.h:494
Definition: Player.h:492

◆ PlayerLocalFlags

Enumerator
PLAYER_LOCAL_FLAG_CONTROLLING_PET 
PLAYER_LOCAL_FLAG_TRACK_STEALTHED 
PLAYER_LOCAL_FLAG_RELEASE_TIMER 
PLAYER_LOCAL_FLAG_NO_RELEASE_WINDOW 
PLAYER_LOCAL_FLAG_NO_PET_BAR 
PLAYER_LOCAL_FLAG_OVERRIDE_CAMERA_MIN_HEIGHT 
PLAYER_LOCAL_FLAG_NEWLY_BOOSTED_CHARACTER 
PLAYER_LOCAL_FLAG_USING_PARTY_GARRISON 
PLAYER_LOCAL_FLAG_CAN_USE_OBJECTS_MOUNTED 
PLAYER_LOCAL_FLAG_CAN_VISIT_PARTY_GARRISON 
PLAYER_LOCAL_FLAG_WAR_MODE 
PLAYER_LOCAL_FLAG_ACCOUNT_SECURED 
PLAYER_LOCAL_FLAG_OVERRIDE_TRANSPORT_SERVER_TIME 
PLAYER_LOCAL_FLAG_MENTOR_RESTRICTED 
PLAYER_LOCAL_FLAG_WEEKLY_REWARD_AVAILABLE 
503 {
504  PLAYER_LOCAL_FLAG_CONTROLLING_PET = 0x00000001, // Displays "You have an active summon already" when trying to tame new pet
506  PLAYER_LOCAL_FLAG_RELEASE_TIMER = 0x00000008, // Display time till auto release spirit
507  PLAYER_LOCAL_FLAG_NO_RELEASE_WINDOW = 0x00000010, // Display no "release spirit" window at all
508  PLAYER_LOCAL_FLAG_NO_PET_BAR = 0x00000020, // CGPetInfo::IsPetBarUsed
514  PLAYER_LOCAL_FLAG_WAR_MODE = 0x00000800,
515  PLAYER_LOCAL_FLAG_ACCOUNT_SECURED = 0x00001000, // Script_IsAccountSecured
519 };
Definition: Player.h:505
Definition: Player.h:514
Definition: Player.h:507
Definition: Player.h:504
Definition: Player.h:508
Definition: Player.h:506
Definition: Player.h:517
Definition: Player.h:515

◆ PlayerLoginQueryIndex

Enumerator
PLAYER_LOGIN_QUERY_LOAD_FROM 
PLAYER_LOGIN_QUERY_LOAD_CUSTOMIZATIONS 
PLAYER_LOGIN_QUERY_LOAD_GROUP 
PLAYER_LOGIN_QUERY_LOAD_BOUND_INSTANCES 
PLAYER_LOGIN_QUERY_LOAD_AURAS 
PLAYER_LOGIN_QUERY_LOAD_AURA_EFFECTS 
PLAYER_LOGIN_QUERY_LOAD_AURA_STORED_LOCATIONS 
PLAYER_LOGIN_QUERY_LOAD_SPELLS 
PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS 
PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_OBJECTIVES 
PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_OBJECTIVES_CRITERIA 
PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_OBJECTIVES_CRITERIA_PROGRESS 
PLAYER_LOGIN_QUERY_LOAD_DAILY_QUEST_STATUS 
PLAYER_LOGIN_QUERY_LOAD_REPUTATION 
PLAYER_LOGIN_QUERY_LOAD_INVENTORY 
PLAYER_LOGIN_QUERY_LOAD_ARTIFACTS 
PLAYER_LOGIN_QUERY_LOAD_AZERITE 
PLAYER_LOGIN_QUERY_LOAD_AZERITE_MILESTONE_POWERS 
PLAYER_LOGIN_QUERY_LOAD_AZERITE_UNLOCKED_ESSENCES 
PLAYER_LOGIN_QUERY_LOAD_AZERITE_EMPOWERED 
PLAYER_LOGIN_QUERY_LOAD_ACTIONS 
PLAYER_LOGIN_QUERY_LOAD_MAILS 
PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS 
PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_ARTIFACT 
PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_AZERITE 
PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_AZERITE_MILESTONE_POWER 
PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_AZERITE_UNLOCKED_ESSENCE 
PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_AZERITE_EMPOWERED 
PLAYER_LOGIN_QUERY_LOAD_SOCIAL_LIST 
PLAYER_LOGIN_QUERY_LOAD_HOME_BIND 
PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS 
PLAYER_LOGIN_QUERY_LOAD_SPELL_CHARGES 
PLAYER_LOGIN_QUERY_LOAD_DECLINED_NAMES 
PLAYER_LOGIN_QUERY_LOAD_GUILD 
PLAYER_LOGIN_QUERY_LOAD_ARENA_INFO 
PLAYER_LOGIN_QUERY_LOAD_ACHIEVEMENTS 
PLAYER_LOGIN_QUERY_LOAD_CRITERIA_PROGRESS 
PLAYER_LOGIN_QUERY_LOAD_EQUIPMENT_SETS 
PLAYER_LOGIN_QUERY_LOAD_TRANSMOG_OUTFITS 
PLAYER_LOGIN_QUERY_LOAD_BG_DATA 
PLAYER_LOGIN_QUERY_LOAD_GLYPHS 
PLAYER_LOGIN_QUERY_LOAD_TALENTS 
PLAYER_LOGIN_QUERY_LOAD_PVP_TALENTS 
PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA 
PLAYER_LOGIN_QUERY_LOAD_SKILLS 
PLAYER_LOGIN_QUERY_LOAD_WEEKLY_QUEST_STATUS 
PLAYER_LOGIN_QUERY_LOAD_RANDOM_BG 
PLAYER_LOGIN_QUERY_LOAD_BANNED 
PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_REW 
PLAYER_LOGIN_QUERY_LOAD_INSTANCE_LOCK_TIMES 
PLAYER_LOGIN_QUERY_LOAD_SEASONAL_QUEST_STATUS 
PLAYER_LOGIN_QUERY_LOAD_MONTHLY_QUEST_STATUS 
PLAYER_LOGIN_QUERY_LOAD_VOID_STORAGE 
PLAYER_LOGIN_QUERY_LOAD_CURRENCY 
PLAYER_LOGIN_QUERY_LOAD_CUF_PROFILES 
PLAYER_LOGIN_QUERY_LOAD_CORPSE_LOCATION 
PLAYER_LOGIN_QUERY_LOAD_PET_SLOTS 
PLAYER_LOGIN_QUERY_LOAD_GARRISON 
PLAYER_LOGIN_QUERY_LOAD_GARRISON_BLUEPRINTS 
PLAYER_LOGIN_QUERY_LOAD_GARRISON_BUILDINGS 
PLAYER_LOGIN_QUERY_LOAD_GARRISON_FOLLOWERS 
PLAYER_LOGIN_QUERY_LOAD_GARRISON_FOLLOWER_ABILITIES 
MAX_PLAYER_LOGIN_QUERY 
841 {
905 };
Definition: Player.h:870
Definition: Player.h:877
Definition: Player.h:889
Definition: Player.h:885
Definition: Player.h:894
Definition: Player.h:899
Definition: Player.h:850
Definition: Player.h:864
Definition: Player.h:904
Definition: Player.h:863
Definition: Player.h:858
Definition: Player.h:875
Definition: Player.h:883
Definition: Player.h:862
Definition: Player.h:842
Definition: Player.h:849
Definition: Player.h:886
Definition: Player.h:856
Definition: Player.h:846
Definition: Player.h:847
Definition: Player.h:884
Definition: Player.h:896
Definition: Player.h:857
Definition: Player.h:876
Definition: Player.h:844
Definition: Player.h:882
Definition: Player.h:888
Definition: Player.h:898
Definition: Player.h:895
Definition: Player.h:871
Definition: Player.h:855
Definition: Player.h:881

◆ PlayerLogXPReason

Enumerator
LOG_XP_REASON_KILL 
LOG_XP_REASON_NO_KILL 
983  : uint8
984 {
985  LOG_XP_REASON_KILL = 0,
987 };
Definition: Player.h:986
Definition: Player.h:985
uint8_t uint8
Definition: Define.h:145

◆ PlayerSlots

Enumerator
PLAYER_SLOT_START 
PLAYER_SLOT_END 
PLAYER_SLOTS_COUNT 
642 {
643  // first slot for item stored (in any way in player m_items data)
644  PLAYER_SLOT_START = 0,
645  // last+1 slot for item stored (in any way in player m_items data)
646  PLAYER_SLOT_END = 199,
648 };
Definition: Player.h:646
Definition: Player.h:647
Definition: Player.h:644

◆ PlayerSpellState

Enumerator
PLAYERSPELL_UNCHANGED 
PLAYERSPELL_CHANGED 
PLAYERSPELL_NEW 
PLAYERSPELL_REMOVED 
PLAYERSPELL_TEMPORARY 
175  : uint8
176 {
179  PLAYERSPELL_NEW = 2,
182 };
Definition: Player.h:180
Definition: Player.h:178
Definition: Player.h:179
Definition: Player.h:177
uint8_t uint8
Definition: Define.h:145
Definition: Player.h:181

◆ PlayerUnderwaterState

Enumerator
UNDERWATER_NONE 
UNDERWATER_INWATER 
UNDERWATER_INLAVA 
UNDERWATER_INSLIME 
UNDERWATER_INDARKWATER 
UNDERWATER_EXIST_TIMERS 
157 {
158  UNDERWATER_NONE = 0x00,
159  UNDERWATER_INWATER = 0x01, // terrain type is water and player is afflicted by it
160  UNDERWATER_INLAVA = 0x02, // terrain type is lava and player is afflicted by it
161  UNDERWATER_INSLIME = 0x04, // terrain type is lava and player is afflicted by it
162  UNDERWATER_INDARKWATER = 0x08, // terrain type is dark water and player is afflicted by it
163 
165 };
Definition: Player.h:160
Definition: Player.h:164
Definition: Player.h:161
Definition: Player.h:159
Definition: Player.h:158
Definition: Player.h:162

◆ QuestSaveType

Enumerator
QUEST_DEFAULT_SAVE_TYPE 
QUEST_DELETE_SAVE_TYPE 
QUEST_FORCE_DELETE_SAVE_TYPE 
587 {
591 };
Definition: Player.h:588
Definition: Player.h:589
Definition: Player.h:590

◆ QuestSlotOffsets

Enumerator
QUEST_ID_OFFSET 
QUEST_STATE_OFFSET 
QUEST_COUNTS_OFFSET 
QUEST_TIME_OFFSET 
600 {
601  QUEST_ID_OFFSET = 0,
602  QUEST_STATE_OFFSET = 1,
604  QUEST_TIME_OFFSET = 14
605 };
Definition: Player.h:602
Definition: Player.h:604
Definition: Player.h:601
Definition: Player.h:603

◆ QuestSlotStateMask

Enumerator
QUEST_STATE_NONE 
QUEST_STATE_COMPLETE 
QUEST_STATE_FAIL 
611 {
612  QUEST_STATE_NONE = 0x0000,
613  QUEST_STATE_COMPLETE = 0x0001,
614  QUEST_STATE_FAIL = 0x0002
615 };
Definition: Player.h:612
Definition: Player.h:614
Definition: Player.h:613

◆ ReagentSlots

Enumerator
REAGENT_SLOT_START 
REAGENT_SLOT_END 
713 {
714  REAGENT_SLOT_START = 98,
715  REAGENT_SLOT_END = 196,
716 };
Definition: Player.h:715
Definition: Player.h:714

◆ ReferAFriendError

Enumerator
ERR_REFER_A_FRIEND_NONE 
ERR_REFER_A_FRIEND_NOT_REFERRED_BY 
ERR_REFER_A_FRIEND_TARGET_TOO_HIGH 
ERR_REFER_A_FRIEND_INSUFFICIENT_GRANTABLE_LEVELS 
ERR_REFER_A_FRIEND_TOO_FAR 
ERR_REFER_A_FRIEND_DIFFERENT_FACTION 
ERR_REFER_A_FRIEND_NOT_NOW 
ERR_REFER_A_FRIEND_GRANT_LEVEL_MAX_I 
ERR_REFER_A_FRIEND_NO_TARGET 
ERR_REFER_A_FRIEND_NOT_IN_GROUP 
ERR_REFER_A_FRIEND_SUMMON_LEVEL_MAX_I 
ERR_REFER_A_FRIEND_SUMMON_COOLDOWN 
ERR_REFER_A_FRIEND_INSUF_EXPAN_LVL 
ERR_REFER_A_FRIEND_SUMMON_OFFLINE_S 
ERR_REFER_A_FRIEND_NO_XREALM 
ERR_REFER_A_FRIEND_MAP_INCOMING_TRANSFER_NOT_ALLOWED 
954 {
971 };
Definition: Player.h:955
Definition: Player.h:968
Definition: Player.h:964
Definition: Player.h:969
Definition: Player.h:961
Definition: Player.h:966
Definition: Player.h:960
Definition: Player.h:963
Definition: Player.h:967
Definition: Player.h:957
Definition: Player.h:956
Definition: Player.h:959
Definition: Player.h:962

◆ ReputationSource

Enumerator
REPUTATION_SOURCE_KILL 
REPUTATION_SOURCE_QUEST 
REPUTATION_SOURCE_DAILY_QUEST 
REPUTATION_SOURCE_WEEKLY_QUEST 
REPUTATION_SOURCE_MONTHLY_QUEST 
REPUTATION_SOURCE_REPEATABLE_QUEST 
REPUTATION_SOURCE_SPELL 

◆ RuneCooldowns

Enumerator
RUNE_BASE_COOLDOWN 
RUNE_MISS_COOLDOWN 
413 {
414  RUNE_BASE_COOLDOWN = 10000,
415  RUNE_MISS_COOLDOWN = 1500 // cooldown applied on runes when the spell misses
416 };
Definition: Player.h:414
Definition: Player.h:415

◆ SkillFieldOffset

Enumerator
SKILL_ID_OFFSET 
SKILL_STEP_OFFSET 
SKILL_RANK_OFFSET 
SUBSKILL_START_RANK_OFFSET 
SKILL_MAX_RANK_OFFSET 
SKILL_TEMP_BONUS_OFFSET 
SKILL_PERM_BONUS_OFFSET 
133  : uint16
134 {
135  SKILL_ID_OFFSET = 0,
136  SKILL_STEP_OFFSET = SKILL_ID_OFFSET + CalculateSkillFieldArraySize<uint16>(),
137  SKILL_RANK_OFFSET = SKILL_STEP_OFFSET + CalculateSkillFieldArraySize<uint16>(),
138  SUBSKILL_START_RANK_OFFSET = SKILL_RANK_OFFSET + CalculateSkillFieldArraySize<uint16>(),
139  SKILL_MAX_RANK_OFFSET = SUBSKILL_START_RANK_OFFSET + CalculateSkillFieldArraySize<uint16>(),
140  SKILL_TEMP_BONUS_OFFSET = SKILL_MAX_RANK_OFFSET + CalculateSkillFieldArraySize<uint16>(),
141  SKILL_PERM_BONUS_OFFSET = SKILL_TEMP_BONUS_OFFSET + CalculateSkillFieldArraySize<uint16>()
142 };
Definition: Player.h:136
Definition: Player.h:137
Definition: Player.h:135
uint16_t uint16
Definition: Define.h:144
Definition: Player.h:141
Definition: Player.h:138
Definition: Player.h:140
Definition: Player.h:139

◆ SkillUpdateState

Enumerator
SKILL_UNCHANGED 
SKILL_CHANGED 
SKILL_NEW 
SKILL_DELETED 
618 {
619  SKILL_UNCHANGED = 0,
620  SKILL_CHANGED = 1,
621  SKILL_NEW = 2,
622  SKILL_DELETED = 3
623 };
Definition: Player.h:619
Definition: Player.h:621
Definition: Player.h:620
Definition: Player.h:622

◆ SpecResetType

Enumerator
SPEC_RESET_TALENTS 
SPEC_RESET_SPECIALIZATION 
SPEC_RESET_GLYPHS 
SPEC_RESET_PET_TALENTS 
245 {
246  SPEC_RESET_TALENTS = 0,
248  SPEC_RESET_GLYPHS = 2,
250 };
Definition: Player.h:249
Definition: Player.h:247
Definition: Player.h:248
Definition: Player.h:246

◆ SpellModType

Enumerator
SPELLMOD_FLAT 
SPELLMOD_PCT 
SPELLMOD_LABEL_FLAT 
SPELLMOD_LABEL_PCT 
SPELLMOD_END 
146  : uint8
147 {
148  SPELLMOD_FLAT = 0, // SPELL_AURA_ADD_FLAT_MODIFIER
149  SPELLMOD_PCT = 1, // SPELL_AURA_ADD_PCT_MODIFIER
150  SPELLMOD_LABEL_FLAT = 2, // SPELL_AURA_ADD_FLAT_MODIFIER_BY_SPELL_LABEL
151  SPELLMOD_LABEL_PCT = 3, // SPELL_AURA_ADD_PCT_MODIFIER_BY_SPELL_LABEL
153 };
Definition: Player.h:149
Definition: Player.h:152
Definition: Player.h:151
Definition: Player.h:150
uint8_t uint8
Definition: Define.h:145
Definition: Player.h:148

◆ TalentLearnResult

Enumerator
TALENT_LEARN_OK 
TALENT_FAILED_UNKNOWN 
TALENT_FAILED_NOT_ENOUGH_TALENTS_IN_PRIMARY_TREE 
TALENT_FAILED_NO_PRIMARY_TREE_SELECTED 
TALENT_FAILED_CANT_DO_THAT_RIGHT_NOW 
TALENT_FAILED_AFFECTING_COMBAT 
TALENT_FAILED_CANT_REMOVE_TALENT 
TALENT_FAILED_CANT_DO_THAT_CHALLENGE_MODE_ACTIVE 
TALENT_FAILED_REST_AREA 

◆ TalentSpecialization

Enumerator
TALENT_SPEC_MAGE_ARCANE 
TALENT_SPEC_MAGE_FIRE 
TALENT_SPEC_MAGE_FROST 
TALENT_SPEC_PALADIN_HOLY 
TALENT_SPEC_PALADIN_PROTECTION 
TALENT_SPEC_PALADIN_RETRIBUTION 
TALENT_SPEC_WARRIOR_ARMS 
TALENT_SPEC_WARRIOR_FURY 
TALENT_SPEC_WARRIOR_PROTECTION 
TALENT_SPEC_DRUID_BALANCE 
TALENT_SPEC_DRUID_CAT 
TALENT_SPEC_DRUID_BEAR 
TALENT_SPEC_DRUID_RESTORATION 
TALENT_SPEC_DEATHKNIGHT_BLOOD 
TALENT_SPEC_DEATHKNIGHT_FROST 
TALENT_SPEC_DEATHKNIGHT_UNHOLY 
TALENT_SPEC_HUNTER_BEASTMASTER 
TALENT_SPEC_HUNTER_MARKSMAN 
TALENT_SPEC_HUNTER_SURVIVAL 
TALENT_SPEC_PRIEST_DISCIPLINE 
TALENT_SPEC_PRIEST_HOLY 
TALENT_SPEC_PRIEST_SHADOW 
TALENT_SPEC_ROGUE_ASSASSINATION 
TALENT_SPEC_ROGUE_COMBAT 
TALENT_SPEC_ROGUE_SUBTLETY 
TALENT_SPEC_SHAMAN_ELEMENTAL 
TALENT_SPEC_SHAMAN_ENHANCEMENT 
TALENT_SPEC_SHAMAN_RESTORATION 
TALENT_SPEC_WARLOCK_AFFLICTION 
TALENT_SPEC_WARLOCK_DEMONOLOGY 
TALENT_SPEC_WARLOCK_DESTRUCTION 
TALENT_SPEC_MONK_BREWMASTER 
TALENT_SPEC_MONK_BATTLEDANCER 
TALENT_SPEC_MONK_MISTWEAVER 
TALENT_SPEC_DEMON_HUNTER_HAVOC 
TALENT_SPEC_DEMON_HUNTER_VENGEANCE 
205 {
216  TALENT_SPEC_DRUID_CAT = 103,
242 };
Definition: Player.h:215
Definition: Player.h:209
Definition: Player.h:225
Definition: Player.h:238
Definition: Player.h:224
Definition: Player.h:231
Definition: Player.h:227
Definition: Player.h:237
Definition: Player.h:241
Definition: Player.h:211
Definition: Player.h:232
Definition: Player.h:235
Definition: Player.h:210
Definition: Player.h:228
Definition: Player.h:240
Definition: Player.h:218
Definition: Player.h:207
Definition: Player.h:226
Definition: Player.h:206
Definition: Player.h:222
Definition: Player.h:223
Definition: Player.h:208
Definition: Player.h:229
Definition: Player.h:214
Definition: Player.h:234
Definition: Player.h:213
Definition: Player.h:236
Definition: Player.h:212
Definition: Player.h:233
Definition: Player.h:216
Definition: Player.h:239
Definition: Player.h:230
Definition: Player.h:221
Definition: Player.h:217
Definition: Player.h:220
Definition: Player.h:219

◆ TeleportToOptions

Enumerator
TELE_TO_GM_MODE 
TELE_TO_NOT_LEAVE_TRANSPORT 
TELE_TO_NOT_LEAVE_COMBAT 
TELE_TO_NOT_UNSUMMON_PET 
TELE_TO_SPELL 
TELE_TO_TRANSPORT_TELEPORT 
TELE_REVIVE_AT_TELEPORT 
TELE_TO_SEAMLESS 
808 {
809  TELE_TO_GM_MODE = 0x01,
813  TELE_TO_SPELL = 0x10,
814  TELE_TO_TRANSPORT_TELEPORT = 0x20, // 3.3.5 only
816  TELE_TO_SEAMLESS = 0x80
817 };
Definition: Player.h:816
Definition: Player.h:814
Definition: Player.h:815
Definition: Player.h:810
Definition: Player.h:812
Definition: Player.h:811
Definition: Player.h:809
Definition: Player.h:813

◆ TransferAbortReason

Enumerator
TRANSFER_ABORT_NONE 
TRANSFER_ABORT_ERROR 
TRANSFER_ABORT_MAX_PLAYERS 
TRANSFER_ABORT_NOT_FOUND 
TRANSFER_ABORT_TOO_MANY_INSTANCES 
TRANSFER_ABORT_ZONE_IN_COMBAT 
TRANSFER_ABORT_INSUF_EXPAN_LVL 
TRANSFER_ABORT_DIFFICULTY 
TRANSFER_ABORT_UNIQUE_MESSAGE 
TRANSFER_ABORT_TOO_MANY_REALM_INSTANCES 
TRANSFER_ABORT_NEED_GROUP 
TRANSFER_ABORT_NOT_FOUND_2 
TRANSFER_ABORT_NOT_FOUND_3 
TRANSFER_ABORT_NOT_FOUND_4 
TRANSFER_ABORT_REALM_ONLY 
TRANSFER_ABORT_MAP_NOT_ALLOWED 
TRANSFER_ABORT_LOCKED_TO_DIFFERENT_INSTANCE 
TRANSFER_ABORT_ALREADY_COMPLETED_ENCOUNTER 
TRANSFER_ABORT_DIFFICULTY_NOT_FOUND 
TRANSFER_ABORT_XREALM_ZONE_DOWN 
TRANSFER_ABORT_SOLO_PLAYER_SWITCH_DIFFICULTY 
753 {
756  TRANSFER_ABORT_MAX_PLAYERS = 2, // Transfer Aborted: instance is full
757  TRANSFER_ABORT_NOT_FOUND = 3, // Transfer Aborted: instance not found
758  TRANSFER_ABORT_TOO_MANY_INSTANCES = 4, // You have entered too many instances recently.
759  TRANSFER_ABORT_ZONE_IN_COMBAT = 6, // Unable to zone in while an encounter is in progress.
760  TRANSFER_ABORT_INSUF_EXPAN_LVL = 7, // You must have <TBC, WotLK> expansion installed to access this area.
761  TRANSFER_ABORT_DIFFICULTY = 8, // <Normal, Heroic, Epic> difficulty mode is not available for %s.
762  TRANSFER_ABORT_UNIQUE_MESSAGE = 9, // Until you've escaped TLK's grasp, you cannot leave this place!
763  TRANSFER_ABORT_TOO_MANY_REALM_INSTANCES = 10, // Additional instances cannot be launched, please try again later.
764  TRANSFER_ABORT_NEED_GROUP = 11, // Transfer Aborted: you must be in a raid group to enter this instance
765  TRANSFER_ABORT_NOT_FOUND_2 = 12, // Transfer Aborted: instance not found
766  TRANSFER_ABORT_NOT_FOUND_3 = 13, // Transfer Aborted: instance not found
767  TRANSFER_ABORT_NOT_FOUND_4 = 14, // Transfer Aborted: instance not found
768  TRANSFER_ABORT_REALM_ONLY = 15, // All players in the party must be from the same realm to enter %s.
769  TRANSFER_ABORT_MAP_NOT_ALLOWED = 16, // Map cannot be entered at this time.
770  TRANSFER_ABORT_LOCKED_TO_DIFFERENT_INSTANCE = 18, // You are already locked to %s
771  TRANSFER_ABORT_ALREADY_COMPLETED_ENCOUNTER = 19, // You are ineligible to participate in at least one encounter in this instance because you are already locked to an instance in which it has been defeated.
772  TRANSFER_ABORT_DIFFICULTY_NOT_FOUND = 22, // client writes to console "Unable to resolve requested difficultyID %u to actual difficulty for map %d"
773  TRANSFER_ABORT_XREALM_ZONE_DOWN = 24, // Transfer Aborted: cross-realm zone is down
774  TRANSFER_ABORT_SOLO_PLAYER_SWITCH_DIFFICULTY = 26, // This instance is already in progress. You may only switch difficulties from inside the instance.
775 };
Definition: Player.h:762
Definition: Player.h:757
Definition: Player.h:761
Definition: Player.h:756
Definition: Player.h:766
Definition: Player.h:772
Definition: Player.h:760
Definition: Player.h:764
Definition: Player.h:768
Definition: Player.h:754
Definition: Player.h:767
Definition: Player.h:773
Definition: Player.h:769
Definition: Player.h:758
Definition: Player.h:759
Definition: Player.h:765
Definition: Player.h:755

◆ ZonePVPTypeOverride

enum ZonePVPTypeOverride : uint32
strong
Enumerator
None 
Friendly 
Hostile 
Contested 
Combat 
1122  : uint32
1123 {
1124  None = 0,
1125  Friendly = 1,
1126  Hostile = 2,
1127  Contested = 3,
1128  Combat = 4
1129 };
uint32_t uint32
Definition: Define.h:143

Function Documentation

◆ AddItemsSetItem()

TC_GAME_API void AddItemsSetItem ( Player player,
Item const *  item 
)
65 {
66  ItemTemplate const* proto = item->GetTemplate();
67  uint32 setid = proto->GetItemSet();
68 
69  ItemSetEntry const* set = sItemSetStore.LookupEntry(setid);
70 
71  if (!set)
72  {
73  TC_LOG_ERROR("sql.sql", "Item set %u for item (id %u) not found, mods not applied.", setid, proto->GetId());
74  return;
75  }
76 
77  if (set->RequiredSkill && player->GetSkillValue(set->RequiredSkill) < set->RequiredSkillRank)
78  return;
79 
80  if (set->SetFlags & ITEM_SET_FLAG_LEGACY_INACTIVE)
81  return;
82 
83  // Check player level for heirlooms
84  if (sDB2Manager.GetHeirloomByItemId(item->GetEntry()))
85  {
86  if (item->GetBonus()->PlayerLevelToItemLevelCurveId)
87  {
88  uint32 maxLevel = sDB2Manager.GetCurveXAxisRange(item->GetBonus()->PlayerLevelToItemLevelCurveId).second;
89 
90  if (Optional<ContentTuningLevels> contentTuning = sDB2Manager.GetContentTuningData(item->GetBonus()->ContentTuningId, player->m_playerData->CtrOptions->ContentTuningConditionMask, true))
91  maxLevel = std::min<uint32>(maxLevel, contentTuning->MaxLevel);
92 
93  if (player->GetLevel() > maxLevel)
94  return;
95  }
96  }
97 
98  ItemSetEffect* eff = nullptr;
99 
100  for (size_t x = 0; x < player->ItemSetEff.size(); ++x)
101  {
102  if (player->ItemSetEff[x] && player->ItemSetEff[x]->ItemSetID == setid)
103  {
104  eff = player->ItemSetEff[x];
105  break;
106  }
107  }
108 
109  if (!eff)
110  {
111  eff = new ItemSetEffect();
112  eff->ItemSetID = setid;
113 
114  size_t x = 0;
115  for (; x < player->ItemSetEff.size(); ++x)
116  if (!player->ItemSetEff[x])
117  break;
118 
119  if (x < player->ItemSetEff.size())
120  player->ItemSetEff[x] = eff;
121  else
122  player->ItemSetEff.push_back(eff);
123  }
124 
125  eff->EquippedItems.insert(item);
126 
127  if (std::vector<ItemSetSpellEntry const*> const* itemSetSpells = sDB2Manager.GetItemSetSpells(setid))
128  {
129  for (ItemSetSpellEntry const* itemSetSpell : *itemSetSpells)
130  {
131  //not enough for spell
132  if (itemSetSpell->Threshold > eff->EquippedItems.size())
133  continue;
134 
135  if (eff->SetBonuses.count(itemSetSpell))
136  continue;
137 
138  SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itemSetSpell->SpellID, DIFFICULTY_NONE);
139  if (!spellInfo)
140  {
141  TC_LOG_ERROR("entities.player.items", "WORLD: unknown spell id %u in items set %u effects", itemSetSpell->SpellID, setid);
142  continue;
143  }
144 
145  eff->SetBonuses.insert(itemSetSpell);
146  // spell cast only if fit form requirement, in other case will cast at form change
147  if (!itemSetSpell->ChrSpecID || itemSetSpell->ChrSpecID == player->GetPrimarySpecialization())
148  player->ApplyEquipSpell(spellInfo, nullptr, true);
149  }
150  }
151 }
Definition: DBCEnums.h:666
#define sDB2Manager
Definition: DB2Stores.h:479
uint32 GetItemSet() const
Definition: ItemTemplate.h:775
Definition: SpellInfo.h:342
Definition: DBCEnums.h:973
Definition: DB2Structure.h:2187
void ApplyEquipSpell(SpellInfo const *spellInfo, Item *item, bool apply, bool formChange=false)
Definition: Player.cpp:8029
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:185
Definition: Item.h:41
uint32 ItemSetID
Definition: Item.h:43
uint32 GetPrimarySpecialization() const
Definition: Player.h:1840
uint8 GetLevel() const
Definition: Unit.h:863
#define sSpellMgr
Definition: SpellMgr.h:825
Definition: DB2Structure.h:2197
uint32_t uint32
Definition: Define.h:143
Definition: ItemTemplate.h:735
std::unordered_set< Item const * > EquippedItems
Definition: Item.h:44
DB2Storage< ItemSetEntry > sItemSetStore("ItemSet.db2", ItemSetLoadInfo::Instance())
UF::UpdateField< UF::PlayerData, 0, TYPEID_PLAYER > m_playerData
Definition: Player.h:2829
std::unordered_set< ItemSetSpellEntry const * > SetBonuses
Definition: Item.h:45
uint32 GetId() const
Definition: ItemTemplate.h:740
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition: Optional.h:25
uint16 GetSkillValue(uint32 skill) const
Definition: Player.cpp:5905
std::vector< ItemSetEffect * > ItemSetEff
Definition: Player.h:2360
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalculateSkillFieldArraySize()

template<typename SkillArrayType >
constexpr std::size_t CalculateSkillFieldArraySize ( )
129 {
130  return PLAYER_MAX_SKILLS / sizeof(uint32) * sizeof(SkillArrayType);
131 }
#define PLAYER_MAX_SKILLS
Definition: Player.h:125
uint32_t uint32
Definition: Define.h:143

◆ DEFINE_ENUM_FLAG() [1/4]

DEFINE_ENUM_FLAG ( PlayerFlags  )

◆ DEFINE_ENUM_FLAG() [2/4]

DEFINE_ENUM_FLAG ( PlayerFlagsEx  )

◆ DEFINE_ENUM_FLAG() [3/4]

DEFINE_ENUM_FLAG ( PlayerLocalFlags  )

◆ DEFINE_ENUM_FLAG() [4/4]

DEFINE_ENUM_FLAG ( ItemSearchLocation  )

◆ GetBagSize()

TC_GAME_API uint32 GetBagSize ( Bag const *  bag)
304 {
305  return bag->GetBagSize();
306 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetItemInBag()

TC_GAME_API Item* GetItemInBag ( Bag const *  bag,
uint8  slot 
)
309 {
310  return bag->GetItemByPos(slot);
311 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeChrCustomizationChoiceRange()

template<typename Container >
Trinity::IteratorPair<UF::ChrCustomizationChoice const*> MakeChrCustomizationChoiceRange ( Container const &  container)
3206 {
3207  static_assert(std::is_same<typename Container::value_type, UF::ChrCustomizationChoice>::value,
3208  "MakeChrCustomizationChoiceRange must be used with containers of UF::ChrCustomizationChoice");
3209 
3210  return { container.data(), container.data() + container.size() };
3211 }
+ Here is the caller graph for this function:

◆ RemoveItemsSetItem()

TC_GAME_API void RemoveItemsSetItem ( Player player,
Item const *  item 
)
154 {
155  uint32 setid = item->GetTemplate()->GetItemSet();
156 
157  ItemSetEntry const* set = sItemSetStore.LookupEntry(setid);
158 
159  if (!set)
160  {
161  TC_LOG_ERROR("sql.sql", "Item set #%u for item #%u not found, mods not removed.", setid, item->GetEntry());
162  return;
163  }
164 
165  ItemSetEffect* eff = nullptr;
166  size_t setindex = 0;
167  for (; setindex < player->ItemSetEff.size(); setindex++)
168  {
169  if (player->ItemSetEff[setindex] && player->ItemSetEff[setindex]->ItemSetID == setid)
170  {
171  eff = player->ItemSetEff[setindex];
172  break;
173  }
174  }
175 
176  // can be in case now enough skill requirement for set appling but set has been appliend when skill requirement not enough
177  if (!eff)
178  return;
179 
180  eff->EquippedItems.erase(item);
181 
182  if (std::vector<ItemSetSpellEntry const*> const* itemSetSpells = sDB2Manager.GetItemSetSpells(setid))
183  {
184  for (ItemSetSpellEntry const* itemSetSpell : *itemSetSpells)
185  {
186  // enough for spell
187  if (itemSetSpell->Threshold <= eff->EquippedItems.size())
188  continue;
189 
190  if (!eff->SetBonuses.count(itemSetSpell))
191  continue;
192 
193  player->ApplyEquipSpell(sSpellMgr->AssertSpellInfo(itemSetSpell->SpellID, DIFFICULTY_NONE), nullptr, false);
194  eff->SetBonuses.erase(itemSetSpell);
195  }
196  }
197 
198  if (eff->EquippedItems.empty()) //all items of a set were removed
199  {
200  ASSERT(eff == player->ItemSetEff[setindex]);
201  delete eff;
202  player->ItemSetEff[setindex] = nullptr;
203  }
204 }
Definition: DBCEnums.h:666
#define sDB2Manager
Definition: DB2Stores.h:479
Definition: DB2Structure.h:2187
void ApplyEquipSpell(SpellInfo const *spellInfo, Item *item, bool apply, bool formChange=false)
Definition: Player.cpp:8029
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:185
Definition: Item.h:41
#define sSpellMgr
Definition: SpellMgr.h:825
Definition: DB2Structure.h:2197
uint32_t uint32
Definition: Define.h:143
std::unordered_set< Item const * > EquippedItems
Definition: Item.h:44
DB2Storage< ItemSetEntry > sItemSetStore("ItemSet.db2", ItemSetLoadInfo::Instance())
#define ASSERT
Definition: Errors.h:68
std::unordered_set< ItemSetSpellEntry const * > SetBonuses
Definition: Item.h:45
std::vector< ItemSetEffect * > ItemSetEff
Definition: Player.h:2360
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ MAX_MONEY_AMOUNT

TC_GAME_API uint64 const MAX_MONEY_AMOUNT

◆ PLAYER_LEVEL_MIN_HONOR

uint8 constexpr PLAYER_LEVEL_MIN_HONOR = 10

◆ PLAYER_MAX_HONOR_LEVEL

uint32 constexpr PLAYER_MAX_HONOR_LEVEL = 500

◆ SPELL_PVP_RULES_ENABLED

uint32 constexpr SPELL_PVP_RULES_ENABLED = 134735