OregonCore  revision fb2a440-git
Your Favourite TBC server
Player.h File Reference
#include "Common.h"
#include "ItemPrototype.h"
#include "Unit.h"
#include "Item.h"
#include "Database/DatabaseEnv.h"
#include "DBCStores.h"
#include "NPCHandler.h"
#include "QuestDef.h"
#include "Group.h"
#include "Bag.h"
#include "WorldSession.h"
#include "CinematicMgr.h"
#include "Pet.h"
#include "MapReference.h"
#include "Utilities/Util.h"
#include "ReputationMgr.h"
#include <string>
#include <vector>

Go to the source code of this file.

Classes

struct  PlayerSpell
 
struct  SpellModifier
 
struct  SpellCooldown
 
struct  ActionButton
 
struct  PlayerCreateInfoItem
 
struct  PlayerClassLevelInfo
 
struct  PlayerClassInfo
 
struct  PlayerLevelInfo
 
struct  PlayerInfo
 
struct  PvPInfo
 
struct  DuelInfo
 
struct  Areas
 
struct  EnchantDuration
 
struct  LookingForGroupSlot
 
struct  LookingForGroup
 
struct  SkillStatusData
 
struct  ItemPosCount
 
struct  InstancePlayerBind
 
struct  AccessRequirement
 
class  PlayerTaxi
 
struct  BGData
 
class  Player
 
struct  Player::BgBattlegroundQueueID_Rec
 

Macros

#define PLAYER_MAX_SKILLS   127
 
#define PLAYER_MAX_DAILY_QUESTS   25
 
#define MAX_ACTION_BUTTONS   132
 
#define MAX_LOOKING_FOR_GROUP_SLOT   3
 
#define PLAYER_TITLE_DISABLED   UI64LIT(0x0000000000000000)
 
#define PLAYER_TITLE_NONE   UI64LIT(0x0000000000000001)
 
#define PLAYER_TITLE_PRIVATE   UI64LIT(0x0000000000000002)
 
#define PLAYER_TITLE_CORPORAL   UI64LIT(0x0000000000000004)
 
#define PLAYER_TITLE_SERGEANT_A   UI64LIT(0x0000000000000008)
 
#define PLAYER_TITLE_MASTER_SERGEANT   UI64LIT(0x0000000000000010)
 
#define PLAYER_TITLE_SERGEANT_MAJOR   UI64LIT(0x0000000000000020)
 
#define PLAYER_TITLE_KNIGHT   UI64LIT(0x0000000000000040)
 
#define PLAYER_TITLE_KNIGHT_LIEUTENANT   UI64LIT(0x0000000000000080)
 
#define PLAYER_TITLE_KNIGHT_CAPTAIN   UI64LIT(0x0000000000000100)
 
#define PLAYER_TITLE_KNIGHT_CHAMPION   UI64LIT(0x0000000000000200)
 
#define PLAYER_TITLE_LIEUTENANT_COMMANDER   UI64LIT(0x0000000000000400)
 
#define PLAYER_TITLE_COMMANDER   UI64LIT(0x0000000000000800)
 
#define PLAYER_TITLE_MARSHAL   UI64LIT(0x0000000000001000)
 
#define PLAYER_TITLE_FIELD_MARSHAL   UI64LIT(0x0000000000002000)
 
#define PLAYER_TITLE_GRAND_MARSHAL   UI64LIT(0x0000000000004000)
 
#define PLAYER_TITLE_SCOUT   UI64LIT(0x0000000000008000)
 
#define PLAYER_TITLE_GRUNT   UI64LIT(0x0000000000010000)
 
#define PLAYER_TITLE_SERGEANT_H   UI64LIT(0x0000000000020000)
 
#define PLAYER_TITLE_SENIOR_SERGEANT   UI64LIT(0x0000000000040000)
 
#define PLAYER_TITLE_FIRST_SERGEANT   UI64LIT(0x0000000000080000)
 
#define PLAYER_TITLE_STONE_GUARD   UI64LIT(0x0000000000100000)
 
#define PLAYER_TITLE_BLOOD_GUARD   UI64LIT(0x0000000000200000)
 
#define PLAYER_TITLE_LEGIONNAIRE   UI64LIT(0x0000000000400000)
 
#define PLAYER_TITLE_CENTURION   UI64LIT(0x0000000000800000)
 
#define PLAYER_TITLE_CHAMPION   UI64LIT(0x0000000001000000)
 
#define PLAYER_TITLE_LIEUTENANT_GENERAL   UI64LIT(0x0000000002000000)
 
#define PLAYER_TITLE_GENERAL   UI64LIT(0x0000000004000000)
 
#define PLAYER_TITLE_WARLORD   UI64LIT(0x0000000008000000)
 
#define PLAYER_TITLE_HIGH_WARLORD   UI64LIT(0x0000000010000000)
 
#define PLAYER_TITLE_GLADIATOR   UI64LIT(0x0000000020000000)
 
#define PLAYER_TITLE_DUELIST   UI64LIT(0x0000000040000000)
 
#define PLAYER_TITLE_RIVAL   UI64LIT(0x0000000080000000)
 
#define PLAYER_TITLE_CHALLENGER   UI64LIT(0x0000000100000000)
 
#define PLAYER_TITLE_SCARAB_LORD   UI64LIT(0x0000000200000000)
 
#define PLAYER_TITLE_CONQUEROR   UI64LIT(0x0000000400000000)
 
#define PLAYER_TITLE_JUSTICAR   UI64LIT(0x0000000800000000)
 
#define PLAYER_TITLE_CHAMPION_OF_THE_NAARU   UI64LIT(0x0000001000000000)
 
#define PLAYER_TITLE_MERCILESS_GLADIATOR   UI64LIT(0x0000002000000000)
 
#define PLAYER_TITLE_OF_THE_SHATTERED_SUN   UI64LIT(0x0000004000000000)
 
#define PLAYER_TITLE_HAND_OF_ADAL   UI64LIT(0x0000008000000000)
 
#define PLAYER_TITLE_VENGEFUL_GLADIATOR   UI64LIT(0x0000010000000000)
 
#define KNOWN_TITLES_SIZE   2
 
#define MAX_TITLE_INDEX   (KNOWN_TITLES_SIZE*64)
 
#define MAX_TIMERS   3
 
#define DISABLED_MIRROR_TIMER   -1
 
#define MAX_QUEST_OFFSET   4
 
#define MAX_PLAYED_TIME_INDEX   2
 
#define MAX_PLAYER_SUMMON_DELAY   (2*MINUTE)
 
#define MAX_MONEY_AMOUNT   (0x7FFFFFFF-1)
 

Typedefs

typedef std::deque< Mail * > PlayerMails
 
typedef UNORDERED_MAP< uint16, PlayerSpellPlayerSpellMap
 
typedef std::list< SpellModifier * > SpellModList
 
typedef std::map< uint32, SpellCooldownSpellCooldowns
 
typedef std::map< uint8, ActionButtonActionButtonList
 
typedef std::pair< uint16, uint8CreateSpellPair
 
typedef std::list< PlayerCreateInfoItemPlayerCreateInfoItems
 
typedef std::list< EnchantDurationEnchantDurationList
 
typedef std::list< Item * > ItemDurationList
 
typedef std::map< uint32, QuestStatusDataQuestStatusMap
 
typedef UNORDERED_MAP< uint32, SkillStatusDataSkillStatusMap
 
typedef std::vector< ItemPosCountItemPosCountVec
 

Enumerations

enum  SpellModType { SPELLMOD_FLAT = 107, SPELLMOD_PCT = 108 }
 
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 { PLAYERSPELL_UNCHANGED = 0, PLAYERSPELL_CHANGED = 1, PLAYERSPELL_NEW = 2, PLAYERSPELL_REMOVED = 3 }
 
enum  TrainerSpellState { TRAINER_SPELL_GREEN = 0, TRAINER_SPELL_RED = 1, TRAINER_SPELL_GRAY = 2 }
 
enum  ActionButtonUpdateState { ACTIONBUTTON_UNCHANGED = 0, ACTIONBUTTON_CHANGED = 1, ACTIONBUTTON_NEW = 2, ACTIONBUTTON_DELETED = 3 }
 
enum  ActionButtonType { ACTION_BUTTON_SPELL = 0, ACTION_BUTTON_MACRO = 64, ACTION_BUTTON_CMACRO = 65, ACTION_BUTTON_ITEM = 128 }
 
enum  PlayerMovementType { MOVE_ROOT = 1, MOVE_UNROOT = 2, MOVE_WATER_WALK = 3, MOVE_LAND_WALK = 4 }
 
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_FFA_PVP = 0x00000080, PLAYER_FLAGS_CONTESTED_PVP = 0x00000100,
  PLAYER_FLAGS_IN_PVP = 0x00000200, PLAYER_FLAGS_HIDE_HELM = 0x00000400, PLAYER_FLAGS_HIDE_CLOAK = 0x00000800, PLAYER_FLAGS_UNK1 = 0x00001000,
  PLAYER_FLAGS_UNK2 = 0x00002000, PLAYER_FLAGS_UNK3 = 0x00008000, PLAYER_FLAGS_SANCTUARY = 0x00010000, PLAYER_FLAGS_TAXI_BENCHMARK = 0x00020000,
  PLAYER_FLAGS_PVP_TIMER = 0x00040000
}
 
enum  PlayerFieldByteFlags { PLAYER_FIELD_BYTE_TRACK_STEALTHED = 0x00000002, PLAYER_FIELD_BYTE_RELEASE_TIMER = 0x00000008, PLAYER_FIELD_BYTE_NO_RELEASE_WINDOW = 0x00000010 }
 
enum  PlayerFieldByte2Flags { PLAYER_FIELD_BYTE2_NONE = 0x00, PLAYER_FIELD_BYTE2_STEALTH = 0x2000, PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW = 0x4000 }
 
enum  ActivateTaxiReplies {
  ERR_TAXIOK = 0, ERR_TAXIUNSPECIFIEDSERVERERROR = 1, ERR_TAXINOSUCHPATH = 2, ERR_TAXINOTENOUGHMONEY = 3,
  ERR_TAXITOOFARAWAY = 4, ERR_TAXINOVENDORNEARBY = 5, ERR_TAXINOTVISITED = 6, ERR_TAXIPLAYERBUSY = 7,
  ERR_TAXIPLAYERALREADYMOUNTED = 8, ERR_TAXIPLAYERSHAPESHIFTED = 9, ERR_TAXIPLAYERMOVING = 10, ERR_TAXISAMENODE = 11,
  ERR_TAXINOTSTANDING = 12
}
 
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
}
 
enum  AtLoginFlags { AT_LOGIN_NONE = 0, AT_LOGIN_RENAME = 1, AT_LOGIN_RESET_SPELLS = 2, AT_LOGIN_RESET_TALENTS = 4 }
 
enum  QuestSlotOffsets { QUEST_ID_OFFSET = 0, QUEST_STATE_OFFSET = 1, QUEST_COUNTS_OFFSET = 2, QUEST_TIME_OFFSET = 3 }
 
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 = 118, PLAYER_SLOTS_COUNT = (PLAYER_SLOT_END - PLAYER_SLOT_START) }
 
enum  EquipmentSlots {
  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 { INVENTORY_SLOT_BAG_0 = 255, INVENTORY_SLOT_BAG_START = 19, INVENTORY_SLOT_BAG_END = 23 }
 
enum  InventoryPackSlots { INVENTORY_SLOT_ITEM_START = 23, INVENTORY_SLOT_ITEM_END = 39 }
 
enum  BankItemSlots { BANK_SLOT_ITEM_START = 39, BANK_SLOT_ITEM_END = 67 }
 
enum  BankBagSlots { BANK_SLOT_BAG_START = 67, BANK_SLOT_BAG_END = 74 }
 
enum  BuyBackSlots { BUYBACK_SLOT_START = 74, BUYBACK_SLOT_END = 86 }
 
enum  KeyRingSlots { KEYRING_SLOT_START = 86, KEYRING_SLOT_END = 118 }
 
enum  TradeSlots { TRADE_SLOT_COUNT = 7, TRADE_SLOT_TRADED_COUNT = 6, TRADE_SLOT_NONTRADED = 6 }
 
enum  TransferAbortReason {
  TRANSFER_ABORT_NONE = 0x0000, TRANSFER_ABORT_MAX_PLAYERS = 0x0001, TRANSFER_ABORT_NOT_FOUND = 0x0002, TRANSFER_ABORT_TOO_MANY_INSTANCES = 0x0003,
  TRANSFER_ABORT_ZONE_IN_COMBAT = 0x0005, TRANSFER_ABORT_INSUF_EXPAN_LVL1 = 0x0106, TRANSFER_ABORT_DIFFICULTY1 = 0x0007, TRANSFER_ABORT_DIFFICULTY2 = 0x0107
}
 
enum  InstanceResetWarningType { RAID_INSTANCE_WARNING_HOURS = 1, RAID_INSTANCE_WARNING_MIN = 2, RAID_INSTANCE_WARNING_MIN_SOON = 3, RAID_INSTANCE_WELCOME = 4 }
 
enum  ArenaTeamInfoType {
  ARENA_TEAM_ID = 0, ARENA_TEAM_MEMBER = 1, ARENA_TEAM_GAMES_WEEK = 2, ARENA_TEAM_GAMES_SEASON = 3,
  ARENA_TEAM_WINS_SEASON = 4, ARENA_TEAM_PERSONAL_RATING = 5, ARENA_TEAM_END = 6
}
 
enum  RestFlag { REST_FLAG_IN_TAVERN = 0x1, REST_FLAG_IN_CITY = 0x2, REST_FLAG_IN_FACTION_AREA = 0x4 }
 
enum  DuelCompleteType { DUEL_INTERUPTED = 0, DUEL_WON = 1, DUEL_FLED = 2 }
 
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
}
 
enum  EnviromentalDamage {
  DAMAGE_EXHAUSTED = 0, DAMAGE_DROWNING = 1, DAMAGE_FALL = 2, DAMAGE_LAVA = 3,
  DAMAGE_SLIME = 4, DAMAGE_FIRE = 5, DAMAGE_FALL_TO_VOID = 6
}
 
enum  PlayerChatTag {
  CHAT_TAG_NONE = 0x00, CHAT_TAG_AFK = 0x01, CHAT_TAG_DND = 0x02, CHAT_TAG_GM = 0x04,
  CHAT_TAG_COM = 0x08, CHAT_TAG_DEV = 0x10
}
 
enum  PlayedTimeIndex { PLAYED_TIME_TOTAL = 0, PLAYED_TIME_LEVEL = 1 }
 
enum  PlayerLoginQueryIndex {
  PLAYER_LOGIN_QUERY_LOADFROM = 0, PLAYER_LOGIN_QUERY_LOADGROUP = 1, PLAYER_LOGIN_QUERY_LOADBOUNDINSTANCES = 2, PLAYER_LOGIN_QUERY_LOADAURAS = 3,
  PLAYER_LOGIN_QUERY_LOADSPELLS = 4, PLAYER_LOGIN_QUERY_LOADQUESTSTATUS = 5, PLAYER_LOGIN_QUERY_LOADDAILYQUESTSTATUS = 6, PLAYER_LOGIN_QUERY_LOADTUTORIALS = 7,
  PLAYER_LOGIN_QUERY_LOADREPUTATION = 8, PLAYER_LOGIN_QUERY_LOADINVENTORY = 9, PLAYER_LOGIN_QUERY_LOADACTIONS = 10, PLAYER_LOGIN_QUERY_LOADMAILCOUNT = 11,
  PLAYER_LOGIN_QUERY_LOADMAILDATE = 12, PLAYER_LOGIN_QUERY_LOADSOCIALLIST = 13, PLAYER_LOGIN_QUERY_LOADHOMEBIND = 14, PLAYER_LOGIN_QUERY_LOADSPELLCOOLDOWNS = 15,
  PLAYER_LOGIN_QUERY_LOADDECLINEDNAMES = 16, PLAYER_LOGIN_QUERY_LOADGUILD = 17, PLAYER_LOGIN_QUERY_LOADARENAINFO = 18, PLAYER_LOGIN_QUERY_LOADBGDATA = 19,
  PLAYER_LOGIN_QUERY_LOADSKILLS = 20, 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_GROUP_RESTORE = 0x20, DELAYED_END
}
 
enum  CharDeleteMethod { CHAR_DELETE_REMOVE = 0, CHAR_DELETE_UNLINK = 1 }
 
enum  PlayerRestState {
  REST_STATE_RESTED = 1, REST_STATE_NORMAL = 2, REST_STATE_TIRED_1 = 3, REST_STATE_TIRED_2 = 4,
  REST_STATE_EXHAUSTED = 5, REST_STATE_RAF_LINKED = 6
}
 
enum  ReferFriendError {
  RAF_ERR_OK = 0x00, RAF_ERR_BAD_REFERRER = 0x01, RAF_ERR_LVL_TOO_HIGH = 0x02, RAF_ERR_NO_GRANTABLE_LVLS = 0x03,
  RAF_ERR_TOO_FAR_AWAY = 0x04, RAF_ERR_OPPOSITE_FACTION = 0x05, RAF_ERR_NOT_RIGHT_NOW = 0x06, RAF_ERR_ONLY_UNTIL_60 = 0x07,
  RAF_ERR_NO_TARGET = 0x08, RAF_ERR_NOT_IN_PARTY = 0x09, RAF_ERR_ONLY_UNTIL_60_2 = 0x0A, RAF_ERR_SUMMON_NOT_READY = 0x0B,
  RAF_ERR_BUDDY_OFFLINE = 0x0C
}
 
enum  RAFLinkStatus { RAF_LINK_NONE = 0, RAF_LINK_REFERRER = 1, RAF_LINK_REFERRED = 2 }
 
enum  PlayerCommandStates {
  CHEAT_NONE = 0x00, CHEAT_GOD = 0x01, CHEAT_CASTTIME = 0x02, CHEAT_COOLDOWN = 0x04,
  CHEAT_POWER = 0x08, CHEAT_WATERWALK = 0x10
}
 

Functions

void AddItemsSetItem (Player *player, Item *item)
 
void RemoveItemsSetItem (Player *player, ItemTemplate const *proto)
 

Macro Definition Documentation

#define DISABLED_MIRROR_TIMER   -1
#define KNOWN_TITLES_SIZE   2

Definition at line 415 of file Player.h.

Referenced by Player::Create().

#define MAX_ACTION_BUTTONS   132

Definition at line 158 of file Player.h.

Referenced by Player::addActionButton(), and Player::SendInitialActionButtons().

#define MAX_MONEY_AMOUNT   (0x7FFFFFFF-1)

Definition at line 742 of file Player.h.

Referenced by World::LoadConfigSettings(), Player::LoadFromDB(), and Player::ModifyMoney().

#define MAX_PLAYED_TIME_INDEX   2

Definition at line 699 of file Player.h.

#define MAX_PLAYER_SUMMON_DELAY   (2*MINUTE)
#define MAX_TIMERS   3

Definition at line 457 of file Player.h.

Referenced by Player::HandleDrowning(), and Player::Player().

#define MAX_TITLE_INDEX   (KNOWN_TITLES_SIZE*64)

Definition at line 416 of file Player.h.

Referenced by WorldSession::HandleChooseTitleOpcode().

#define PLAYER_MAX_SKILLS   127

Definition at line 55 of file Player.h.

Referenced by Player::_LoadSkills(), and Player::SetSkill().

#define PLAYER_TITLE_BLOOD_GUARD   UI64LIT(0x0000000000200000)

Definition at line 394 of file Player.h.

#define PLAYER_TITLE_CENTURION   UI64LIT(0x0000000000800000)

Definition at line 396 of file Player.h.

#define PLAYER_TITLE_CHALLENGER   UI64LIT(0x0000000100000000)

Definition at line 405 of file Player.h.

#define PLAYER_TITLE_CHAMPION   UI64LIT(0x0000000001000000)

Definition at line 397 of file Player.h.

#define PLAYER_TITLE_CHAMPION_OF_THE_NAARU   UI64LIT(0x0000001000000000)

Definition at line 409 of file Player.h.

#define PLAYER_TITLE_COMMANDER   UI64LIT(0x0000000000000800)

Definition at line 384 of file Player.h.

#define PLAYER_TITLE_CONQUEROR   UI64LIT(0x0000000400000000)

Definition at line 407 of file Player.h.

#define PLAYER_TITLE_CORPORAL   UI64LIT(0x0000000000000004)

Definition at line 375 of file Player.h.

#define PLAYER_TITLE_DISABLED   UI64LIT(0x0000000000000000)

Definition at line 372 of file Player.h.

#define PLAYER_TITLE_DUELIST   UI64LIT(0x0000000040000000)

Definition at line 403 of file Player.h.

#define PLAYER_TITLE_FIELD_MARSHAL   UI64LIT(0x0000000000002000)

Definition at line 386 of file Player.h.

#define PLAYER_TITLE_FIRST_SERGEANT   UI64LIT(0x0000000000080000)

Definition at line 392 of file Player.h.

#define PLAYER_TITLE_GENERAL   UI64LIT(0x0000000004000000)

Definition at line 399 of file Player.h.

#define PLAYER_TITLE_GLADIATOR   UI64LIT(0x0000000020000000)

Definition at line 402 of file Player.h.

#define PLAYER_TITLE_GRAND_MARSHAL   UI64LIT(0x0000000000004000)

Definition at line 387 of file Player.h.

#define PLAYER_TITLE_GRUNT   UI64LIT(0x0000000000010000)

Definition at line 389 of file Player.h.

#define PLAYER_TITLE_HAND_OF_ADAL   UI64LIT(0x0000008000000000)

Definition at line 412 of file Player.h.

#define PLAYER_TITLE_HIGH_WARLORD   UI64LIT(0x0000000010000000)

Definition at line 401 of file Player.h.

#define PLAYER_TITLE_JUSTICAR   UI64LIT(0x0000000800000000)

Definition at line 408 of file Player.h.

#define PLAYER_TITLE_KNIGHT   UI64LIT(0x0000000000000040)

Definition at line 379 of file Player.h.

#define PLAYER_TITLE_KNIGHT_CAPTAIN   UI64LIT(0x0000000000000100)

Definition at line 381 of file Player.h.

#define PLAYER_TITLE_KNIGHT_CHAMPION   UI64LIT(0x0000000000000200)

Definition at line 382 of file Player.h.

#define PLAYER_TITLE_KNIGHT_LIEUTENANT   UI64LIT(0x0000000000000080)

Definition at line 380 of file Player.h.

#define PLAYER_TITLE_LEGIONNAIRE   UI64LIT(0x0000000000400000)

Definition at line 395 of file Player.h.

#define PLAYER_TITLE_LIEUTENANT_COMMANDER   UI64LIT(0x0000000000000400)

Definition at line 383 of file Player.h.

#define PLAYER_TITLE_LIEUTENANT_GENERAL   UI64LIT(0x0000000002000000)

Definition at line 398 of file Player.h.

#define PLAYER_TITLE_MARSHAL   UI64LIT(0x0000000000001000)

Definition at line 385 of file Player.h.

#define PLAYER_TITLE_MASTER_SERGEANT   UI64LIT(0x0000000000000010)

Definition at line 377 of file Player.h.

#define PLAYER_TITLE_MERCILESS_GLADIATOR   UI64LIT(0x0000002000000000)

Definition at line 410 of file Player.h.

#define PLAYER_TITLE_NONE   UI64LIT(0x0000000000000001)

Definition at line 373 of file Player.h.

#define PLAYER_TITLE_OF_THE_SHATTERED_SUN   UI64LIT(0x0000004000000000)

Definition at line 411 of file Player.h.

#define PLAYER_TITLE_PRIVATE   UI64LIT(0x0000000000000002)

Definition at line 374 of file Player.h.

#define PLAYER_TITLE_RIVAL   UI64LIT(0x0000000080000000)

Definition at line 404 of file Player.h.

#define PLAYER_TITLE_SCARAB_LORD   UI64LIT(0x0000000200000000)

Definition at line 406 of file Player.h.

#define PLAYER_TITLE_SCOUT   UI64LIT(0x0000000000008000)

Definition at line 388 of file Player.h.

#define PLAYER_TITLE_SENIOR_SERGEANT   UI64LIT(0x0000000000040000)

Definition at line 391 of file Player.h.

#define PLAYER_TITLE_SERGEANT_A   UI64LIT(0x0000000000000008)

Definition at line 376 of file Player.h.

#define PLAYER_TITLE_SERGEANT_H   UI64LIT(0x0000000000020000)

Definition at line 390 of file Player.h.

#define PLAYER_TITLE_SERGEANT_MAJOR   UI64LIT(0x0000000000000020)

Definition at line 378 of file Player.h.

#define PLAYER_TITLE_STONE_GUARD   UI64LIT(0x0000000000100000)

Definition at line 393 of file Player.h.

#define PLAYER_TITLE_VENGEFUL_GLADIATOR   UI64LIT(0x0000010000000000)

Definition at line 413 of file Player.h.

#define PLAYER_TITLE_WARLORD   UI64LIT(0x0000000008000000)

Definition at line 400 of file Player.h.

Typedef Documentation

typedef std::map<uint8, ActionButton> ActionButtonList

Definition at line 160 of file Player.h.

typedef std::pair<uint16, uint8> CreateSpellPair

Definition at line 162 of file Player.h.

Definition at line 262 of file Player.h.

typedef std::list<Item*> ItemDurationList

Definition at line 263 of file Player.h.

typedef std::vector<ItemPosCount> ItemPosCountVec

Definition at line 605 of file Player.h.

Definition at line 172 of file Player.h.

typedef std::deque<Mail*> PlayerMails

Definition at line 51 of file Player.h.

Definition at line 113 of file Player.h.

Definition at line 483 of file Player.h.

Definition at line 519 of file Player.h.

typedef std::map<uint32, SpellCooldown> SpellCooldowns

Definition at line 122 of file Player.h.

typedef std::list<SpellModifier*> SpellModList

Definition at line 114 of file Player.h.

Enumeration Type Documentation

Enumerator
ACTION_BUTTON_SPELL 
ACTION_BUTTON_MACRO 
ACTION_BUTTON_CMACRO 
ACTION_BUTTON_ITEM 

Definition at line 150 of file Player.h.

Enumerator
ACTIONBUTTON_UNCHANGED 
ACTIONBUTTON_CHANGED 
ACTIONBUTTON_NEW 
ACTIONBUTTON_DELETED 

Definition at line 131 of file Player.h.

Enumerator
ERR_TAXIOK 
ERR_TAXIUNSPECIFIEDSERVERERROR 
ERR_TAXINOSUCHPATH 
ERR_TAXINOTENOUGHMONEY 
ERR_TAXITOOFARAWAY 
ERR_TAXINOVENDORNEARBY 
ERR_TAXINOTVISITED 
ERR_TAXIPLAYERBUSY 
ERR_TAXIPLAYERALREADYMOUNTED 
ERR_TAXIPLAYERSHAPESHIFTED 
ERR_TAXIPLAYERMOVING 
ERR_TAXISAMENODE 
ERR_TAXINOTSTANDING 

Definition at line 434 of file Player.h.

Enumerator
ARENA_TEAM_ID 
ARENA_TEAM_MEMBER 
ARENA_TEAM_GAMES_WEEK 
ARENA_TEAM_GAMES_SEASON 
ARENA_TEAM_WINS_SEASON 
ARENA_TEAM_PERSONAL_RATING 
ARENA_TEAM_END 

Definition at line 637 of file Player.h.

Enumerator
AT_LOGIN_NONE 
AT_LOGIN_RENAME 
AT_LOGIN_RESET_SPELLS 
AT_LOGIN_RESET_TALENTS 

Definition at line 475 of file Player.h.

Enumerator
BANK_SLOT_BAG_START 
BANK_SLOT_BAG_END 

Definition at line 579 of file Player.h.

580 {
581  BANK_SLOT_BAG_START = 67,
582  BANK_SLOT_BAG_END = 74
583 };
Enumerator
BANK_SLOT_ITEM_START 
BANK_SLOT_ITEM_END 

Definition at line 573 of file Player.h.

Enumerator
BUYBACK_SLOT_START 
BUYBACK_SLOT_END 

Definition at line 585 of file Player.h.

586 {
587  // stored in m_buybackitems
588  BUYBACK_SLOT_START = 74,
589  BUYBACK_SLOT_END = 86
590 };
Enumerator
ERR_BANKSLOT_FAILED_TOO_MANY 
ERR_BANKSLOT_INSUFFICIENT_FUNDS 
ERR_BANKSLOT_NOTBANKER 
ERR_BANKSLOT_OK 

Definition at line 77 of file Player.h.

Enumerator
CHAR_DELETE_REMOVE 
CHAR_DELETE_UNLINK 

Definition at line 768 of file Player.h.

769 {
770  CHAR_DELETE_REMOVE = 0, // Completely remove from the database
771  CHAR_DELETE_UNLINK = 1 // The character gets unlinked from the account,
772  // the name gets freed up and appears as deleted ingame
773 };
Enumerator
DRUNKEN_SOBER 
DRUNKEN_TIPSY 
DRUNKEN_DRUNK 
DRUNKEN_SMASHED 

Definition at line 341 of file Player.h.

342 {
343  DRUNKEN_SOBER = 0,
344  DRUNKEN_TIPSY = 1,
345  DRUNKEN_DRUNK = 2,
346  DRUNKEN_SMASHED = 3
347 };
Enumerator
DUEL_INTERUPTED 
DUEL_WON 
DUEL_FLED 

Definition at line 655 of file Player.h.

656 {
657  DUEL_INTERUPTED = 0,
658  DUEL_WON = 1,
659  DUEL_FLED = 2
660 };
Enumerator
DAMAGE_EXHAUSTED 
DAMAGE_DROWNING 
DAMAGE_FALL 
DAMAGE_LAVA 
DAMAGE_SLIME 
DAMAGE_FIRE 
DAMAGE_FALL_TO_VOID 

Definition at line 672 of file Player.h.

673 {
674  DAMAGE_EXHAUSTED = 0,
675  DAMAGE_DROWNING = 1,
676  DAMAGE_FALL = 2,
677  DAMAGE_LAVA = 3,
678  DAMAGE_SLIME = 4,
679  DAMAGE_FIRE = 5,
680  DAMAGE_FALL_TO_VOID = 6 // custom case for fall without durability loss
681 };
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 

Definition at line 535 of file Player.h.

536 {
552  EQUIPMENT_SLOT_BACK = 14,
557  EQUIPMENT_SLOT_END = 19
558 };
Enumerator
RAID_INSTANCE_WARNING_HOURS 
RAID_INSTANCE_WARNING_MIN 
RAID_INSTANCE_WARNING_MIN_SOON 
RAID_INSTANCE_WELCOME 

Definition at line 626 of file Player.h.

627 {
628  RAID_INSTANCE_WARNING_HOURS = 1, // WARNING! %s is scheduled to reset in %d hour(s).
629  RAID_INSTANCE_WARNING_MIN = 2, // WARNING! %s is scheduled to reset in %d minute(s)!
630  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!
631  RAID_INSTANCE_WELCOME = 4 // Welcome to %s. This raid instance is scheduled to reset in %s.
632 };
Enumerator
INVENTORY_SLOT_ITEM_START 
INVENTORY_SLOT_ITEM_END 

Definition at line 567 of file Player.h.

Enumerator
INVENTORY_SLOT_BAG_0 
INVENTORY_SLOT_BAG_START 
INVENTORY_SLOT_BAG_END 

Definition at line 560 of file Player.h.

Enumerator
KEYRING_SLOT_START 
KEYRING_SLOT_END 

Definition at line 592 of file Player.h.

593 {
594  KEYRING_SLOT_START = 86,
595  KEYRING_SLOT_END = 118
596 };
Enumerator
FATIGUE_TIMER 
BREATH_TIMER 
FIRE_TIMER 

Definition at line 451 of file Player.h.

452 {
453  FATIGUE_TIMER = 0,
454  BREATH_TIMER = 1,
455  FIRE_TIMER = 2
456 };
Enumerator
PLAYED_TIME_TOTAL 
PLAYED_TIME_LEVEL 

Definition at line 693 of file Player.h.

694 {
695  PLAYED_TIME_TOTAL = 0,
697 };
Enumerator
CHAT_TAG_NONE 
CHAT_TAG_AFK 
CHAT_TAG_DND 
CHAT_TAG_GM 
CHAT_TAG_COM 
CHAT_TAG_DEV 

Definition at line 683 of file Player.h.

684 {
685  CHAT_TAG_NONE = 0x00,
686  CHAT_TAG_AFK = 0x01,
687  CHAT_TAG_DND = 0x02,
688  CHAT_TAG_GM = 0x04,
689  CHAT_TAG_COM = 0x08, // [Unused WotLK] Commentator
690  CHAT_TAG_DEV = 0x10 // [Unused WotLK]
691 };
Enumerator
CHEAT_NONE 
CHEAT_GOD 
CHEAT_CASTTIME 
CHEAT_COOLDOWN 
CHEAT_POWER 
CHEAT_WATERWALK 

Definition at line 809 of file Player.h.

810 {
811  CHEAT_NONE = 0x00,
812  CHEAT_GOD = 0x01,
813  CHEAT_CASTTIME = 0x02,
814  CHEAT_COOLDOWN = 0x04,
815  CHEAT_POWER = 0x08,
816  CHEAT_WATERWALK = 0x10
817 };
Enumerator
DELAYED_SAVE_PLAYER 
DELAYED_RESURRECT_PLAYER 
DELAYED_SPELL_CAST_DESERTER 
DELAYED_BG_MOUNT_RESTORE 
DELAYED_BG_TAXI_RESTORE 
DELAYED_GROUP_RESTORE 
DELAYED_END 

Definition at line 729 of file Player.h.

730 {
731  DELAYED_SAVE_PLAYER = 0x01,
734  DELAYED_BG_MOUNT_RESTORE = 0x08, // Flag to restore mount state after teleport from BG
735  DELAYED_BG_TAXI_RESTORE = 0x10, // Flag to restore taxi state after teleport from BG
736  DELAYED_GROUP_RESTORE = 0x20, // Flag to tell player he's in a group (client would crash if this is sent at loading screen)
738 };
Enumerator
PLAYER_EXTRA_GM_ON 
PLAYER_EXTRA_ACCEPT_WHISPERS 
PLAYER_EXTRA_TAXICHEAT 
PLAYER_EXTRA_GM_INVISIBLE 
PLAYER_EXTRA_GM_CHAT 
PLAYER_EXTRA_PVP_DEATH 

Definition at line 461 of file Player.h.

462 {
463  // gm abilities
464  PLAYER_EXTRA_GM_ON = 0x0001,
466  PLAYER_EXTRA_TAXICHEAT = 0x0008,
467  PLAYER_EXTRA_GM_INVISIBLE = 0x0010,
468  PLAYER_EXTRA_GM_CHAT = 0x0020, // Show GM badge in chat messages
469 
470  // other states
471  PLAYER_EXTRA_PVP_DEATH = 0x0100 // store PvP death status until corpse creating.
472 };
Enumerator
PLAYER_FIELD_BYTE2_NONE 
PLAYER_FIELD_BYTE2_STEALTH 
PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW 

Definition at line 427 of file Player.h.

Enumerator
PLAYER_FIELD_BYTE_TRACK_STEALTHED 
PLAYER_FIELD_BYTE_RELEASE_TIMER 
PLAYER_FIELD_BYTE_NO_RELEASE_WINDOW 

Definition at line 419 of file Player.h.

420 {
422  PLAYER_FIELD_BYTE_RELEASE_TIMER = 0x00000008, // Display time till auto release spirit
423  PLAYER_FIELD_BYTE_NO_RELEASE_WINDOW = 0x00000010 // Display no "release spirit" window at all
424 };
Enumerator
PLAYER_FLAGS_GROUP_LEADER 
PLAYER_FLAGS_AFK 
PLAYER_FLAGS_DND 
PLAYER_FLAGS_GM 
PLAYER_FLAGS_GHOST 
PLAYER_FLAGS_RESTING 
PLAYER_FLAGS_FFA_PVP 
PLAYER_FLAGS_CONTESTED_PVP 
PLAYER_FLAGS_IN_PVP 
PLAYER_FLAGS_HIDE_HELM 
PLAYER_FLAGS_HIDE_CLOAK 
PLAYER_FLAGS_UNK1 
PLAYER_FLAGS_UNK2 
PLAYER_FLAGS_UNK3 
PLAYER_FLAGS_SANCTUARY 
PLAYER_FLAGS_TAXI_BENCHMARK 
PLAYER_FLAGS_PVP_TIMER 

Definition at line 349 of file Player.h.

350 {
351  PLAYER_FLAGS_GROUP_LEADER = 0x00000001,
352  PLAYER_FLAGS_AFK = 0x00000002,
353  PLAYER_FLAGS_DND = 0x00000004,
354  PLAYER_FLAGS_GM = 0x00000008,
355  PLAYER_FLAGS_GHOST = 0x00000010,
356  PLAYER_FLAGS_RESTING = 0x00000020,
357  PLAYER_FLAGS_FFA_PVP = 0x00000080,
358  PLAYER_FLAGS_CONTESTED_PVP = 0x00000100, // Player has been involved in a PvP combat and will be attacked by contested guards
359  PLAYER_FLAGS_IN_PVP = 0x00000200,
360  PLAYER_FLAGS_HIDE_HELM = 0x00000400,
361  PLAYER_FLAGS_HIDE_CLOAK = 0x00000800,
362  PLAYER_FLAGS_UNK1 = 0x00001000, // played long time
363  PLAYER_FLAGS_UNK2 = 0x00002000, // played too long time
364  PLAYER_FLAGS_UNK3 = 0x00008000, // strange visual effect (2.0.1), looks like PLAYER_FLAGS_GHOST flag
365  PLAYER_FLAGS_SANCTUARY = 0x00010000, // player entered sanctuary
366  PLAYER_FLAGS_TAXI_BENCHMARK = 0x00020000, // taxi benchmark mode (on/off) (2.0.1)
367  PLAYER_FLAGS_PVP_TIMER = 0x00040000, // 2.0.8...
368 };
Enumerator
PLAYER_LOGIN_QUERY_LOADFROM 
PLAYER_LOGIN_QUERY_LOADGROUP 
PLAYER_LOGIN_QUERY_LOADBOUNDINSTANCES 
PLAYER_LOGIN_QUERY_LOADAURAS 
PLAYER_LOGIN_QUERY_LOADSPELLS 
PLAYER_LOGIN_QUERY_LOADQUESTSTATUS 
PLAYER_LOGIN_QUERY_LOADDAILYQUESTSTATUS 
PLAYER_LOGIN_QUERY_LOADTUTORIALS 
PLAYER_LOGIN_QUERY_LOADREPUTATION 
PLAYER_LOGIN_QUERY_LOADINVENTORY 
PLAYER_LOGIN_QUERY_LOADACTIONS 
PLAYER_LOGIN_QUERY_LOADMAILCOUNT 
PLAYER_LOGIN_QUERY_LOADMAILDATE 
PLAYER_LOGIN_QUERY_LOADSOCIALLIST 
PLAYER_LOGIN_QUERY_LOADHOMEBIND 
PLAYER_LOGIN_QUERY_LOADSPELLCOOLDOWNS 
PLAYER_LOGIN_QUERY_LOADDECLINEDNAMES 
PLAYER_LOGIN_QUERY_LOADGUILD 
PLAYER_LOGIN_QUERY_LOADARENAINFO 
PLAYER_LOGIN_QUERY_LOADBGDATA 
PLAYER_LOGIN_QUERY_LOADSKILLS 
MAX_PLAYER_LOGIN_QUERY 

Definition at line 702 of file Player.h.

703 {
711  PLAYER_LOGIN_QUERY_LOADTUTORIALS = 7, // common for all characters for some account at specific realm
725 
727 };
Enumerator
MOVE_ROOT 
MOVE_UNROOT 
MOVE_WATER_WALK 
MOVE_LAND_WALK 

Definition at line 333 of file Player.h.

334 {
335  MOVE_ROOT = 1,
336  MOVE_UNROOT = 2,
337  MOVE_WATER_WALK = 3,
338  MOVE_LAND_WALK = 4
339 };
Enumerator
REST_STATE_RESTED 
REST_STATE_NORMAL 
REST_STATE_TIRED_1 
REST_STATE_TIRED_2 
REST_STATE_EXHAUSTED 
REST_STATE_RAF_LINKED 

Definition at line 775 of file Player.h.

776 {
777  REST_STATE_RESTED = 1, // 200% xp
778  REST_STATE_NORMAL = 2, // 100% xp
779  REST_STATE_TIRED_1 = 3, // 100% xp
780  REST_STATE_TIRED_2 = 4, // 50% xp
781  REST_STATE_EXHAUSTED = 5, // 25% xp
782  REST_STATE_RAF_LINKED = 6 // 200% xp
783 };
Enumerator
PLAYER_SLOT_START 
PLAYER_SLOT_END 
PLAYER_SLOTS_COUNT 

Definition at line 526 of file Player.h.

527 {
528  // first slot for item stored (in any way in player m_items data)
529  PLAYER_SLOT_START = 0,
530  // last+1 slot for item stored (in any way in player m_items data)
531  PLAYER_SLOT_END = 118,
533 };
Enumerator
PLAYERSPELL_UNCHANGED 
PLAYERSPELL_CHANGED 
PLAYERSPELL_NEW 
PLAYERSPELL_REMOVED 

Definition at line 85 of file Player.h.

Enumerator
UNDERWATER_NONE 
UNDERWATER_INWATER 
UNDERWATER_INLAVA 
UNDERWATER_INSLIME 
UNDERWATER_INDARKWATER 
UNDERWATER_EXIST_TIMERS 

Definition at line 66 of file Player.h.

67 {
68  UNDERWATER_NONE = 0x00,
69  UNDERWATER_INWATER = 0x01, // terrain type is water and player is afflicted by it
70  UNDERWATER_INLAVA = 0x02, // terrain type is lava and player is afflicted by it
71  UNDERWATER_INSLIME = 0x04, // terrain type is lava and player is afflicted by it
72  UNDERWATER_INDARKWATER = 0x08, // terrain type is dark water and player is afflicted by it
73 
75 };
Enumerator
QUEST_ID_OFFSET 
QUEST_STATE_OFFSET 
QUEST_COUNTS_OFFSET 
QUEST_TIME_OFFSET 

Definition at line 485 of file Player.h.

Enumerator
QUEST_STATE_NONE 
QUEST_STATE_COMPLETE 
QUEST_STATE_FAIL 

Definition at line 495 of file Player.h.

496 {
497  QUEST_STATE_NONE = 0x0000,
498  QUEST_STATE_COMPLETE = 0x0001,
499  QUEST_STATE_FAIL = 0x0002
500 };
Enumerator
RAF_LINK_NONE 
RAF_LINK_REFERRER 
RAF_LINK_REFERRED 

Definition at line 802 of file Player.h.

803 {
804  RAF_LINK_NONE = 0,
805  RAF_LINK_REFERRER = 1,
807 };
Enumerator
RAF_ERR_OK 
RAF_ERR_BAD_REFERRER 
RAF_ERR_LVL_TOO_HIGH 
RAF_ERR_NO_GRANTABLE_LVLS 
RAF_ERR_TOO_FAR_AWAY 
RAF_ERR_OPPOSITE_FACTION 
RAF_ERR_NOT_RIGHT_NOW 
RAF_ERR_ONLY_UNTIL_60 
RAF_ERR_NO_TARGET 
RAF_ERR_NOT_IN_PARTY 
RAF_ERR_ONLY_UNTIL_60_2 
RAF_ERR_SUMMON_NOT_READY 
RAF_ERR_BUDDY_OFFLINE 

Definition at line 785 of file Player.h.

786 {
787  RAF_ERR_OK = 0x00,
788  RAF_ERR_BAD_REFERRER = 0x01, // You were not referred by that player
789  RAF_ERR_LVL_TOO_HIGH = 0x02, // That player's level is too high
790  RAF_ERR_NO_GRANTABLE_LVLS = 0x03, // You have not earned enough levels to grant any more levels
791  RAF_ERR_TOO_FAR_AWAY = 0x04, // That player is too far away
792  RAF_ERR_OPPOSITE_FACTION = 0x05, // No cannot grant level to a character of the opposite faction
793  RAF_ERR_NOT_RIGHT_NOW = 0x06, // You cannot grant that player a level right now
794  RAF_ERR_ONLY_UNTIL_60 = 0x07, // You cannot grant levels to players level 60 or higher
795  RAF_ERR_NO_TARGET = 0x08, // You have no target
796  RAF_ERR_NOT_IN_PARTY = 0x09, // %s is not in your party
797  RAF_ERR_ONLY_UNTIL_60_2 = 0x0A, // You cannot summon players above level 60
798  RAF_ERR_SUMMON_NOT_READY = 0x0B, // You can only summon your friend once per hour
799  RAF_ERR_BUDDY_OFFLINE = 0x0C // %s is offline and cannot be summoned
800 };
enum RestFlag
Enumerator
REST_FLAG_IN_TAVERN 
REST_FLAG_IN_CITY 
REST_FLAG_IN_FACTION_AREA 

Definition at line 648 of file Player.h.

649 {
650  REST_FLAG_IN_TAVERN = 0x1,
651  REST_FLAG_IN_CITY = 0x2,
652  REST_FLAG_IN_FACTION_AREA = 0x4, // used with AREA_FLAG_REST_ZONE_*
653 };
Enumerator
SKILL_UNCHANGED 
SKILL_CHANGED 
SKILL_NEW 
SKILL_DELETED 

Definition at line 502 of file Player.h.

503 {
504  SKILL_UNCHANGED = 0,
505  SKILL_CHANGED = 1,
506  SKILL_NEW = 2,
507  SKILL_DELETED = 3
508 };
Enumerator
SPELLMOD_FLAT 
SPELLMOD_PCT 

Definition at line 59 of file Player.h.

60 {
61  SPELLMOD_FLAT = 107, // SPELL_AURA_ADD_FLAT_MODIFIER
62  SPELLMOD_PCT = 108 // SPELL_AURA_ADD_PCT_MODIFIER
63 };
Enumerator
TELE_TO_GM_MODE 
TELE_TO_NOT_LEAVE_TRANSPORT 
TELE_TO_NOT_LEAVE_COMBAT 
TELE_TO_NOT_UNSUMMON_PET 
TELE_TO_SPELL 

Definition at line 662 of file Player.h.

enum TradeSlots
Enumerator
TRADE_SLOT_COUNT 
TRADE_SLOT_TRADED_COUNT 
TRADE_SLOT_NONTRADED 

Definition at line 607 of file Player.h.

Enumerator
TRAINER_SPELL_GREEN 
TRAINER_SPELL_RED 
TRAINER_SPELL_GRAY 

Definition at line 124 of file Player.h.

Enumerator
TRANSFER_ABORT_NONE 
TRANSFER_ABORT_MAX_PLAYERS 
TRANSFER_ABORT_NOT_FOUND 
TRANSFER_ABORT_TOO_MANY_INSTANCES 
TRANSFER_ABORT_ZONE_IN_COMBAT 
TRANSFER_ABORT_INSUF_EXPAN_LVL1 
TRANSFER_ABORT_DIFFICULTY1 
TRANSFER_ABORT_DIFFICULTY2 

Definition at line 614 of file Player.h.

615 {
616  TRANSFER_ABORT_NONE = 0x0000,
617  TRANSFER_ABORT_MAX_PLAYERS = 0x0001, // Transfer Aborted: instance is full
618  TRANSFER_ABORT_NOT_FOUND = 0x0002, // Transfer Aborted: instance not found
619  TRANSFER_ABORT_TOO_MANY_INSTANCES = 0x0003, // You have entered too many instances recently.
620  TRANSFER_ABORT_ZONE_IN_COMBAT = 0x0005, // Unable to zone in while an encounter is in progress.
621  TRANSFER_ABORT_INSUF_EXPAN_LVL1 = 0x0106, // You must have TBC expansion installed to access this area.
622  TRANSFER_ABORT_DIFFICULTY1 = 0x0007, // Normal difficulty mode is not available for %s.
623  TRANSFER_ABORT_DIFFICULTY2 = 0x0107, // Heroic difficulty mode is not available for %s.
624 };

Function Documentation

void AddItemsSetItem ( Player player,
Item item 
)

Definition at line 25 of file Item.cpp.

References Player::ApplyEquipSpell(), Item::GetProto(), Player::GetSkillValue(), SpellEntry::Id, ItemSetEffect::item_count, ItemTemplate::ItemId, ItemTemplate::ItemSet, Player::ItemSetEff, ItemSetEffect::setid, sItemSetStore, sLog, ItemSetEffect::spells, and sSpellStore.

Referenced by Player::_ApplyAllItemMods(), and Player::EquipItem().

26 {
27  ItemTemplate const* proto = item->GetProto();
28  uint32 setid = proto->ItemSet;
29 
30  ItemSetEntry const* set = sItemSetStore.LookupEntry(setid);
31 
32  if (!set)
33  {
34  sLog.outErrorDb("Item set %u for item (id %u) not found, mods not applied.", setid, proto->ItemId);
35  return;
36  }
37 
38  if (set->required_skill_id && player->GetSkillValue(set->required_skill_id) < set->required_skill_value)
39  return;
40 
41  ItemSetEffect* eff = NULL;
42 
43  for (size_t x = 0; x < player->ItemSetEff.size(); ++x)
44  {
45  if (player->ItemSetEff[x] && player->ItemSetEff[x]->setid == setid)
46  {
47  eff = player->ItemSetEff[x];
48  break;
49  }
50  }
51 
52  if (!eff)
53  {
54  eff = new ItemSetEffect;
55  memset(eff, 0, sizeof(ItemSetEffect));
56  eff->setid = setid;
57 
58  size_t x = 0;
59  for (; x < player->ItemSetEff.size(); x++)
60  if (!player->ItemSetEff[x])
61  break;
62 
63  if (x < player->ItemSetEff.size())
64  player->ItemSetEff[x] = eff;
65  else
66  player->ItemSetEff.push_back(eff);
67  }
68 
69  ++eff->item_count;
70 
71  for (uint32 x = 0; x < 8; x++)
72  {
73  if (!set->spells [x])
74  continue;
75  //not enough for spell
76  if (set->items_to_triggerspell[x] > eff->item_count)
77  continue;
78 
79  uint32 z = 0;
80  for (; z < 8; z++)
81  if (eff->spells[z] && eff->spells[z]->Id == set->spells[x])
82  break;
83 
84  if (z < 8)
85  continue;
86 
87  //new spell
88  for (uint32 y = 0; y < 8; y++)
89  {
90  if (!eff->spells[y]) // free slot
91  {
92  SpellEntry const* spellInfo = sSpellStore.LookupEntry(set->spells[x]);
93  if (!spellInfo)
94  {
95  sLog.outError("WORLD: unknown spell id %u in items set %u effects", set->spells[x], setid);
96  break;
97  }
98 
99  // spell casted only if fit form requirement, in other case will casted at form change
100  player->ApplyEquipSpell(spellInfo, NULL, true);
101  eff->spells[y] = spellInfo;
102  break;
103  }
104  }
105  }
106 }
ItemTemplate const * GetProto() const
Definition: Item.cpp:460
DBCStorage< ItemSetEntry > sItemSetStore(ItemSetEntryfmt)
#define sLog
Log class singleton.
Definition: Log.h:187
DBCStorage< SpellEntry > sSpellStore(SpellEntryfmt)
uint32 setid
Definition: Item.h:33
SpellEntry const * spells[8]
Definition: Item.h:35
uint16 GetSkillValue(uint32 skill) const
Definition: Player.cpp:5487
void ApplyEquipSpell(SpellEntry const *spellInfo, Item *item, bool apply, bool form_change=false)
Definition: Player.cpp:6862
ACE_UINT32 uint32
Definition: Define.h:71
uint32 item_count
Definition: Item.h:34
std::vector< ItemSetEffect * > ItemSetEff
Definition: Player.h:2183
void RemoveItemsSetItem ( Player player,
ItemTemplate const *  proto 
)

Definition at line 108 of file Item.cpp.

References Player::ApplyEquipSpell(), ASSERT, SpellEntry::Id, ItemSetEffect::item_count, ItemTemplate::ItemId, ItemTemplate::ItemSet, Player::ItemSetEff, sItemSetStore, sLog, and ItemSetEffect::spells.

Referenced by Player::_RemoveAllItemMods(), Player::DestroyItem(), and Player::RemoveItem().

109 {
110  uint32 setid = proto->ItemSet;
111 
112  ItemSetEntry const* set = sItemSetStore.LookupEntry(setid);
113 
114  if (!set)
115  {
116  sLog.outErrorDb("Item set #%u for item #%u not found, mods not removed.", setid, proto->ItemId);
117  return;
118  }
119 
120  ItemSetEffect* eff = NULL;
121  size_t setindex = 0;
122  for (; setindex < player->ItemSetEff.size(); setindex++)
123  {
124  if (player->ItemSetEff[setindex] && player->ItemSetEff[setindex]->setid == setid)
125  {
126  eff = player->ItemSetEff[setindex];
127  break;
128  }
129  }
130 
131  // can be in case now enough skill requirement for set appling but set has been appliend when skill requirement not enough
132  if (!eff)
133  return;
134 
135  --eff->item_count;
136 
137  for (uint32 x = 0; x < 8; x++)
138  {
139  if (!set->spells[x])
140  continue;
141 
142  // enough for spell
143  if (set->items_to_triggerspell[x] <= eff->item_count)
144  continue;
145 
146  for (uint32 z = 0; z < 8; z++)
147  {
148  if (eff->spells[z] && eff->spells[z]->Id == set->spells[x])
149  {
150  // spell can be not active if not fit form requirement
151  player->ApplyEquipSpell(eff->spells[z], NULL, false);
152  eff->spells[z] = NULL;
153  break;
154  }
155  }
156  }
157 
158  if (!eff->item_count) //all items of a set were removed
159  {
160  ASSERT(eff == player->ItemSetEff[setindex]);
161  delete eff;
162  player->ItemSetEff[setindex] = NULL;
163  }
164 }
DBCStorage< ItemSetEntry > sItemSetStore(ItemSetEntryfmt)
#define sLog
Log class singleton.
Definition: Log.h:187
SpellEntry const * spells[8]
Definition: Item.h:35
#define ASSERT
Definition: Errors.h:29
void ApplyEquipSpell(SpellEntry const *spellInfo, Item *item, bool apply, bool form_change=false)
Definition: Player.cpp:6862
ACE_UINT32 uint32
Definition: Define.h:71
uint32 item_count
Definition: Item.h:34
std::vector< ItemSetEffect * > ItemSetEff
Definition: Player.h:2183