TrinityCore
Player.h File Reference
#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 <queue>
+ 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::BgBattlegroundQueueID_Rec
 

Namespaces

 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, PlayerSpell * > PlayerSpellMap
 
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  PlayerCreateMode : int8 { PlayerCreateMode::Normal = 0, PlayerCreateMode::NPE = 1 }
 
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  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_TO_SEAMLESS = 0x40
}
 
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_MAIL_COUNT, PLAYER_LOGIN_QUERY_LOAD_MAIL_DATE, 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_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  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 (ItemSearchLocation)
 
TC_GAME_API void AddItemsSetItem (Player *player, Item *item)
 
TC_GAME_API void RemoveItemsSetItem (Player *player, ItemTemplate const *proto)
 
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 = 110
 
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

using QuestObjectiveStatusMap = std::unordered_multimap<std::pair<QuestObjectiveType, int32>, QuestObjectiveStatusData>

◆ 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 
782 {
783  ARENA_TEAM_ID = 0,
784  ARENA_TEAM_TYPE = 1, // new in 3.2 - team type?
785  ARENA_TEAM_MEMBER = 2, // 0 - captain, 1 - member
790  ARENA_TEAM_END = 7
791 };
Definition: Player.h:783
Definition: Player.h:788
Definition: Player.h:789
Definition: Player.h:786
Definition: Player.h:790
Definition: Player.h:785
Definition: Player.h:787
Definition: Player.h:784

◆ 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 
549 {
550  AT_LOGIN_NONE = 0x000,
551  AT_LOGIN_RENAME = 0x001,
552  AT_LOGIN_RESET_SPELLS = 0x002,
553  AT_LOGIN_RESET_TALENTS = 0x004,
554  AT_LOGIN_CUSTOMIZE = 0x008,
556  AT_LOGIN_FIRST = 0x020,
557  AT_LOGIN_CHANGE_FACTION = 0x040,
558  AT_LOGIN_CHANGE_RACE = 0x080,
559  AT_LOGIN_RESURRECT = 0x100,
560 };
Definition: Player.h:558
Definition: Player.h:559
Definition: Player.h:557
Definition: Player.h:554
Definition: Player.h:556
Definition: Player.h:555
Definition: Player.h:553
Definition: Player.h:551
Definition: Player.h:550
Definition: Player.h:552

◆ BankBagSlots

Enumerator
BANK_SLOT_BAG_START 
BANK_SLOT_BAG_END 
688 {
689  BANK_SLOT_BAG_START = 79,
690  BANK_SLOT_BAG_END = 86
691 };
Definition: Player.h:689
Definition: Player.h:690

◆ BankItemSlots

Enumerator
BANK_SLOT_ITEM_START 
BANK_SLOT_ITEM_END 
682 {
684  BANK_SLOT_ITEM_END = 79
685 };
Definition: Player.h:683
Definition: Player.h:684

◆ BindExtensionState

Enumerator
EXTEND_STATE_EXPIRED 
EXTEND_STATE_NORMAL 
EXTEND_STATE_EXTENDED 
EXTEND_STATE_KEEP 
905 {
909  EXTEND_STATE_KEEP = 255 // special state: keep current save type
910 };
Definition: Player.h:909
Definition: Player.h:908
Definition: Player.h:906
Definition: Player.h:907

◆ BuyBackSlots

Enumerator
BUYBACK_SLOT_START 
BUYBACK_SLOT_END 
694 {
695  // stored in m_buybackitems
696  BUYBACK_SLOT_START = 86,
697  BUYBACK_SLOT_END = 98
698 };
Definition: Player.h:697
Definition: Player.h:696

◆ 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 
928 {
929  CHAR_DELETE_REMOVE = 0, // Completely remove from the database
930  CHAR_DELETE_UNLINK = 1 // The character gets unlinked from the account,
931  // the name gets freed up and appears as deleted ingame
932 };
Definition: Player.h:930
Definition: Player.h:929

◆ ChildEquipmentSlots

Enumerator
CHILD_EQUIPMENT_SLOT_START 
CHILD_EQUIPMENT_SLOT_END 
707 {
710 };
Definition: Player.h:708
Definition: Player.h:709

◆ DrunkenState

Enumerator
DRUNKEN_SOBER 
DRUNKEN_TIPSY 
DRUNKEN_DRUNK 
DRUNKEN_SMASHED 
436 {
437  DRUNKEN_SOBER = 0,
438  DRUNKEN_TIPSY = 1,
439  DRUNKEN_DRUNK = 2,
440  DRUNKEN_SMASHED = 3
441 };
Definition: Player.h:437
Definition: Player.h:440
Definition: Player.h:438
Definition: Player.h:439

◆ EnviromentalDamage

Type of environmental damages.

Enumerator
DAMAGE_EXHAUSTED 
DAMAGE_DROWNING 
DAMAGE_FALL 
DAMAGE_LAVA 
DAMAGE_SLIME 
DAMAGE_FIRE 
DAMAGE_FALL_TO_VOID 
807  : uint8
808 {
809  DAMAGE_EXHAUSTED = 0,
810  DAMAGE_DROWNING = 1,
811  DAMAGE_FALL = 2,
812  DAMAGE_LAVA = 3,
813  DAMAGE_SLIME = 4,
814  DAMAGE_FIRE = 5,
815  DAMAGE_FALL_TO_VOID = 6 // custom case for fall without durability loss
816 };
Definition: Player.h:812
Definition: Player.h:809
Definition: Player.h:810
Definition: Player.h:815
Definition: Player.h:813
Definition: Player.h:814
Definition: Player.h:811
uint8_t uint8
Definition: Define.h:154

◆ 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 
641  : uint8 // 19 slots
642 {
658  EQUIPMENT_SLOT_BACK = 14,
663  EQUIPMENT_SLOT_END = 19
664 };
Definition: Player.h:646
Definition: Player.h:644
Definition: Player.h:649
Definition: Player.h:662
Definition: Player.h:660
Definition: Player.h:648
Definition: Player.h:654
Definition: Player.h:650
Definition: Player.h:661
Definition: Player.h:645
Definition: Player.h:655
Definition: Player.h:647
Definition: Player.h:656
Definition: Player.h:659
Definition: Player.h:657
Definition: Player.h:643
Definition: Player.h:658
uint8_t uint8
Definition: Define.h:154
Definition: Player.h:651
Definition: Player.h:653
Definition: Player.h:663
Definition: Player.h:652

◆ InstanceResetWarningType

Enumerator
RAID_INSTANCE_WARNING_HOURS 
RAID_INSTANCE_WARNING_MIN 
RAID_INSTANCE_WARNING_MIN_SOON 
RAID_INSTANCE_WELCOME 
RAID_INSTANCE_EXPIRED 
772 {
773  RAID_INSTANCE_WARNING_HOURS = 1, // WARNING! %s is scheduled to reset in %d hour(s).
774  RAID_INSTANCE_WARNING_MIN = 2, // WARNING! %s is scheduled to reset in %d minute(s)!
775  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!
776  RAID_INSTANCE_WELCOME = 4, // Welcome to %s. This raid instance is scheduled to reset in %s.
778 };
Definition: Player.h:775
Definition: Player.h:773
Definition: Player.h:774
Definition: Player.h:777
Definition: Player.h:776

◆ InventoryPackSlots

Enumerator
INVENTORY_SLOT_ITEM_START 
INVENTORY_SLOT_ITEM_END 
675  : uint8 // 28 slots
676 {
679 };
Definition: Player.h:678
Definition: Player.h:677
uint8_t uint8
Definition: Define.h:154

◆ InventorySlots

Enumerator
INVENTORY_SLOT_BAG_START 
INVENTORY_SLOT_BAG_END 
669  : uint8 // 4 slots
670 {
673 };
Definition: Player.h:671
Definition: Player.h:672
uint8_t uint8
Definition: Define.h:154

◆ ItemSearchCallbackResult

Enumerator
Stop 
Continue 

◆ ItemSearchLocation

enum ItemSearchLocation
strong
Enumerator
Equipment 
Inventory 
Bank 
ReagentBank 
Default 
Everywhere 

◆ MirrorTimerType

Enumerator
FATIGUE_TIMER 
BREATH_TIMER 
FIRE_TIMER 
520 {
521  FATIGUE_TIMER = 0,
522  BREATH_TIMER = 1,
523  FIRE_TIMER = 2 // feign death
524 };
Definition: Player.h:522
Definition: Player.h:523
Definition: Player.h:521

◆ NewWorldReason

Enumerator
NEW_WORLD_NORMAL 
NEW_WORLD_SEAMLESS 
766 {
767  NEW_WORLD_NORMAL = 16, // Normal map change
768  NEW_WORLD_SEAMLESS = 21, // Teleport to another map without a loading screen, used for outdoor scenarios
769 };
Definition: Player.h:768
Definition: Player.h:767

◆ PlayedTimeIndex

Enumerator
PLAYED_TIME_TOTAL 
PLAYED_TIME_LEVEL 
819 {
820  PLAYED_TIME_TOTAL = 0,
822 };
Definition: Player.h:820
Definition: Player.h:821

◆ PlayerCommandStates

Enumerator
CHEAT_NONE 
CHEAT_GOD 
CHEAT_CASTTIME 
CHEAT_COOLDOWN 
CHEAT_POWER 
CHEAT_WATERWALK 
955 {
956  CHEAT_NONE = 0x00,
957  CHEAT_GOD = 0x01,
958  CHEAT_CASTTIME = 0x02,
959  CHEAT_COOLDOWN = 0x04,
960  CHEAT_POWER = 0x08,
961  CHEAT_WATERWALK = 0x10
962 };
Definition: Player.h:959
Definition: Player.h:957
Definition: Player.h:960
Definition: Player.h:956
Definition: Player.h:961
Definition: Player.h:958

◆ PlayerCreateMode

enum PlayerCreateMode : int8
strong
Enumerator
Normal 
NPE 
117  : int8
118 {
119  Normal = 0,
120  NPE = 1
121 };
int8_t int8
Definition: Define.h:150

◆ 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 
889 {
890  DELAYED_SAVE_PLAYER = 0x01,
893  DELAYED_BG_MOUNT_RESTORE = 0x08,
894  DELAYED_BG_TAXI_RESTORE = 0x10,
895  DELAYED_BG_GROUP_RESTORE = 0x20,
897 };
Definition: Player.h:892
Flag to restore group state after teleport from BG.
Definition: Player.h:895
Flag to restore taxi state after teleport from BG.
Definition: Player.h:894
Definition: Player.h:891
Flag to restore mount state after teleport from BG.
Definition: Player.h:893
Definition: Player.h:890
Definition: Player.h:896

◆ 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 
530 {
531  // gm abilities
532  PLAYER_EXTRA_GM_ON = 0x0001,
534  PLAYER_EXTRA_TAXICHEAT = 0x0008,
535  PLAYER_EXTRA_GM_INVISIBLE = 0x0010,
536  PLAYER_EXTRA_GM_CHAT = 0x0020, // Show GM badge in chat messages
537 
538  // other states
539  PLAYER_EXTRA_PVP_DEATH = 0x0100, // store PvP death status until corpse creating.
540 
541  // Character services markers
545 };
Definition: Player.h:534
Definition: Player.h:532
Definition: Player.h:533
Definition: Player.h:539
Definition: Player.h:535
Definition: Player.h:536
Definition: Player.h:542
Definition: Player.h:544
Definition: Player.h:543

◆ PlayerFieldByte2Flags

Enumerator
PLAYER_FIELD_BYTE2_NONE 
PLAYER_FIELD_BYTE2_STEALTH 
PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW 
513 {
517 };
Definition: Player.h:514
Definition: Player.h:515
Definition: Player.h:516

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

◆ 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 
482 {
486  PLAYER_FLAGS_EX_IN_PVP_COMBAT = 0x0040, // Forbids /follow
487  PLAYER_FLAGS_EX_MENTOR = 0x0080,
488  PLAYER_FLAGS_EX_NEWCOMER = 0x0100,
490 };
Definition: Player.h:488
Definition: Player.h:485
Definition: Player.h:487
Definition: Player.h:489
Definition: Player.h:486
Definition: Player.h:484

◆ 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 
493 {
494  PLAYER_LOCAL_FLAG_CONTROLLING_PET = 0x00000001, // Displays "You have an active summon already" when trying to tame new pet
496  PLAYER_LOCAL_FLAG_RELEASE_TIMER = 0x00000008, // Display time till auto release spirit
497  PLAYER_LOCAL_FLAG_NO_RELEASE_WINDOW = 0x00000010, // Display no "release spirit" window at all
498  PLAYER_LOCAL_FLAG_NO_PET_BAR = 0x00000020, // CGPetInfo::IsPetBarUsed
504  PLAYER_LOCAL_FLAG_WAR_MODE = 0x00000800,
505  PLAYER_LOCAL_FLAG_ACCOUNT_SECURED = 0x00001000, // Script_IsAccountSecured
509 };
Definition: Player.h:495
Definition: Player.h:504
Definition: Player.h:497
Definition: Player.h:494
Definition: Player.h:498
Definition: Player.h:496
Definition: Player.h:507
Definition: Player.h:505

◆ 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_MAIL_COUNT 
PLAYER_LOGIN_QUERY_LOAD_MAIL_DATE 
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_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 
828 {
886 };
Definition: Player.h:852
Definition: Player.h:859
Definition: Player.h:871
Definition: Player.h:867
Definition: Player.h:876
Definition: Player.h:850
Definition: Player.h:880
Definition: Player.h:837
Definition: Player.h:885
Definition: Player.h:845
Definition: Player.h:857
Definition: Player.h:865
Definition: Player.h:849
Definition: Player.h:829
Definition: Player.h:836
Definition: Player.h:868
Definition: Player.h:843
Definition: Player.h:833
Definition: Player.h:834
Definition: Player.h:866
Definition: Player.h:878
Definition: Player.h:844
Definition: Player.h:858
Definition: Player.h:831
Definition: Player.h:864
Definition: Player.h:851
Definition: Player.h:870
Definition: Player.h:877
Definition: Player.h:853
Definition: Player.h:842
Definition: Player.h:863

◆ PlayerLogXPReason

Enumerator
LOG_XP_REASON_KILL 
LOG_XP_REASON_NO_KILL 
964  : uint8
965 {
966  LOG_XP_REASON_KILL = 0,
968 };
Definition: Player.h:967
Definition: Player.h:966
uint8_t uint8
Definition: Define.h:154

◆ PlayerSlots

Enumerator
PLAYER_SLOT_START 
PLAYER_SLOT_END 
PLAYER_SLOTS_COUNT 
630 {
631  // first slot for item stored (in any way in player m_items data)
632  PLAYER_SLOT_START = 0,
633  // last+1 slot for item stored (in any way in player m_items data)
634  PLAYER_SLOT_END = 199,
636 };
Definition: Player.h:634
Definition: Player.h:635
Definition: Player.h:632

◆ 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:154
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 
575 {
579 };
Definition: Player.h:576
Definition: Player.h:577
Definition: Player.h:578

◆ QuestSlotOffsets

Enumerator
QUEST_ID_OFFSET 
QUEST_STATE_OFFSET 
QUEST_COUNTS_OFFSET 
QUEST_TIME_OFFSET 
588 {
589  QUEST_ID_OFFSET = 0,
590  QUEST_STATE_OFFSET = 1,
592  QUEST_TIME_OFFSET = 14
593 };
Definition: Player.h:590
Definition: Player.h:592
Definition: Player.h:589
Definition: Player.h:591

◆ QuestSlotStateMask

Enumerator
QUEST_STATE_NONE 
QUEST_STATE_COMPLETE 
QUEST_STATE_FAIL 
599 {
600  QUEST_STATE_NONE = 0x0000,
601  QUEST_STATE_COMPLETE = 0x0001,
602  QUEST_STATE_FAIL = 0x0002
603 };
Definition: Player.h:600
Definition: Player.h:602
Definition: Player.h:601

◆ ReagentSlots

Enumerator
REAGENT_SLOT_START 
REAGENT_SLOT_END 
701 {
702  REAGENT_SLOT_START = 98,
703  REAGENT_SLOT_END = 196,
704 };
Definition: Player.h:703
Definition: Player.h:702

◆ 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 
935 {
952 };
Definition: Player.h:936
Definition: Player.h:949
Definition: Player.h:945
Definition: Player.h:950
Definition: Player.h:942
Definition: Player.h:947
Definition: Player.h:941
Definition: Player.h:944
Definition: Player.h:948
Definition: Player.h:938
Definition: Player.h:937
Definition: Player.h:940
Definition: Player.h:943

◆ 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 
407 {
408  RUNE_BASE_COOLDOWN = 10000,
409  RUNE_MISS_COOLDOWN = 1500 // cooldown applied on runes when the spell misses
410 };
Definition: Player.h:408
Definition: Player.h:409

◆ 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:153
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 
606 {
607  SKILL_UNCHANGED = 0,
608  SKILL_CHANGED = 1,
609  SKILL_NEW = 2,
610  SKILL_DELETED = 3
611 };
Definition: Player.h:607
Definition: Player.h:609
Definition: Player.h:608
Definition: Player.h:610

◆ 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:154
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_TO_SEAMLESS 
796 {
797  TELE_TO_GM_MODE = 0x01,
801  TELE_TO_SPELL = 0x10,
802  TELE_TO_TRANSPORT_TELEPORT = 0x20, // 3.3.5 only
803  TELE_TO_SEAMLESS = 0x40
804 };
Definition: Player.h:803
Definition: Player.h:802
Definition: Player.h:798
Definition: Player.h:800
Definition: Player.h:799
Definition: Player.h:797
Definition: Player.h:801

◆ 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 
741 {
744  TRANSFER_ABORT_MAX_PLAYERS = 2, // Transfer Aborted: instance is full
745  TRANSFER_ABORT_NOT_FOUND = 3, // Transfer Aborted: instance not found
746  TRANSFER_ABORT_TOO_MANY_INSTANCES = 4, // You have entered too many instances recently.
747  TRANSFER_ABORT_ZONE_IN_COMBAT = 6, // Unable to zone in while an encounter is in progress.
748  TRANSFER_ABORT_INSUF_EXPAN_LVL = 7, // You must have <TBC, WotLK> expansion installed to access this area.
749  TRANSFER_ABORT_DIFFICULTY = 8, // <Normal, Heroic, Epic> difficulty mode is not available for %s.
750  TRANSFER_ABORT_UNIQUE_MESSAGE = 9, // Until you've escaped TLK's grasp, you cannot leave this place!
751  TRANSFER_ABORT_TOO_MANY_REALM_INSTANCES = 10, // Additional instances cannot be launched, please try again later.
752  TRANSFER_ABORT_NEED_GROUP = 11, // Transfer Aborted: you must be in a raid group to enter this instance
753  TRANSFER_ABORT_NOT_FOUND_2 = 12, // Transfer Aborted: instance not found
754  TRANSFER_ABORT_NOT_FOUND_3 = 13, // Transfer Aborted: instance not found
755  TRANSFER_ABORT_NOT_FOUND_4 = 14, // Transfer Aborted: instance not found
756  TRANSFER_ABORT_REALM_ONLY = 15, // All players in the party must be from the same realm to enter %s.
757  TRANSFER_ABORT_MAP_NOT_ALLOWED = 16, // Map cannot be entered at this time.
758  TRANSFER_ABORT_LOCKED_TO_DIFFERENT_INSTANCE = 18, // You are already locked to %s
759  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.
760  TRANSFER_ABORT_DIFFICULTY_NOT_FOUND = 22, // client writes to console "Unable to resolve requested difficultyID %u to actual difficulty for map %d"
761  TRANSFER_ABORT_XREALM_ZONE_DOWN = 24, // Transfer Aborted: cross-realm zone is down
762  TRANSFER_ABORT_SOLO_PLAYER_SWITCH_DIFFICULTY = 26, // This instance is already in progress. You may only switch difficulties from inside the instance.
763 };
Definition: Player.h:750
Definition: Player.h:745
Definition: Player.h:749
Definition: Player.h:744
Definition: Player.h:754
Definition: Player.h:760
Definition: Player.h:748
Definition: Player.h:752
Definition: Player.h:756
Definition: Player.h:742
Definition: Player.h:755
Definition: Player.h:761
Definition: Player.h:757
Definition: Player.h:746
Definition: Player.h:747
Definition: Player.h:753
Definition: Player.h:743

◆ ZonePVPTypeOverride

enum ZonePVPTypeOverride : uint32
strong
Enumerator
None 
Friendly 
Hostile 
Contested 
Combat 
1072  : uint32
1073 {
1074  None = 0,
1075  Friendly = 1,
1076  Hostile = 2,
1077  Contested = 3,
1078  Combat = 4
1079 };
uint32_t uint32
Definition: Define.h:152

Function Documentation

◆ AddItemsSetItem()

TC_GAME_API void AddItemsSetItem ( Player player,
Item item 
)
64 {
65  ItemTemplate const* proto = item->GetTemplate();
66  uint32 setid = proto->GetItemSet();
67 
68  ItemSetEntry const* set = sItemSetStore.LookupEntry(setid);
69 
70  if (!set)
71  {
72  TC_LOG_ERROR("sql.sql", "Item set %u for item (id %u) not found, mods not applied.", setid, proto->GetId());
73  return;
74  }
75 
76  if (set->RequiredSkill && player->GetSkillValue(set->RequiredSkill) < set->RequiredSkillRank)
77  return;
78 
79  if (set->SetFlags & ITEM_SET_FLAG_LEGACY_INACTIVE)
80  return;
81 
82  ItemSetEffect* eff = nullptr;
83 
84  for (size_t x = 0; x < player->ItemSetEff.size(); ++x)
85  {
86  if (player->ItemSetEff[x] && player->ItemSetEff[x]->ItemSetID == setid)
87  {
88  eff = player->ItemSetEff[x];
89  break;
90  }
91  }
92 
93  if (!eff)
94  {
95  eff = new ItemSetEffect();
96  eff->ItemSetID = setid;
97  eff->EquippedItemCount = 0;
98 
99  size_t x = 0;
100  for (; x < player->ItemSetEff.size(); ++x)
101  if (!player->ItemSetEff[x])
102  break;
103 
104  if (x < player->ItemSetEff.size())
105  player->ItemSetEff[x] = eff;
106  else
107  player->ItemSetEff.push_back(eff);
108  }
109 
110  ++eff->EquippedItemCount;
111 
112  if (std::vector<ItemSetSpellEntry const*> const* itemSetSpells = sDB2Manager.GetItemSetSpells(setid))
113  {
114  for (ItemSetSpellEntry const* itemSetSpell : *itemSetSpells)
115  {
116  //not enough for spell
117  if (itemSetSpell->Threshold > eff->EquippedItemCount)
118  continue;
119 
120  if (eff->SetBonuses.count(itemSetSpell))
121  continue;
122 
123  SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itemSetSpell->SpellID, DIFFICULTY_NONE);
124  if (!spellInfo)
125  {
126  TC_LOG_ERROR("entities.player.items", "WORLD: unknown spell id %u in items set %u effects", itemSetSpell->SpellID, setid);
127  continue;
128  }
129 
130  eff->SetBonuses.insert(itemSetSpell);
131  // spell cast only if fit form requirement, in other case will cast at form change
132  if (!itemSetSpell->ChrSpecID || itemSetSpell->ChrSpecID == player->GetPrimarySpecialization())
133  player->ApplyEquipSpell(spellInfo, nullptr, true);
134  }
135  }
136 }
Definition: DBCEnums.h:619
#define sDB2Manager
Definition: DB2Stores.h:446
ItemTemplate const * GetTemplate() const
Definition: Item.cpp:1107
uint32 GetItemSet() const
Definition: ItemTemplate.h:780
Definition: SpellInfo.h:335
Definition: DBCEnums.h:956
Definition: DB2Structure.h:2113
void ApplyEquipSpell(SpellInfo const *spellInfo, Item *item, bool apply, bool formChange=false)
Definition: Player.cpp:8010
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:186
uint32 EquippedItemCount
Definition: Item.h:44
Definition: Item.h:41
uint32 ItemSetID
Definition: Item.h:43
uint32 GetPrimarySpecialization() const
Definition: Player.h:1778
#define sSpellMgr
Definition: SpellMgr.h:792
Definition: DB2Structure.h:2123
uint32_t uint32
Definition: Define.h:152
Definition: ItemTemplate.h:737
DB2Storage< ItemSetEntry > sItemSetStore("ItemSet.db2", ItemSetLoadInfo::Instance())
std::unordered_set< ItemSetSpellEntry const * > SetBonuses
Definition: Item.h:45
uint32 GetId() const
Definition: ItemTemplate.h:742
uint16 GetSkillValue(uint32 skill) const
Definition: Player.cpp:5886
std::vector< ItemSetEffect * > ItemSetEff
Definition: Player.h:2278
+ 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:152

◆ DEFINE_ENUM_FLAG()

DEFINE_ENUM_FLAG ( ItemSearchLocation  )

◆ GetBagSize()

TC_GAME_API uint32 GetBagSize ( Bag const *  bag)
285 {
286  return bag->GetBagSize();
287 }
+ 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 
)
290 {
291  return bag->GetItemByPos(slot);
292 }
+ 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)
3089 {
3090  static_assert(std::is_same<typename Container::value_type, UF::ChrCustomizationChoice>::value,
3091  "MakeChrCustomizationChoiceRange must be used with containers of UF::ChrCustomizationChoice");
3092 
3093  return { container.data(), container.data() + container.size() };
3094 }
+ Here is the caller graph for this function:

◆ RemoveItemsSetItem()

TC_GAME_API void RemoveItemsSetItem ( Player player,
ItemTemplate const *  proto 
)
139 {
140  uint32 setid = proto->GetItemSet();
141 
142  ItemSetEntry const* set = sItemSetStore.LookupEntry(setid);
143 
144  if (!set)
145  {
146  TC_LOG_ERROR("sql.sql", "Item set #%u for item #%u not found, mods not removed.", setid, proto->GetId());
147  return;
148  }
149 
150  ItemSetEffect* eff = nullptr;
151  size_t setindex = 0;
152  for (; setindex < player->ItemSetEff.size(); setindex++)
153  {
154  if (player->ItemSetEff[setindex] && player->ItemSetEff[setindex]->ItemSetID == setid)
155  {
156  eff = player->ItemSetEff[setindex];
157  break;
158  }
159  }
160 
161  // can be in case now enough skill requirement for set appling but set has been appliend when skill requirement not enough
162  if (!eff)
163  return;
164 
165  --eff->EquippedItemCount;
166 
167  if (std::vector<ItemSetSpellEntry const*> const* itemSetSpells = sDB2Manager.GetItemSetSpells(setid))
168  {
169  for (ItemSetSpellEntry const* itemSetSpell : *itemSetSpells)
170  {
171  // enough for spell
172  if (itemSetSpell->Threshold <= eff->EquippedItemCount)
173  continue;
174 
175  if (!eff->SetBonuses.count(itemSetSpell))
176  continue;
177 
178  player->ApplyEquipSpell(sSpellMgr->AssertSpellInfo(itemSetSpell->SpellID, DIFFICULTY_NONE), nullptr, false);
179  eff->SetBonuses.erase(itemSetSpell);
180  }
181  }
182 
183  if (!eff->EquippedItemCount) //all items of a set were removed
184  {
185  ASSERT(eff == player->ItemSetEff[setindex]);
186  delete eff;
187  player->ItemSetEff[setindex] = nullptr;
188  }
189 }
Definition: DBCEnums.h:619
#define sDB2Manager
Definition: DB2Stores.h:446
Definition: DB2Structure.h:2113
void ApplyEquipSpell(SpellInfo const *spellInfo, Item *item, bool apply, bool formChange=false)
Definition: Player.cpp:8010
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:186
uint32 EquippedItemCount
Definition: Item.h:44
Definition: Item.h:41
#define sSpellMgr
Definition: SpellMgr.h:792
Definition: DB2Structure.h:2123
uint32_t uint32
Definition: Define.h:152
DB2Storage< ItemSetEntry > sItemSetStore("ItemSet.db2", ItemSetLoadInfo::Instance())
#define ASSERT
Definition: Errors.h:61
std::unordered_set< ItemSetSpellEntry const * > SetBonuses
Definition: Item.h:45
std::vector< ItemSetEffect * > ItemSetEff
Definition: Player.h:2278
+ 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 = 110

◆ PLAYER_MAX_HONOR_LEVEL

uint32 constexpr PLAYER_MAX_HONOR_LEVEL = 500

◆ SPELL_PVP_RULES_ENABLED

uint32 constexpr SPELL_PVP_RULES_ENABLED = 134735