TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Unit.h File Reference
#include "DBCStructure.h"
#include "EventProcessor.h"
#include "FollowerReference.h"
#include "FollowerRefManager.h"
#include "HostileRefManager.h"
#include "MotionMaster.h"
#include "Object.h"
#include "SpellAuraDefines.h"
#include "ThreatManager.h"
#include "MoveSplineInit.h"
+ Include dependency graph for Unit.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CustomSpellValues
 
struct  SpellImmune
 
struct  DiminishingReturn
 
class  DispelInfo
 
struct  CleanDamage
 
class  DamageInfo
 
class  HealInfo
 
class  ProcEventInfo
 
struct  CalcDamageInfo
 
struct  SpellNonMeleeDamage
 
struct  SpellPeriodicAuraLogInfo
 
struct  RedirectThreatInfo
 
struct  DeclinedName
 
struct  UnitActionBarEntry
 
struct  CharmInfo
 
class  Unit
 
class  Trinity::PowerPctOrderPred
 
class  Trinity::HealthPctOrderPred
 

Namespaces

 Movement
 
 WorldPackets
 
 WorldPackets::CombatLog
 
 Trinity
 

Macros

#define WORLD_TRIGGER   12999
 
#define MAX_SPELLMOD   38
 
#define BASE_MINDAMAGE   1.0f
 
#define BASE_MAXDAMAGE   2.0f
 
#define BASE_ATTACK_TIME   2000
 
#define MAX_SHEATH_STATE   3
 
#define MAX_SPELL_CHARM   4
 
#define MAX_SPELL_VEHICLE   6
 
#define MAX_SPELL_POSSESS   8
 
#define MAX_SPELL_CONTROL_BAR   10
 
#define MAX_AGGRO_RESET_TIME   10
 
#define MAX_AGGRO_RADIUS   45.0f
 
#define MAX_MOVE_TYPE   9
 
#define MAX_COMBAT_RATING   31
 
#define MAX_DECLINED_NAME_CASES   5
 
#define CURRENT_FIRST_NON_MELEE_SPELL   1
 
#define CURRENT_MAX_SPELL   4
 
#define UNIT_ACTION_BUTTON_ACTION(X)   (uint32(X) & 0x00FFFFFF)
 
#define UNIT_ACTION_BUTTON_TYPE(X)   ((uint32(X) & 0xFF000000) >> 24)
 
#define MAKE_UNIT_ACTION_BUTTON(A, T)   (uint32(A) | (uint32(T) << 24))
 
#define MAX_UNIT_ACTION_BAR_INDEX   (ACTION_BAR_INDEX_END-ACTION_BAR_INDEX_START)
 
#define REACTIVE_TIMER_START   4000
 
#define MAX_REACTIVE   3
 
#define SUMMON_SLOT_PET   0
 
#define SUMMON_SLOT_TOTEM   1
 
#define MAX_TOTEM_SLOT   5
 
#define SUMMON_SLOT_MINIPET   5
 
#define SUMMON_SLOT_QUEST   6
 
#define MAX_SUMMON_SLOT   7
 
#define MAX_GAMEOBJECT_SLOT   4
 
#define MAX_EQUIPMENT_ITEMS   3
 
#define ATTACK_DISPLAY_DELAY   200
 
#define MAX_PLAYER_STEALTH_DETECT_RANGE   30.0f
 

Typedefs

typedef std::list< Unit * > UnitList
 
typedef std::list< std::pair
< Aura *, uint8 > > 
DispelChargesList
 
typedef std::list< SpellImmuneSpellImmuneList
 
typedef std::list< Player * > SharedVisionList
 
typedef UnitActionBarEntry CharmSpellInfo
 

Enumerations

enum  SpellInterruptFlags {
  SPELL_INTERRUPT_FLAG_MOVEMENT = 0x01, SPELL_INTERRUPT_FLAG_PUSH_BACK = 0x02, SPELL_INTERRUPT_FLAG_UNK3 = 0x04, SPELL_INTERRUPT_FLAG_INTERRUPT = 0x08,
  SPELL_INTERRUPT_FLAG_ABORT_ON_DMG = 0x10
}
 
enum  SpellChannelInterruptFlags { CHANNEL_INTERRUPT_FLAG_INTERRUPT = 0x08, CHANNEL_FLAG_DELAY = 0x4000 }
 
enum  SpellAuraInterruptFlags {
  AURA_INTERRUPT_FLAG_HITBYSPELL = 0x00000001, AURA_INTERRUPT_FLAG_TAKE_DAMAGE = 0x00000002, AURA_INTERRUPT_FLAG_CAST = 0x00000004, AURA_INTERRUPT_FLAG_MOVE = 0x00000008,
  AURA_INTERRUPT_FLAG_TURNING = 0x00000010, AURA_INTERRUPT_FLAG_JUMP = 0x00000020, AURA_INTERRUPT_FLAG_NOT_MOUNTED = 0x00000040, AURA_INTERRUPT_FLAG_NOT_ABOVEWATER = 0x00000080,
  AURA_INTERRUPT_FLAG_NOT_UNDERWATER = 0x00000100, AURA_INTERRUPT_FLAG_NOT_SHEATHED = 0x00000200, AURA_INTERRUPT_FLAG_TALK = 0x00000400, AURA_INTERRUPT_FLAG_USE = 0x00000800,
  AURA_INTERRUPT_FLAG_MELEE_ATTACK = 0x00001000, AURA_INTERRUPT_FLAG_SPELL_ATTACK = 0x00002000, AURA_INTERRUPT_FLAG_UNK14 = 0x00004000, AURA_INTERRUPT_FLAG_TRANSFORM = 0x00008000,
  AURA_INTERRUPT_FLAG_UNK16 = 0x00010000, AURA_INTERRUPT_FLAG_MOUNT = 0x00020000, AURA_INTERRUPT_FLAG_NOT_SEATED = 0x00040000, AURA_INTERRUPT_FLAG_CHANGE_MAP = 0x00080000,
  AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION = 0x00100000, AURA_INTERRUPT_FLAG_UNK21 = 0x00200000, AURA_INTERRUPT_FLAG_TELEPORTED = 0x00400000, AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT = 0x00800000,
  AURA_INTERRUPT_FLAG_DIRECT_DAMAGE = 0x01000000, AURA_INTERRUPT_FLAG_LANDING = 0x02000000, AURA_INTERRUPT_FLAG_NOT_VICTIM = (AURA_INTERRUPT_FLAG_HITBYSPELL | AURA_INTERRUPT_FLAG_TAKE_DAMAGE | AURA_INTERRUPT_FLAG_DIRECT_DAMAGE)
}
 
enum  SpellModOp {
  SPELLMOD_DAMAGE = 0, SPELLMOD_DURATION = 1, SPELLMOD_THREAT = 2, SPELLMOD_EFFECT1 = 3,
  SPELLMOD_CHARGES = 4, SPELLMOD_RANGE = 5, SPELLMOD_RADIUS = 6, SPELLMOD_CRITICAL_CHANCE = 7,
  SPELLMOD_ALL_EFFECTS = 8, SPELLMOD_NOT_LOSE_CASTING_TIME = 9, SPELLMOD_CASTING_TIME = 10, SPELLMOD_COOLDOWN = 11,
  SPELLMOD_EFFECT2 = 12, SPELLMOD_IGNORE_ARMOR = 13, SPELLMOD_COST = 14, SPELLMOD_CRIT_DAMAGE_BONUS = 15,
  SPELLMOD_RESIST_MISS_CHANCE = 16, SPELLMOD_JUMP_TARGETS = 17, SPELLMOD_CHANCE_OF_SUCCESS = 18, SPELLMOD_ACTIVATION_TIME = 19,
  SPELLMOD_DAMAGE_MULTIPLIER = 20, SPELLMOD_GLOBAL_COOLDOWN = 21, SPELLMOD_DOT = 22, SPELLMOD_EFFECT3 = 23,
  SPELLMOD_BONUS_MULTIPLIER = 24, SPELLMOD_PROC_PER_MINUTE = 26, SPELLMOD_VALUE_MULTIPLIER = 27, SPELLMOD_RESIST_DISPEL_CHANCE = 28,
  SPELLMOD_CRIT_DAMAGE_BONUS_2 = 29, SPELLMOD_SPELL_COST_REFUND_ON_FAIL = 30, SPELLMOD_STACK_AMOUNT = 31, SPELLMOD_EFFECT4 = 32,
  SPELLMOD_EFFECT5 = 33, SPELLMOD_SPELL_COST2 = 34, SPELLMOD_JUMP_DISTANCE = 35, SPELLMOD_STACK_AMOUNT2 = 37
}
 
enum  SpellValueMod {
  SPELLVALUE_BASE_POINT0, SPELLVALUE_BASE_POINT1, SPELLVALUE_BASE_POINT2, SPELLVALUE_BASE_POINT3,
  SPELLVALUE_BASE_POINT4, SPELLVALUE_BASE_POINT5, SPELLVALUE_BASE_POINT6, SPELLVALUE_BASE_POINT7,
  SPELLVALUE_BASE_POINT8, SPELLVALUE_BASE_POINT9, SPELLVALUE_BASE_POINT10, SPELLVALUE_BASE_POINT11,
  SPELLVALUE_BASE_POINT12, SPELLVALUE_BASE_POINT13, SPELLVALUE_BASE_POINT14, SPELLVALUE_BASE_POINT15,
  SPELLVALUE_BASE_POINT16, SPELLVALUE_BASE_POINT17, SPELLVALUE_BASE_POINT18, SPELLVALUE_BASE_POINT19,
  SPELLVALUE_BASE_POINT20, SPELLVALUE_BASE_POINT21, SPELLVALUE_BASE_POINT22, SPELLVALUE_BASE_POINT23,
  SPELLVALUE_BASE_POINT24, SPELLVALUE_BASE_POINT25, SPELLVALUE_BASE_POINT26, SPELLVALUE_BASE_POINT27,
  SPELLVALUE_BASE_POINT28, SPELLVALUE_BASE_POINT29, SPELLVALUE_BASE_POINT30, SPELLVALUE_BASE_POINT31,
  SPELLVALUE_BASE_POINT_END, SPELLVALUE_RADIUS_MOD, SPELLVALUE_MAX_TARGETS, SPELLVALUE_AURA_STACK
}
 
enum  SpellFacingFlags { SPELL_FACING_FLAG_INFRONT = 0x0001 }
 
enum  UnitStandStateType {
  UNIT_STAND_STATE_STAND = 0, UNIT_STAND_STATE_SIT = 1, UNIT_STAND_STATE_SIT_CHAIR = 2, UNIT_STAND_STATE_SLEEP = 3,
  UNIT_STAND_STATE_SIT_LOW_CHAIR = 4, UNIT_STAND_STATE_SIT_MEDIUM_CHAIR = 5, UNIT_STAND_STATE_SIT_HIGH_CHAIR = 6, UNIT_STAND_STATE_DEAD = 7,
  UNIT_STAND_STATE_KNEEL = 8, UNIT_STAND_STATE_SUBMERGED = 9
}
 
enum  UnitStandFlags {
  UNIT_STAND_FLAGS_UNK1 = 0x01, UNIT_STAND_FLAGS_CREEP = 0x02, UNIT_STAND_FLAGS_UNTRACKABLE = 0x04, UNIT_STAND_FLAGS_UNK4 = 0x08,
  UNIT_STAND_FLAGS_UNK5 = 0x10, UNIT_STAND_FLAGS_ALL = 0xFF
}
 
enum  UnitBytes0Offsets { UNIT_BYTES_0_OFFSET_RACE = 0, UNIT_BYTES_0_OFFSET_CLASS = 1, UNIT_BYTES_0_OFFSET_GENDER = 3 }
 
enum  UnitBytes1Offsets { UNIT_BYTES_1_OFFSET_STAND_STATE = 0, UNIT_BYTES_1_OFFSET_VIS_FLAG = 2, UNIT_BYTES_1_OFFSET_ANIM_TIER = 3 }
 
enum  UnitBytes2Offsets { UNIT_BYTES_2_OFFSET_SHEATH_STATE = 0, UNIT_BYTES_2_OFFSET_PVP_FLAG = 1 }
 
enum  UnitBytes1_Flags { UNIT_BYTE1_FLAG_ALWAYS_STAND = 0x01, UNIT_BYTE1_FLAG_HOVER = 0x02, UNIT_BYTE1_FLAG_UNK_3 = 0x04, UNIT_BYTE1_FLAG_ALL = 0xFF }
 
enum  ShapeshiftForm {
  FORM_NONE = 0x00, FORM_CAT = 0x01, FORM_TREE = 0x02, FORM_TRAVEL = 0x03,
  FORM_AQUA = 0x04, FORM_BEAR = 0x05, FORM_AMBIENT = 0x06, FORM_GHOUL = 0x07,
  FORM_DIREBEAR = 0x08, FORM_STEVES_GHOUL = 0x09, FORM_THARONJA_SKELETON = 0x0A, FORM_TEST_OF_STRENGTH = 0x0B,
  FORM_BLB_PLAYER = 0x0C, FORM_SHADOW_DANCE = 0x0D, FORM_CREATUREBEAR = 0x0E, FORM_CREATURECAT = 0x0F,
  FORM_GHOSTWOLF = 0x10, FORM_BATTLESTANCE = 0x11, FORM_DEFENSIVESTANCE = 0x12, FORM_BERSERKERSTANCE = 0x13,
  FORM_TEST = 0x14, FORM_ZOMBIE = 0x15, FORM_METAMORPHOSIS = 0x16, FORM_UNDEAD = 0x19,
  FORM_MASTER_ANGLER = 0x1A, FORM_FLIGHT_EPIC = 0x1B, FORM_SHADOW = 0x1C, FORM_FLIGHT = 0x1D,
  FORM_STEALTH = 0x1E, FORM_MOONKIN = 0x1F, FORM_SPIRITOFREDEMPTION = 0x20
}
 
enum  SheathState : uint8 { SHEATH_STATE_UNARMED = 0, SHEATH_STATE_MELEE = 1, SHEATH_STATE_RANGED = 2 }
 
enum  UnitPVPStateFlags {
  UNIT_BYTE2_FLAG_PVP = 0x01, UNIT_BYTE2_FLAG_UNK1 = 0x02, UNIT_BYTE2_FLAG_FFA_PVP = 0x04, UNIT_BYTE2_FLAG_SANCTUARY = 0x08,
  UNIT_BYTE2_FLAG_UNK4 = 0x10, UNIT_BYTE2_FLAG_UNK5 = 0x20, UNIT_BYTE2_FLAG_UNK6 = 0x40, UNIT_BYTE2_FLAG_UNK7 = 0x80
}
 
enum  UnitRename { UNIT_CAN_BE_RENAMED = 0x01, UNIT_CAN_BE_ABANDONED = 0x02 }
 
enum  VictimState {
  VICTIMSTATE_INTACT = 0, VICTIMSTATE_HIT = 1, VICTIMSTATE_DODGE = 2, VICTIMSTATE_PARRY = 3,
  VICTIMSTATE_INTERRUPT = 4, VICTIMSTATE_BLOCKS = 5, VICTIMSTATE_EVADES = 6, VICTIMSTATE_IS_IMMUNE = 7,
  VICTIMSTATE_DEFLECTS = 8
}
 
enum  HitInfo {
  HITINFO_NORMALSWING = 0x00000000, HITINFO_UNK1 = 0x00000001, HITINFO_AFFECTS_VICTIM = 0x00000002, HITINFO_OFFHAND = 0x00000004,
  HITINFO_UNK2 = 0x00000008, HITINFO_MISS = 0x00000010, HITINFO_FULL_ABSORB = 0x00000020, HITINFO_PARTIAL_ABSORB = 0x00000040,
  HITINFO_FULL_RESIST = 0x00000080, HITINFO_PARTIAL_RESIST = 0x00000100, HITINFO_CRITICALHIT = 0x00000200, HITINFO_UNK12 = 0x00001000,
  HITINFO_BLOCK = 0x00002000, HITINFO_GLANCING = 0x00010000, HITINFO_CRUSHING = 0x00020000, HITINFO_NO_ANIMATION = 0x00040000,
  HITINFO_SWINGNOHITSOUND = 0x00200000, HITINFO_RAGE_GAIN = 0x00800000
}
 
enum  InventorySlot { NULL_BAG = 0, NULL_SLOT = 255 }
 
enum  UnitModifierType {
  BASE_VALUE = 0, BASE_PCT_EXCLUDE_CREATE = 1, BASE_PCT = 2, TOTAL_VALUE = 3,
  TOTAL_PCT = 4, MODIFIER_TYPE_END = 5
}
 
enum  WeaponDamageRange { MINDAMAGE, MAXDAMAGE }
 
enum  AuraRemoveMode {
  AURA_REMOVE_NONE = 0, AURA_REMOVE_BY_DEFAULT = 1, AURA_REMOVE_BY_CANCEL, AURA_REMOVE_BY_ENEMY_SPELL,
  AURA_REMOVE_BY_EXPIRE, AURA_REMOVE_BY_DEATH
}
 
enum  TriggerCastFlags {
  TRIGGERED_NONE = 0x00000000, TRIGGERED_IGNORE_GCD = 0x00000001, TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD = 0x00000002, TRIGGERED_IGNORE_POWER_AND_REAGENT_COST = 0x00000004,
  TRIGGERED_IGNORE_CAST_ITEM = 0x00000008, TRIGGERED_IGNORE_AURA_SCALING = 0x00000010, TRIGGERED_IGNORE_CAST_IN_PROGRESS = 0x00000020, TRIGGERED_IGNORE_COMBO_POINTS = 0x00000040,
  TRIGGERED_CAST_DIRECTLY = 0x00000080, TRIGGERED_IGNORE_AURA_INTERRUPT_FLAGS = 0x00000100, TRIGGERED_IGNORE_SET_FACING = 0x00000200, TRIGGERED_IGNORE_SHAPESHIFT = 0x00000400,
  TRIGGERED_IGNORE_CASTER_AURASTATE = 0x00000800, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE = 0x00002000, TRIGGERED_IGNORE_CASTER_AURAS = 0x00010000, TRIGGERED_DISALLOW_PROC_EVENTS = 0x00020000,
  TRIGGERED_DONT_REPORT_CAST_ERROR = 0x00040000, TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT = 0x00080000, TRIGGERED_IGNORE_TARGET_CHECK = 0x00100000, TRIGGERED_FULL_MASK = 0xFFFFFFFF
}
 
enum  UnitMods {
  UNIT_MOD_STAT_STRENGTH, UNIT_MOD_STAT_AGILITY, UNIT_MOD_STAT_STAMINA, UNIT_MOD_STAT_INTELLECT,
  UNIT_MOD_STAT_SPIRIT, UNIT_MOD_HEALTH, UNIT_MOD_MANA, UNIT_MOD_RAGE,
  UNIT_MOD_FOCUS, UNIT_MOD_ENERGY, UNIT_MOD_UNUSED, UNIT_MOD_RUNE,
  UNIT_MOD_RUNIC_POWER, UNIT_MOD_SOUL_SHARDS, UNIT_MOD_ECLIPSE, UNIT_MOD_HOLY_POWER,
  UNIT_MOD_ALTERNATIVE, UNIT_MOD_ARMOR, UNIT_MOD_RESISTANCE_HOLY, UNIT_MOD_RESISTANCE_FIRE,
  UNIT_MOD_RESISTANCE_NATURE, UNIT_MOD_RESISTANCE_FROST, UNIT_MOD_RESISTANCE_SHADOW, UNIT_MOD_RESISTANCE_ARCANE,
  UNIT_MOD_ATTACK_POWER, UNIT_MOD_ATTACK_POWER_RANGED, UNIT_MOD_DAMAGE_MAINHAND, UNIT_MOD_DAMAGE_OFFHAND,
  UNIT_MOD_DAMAGE_RANGED, UNIT_MOD_END, UNIT_MOD_STAT_START = UNIT_MOD_STAT_STRENGTH, UNIT_MOD_STAT_END = UNIT_MOD_STAT_SPIRIT + 1,
  UNIT_MOD_RESISTANCE_START = UNIT_MOD_ARMOR, UNIT_MOD_RESISTANCE_END = UNIT_MOD_RESISTANCE_ARCANE + 1, UNIT_MOD_POWER_START = UNIT_MOD_MANA, UNIT_MOD_POWER_END = UNIT_MOD_ALTERNATIVE + 1
}
 
enum  BaseModGroup {
  CRIT_PERCENTAGE, RANGED_CRIT_PERCENTAGE, OFFHAND_CRIT_PERCENTAGE, SHIELD_BLOCK_VALUE,
  BASEMOD_END
}
 
enum  BaseModType { FLAT_MOD, PCT_MOD, MOD_END }
 
enum  DeathState {
  ALIVE = 0, JUST_DIED = 1, CORPSE = 2, DEAD = 3,
  JUST_RESPAWNED = 4
}
 
enum  UnitState {
  UNIT_STATE_DIED = 0x00000001, UNIT_STATE_MELEE_ATTACKING = 0x00000002, UNIT_STATE_STUNNED = 0x00000008, UNIT_STATE_ROAMING = 0x00000010,
  UNIT_STATE_CHASE = 0x00000020, UNIT_STATE_FLEEING = 0x00000080, UNIT_STATE_IN_FLIGHT = 0x00000100, UNIT_STATE_FOLLOW = 0x00000200,
  UNIT_STATE_ROOT = 0x00000400, UNIT_STATE_CONFUSED = 0x00000800, UNIT_STATE_DISTRACTED = 0x00001000, UNIT_STATE_ISOLATED = 0x00002000,
  UNIT_STATE_ATTACK_PLAYER = 0x00004000, UNIT_STATE_CASTING = 0x00008000, UNIT_STATE_POSSESSED = 0x00010000, UNIT_STATE_CHARGING = 0x00020000,
  UNIT_STATE_JUMPING = 0x00040000, UNIT_STATE_MOVE = 0x00100000, UNIT_STATE_ROTATING = 0x00200000, UNIT_STATE_EVADE = 0x00400000,
  UNIT_STATE_ROAMING_MOVE = 0x00800000, UNIT_STATE_CONFUSED_MOVE = 0x01000000, UNIT_STATE_FLEEING_MOVE = 0x02000000, UNIT_STATE_CHASE_MOVE = 0x04000000,
  UNIT_STATE_FOLLOW_MOVE = 0x08000000, UNIT_STATE_IGNORE_PATHFINDING = 0x10000000, UNIT_STATE_ALL_STATE_SUPPORTED, UNIT_STATE_UNATTACKABLE = UNIT_STATE_IN_FLIGHT,
  UNIT_STATE_MOVING = UNIT_STATE_ROAMING_MOVE | UNIT_STATE_CONFUSED_MOVE | UNIT_STATE_FLEEING_MOVE | UNIT_STATE_CHASE_MOVE | UNIT_STATE_FOLLOW_MOVE, UNIT_STATE_CONTROLLED = (UNIT_STATE_CONFUSED | UNIT_STATE_STUNNED | UNIT_STATE_FLEEING), UNIT_STATE_LOST_CONTROL = (UNIT_STATE_CONTROLLED | UNIT_STATE_JUMPING | UNIT_STATE_CHARGING), UNIT_STATE_SIGHTLESS = (UNIT_STATE_LOST_CONTROL | UNIT_STATE_EVADE),
  UNIT_STATE_CANNOT_AUTOATTACK = (UNIT_STATE_LOST_CONTROL | UNIT_STATE_CASTING), UNIT_STATE_CANNOT_TURN = (UNIT_STATE_LOST_CONTROL | UNIT_STATE_ROTATING), UNIT_STATE_NOT_MOVE = UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DIED | UNIT_STATE_DISTRACTED, UNIT_STATE_ALL_STATE = 0xffffffff
}
 
enum  UnitMoveType {
  MOVE_WALK = 0, MOVE_RUN = 1, MOVE_RUN_BACK = 2, MOVE_SWIM = 3,
  MOVE_SWIM_BACK = 4, MOVE_TURN_RATE = 5, MOVE_FLIGHT = 6, MOVE_FLIGHT_BACK = 7,
  MOVE_PITCH_RATE = 8
}
 
enum  WeaponAttackType : uint16 { BASE_ATTACK = 0, OFF_ATTACK = 1, RANGED_ATTACK = 2, MAX_ATTACK }
 
enum  CombatRating {
  CR_UNUSED_1 = 0, CR_DEFENSE_SKILL = 1, CR_DODGE = 2, CR_PARRY = 3,
  CR_BLOCK = 4, CR_HIT_MELEE = 5, CR_HIT_RANGED = 6, CR_HIT_SPELL = 7,
  CR_CRIT_MELEE = 8, CR_CRIT_RANGED = 9, CR_CRIT_SPELL = 10, CR_MULTISTRIKE = 11,
  CR_READINESS = 12, CR_SPEED = 13, CR_RESILIENCE_CRIT_TAKEN = 14, CR_RESILIENCE_PLAYER_DAMAGE_TAKEN = 15,
  CR_LIFESTEAL = 16, CR_HASTE_MELEE = 17, CR_HASTE_RANGED = 18, CR_HASTE_SPELL = 19,
  CR_AVOIDANCE = 20, CR_UNUSED_2 = 21, CR_WEAPON_SKILL_RANGED = 22, CR_EXPERTISE = 23,
  CR_ARMOR_PENETRATION = 24, CR_MASTERY = 25, CR_UNUSED_3 = 26, CR_UNUSED_4 = 27,
  CR_VERSATILITY_DAMAGE_DONE = 28, CR_VERSATILITY_DAMAGE_TAKEN = 30
}
 
enum  DamageEffectType {
  DIRECT_DAMAGE = 0, SPELL_DIRECT_DAMAGE = 1, DOT = 2, HEAL = 3,
  NODAMAGE = 4, SELF_DAMAGE = 5
}
 
enum  UnitFlags : uint32 {
  UNIT_FLAG_SERVER_CONTROLLED = 0x00000001, UNIT_FLAG_NON_ATTACKABLE = 0x00000002, UNIT_FLAG_DISABLE_MOVE = 0x00000004, UNIT_FLAG_PVP_ATTACKABLE = 0x00000008,
  UNIT_FLAG_RENAME = 0x00000010, UNIT_FLAG_PREPARATION = 0x00000020, UNIT_FLAG_UNK_6 = 0x00000040, UNIT_FLAG_NOT_ATTACKABLE_1 = 0x00000080,
  UNIT_FLAG_IMMUNE_TO_PC = 0x00000100, UNIT_FLAG_IMMUNE_TO_NPC = 0x00000200, UNIT_FLAG_LOOTING = 0x00000400, UNIT_FLAG_PET_IN_COMBAT = 0x00000800,
  UNIT_FLAG_PVP = 0x00001000, UNIT_FLAG_SILENCED = 0x00002000, UNIT_FLAG_UNK_14 = 0x00004000, UNIT_FLAG_UNK_15 = 0x00008000,
  UNIT_FLAG_UNK_16 = 0x00010000, UNIT_FLAG_PACIFIED = 0x00020000, UNIT_FLAG_STUNNED = 0x00040000, UNIT_FLAG_IN_COMBAT = 0x00080000,
  UNIT_FLAG_TAXI_FLIGHT = 0x00100000, UNIT_FLAG_DISARMED = 0x00200000, UNIT_FLAG_CONFUSED = 0x00400000, UNIT_FLAG_FLEEING = 0x00800000,
  UNIT_FLAG_PLAYER_CONTROLLED = 0x01000000, UNIT_FLAG_NOT_SELECTABLE = 0x02000000, UNIT_FLAG_SKINNABLE = 0x04000000, UNIT_FLAG_MOUNT = 0x08000000,
  UNIT_FLAG_UNK_28 = 0x10000000, UNIT_FLAG_UNK_29 = 0x20000000, UNIT_FLAG_SHEATHE = 0x40000000, UNIT_FLAG_UNK_31 = 0x80000000,
  MAX_UNIT_FLAGS = 33
}
 
enum  UnitFlags2 {
  UNIT_FLAG2_FEIGN_DEATH = 0x00000001, UNIT_FLAG2_UNK1 = 0x00000002, UNIT_FLAG2_IGNORE_REPUTATION = 0x00000004, UNIT_FLAG2_COMPREHEND_LANG = 0x00000008,
  UNIT_FLAG2_MIRROR_IMAGE = 0x00000010, UNIT_FLAG2_INSTANTLY_APPEAR_MODEL = 0x00000020, UNIT_FLAG2_FORCE_MOVEMENT = 0x00000040, UNIT_FLAG2_DISARM_OFFHAND = 0x00000080,
  UNIT_FLAG2_DISABLE_PRED_STATS = 0x00000100, UNIT_FLAG2_DISARM_RANGED = 0x00000400, UNIT_FLAG2_REGENERATE_POWER = 0x00000800, UNIT_FLAG2_RESTRICT_PARTY_INTERACTION = 0x00001000,
  UNIT_FLAG2_PREVENT_SPELL_CLICK = 0x00002000, UNIT_FLAG2_ALLOW_ENEMY_INTERACT = 0x00004000, UNIT_FLAG2_DISABLE_TURN = 0x00008000, UNIT_FLAG2_UNK2 = 0x00010000,
  UNIT_FLAG2_PLAY_DEATH_ANIM = 0x00020000, UNIT_FLAG2_ALLOW_CHEAT_SPELLS = 0x00040000
}
 
enum  NPCFlags : uint64 {
  UNIT_NPC_FLAG_NONE = 0x0000000000, UNIT_NPC_FLAG_GOSSIP = 0x0000000001, UNIT_NPC_FLAG_QUESTGIVER = 0x0000000002, UNIT_NPC_FLAG_UNK1 = 0x0000000004,
  UNIT_NPC_FLAG_UNK2 = 0x0000000008, UNIT_NPC_FLAG_TRAINER = 0x0000000010, UNIT_NPC_FLAG_TRAINER_CLASS = 0x0000000020, UNIT_NPC_FLAG_TRAINER_PROFESSION = 0x0000000040,
  UNIT_NPC_FLAG_VENDOR = 0x0000000080, UNIT_NPC_FLAG_VENDOR_AMMO = 0x0000000100, UNIT_NPC_FLAG_VENDOR_FOOD = 0x0000000200, UNIT_NPC_FLAG_VENDOR_POISON = 0x0000000400,
  UNIT_NPC_FLAG_VENDOR_REAGENT = 0x0000000800, UNIT_NPC_FLAG_REPAIR = 0x0000001000, UNIT_NPC_FLAG_FLIGHTMASTER = 0x0000002000, UNIT_NPC_FLAG_SPIRITHEALER = 0x0000004000,
  UNIT_NPC_FLAG_SPIRITGUIDE = 0x0000008000, UNIT_NPC_FLAG_INNKEEPER = 0x0000010000, UNIT_NPC_FLAG_BANKER = 0x0000020000, UNIT_NPC_FLAG_PETITIONER = 0x0000040000,
  UNIT_NPC_FLAG_TABARDDESIGNER = 0x0000080000, UNIT_NPC_FLAG_BATTLEMASTER = 0x0000100000, UNIT_NPC_FLAG_AUCTIONEER = 0x0000200000, UNIT_NPC_FLAG_STABLEMASTER = 0x0000400000,
  UNIT_NPC_FLAG_GUILD_BANKER = 0x0000800000, UNIT_NPC_FLAG_SPELLCLICK = 0x0001000000, UNIT_NPC_FLAG_PLAYER_VEHICLE = 0x0002000000, UNIT_NPC_FLAG_MAILBOX = 0x0004000000,
  UNIT_NPC_FLAG_REFORGER = 0x0008000000, UNIT_NPC_FLAG_TRANSMOGRIFIER = 0x0010000000, UNIT_NPC_FLAG_VAULTKEEPER = 0x0020000000, UNIT_NPC_FLAG_BLACK_MARKET = 0x0080000000,
  UNIT_NPC_FLAG_ITEM_UPGRADE_MASTER = 0x0100000000, UNIT_NPC_FLAG_GARRISON_ARCHITECT = 0x0200000000, UNIT_NPC_FLAG_SHIPMENT_CRAFTER = 0x2000000000, UNIT_NPC_FLAG_GARRISON_MISSION_NPC = 0x4000000000,
  UNIT_NPC_FLAG_TRADESKILL_NPC = 0x8000000000
}
 Non Player Character flags. More...
 
enum  MovementFlags {
  MOVEMENTFLAG_NONE = 0x00000000, MOVEMENTFLAG_FORWARD = 0x00000001, MOVEMENTFLAG_BACKWARD = 0x00000002, MOVEMENTFLAG_STRAFE_LEFT = 0x00000004,
  MOVEMENTFLAG_STRAFE_RIGHT = 0x00000008, MOVEMENTFLAG_LEFT = 0x00000010, MOVEMENTFLAG_RIGHT = 0x00000020, MOVEMENTFLAG_PITCH_UP = 0x00000040,
  MOVEMENTFLAG_PITCH_DOWN = 0x00000080, MOVEMENTFLAG_WALKING = 0x00000100, MOVEMENTFLAG_DISABLE_GRAVITY = 0x00000200, MOVEMENTFLAG_ROOT = 0x00000400,
  MOVEMENTFLAG_FALLING = 0x00000800, MOVEMENTFLAG_FALLING_FAR = 0x00001000, MOVEMENTFLAG_PENDING_STOP = 0x00002000, MOVEMENTFLAG_PENDING_STRAFE_STOP = 0x00004000,
  MOVEMENTFLAG_PENDING_FORWARD = 0x00008000, MOVEMENTFLAG_PENDING_BACKWARD = 0x00010000, MOVEMENTFLAG_PENDING_STRAFE_LEFT = 0x00020000, MOVEMENTFLAG_PENDING_STRAFE_RIGHT = 0x00040000,
  MOVEMENTFLAG_PENDING_ROOT = 0x00080000, MOVEMENTFLAG_SWIMMING = 0x00100000, MOVEMENTFLAG_ASCENDING = 0x00200000, MOVEMENTFLAG_DESCENDING = 0x00400000,
  MOVEMENTFLAG_CAN_FLY = 0x00800000, MOVEMENTFLAG_FLYING = 0x01000000, MOVEMENTFLAG_SPLINE_ELEVATION = 0x02000000, MOVEMENTFLAG_WATERWALKING = 0x04000000,
  MOVEMENTFLAG_FALLING_SLOW = 0x08000000, MOVEMENTFLAG_HOVER = 0x10000000, MOVEMENTFLAG_DISABLE_COLLISION = 0x20000000, MOVEMENTFLAG_MASK_MOVING,
  MOVEMENTFLAG_MASK_TURNING, MOVEMENTFLAG_MASK_MOVING_FLY, MOVEMENTFLAG_MASK_CREATURE_ALLOWED, MOVEMENTFLAG_MASK_PLAYER_ONLY,
  MOVEMENTFLAG_MASK_HAS_PLAYER_STATUS_OPCODE
}
 
enum  MovementFlags2 {
  MOVEMENTFLAG2_NONE = 0x00000000, MOVEMENTFLAG2_NO_STRAFE = 0x00000001, MOVEMENTFLAG2_NO_JUMPING = 0x00000002, MOVEMENTFLAG2_FULL_SPEED_TURNING = 0x00000004,
  MOVEMENTFLAG2_FULL_SPEED_PITCHING = 0x00000008, MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING = 0x00000010, MOVEMENTFLAG2_UNK5 = 0x00000020, MOVEMENTFLAG2_UNK6 = 0x00000040,
  MOVEMENTFLAG2_UNK7 = 0x00000080, MOVEMENTFLAG2_UNK8 = 0x00000100, MOVEMENTFLAG2_UNK9 = 0x00000200, MOVEMENTFLAG2_CAN_SWIM_TO_FLY_TRANS = 0x00000400,
  MOVEMENTFLAG2_UNK11 = 0x00000800, MOVEMENTFLAG2_UNK12 = 0x00001000, MOVEMENTFLAG2_INTERPOLATED_MOVEMENT = 0x00002000, MOVEMENTFLAG2_INTERPOLATED_TURNING = 0x00004000,
  MOVEMENTFLAG2_INTERPOLATED_PITCHING = 0x00008000
}
 
enum  UnitTypeMask {
  UNIT_MASK_NONE = 0x00000000, UNIT_MASK_SUMMON = 0x00000001, UNIT_MASK_MINION = 0x00000002, UNIT_MASK_GUARDIAN = 0x00000004,
  UNIT_MASK_TOTEM = 0x00000008, UNIT_MASK_PET = 0x00000010, UNIT_MASK_VEHICLE = 0x00000020, UNIT_MASK_PUPPET = 0x00000040,
  UNIT_MASK_HUNTER_PET = 0x00000080, UNIT_MASK_CONTROLABLE_GUARDIAN = 0x00000100, UNIT_MASK_ACCESSORY = 0x00000200
}
 
enum  MeleeHitOutcome {
  MELEE_HIT_EVADE, MELEE_HIT_MISS, MELEE_HIT_DODGE, MELEE_HIT_BLOCK,
  MELEE_HIT_PARRY, MELEE_HIT_GLANCING, MELEE_HIT_CRIT, MELEE_HIT_CRUSHING,
  MELEE_HIT_NORMAL
}
 
enum  CurrentSpellTypes { CURRENT_MELEE_SPELL = 0, CURRENT_GENERIC_SPELL = 1, CURRENT_CHANNELED_SPELL = 2, CURRENT_AUTOREPEAT_SPELL = 3 }
 
enum  ActiveStates {
  ACT_PASSIVE = 0x01, ACT_DISABLED = 0x81, ACT_ENABLED = 0xC1, ACT_COMMAND = 0x07,
  ACT_REACTION = 0x06, ACT_DECIDE = 0x00
}
 
enum  ReactStates { REACT_PASSIVE = 0, REACT_DEFENSIVE = 1, REACT_AGGRESSIVE = 2, REACT_ASSIST = 3 }
 
enum  CommandStates {
  COMMAND_STAY = 0, COMMAND_FOLLOW = 1, COMMAND_ATTACK = 2, COMMAND_ABANDON = 3,
  COMMAND_MOVE_TO = 4
}
 
enum  CharmType { CHARM_TYPE_CHARM, CHARM_TYPE_POSSESS, CHARM_TYPE_VEHICLE, CHARM_TYPE_CONVERT }
 
enum  ActionBarIndex { ACTION_BAR_INDEX_START = 0, ACTION_BAR_INDEX_PET_SPELL_START = 3, ACTION_BAR_INDEX_PET_SPELL_END = 7, ACTION_BAR_INDEX_END = 10 }
 
enum  ReactiveType { REACTIVE_DEFENSE = 0, REACTIVE_HUNTER_PARRY = 1, REACTIVE_OVERPOWER = 2 }
 
enum  PlayerTotemType { SUMMON_TYPE_TOTEM_FIRE = 63, SUMMON_TYPE_TOTEM_EARTH = 81, SUMMON_TYPE_TOTEM_WATER = 82, SUMMON_TYPE_TOTEM_AIR = 83 }
 

Functions

uint32 createProcExtendMask (SpellNonMeleeDamage *damageInfo, SpellMissInfo missCondition)
 

Variables

TC_GAME_API float baseMoveSpeed [MAX_MOVE_TYPE]
 
TC_GAME_API float playerBaseMoveSpeed [MAX_MOVE_TYPE]
 

Macro Definition Documentation

#define ATTACK_DISPLAY_DELAY   200
#define BASE_ATTACK_TIME   2000
#define BASE_MAXDAMAGE   2.0f
#define BASE_MINDAMAGE   1.0f
#define CURRENT_FIRST_NON_MELEE_SPELL   1
#define CURRENT_MAX_SPELL   4
#define MAKE_UNIT_ACTION_BUTTON (   A,
 
)    (uint32(A) | (uint32(T) << 24))
#define MAX_AGGRO_RADIUS   45.0f
#define MAX_AGGRO_RESET_TIME   10
#define MAX_COMBAT_RATING   31
#define MAX_DECLINED_NAME_CASES   5
#define MAX_EQUIPMENT_ITEMS   3
#define MAX_GAMEOBJECT_SLOT   4
#define MAX_MOVE_TYPE   9
#define MAX_PLAYER_STEALTH_DETECT_RANGE   30.0f
#define MAX_REACTIVE   3
#define MAX_SHEATH_STATE   3
#define MAX_SPELL_CHARM   4
#define MAX_SPELL_CONTROL_BAR   10
#define MAX_SPELL_POSSESS   8
#define MAX_SPELL_VEHICLE   6
#define MAX_SPELLMOD   38
#define MAX_SUMMON_SLOT   7
#define MAX_TOTEM_SLOT   5
#define MAX_UNIT_ACTION_BAR_INDEX   (ACTION_BAR_INDEX_END-ACTION_BAR_INDEX_START)
#define REACTIVE_TIMER_START   4000
#define SUMMON_SLOT_MINIPET   5
#define SUMMON_SLOT_PET   0
#define SUMMON_SLOT_QUEST   6
#define SUMMON_SLOT_TOTEM   1
#define UNIT_ACTION_BUTTON_ACTION (   X)    (uint32(X) & 0x00FFFFFF)
#define UNIT_ACTION_BUTTON_TYPE (   X)    ((uint32(X) & 0xFF000000) >> 24)
#define WORLD_TRIGGER   12999

Typedef Documentation

typedef std::list<std::pair<Aura*, uint8> > DispelChargesList
typedef std::list<Player*> SharedVisionList
typedef std::list<SpellImmune> SpellImmuneList
typedef std::list<Unit*> UnitList

Enumeration Type Documentation

Enumerator
ACTION_BAR_INDEX_START 
ACTION_BAR_INDEX_PET_SPELL_START 
ACTION_BAR_INDEX_PET_SPELL_END 
ACTION_BAR_INDEX_END 
1192 {
1197 };
Definition: Unit.h:1196
Definition: Unit.h:1194
Definition: Unit.h:1195
Definition: Unit.h:1193
Enumerator
ACT_PASSIVE 
ACT_DISABLED 
ACT_ENABLED 
ACT_COMMAND 
ACT_REACTION 
ACT_DECIDE 
1118 {
1119  ACT_PASSIVE = 0x01, // 0x01 - passive
1120  ACT_DISABLED = 0x81, // 0x80 - castable
1121  ACT_ENABLED = 0xC1, // 0x40 | 0x80 - auto cast + castable
1122  ACT_COMMAND = 0x07, // 0x01 | 0x02 | 0x04
1123  ACT_REACTION = 0x06, // 0x02 | 0x04
1124  ACT_DECIDE = 0x00 // custom
1125 };
Definition: Unit.h:1124
Definition: Unit.h:1123
Definition: Unit.h:1122
Definition: Unit.h:1121
Definition: Unit.h:1119
Definition: Unit.h:1120
Enumerator
AURA_REMOVE_NONE 
AURA_REMOVE_BY_DEFAULT 
AURA_REMOVE_BY_CANCEL 
AURA_REMOVE_BY_ENEMY_SPELL 
AURA_REMOVE_BY_EXPIRE 
AURA_REMOVE_BY_DEATH 
449 {
450  AURA_REMOVE_NONE = 0,
451  AURA_REMOVE_BY_DEFAULT = 1, // scripted remove, remove by stack with aura with different ids and sc aura remove
453  AURA_REMOVE_BY_ENEMY_SPELL, // dispel and absorb aura destroy
454  AURA_REMOVE_BY_EXPIRE, // aura duration has ended
456 };
Definition: Unit.h:450
Definition: Unit.h:455
Definition: Unit.h:452
Definition: Unit.h:454
Definition: Unit.h:453
Definition: Unit.h:451
Enumerator
CRIT_PERCENTAGE 
RANGED_CRIT_PERCENTAGE 
OFFHAND_CRIT_PERCENTAGE 
SHIELD_BLOCK_VALUE 
BASEMOD_END 
524 {
530 };
Definition: Unit.h:525
Definition: Unit.h:527
Definition: Unit.h:528
Definition: Unit.h:529
Definition: Unit.h:526
Enumerator
FLAT_MOD 
PCT_MOD 
MOD_END 
533 {
534  FLAT_MOD,
535  PCT_MOD,
536  MOD_END
537 };
Definition: Unit.h:534
Definition: Unit.h:536
Definition: Unit.h:535
enum CharmType
Enumerator
CHARM_TYPE_CHARM 
CHARM_TYPE_POSSESS 
CHARM_TYPE_VEHICLE 
CHARM_TYPE_CONVERT 
1182 {
1187 };
Definition: Unit.h:1185
Definition: Unit.h:1183
Definition: Unit.h:1184
Definition: Unit.h:1186
Enumerator
CR_UNUSED_1 
CR_DEFENSE_SKILL 
CR_DODGE 
CR_PARRY 
CR_BLOCK 
CR_HIT_MELEE 
CR_HIT_RANGED 
CR_HIT_SPELL 
CR_CRIT_MELEE 
CR_CRIT_RANGED 
CR_CRIT_SPELL 
CR_MULTISTRIKE 
CR_READINESS 
CR_SPEED 
CR_RESILIENCE_CRIT_TAKEN 
CR_RESILIENCE_PLAYER_DAMAGE_TAKEN 
CR_LIFESTEAL 
CR_HASTE_MELEE 
CR_HASTE_RANGED 
CR_HASTE_SPELL 
CR_AVOIDANCE 
CR_UNUSED_2 
CR_WEAPON_SKILL_RANGED 
CR_EXPERTISE 
CR_ARMOR_PENETRATION 
CR_MASTERY 
CR_UNUSED_3 
CR_UNUSED_4 
CR_VERSATILITY_DAMAGE_DONE 
CR_VERSATILITY_DAMAGE_TAKEN 
624 {
625  CR_UNUSED_1 = 0,
626  CR_DEFENSE_SKILL = 1, // Removed in 4.0.1
627  CR_DODGE = 2,
628  CR_PARRY = 3,
629  CR_BLOCK = 4,
630  CR_HIT_MELEE = 5,
631  CR_HIT_RANGED = 6,
632  CR_HIT_SPELL = 7,
633  CR_CRIT_MELEE = 8,
634  CR_CRIT_RANGED = 9,
635  CR_CRIT_SPELL = 10,
636  CR_MULTISTRIKE = 11,
637  CR_READINESS = 12,
638  CR_SPEED = 13,
641  CR_LIFESTEAL = 16,
642  CR_HASTE_MELEE = 17,
643  CR_HASTE_RANGED = 18,
644  CR_HASTE_SPELL = 19,
645  CR_AVOIDANCE = 20,
646  CR_UNUSED_2 = 21,
648  CR_EXPERTISE = 23,
650  CR_MASTERY = 25,
651  CR_UNUSED_3 = 26,
652  CR_UNUSED_4 = 27,
654  // placeholder = 29,
656 };
Definition: Unit.h:629
Definition: Unit.h:627
Definition: Unit.h:653
Definition: Unit.h:632
Definition: Unit.h:648
Definition: Unit.h:640
Definition: Unit.h:643
Definition: Unit.h:644
Definition: Unit.h:631
Definition: Unit.h:634
Definition: Unit.h:625
Definition: Unit.h:630
Definition: Unit.h:655
Definition: Unit.h:638
Definition: Unit.h:650
Definition: Unit.h:645
Definition: Unit.h:652
Definition: Unit.h:635
Definition: Unit.h:642
Definition: Unit.h:646
Definition: Unit.h:636
Definition: Unit.h:649
Definition: Unit.h:628
Definition: Unit.h:647
Definition: Unit.h:651
Definition: Unit.h:641
Definition: Unit.h:639
Definition: Unit.h:626
Definition: Unit.h:633
Definition: Unit.h:637
Enumerator
COMMAND_STAY 
COMMAND_FOLLOW 
COMMAND_ATTACK 
COMMAND_ABANDON 
COMMAND_MOVE_TO 
1136 {
1137  COMMAND_STAY = 0,
1138  COMMAND_FOLLOW = 1,
1139  COMMAND_ATTACK = 2,
1140  COMMAND_ABANDON = 3,
1141  COMMAND_MOVE_TO = 4
1142 };
Definition: Unit.h:1139
Definition: Unit.h:1140
Definition: Unit.h:1138
Definition: Unit.h:1141
Definition: Unit.h:1137
Enumerator
CURRENT_MELEE_SPELL 
CURRENT_GENERIC_SPELL 
CURRENT_CHANNELED_SPELL 
CURRENT_AUTOREPEAT_SPELL 
1107 {
1108  CURRENT_MELEE_SPELL = 0,
1112 };
Definition: Unit.h:1109
Definition: Unit.h:1110
Definition: Unit.h:1111
Definition: Unit.h:1108
Enumerator
DIRECT_DAMAGE 
SPELL_DIRECT_DAMAGE 
DOT 
HEAL 
NODAMAGE 
SELF_DAMAGE 
661 {
662  DIRECT_DAMAGE = 0, // used for normal weapon damage (not for class abilities or spells)
663  SPELL_DIRECT_DAMAGE = 1, // spell/class abilities damage
664  DOT = 2,
665  HEAL = 3,
666  NODAMAGE = 4, // used also in case when damage applied to health but not applied to spell channelInterruptFlags/etc
667  SELF_DAMAGE = 5
668 };
Definition: Unit.h:664
Definition: Unit.h:666
Definition: Unit.h:667
Definition: Unit.h:662
Definition: Unit.h:663
Definition: Unit.h:665
enum DeathState
Enumerator
ALIVE 
JUST_DIED 
CORPSE 
DEAD 
JUST_RESPAWNED 
540 {
541  ALIVE = 0,
542  JUST_DIED = 1,
543  CORPSE = 2,
544  DEAD = 3,
545  JUST_RESPAWNED = 4
546 };
Definition: Unit.h:544
Definition: Unit.h:542
Definition: Unit.h:541
Definition: Unit.h:543
Definition: Unit.h:545
enum HitInfo
Enumerator
HITINFO_NORMALSWING 
HITINFO_UNK1 
HITINFO_AFFECTS_VICTIM 
HITINFO_OFFHAND 
HITINFO_UNK2 
HITINFO_MISS 
HITINFO_FULL_ABSORB 
HITINFO_PARTIAL_ABSORB 
HITINFO_FULL_RESIST 
HITINFO_PARTIAL_RESIST 
HITINFO_CRITICALHIT 
HITINFO_UNK12 
HITINFO_BLOCK 
HITINFO_GLANCING 
HITINFO_CRUSHING 
HITINFO_NO_ANIMATION 
HITINFO_SWINGNOHITSOUND 
HITINFO_RAGE_GAIN 
347 {
348  HITINFO_NORMALSWING = 0x00000000,
349  HITINFO_UNK1 = 0x00000001, // req correct packet structure
350  HITINFO_AFFECTS_VICTIM = 0x00000002,
351  HITINFO_OFFHAND = 0x00000004,
352  HITINFO_UNK2 = 0x00000008,
353  HITINFO_MISS = 0x00000010,
354  HITINFO_FULL_ABSORB = 0x00000020,
355  HITINFO_PARTIAL_ABSORB = 0x00000040,
356  HITINFO_FULL_RESIST = 0x00000080,
357  HITINFO_PARTIAL_RESIST = 0x00000100,
358  HITINFO_CRITICALHIT = 0x00000200, // critical hit
359  // 0x00000400
360  // 0x00000800
361  HITINFO_UNK12 = 0x00001000,
362  HITINFO_BLOCK = 0x00002000, // blocked damage
363  // 0x00004000 // Hides worldtext for 0 damage
364  // 0x00008000 // Related to blood visual
365  HITINFO_GLANCING = 0x00010000,
366  HITINFO_CRUSHING = 0x00020000,
367  HITINFO_NO_ANIMATION = 0x00040000,
368  // 0x00080000
369  // 0x00100000
370  HITINFO_SWINGNOHITSOUND = 0x00200000, // unused?
371  // 0x00400000
372  HITINFO_RAGE_GAIN = 0x00800000
373 };
Definition: Unit.h:351
Definition: Unit.h:353
Definition: Unit.h:352
Definition: Unit.h:366
Definition: Unit.h:358
Definition: Unit.h:372
Definition: Unit.h:356
Definition: Unit.h:367
Definition: Unit.h:348
Definition: Unit.h:362
Definition: Unit.h:365
Definition: Unit.h:357
Definition: Unit.h:350
Definition: Unit.h:361
Definition: Unit.h:354
Definition: Unit.h:355
Definition: Unit.h:349
Definition: Unit.h:370
Enumerator
NULL_BAG 
NULL_SLOT 
377 {
378  NULL_BAG = 0,
379  NULL_SLOT = 255
380 };
Definition: Unit.h:379
Definition: Unit.h:378
Enumerator
MELEE_HIT_EVADE 
MELEE_HIT_MISS 
MELEE_HIT_DODGE 
MELEE_HIT_BLOCK 
MELEE_HIT_PARRY 
MELEE_HIT_GLANCING 
MELEE_HIT_CRIT 
MELEE_HIT_CRUSHING 
MELEE_HIT_NORMAL 
883 {
886 };
Definition: Unit.h:885
Definition: Unit.h:884
Definition: Unit.h:885
Definition: Unit.h:884
Definition: Unit.h:884
Definition: Unit.h:884
Definition: Unit.h:884
Definition: Unit.h:885
Definition: Unit.h:885
Enumerator
MOVEMENTFLAG_NONE 
MOVEMENTFLAG_FORWARD 
MOVEMENTFLAG_BACKWARD 
MOVEMENTFLAG_STRAFE_LEFT 
MOVEMENTFLAG_STRAFE_RIGHT 
MOVEMENTFLAG_LEFT 
MOVEMENTFLAG_RIGHT 
MOVEMENTFLAG_PITCH_UP 
MOVEMENTFLAG_PITCH_DOWN 
MOVEMENTFLAG_WALKING 
MOVEMENTFLAG_DISABLE_GRAVITY 
MOVEMENTFLAG_ROOT 
MOVEMENTFLAG_FALLING 
MOVEMENTFLAG_FALLING_FAR 
MOVEMENTFLAG_PENDING_STOP 
MOVEMENTFLAG_PENDING_STRAFE_STOP 
MOVEMENTFLAG_PENDING_FORWARD 
MOVEMENTFLAG_PENDING_BACKWARD 
MOVEMENTFLAG_PENDING_STRAFE_LEFT 
MOVEMENTFLAG_PENDING_STRAFE_RIGHT 
MOVEMENTFLAG_PENDING_ROOT 
MOVEMENTFLAG_SWIMMING 
MOVEMENTFLAG_ASCENDING 
MOVEMENTFLAG_DESCENDING 
MOVEMENTFLAG_CAN_FLY 
MOVEMENTFLAG_FLYING 
MOVEMENTFLAG_SPLINE_ELEVATION 
MOVEMENTFLAG_WATERWALKING 
MOVEMENTFLAG_FALLING_SLOW 
MOVEMENTFLAG_HOVER 
MOVEMENTFLAG_DISABLE_COLLISION 
MOVEMENTFLAG_MASK_MOVING 
Todo:
Check if PITCH_UP and PITCH_DOWN really belong here..
MOVEMENTFLAG_MASK_TURNING 
MOVEMENTFLAG_MASK_MOVING_FLY 
MOVEMENTFLAG_MASK_CREATURE_ALLOWED 
MOVEMENTFLAG_MASK_PLAYER_ONLY 
Todo:
if needed: add more flags to this masks that are exclusive to players
MOVEMENTFLAG_MASK_HAS_PLAYER_STATUS_OPCODE 

Movement flags that have change status opcodes associated for players.

774 {
775  MOVEMENTFLAG_NONE = 0x00000000,
776  MOVEMENTFLAG_FORWARD = 0x00000001,
777  MOVEMENTFLAG_BACKWARD = 0x00000002,
778  MOVEMENTFLAG_STRAFE_LEFT = 0x00000004,
779  MOVEMENTFLAG_STRAFE_RIGHT = 0x00000008,
780  MOVEMENTFLAG_LEFT = 0x00000010,
781  MOVEMENTFLAG_RIGHT = 0x00000020,
782  MOVEMENTFLAG_PITCH_UP = 0x00000040,
783  MOVEMENTFLAG_PITCH_DOWN = 0x00000080,
784  MOVEMENTFLAG_WALKING = 0x00000100, // Walking
785  MOVEMENTFLAG_DISABLE_GRAVITY = 0x00000200, // Former MOVEMENTFLAG_LEVITATING. This is used when walking is not possible.
786  MOVEMENTFLAG_ROOT = 0x00000400, // Must not be set along with MOVEMENTFLAG_MASK_MOVING
787  MOVEMENTFLAG_FALLING = 0x00000800, // damage dealt on that type of falling
788  MOVEMENTFLAG_FALLING_FAR = 0x00001000,
789  MOVEMENTFLAG_PENDING_STOP = 0x00002000,
791  MOVEMENTFLAG_PENDING_FORWARD = 0x00008000,
792  MOVEMENTFLAG_PENDING_BACKWARD = 0x00010000,
795  MOVEMENTFLAG_PENDING_ROOT = 0x00080000,
796  MOVEMENTFLAG_SWIMMING = 0x00100000, // appears with fly flag also
797  MOVEMENTFLAG_ASCENDING = 0x00200000, // press "space" when flying
798  MOVEMENTFLAG_DESCENDING = 0x00400000,
799  MOVEMENTFLAG_CAN_FLY = 0x00800000, // Appears when unit can fly AND also walk
800  MOVEMENTFLAG_FLYING = 0x01000000, // unit is actually flying. pretty sure this is only used for players. creatures use disable_gravity
801  MOVEMENTFLAG_SPLINE_ELEVATION = 0x02000000, // used for flight paths
802  MOVEMENTFLAG_WATERWALKING = 0x04000000, // prevent unit from falling through water
803  MOVEMENTFLAG_FALLING_SLOW = 0x08000000, // active rogue safe fall spell (passive)
804  MOVEMENTFLAG_HOVER = 0x10000000, // hover, cannot jump
805  MOVEMENTFLAG_DISABLE_COLLISION = 0x20000000,
806 
812 
815 
818 
819  // Movement flags allowed for creature in CreateObject - we need to keep all other enabled serverside
820  // to properly calculate all movement
824 
828 
832 };
Definition: Unit.h:784
Movement flags that have change status opcodes associated for players.
Definition: Unit.h:830
Definition: Unit.h:782
Definition: Unit.h:787
Definition: Unit.h:802
Definition: Unit.h:779
Definition: Unit.h:808
Definition: Unit.h:778
Definition: Unit.h:792
Definition: Unit.h:800
Definition: Unit.h:799
Definition: Unit.h:801
Definition: Unit.h:795
Definition: Unit.h:793
Definition: Unit.h:783
Definition: Unit.h:804
Definition: Unit.h:789
Definition: Unit.h:796
Definition: Unit.h:785
Definition: Unit.h:775
Definition: Unit.h:826
Definition: Unit.h:794
Definition: Unit.h:803
Definition: Unit.h:780
Definition: Unit.h:790
Definition: Unit.h:776
Definition: Unit.h:805
Definition: Unit.h:781
Definition: Unit.h:816
Definition: Unit.h:786
Definition: Unit.h:777
Definition: Unit.h:797
Definition: Unit.h:813
Definition: Unit.h:788
Definition: Unit.h:791
Definition: Unit.h:798
Enumerator
MOVEMENTFLAG2_NONE 
MOVEMENTFLAG2_NO_STRAFE 
MOVEMENTFLAG2_NO_JUMPING 
MOVEMENTFLAG2_FULL_SPEED_TURNING 
MOVEMENTFLAG2_FULL_SPEED_PITCHING 
MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING 
MOVEMENTFLAG2_UNK5 
MOVEMENTFLAG2_UNK6 
MOVEMENTFLAG2_UNK7 
MOVEMENTFLAG2_UNK8 
MOVEMENTFLAG2_UNK9 
MOVEMENTFLAG2_CAN_SWIM_TO_FLY_TRANS 
MOVEMENTFLAG2_UNK11 
MOVEMENTFLAG2_UNK12 
MOVEMENTFLAG2_INTERPOLATED_MOVEMENT 
MOVEMENTFLAG2_INTERPOLATED_TURNING 
MOVEMENTFLAG2_INTERPOLATED_PITCHING 
835 {
836  MOVEMENTFLAG2_NONE = 0x00000000,
837  MOVEMENTFLAG2_NO_STRAFE = 0x00000001,
838  MOVEMENTFLAG2_NO_JUMPING = 0x00000002,
842  MOVEMENTFLAG2_UNK5 = 0x00000020,
843  MOVEMENTFLAG2_UNK6 = 0x00000040,
844  MOVEMENTFLAG2_UNK7 = 0x00000080,
845  MOVEMENTFLAG2_UNK8 = 0x00000100,
846  MOVEMENTFLAG2_UNK9 = 0x00000200,
848  MOVEMENTFLAG2_UNK11 = 0x00000800,
849  MOVEMENTFLAG2_UNK12 = 0x00001000,
853 };
Definition: Unit.h:837
Definition: Unit.h:849
Definition: Unit.h:839
Definition: Unit.h:840
Definition: Unit.h:845
Definition: Unit.h:848
Definition: Unit.h:838
Definition: Unit.h:844
Definition: Unit.h:842
Definition: Unit.h:836
Definition: Unit.h:843
Definition: Unit.h:846
enum NPCFlags : uint64

Non Player Character flags.

Enumerator
UNIT_NPC_FLAG_NONE 
UNIT_NPC_FLAG_GOSSIP 
UNIT_NPC_FLAG_QUESTGIVER 
UNIT_NPC_FLAG_UNK1 
UNIT_NPC_FLAG_UNK2 
UNIT_NPC_FLAG_TRAINER 
UNIT_NPC_FLAG_TRAINER_CLASS 
UNIT_NPC_FLAG_TRAINER_PROFESSION 
UNIT_NPC_FLAG_VENDOR 
UNIT_NPC_FLAG_VENDOR_AMMO 
UNIT_NPC_FLAG_VENDOR_FOOD 
UNIT_NPC_FLAG_VENDOR_POISON 
UNIT_NPC_FLAG_VENDOR_REAGENT 
UNIT_NPC_FLAG_REPAIR 
UNIT_NPC_FLAG_FLIGHTMASTER 
UNIT_NPC_FLAG_SPIRITHEALER 
UNIT_NPC_FLAG_SPIRITGUIDE 
UNIT_NPC_FLAG_INNKEEPER 
UNIT_NPC_FLAG_BANKER 
UNIT_NPC_FLAG_PETITIONER 
UNIT_NPC_FLAG_TABARDDESIGNER 
UNIT_NPC_FLAG_BATTLEMASTER 
UNIT_NPC_FLAG_AUCTIONEER 
UNIT_NPC_FLAG_STABLEMASTER 
UNIT_NPC_FLAG_GUILD_BANKER 
UNIT_NPC_FLAG_SPELLCLICK 
UNIT_NPC_FLAG_PLAYER_VEHICLE 
UNIT_NPC_FLAG_MAILBOX 
UNIT_NPC_FLAG_REFORGER 
UNIT_NPC_FLAG_TRANSMOGRIFIER 
UNIT_NPC_FLAG_VAULTKEEPER 
UNIT_NPC_FLAG_BLACK_MARKET 
UNIT_NPC_FLAG_ITEM_UPGRADE_MASTER 
UNIT_NPC_FLAG_GARRISON_ARCHITECT 
UNIT_NPC_FLAG_SHIPMENT_CRAFTER 
UNIT_NPC_FLAG_GARRISON_MISSION_NPC 
UNIT_NPC_FLAG_TRADESKILL_NPC 
732  : uint64
733 {
734  UNIT_NPC_FLAG_NONE = 0x0000000000,
735  UNIT_NPC_FLAG_GOSSIP = 0x0000000001, // 100%
736  UNIT_NPC_FLAG_QUESTGIVER = 0x0000000002, // 100%
737  UNIT_NPC_FLAG_UNK1 = 0x0000000004,
738  UNIT_NPC_FLAG_UNK2 = 0x0000000008,
739  UNIT_NPC_FLAG_TRAINER = 0x0000000010, // 100%
740  UNIT_NPC_FLAG_TRAINER_CLASS = 0x0000000020, // 100%
741  UNIT_NPC_FLAG_TRAINER_PROFESSION = 0x0000000040, // 100%
742  UNIT_NPC_FLAG_VENDOR = 0x0000000080, // 100%
743  UNIT_NPC_FLAG_VENDOR_AMMO = 0x0000000100, // 100%, general goods vendor
744  UNIT_NPC_FLAG_VENDOR_FOOD = 0x0000000200, // 100%
745  UNIT_NPC_FLAG_VENDOR_POISON = 0x0000000400, // guessed
746  UNIT_NPC_FLAG_VENDOR_REAGENT = 0x0000000800, // 100%
747  UNIT_NPC_FLAG_REPAIR = 0x0000001000, // 100%
748  UNIT_NPC_FLAG_FLIGHTMASTER = 0x0000002000, // 100%
749  UNIT_NPC_FLAG_SPIRITHEALER = 0x0000004000, // guessed
750  UNIT_NPC_FLAG_SPIRITGUIDE = 0x0000008000, // guessed
751  UNIT_NPC_FLAG_INNKEEPER = 0x0000010000, // 100%
752  UNIT_NPC_FLAG_BANKER = 0x0000020000, // 100%
753  UNIT_NPC_FLAG_PETITIONER = 0x0000040000, // 100% 0xC0000 = guild petitions, 0x40000 = arena team petitions
754  UNIT_NPC_FLAG_TABARDDESIGNER = 0x0000080000, // 100%
755  UNIT_NPC_FLAG_BATTLEMASTER = 0x0000100000, // 100%
756  UNIT_NPC_FLAG_AUCTIONEER = 0x0000200000, // 100%
757  UNIT_NPC_FLAG_STABLEMASTER = 0x0000400000, // 100%
758  UNIT_NPC_FLAG_GUILD_BANKER = 0x0000800000, // cause client to send 997 opcode
759  UNIT_NPC_FLAG_SPELLCLICK = 0x0001000000, // cause client to send 1015 opcode (spell click)
760  UNIT_NPC_FLAG_PLAYER_VEHICLE = 0x0002000000, // players with mounts that have vehicle data should have it set
761  UNIT_NPC_FLAG_MAILBOX = 0x0004000000, // mailbox
762  UNIT_NPC_FLAG_REFORGER = 0x0008000000, // reforging
763  UNIT_NPC_FLAG_TRANSMOGRIFIER = 0x0010000000, // transmogrification
764  UNIT_NPC_FLAG_VAULTKEEPER = 0x0020000000, // void storage
765  UNIT_NPC_FLAG_BLACK_MARKET = 0x0080000000, // black market
766  UNIT_NPC_FLAG_ITEM_UPGRADE_MASTER = 0x0100000000,
767  UNIT_NPC_FLAG_GARRISON_ARCHITECT = 0x0200000000,
768  UNIT_NPC_FLAG_SHIPMENT_CRAFTER = 0x2000000000,
769  UNIT_NPC_FLAG_GARRISON_MISSION_NPC = 0x4000000000,
770  UNIT_NPC_FLAG_TRADESKILL_NPC = 0x8000000000
771 };
Definition: Unit.h:770
Definition: Unit.h:765
Definition: Unit.h:735
Definition: Unit.h:743
Definition: Unit.h:759
Definition: Unit.h:758
Definition: Unit.h:751
Definition: Unit.h:762
Definition: Unit.h:742
Definition: Unit.h:738
Definition: Unit.h:739
Definition: Unit.h:757
Definition: Unit.h:741
Definition: Unit.h:763
Definition: Unit.h:760
Definition: Unit.h:746
Definition: Unit.h:736
Definition: Unit.h:768
Definition: Unit.h:744
uint64_t uint64
Definition: Define.h:149
Definition: Unit.h:745
Definition: Unit.h:740
Definition: Unit.h:749
Definition: Unit.h:734
Definition: Unit.h:754
Definition: Unit.h:753
Definition: Unit.h:761
Definition: Unit.h:755
Definition: Unit.h:752
Definition: Unit.h:767
Definition: Unit.h:766
Definition: Unit.h:747
Definition: Unit.h:750
Definition: Unit.h:756
Definition: Unit.h:737
Definition: Unit.h:764
Definition: Unit.h:748
Enumerator
SUMMON_TYPE_TOTEM_FIRE 
SUMMON_TYPE_TOTEM_EARTH 
SUMMON_TYPE_TOTEM_WATER 
SUMMON_TYPE_TOTEM_AIR 
1290 {
1295 };
Definition: Unit.h:1293
Definition: Unit.h:1292
Definition: Unit.h:1291
Definition: Unit.h:1294
Enumerator
REACTIVE_DEFENSE 
REACTIVE_HUNTER_PARRY 
REACTIVE_OVERPOWER 
1273 {
1274  REACTIVE_DEFENSE = 0,
1276  REACTIVE_OVERPOWER = 2
1277 };
Definition: Unit.h:1274
Definition: Unit.h:1275
Definition: Unit.h:1276
Enumerator
REACT_PASSIVE 
REACT_DEFENSIVE 
REACT_AGGRESSIVE 
REACT_ASSIST 
1128 {
1129  REACT_PASSIVE = 0,
1130  REACT_DEFENSIVE = 1,
1131  REACT_AGGRESSIVE = 2,
1132  REACT_ASSIST = 3
1133 };
Definition: Unit.h:1131
Definition: Unit.h:1129
Definition: Unit.h:1130
Definition: Unit.h:1132
Enumerator
FORM_NONE 
FORM_CAT 
FORM_TREE 
FORM_TRAVEL 
FORM_AQUA 
FORM_BEAR 
FORM_AMBIENT 
FORM_GHOUL 
FORM_DIREBEAR 
FORM_STEVES_GHOUL 
FORM_THARONJA_SKELETON 
FORM_TEST_OF_STRENGTH 
FORM_BLB_PLAYER 
FORM_SHADOW_DANCE 
FORM_CREATUREBEAR 
FORM_CREATURECAT 
FORM_GHOSTWOLF 
FORM_BATTLESTANCE 
FORM_DEFENSIVESTANCE 
FORM_BERSERKERSTANCE 
FORM_TEST 
FORM_ZOMBIE 
FORM_METAMORPHOSIS 
FORM_UNDEAD 
FORM_MASTER_ANGLER 
FORM_FLIGHT_EPIC 
FORM_SHADOW 
FORM_FLIGHT 
FORM_STEALTH 
FORM_MOONKIN 
FORM_SPIRITOFREDEMPTION 
261 {
262  FORM_NONE = 0x00,
263  FORM_CAT = 0x01,
264  FORM_TREE = 0x02,
265  FORM_TRAVEL = 0x03,
266  FORM_AQUA = 0x04,
267  FORM_BEAR = 0x05,
268  FORM_AMBIENT = 0x06,
269  FORM_GHOUL = 0x07,
270  FORM_DIREBEAR = 0x08, // Removed in 4.0.1
271  FORM_STEVES_GHOUL = 0x09,
272  FORM_THARONJA_SKELETON = 0x0A,
273  FORM_TEST_OF_STRENGTH = 0x0B,
274  FORM_BLB_PLAYER = 0x0C,
275  FORM_SHADOW_DANCE = 0x0D,
276  FORM_CREATUREBEAR = 0x0E,
277  FORM_CREATURECAT = 0x0F,
278  FORM_GHOSTWOLF = 0x10,
279  FORM_BATTLESTANCE = 0x11,
280  FORM_DEFENSIVESTANCE = 0x12,
281  FORM_BERSERKERSTANCE = 0x13,
282  FORM_TEST = 0x14,
283  FORM_ZOMBIE = 0x15,
284  FORM_METAMORPHOSIS = 0x16,
285  FORM_UNDEAD = 0x19,
286  FORM_MASTER_ANGLER = 0x1A,
287  FORM_FLIGHT_EPIC = 0x1B,
288  FORM_SHADOW = 0x1C,
289  FORM_FLIGHT = 0x1D,
290  FORM_STEALTH = 0x1E,
291  FORM_MOONKIN = 0x1F,
293 };
Definition: Unit.h:279
Definition: Unit.h:262
Definition: Unit.h:292
Definition: Unit.h:272
Definition: Unit.h:273
Definition: Unit.h:266
Definition: Unit.h:282
Definition: Unit.h:271
Definition: Unit.h:289
Definition: Unit.h:270
Definition: Unit.h:281
Definition: Unit.h:284
Definition: Unit.h:286
Definition: Unit.h:285
Definition: Unit.h:277
Definition: Unit.h:263
Definition: Unit.h:291
Definition: Unit.h:268
Definition: Unit.h:267
Definition: Unit.h:280
Definition: Unit.h:265
Definition: Unit.h:278
Definition: Unit.h:274
Definition: Unit.h:287
Definition: Unit.h:290
Definition: Unit.h:276
Definition: Unit.h:275
Definition: Unit.h:264
Definition: Unit.h:283
Definition: Unit.h:269
Definition: Unit.h:288
Enumerator
SHEATH_STATE_UNARMED 
SHEATH_STATE_MELEE 
SHEATH_STATE_RANGED 
296  : uint8
297 {
298  SHEATH_STATE_UNARMED = 0, // non prepared weapon
299  SHEATH_STATE_MELEE = 1, // prepared melee weapon
300  SHEATH_STATE_RANGED = 2 // prepared ranged weapon
301 };
Definition: Unit.h:298
uint8_t uint8
Definition: Define.h:152
Definition: Unit.h:300
Definition: Unit.h:299
Enumerator
AURA_INTERRUPT_FLAG_HITBYSPELL 
AURA_INTERRUPT_FLAG_TAKE_DAMAGE 
AURA_INTERRUPT_FLAG_CAST 
AURA_INTERRUPT_FLAG_MOVE 
AURA_INTERRUPT_FLAG_TURNING 
AURA_INTERRUPT_FLAG_JUMP 
AURA_INTERRUPT_FLAG_NOT_MOUNTED 
AURA_INTERRUPT_FLAG_NOT_ABOVEWATER 
AURA_INTERRUPT_FLAG_NOT_UNDERWATER 
AURA_INTERRUPT_FLAG_NOT_SHEATHED 
AURA_INTERRUPT_FLAG_TALK 
AURA_INTERRUPT_FLAG_USE 
AURA_INTERRUPT_FLAG_MELEE_ATTACK 
AURA_INTERRUPT_FLAG_SPELL_ATTACK 
AURA_INTERRUPT_FLAG_UNK14 
AURA_INTERRUPT_FLAG_TRANSFORM 
AURA_INTERRUPT_FLAG_UNK16 
AURA_INTERRUPT_FLAG_MOUNT 
AURA_INTERRUPT_FLAG_NOT_SEATED 
AURA_INTERRUPT_FLAG_CHANGE_MAP 
AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION 
AURA_INTERRUPT_FLAG_UNK21 
AURA_INTERRUPT_FLAG_TELEPORTED 
AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT 
AURA_INTERRUPT_FLAG_DIRECT_DAMAGE 
AURA_INTERRUPT_FLAG_LANDING 
AURA_INTERRUPT_FLAG_NOT_VICTIM 
53 {
54  AURA_INTERRUPT_FLAG_HITBYSPELL = 0x00000001, // 0 removed when getting hit by a negative spell?
55  AURA_INTERRUPT_FLAG_TAKE_DAMAGE = 0x00000002, // 1 removed by any damage
56  AURA_INTERRUPT_FLAG_CAST = 0x00000004, // 2 cast any spells
57  AURA_INTERRUPT_FLAG_MOVE = 0x00000008, // 3 removed by any movement
58  AURA_INTERRUPT_FLAG_TURNING = 0x00000010, // 4 removed by any turning
59  AURA_INTERRUPT_FLAG_JUMP = 0x00000020, // 5 removed by entering combat
60  AURA_INTERRUPT_FLAG_NOT_MOUNTED = 0x00000040, // 6 removed by dismounting
61  AURA_INTERRUPT_FLAG_NOT_ABOVEWATER = 0x00000080, // 7 removed by entering water
62  AURA_INTERRUPT_FLAG_NOT_UNDERWATER = 0x00000100, // 8 removed by leaving water
63  AURA_INTERRUPT_FLAG_NOT_SHEATHED = 0x00000200, // 9 removed by unsheathing
64  AURA_INTERRUPT_FLAG_TALK = 0x00000400, // 10 talk to npc / loot? action on creature
65  AURA_INTERRUPT_FLAG_USE = 0x00000800, // 11 mine/use/open action on gameobject
66  AURA_INTERRUPT_FLAG_MELEE_ATTACK = 0x00001000, // 12 removed by attacking
67  AURA_INTERRUPT_FLAG_SPELL_ATTACK = 0x00002000, // 13 ???
68  AURA_INTERRUPT_FLAG_UNK14 = 0x00004000, // 14
69  AURA_INTERRUPT_FLAG_TRANSFORM = 0x00008000, // 15 removed by transform?
70  AURA_INTERRUPT_FLAG_UNK16 = 0x00010000, // 16
71  AURA_INTERRUPT_FLAG_MOUNT = 0x00020000, // 17 misdirect, aspect, swim speed
72  AURA_INTERRUPT_FLAG_NOT_SEATED = 0x00040000, // 18 removed by standing up (used by food and drink mostly and sleep/Fake Death like)
73  AURA_INTERRUPT_FLAG_CHANGE_MAP = 0x00080000, // 19 leaving map/getting teleported
74  AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION = 0x00100000, // 20 removed by auras that make you invulnerable, or make other to lose selection on you
75  AURA_INTERRUPT_FLAG_UNK21 = 0x00200000, // 21
76  AURA_INTERRUPT_FLAG_TELEPORTED = 0x00400000, // 22
77  AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT = 0x00800000, // 23 removed by entering pvp combat
78  AURA_INTERRUPT_FLAG_DIRECT_DAMAGE = 0x01000000, // 24 removed by any direct damage
79  AURA_INTERRUPT_FLAG_LANDING = 0x02000000, // 25 removed by hitting the ground
80 
82 };
Definition: Unit.h:56
Definition: Unit.h:57
Definition: Unit.h:69
Definition: Unit.h:81
Definition: Unit.h:68
Definition: Unit.h:76
Definition: Unit.h:64
Definition: Unit.h:59
Definition: Unit.h:75
Definition: Unit.h:55
Definition: Unit.h:60
Definition: Unit.h:65
Definition: Unit.h:72
Definition: Unit.h:58
Definition: Unit.h:70
Definition: Unit.h:54
Definition: Unit.h:79
Definition: Unit.h:73
Definition: Unit.h:71
Enumerator
CHANNEL_INTERRUPT_FLAG_INTERRUPT 
CHANNEL_FLAG_DELAY 
47 {
48  CHANNEL_INTERRUPT_FLAG_INTERRUPT = 0x08, // interrupt
49  CHANNEL_FLAG_DELAY = 0x4000
50 };
Definition: Unit.h:49
Enumerator
SPELL_FACING_FLAG_INFRONT 
196 {
198 };
Definition: Unit.h:197
Enumerator
SPELL_INTERRUPT_FLAG_MOVEMENT 
SPELL_INTERRUPT_FLAG_PUSH_BACK 
SPELL_INTERRUPT_FLAG_UNK3 
SPELL_INTERRUPT_FLAG_INTERRUPT 
SPELL_INTERRUPT_FLAG_ABORT_ON_DMG 
36 {
37  SPELL_INTERRUPT_FLAG_MOVEMENT = 0x01, // why need this for instant?
38  SPELL_INTERRUPT_FLAG_PUSH_BACK = 0x02, // push back
39  SPELL_INTERRUPT_FLAG_UNK3 = 0x04, // any info?
40  SPELL_INTERRUPT_FLAG_INTERRUPT = 0x08, // interrupt
41  SPELL_INTERRUPT_FLAG_ABORT_ON_DMG = 0x10 // _complete_ interrupt on direct damage
42  //SPELL_INTERRUPT_UNK = 0x20 // unk, 564 of 727 spells having this spell start with "Glyph"
43 };
Definition: Unit.h:37
Definition: Unit.h:38
Definition: Unit.h:39
Definition: Unit.h:40
enum SpellModOp
Enumerator
SPELLMOD_DAMAGE 
SPELLMOD_DURATION 
SPELLMOD_THREAT 
SPELLMOD_EFFECT1 
SPELLMOD_CHARGES 
SPELLMOD_RANGE 
SPELLMOD_RADIUS 
SPELLMOD_CRITICAL_CHANCE 
SPELLMOD_ALL_EFFECTS 
SPELLMOD_NOT_LOSE_CASTING_TIME 
SPELLMOD_CASTING_TIME 
SPELLMOD_COOLDOWN 
SPELLMOD_EFFECT2 
SPELLMOD_IGNORE_ARMOR 
SPELLMOD_COST 
SPELLMOD_CRIT_DAMAGE_BONUS 
SPELLMOD_RESIST_MISS_CHANCE 
SPELLMOD_JUMP_TARGETS 
SPELLMOD_CHANCE_OF_SUCCESS 
SPELLMOD_ACTIVATION_TIME 
SPELLMOD_DAMAGE_MULTIPLIER 
SPELLMOD_GLOBAL_COOLDOWN 
SPELLMOD_DOT 
SPELLMOD_EFFECT3 
SPELLMOD_BONUS_MULTIPLIER 
SPELLMOD_PROC_PER_MINUTE 
SPELLMOD_VALUE_MULTIPLIER 
SPELLMOD_RESIST_DISPEL_CHANCE 
SPELLMOD_CRIT_DAMAGE_BONUS_2 
SPELLMOD_SPELL_COST_REFUND_ON_FAIL 
SPELLMOD_STACK_AMOUNT 
SPELLMOD_EFFECT4 
SPELLMOD_EFFECT5 
SPELLMOD_SPELL_COST2 
SPELLMOD_JUMP_DISTANCE 
SPELLMOD_STACK_AMOUNT2 
85 {
86  SPELLMOD_DAMAGE = 0,
88  SPELLMOD_THREAT = 2,
89  SPELLMOD_EFFECT1 = 3,
90  SPELLMOD_CHARGES = 4,
91  SPELLMOD_RANGE = 5,
92  SPELLMOD_RADIUS = 6,
97  SPELLMOD_COOLDOWN = 11,
98  SPELLMOD_EFFECT2 = 12,
100  SPELLMOD_COST = 14, // Used when SpellPowerEntry::PowerIndex == 0
108  SPELLMOD_DOT = 22,
109  SPELLMOD_EFFECT3 = 23,
111  // spellmod 25
115  SPELLMOD_CRIT_DAMAGE_BONUS_2 = 29, //one not used spell
117  SPELLMOD_STACK_AMOUNT = 31, // has no effect on tooltip parsing
118  SPELLMOD_EFFECT4 = 32,
119  SPELLMOD_EFFECT5 = 33,
120  SPELLMOD_SPELL_COST2 = 34, // Used when SpellPowerEntry::PowerIndex == 1
122  SPELLMOD_STACK_AMOUNT2 = 37 // same as SPELLMOD_STACK_AMOUNT but affects tooltips
123 };
Definition: Unit.h:120
Definition: Unit.h:104
Definition: Unit.h:92
Definition: Unit.h:89
Definition: Unit.h:118
Definition: Unit.h:98
Definition: Unit.h:94
Definition: Unit.h:87
Definition: Unit.h:93
Definition: Unit.h:91
Definition: Unit.h:114
Definition: Unit.h:96
Definition: Unit.h:106
Definition: Unit.h:107
Definition: Unit.h:109
Definition: Unit.h:103
Definition: Unit.h:108
Definition: Unit.h:117
Definition: Unit.h:102
Definition: Unit.h:110
Definition: Unit.h:101
Definition: Unit.h:100
Definition: Unit.h:122
Definition: Unit.h:86
Definition: Unit.h:115
Definition: Unit.h:113
Definition: Unit.h:97
Definition: Unit.h:121
Definition: Unit.h:90
Definition: Unit.h:105
Definition: Unit.h:99
Definition: Unit.h:95
Definition: Unit.h:88
Definition: Unit.h:112
Definition: Unit.h:119
Enumerator
SPELLVALUE_BASE_POINT0 
SPELLVALUE_BASE_POINT1 
SPELLVALUE_BASE_POINT2 
SPELLVALUE_BASE_POINT3 
SPELLVALUE_BASE_POINT4 
SPELLVALUE_BASE_POINT5 
SPELLVALUE_BASE_POINT6 
SPELLVALUE_BASE_POINT7 
SPELLVALUE_BASE_POINT8 
SPELLVALUE_BASE_POINT9 
SPELLVALUE_BASE_POINT10 
SPELLVALUE_BASE_POINT11 
SPELLVALUE_BASE_POINT12 
SPELLVALUE_BASE_POINT13 
SPELLVALUE_BASE_POINT14 
SPELLVALUE_BASE_POINT15 
SPELLVALUE_BASE_POINT16 
SPELLVALUE_BASE_POINT17 
SPELLVALUE_BASE_POINT18 
SPELLVALUE_BASE_POINT19 
SPELLVALUE_BASE_POINT20 
SPELLVALUE_BASE_POINT21 
SPELLVALUE_BASE_POINT22 
SPELLVALUE_BASE_POINT23 
SPELLVALUE_BASE_POINT24 
SPELLVALUE_BASE_POINT25 
SPELLVALUE_BASE_POINT26 
SPELLVALUE_BASE_POINT27 
SPELLVALUE_BASE_POINT28 
SPELLVALUE_BASE_POINT29 
SPELLVALUE_BASE_POINT30 
SPELLVALUE_BASE_POINT31 
SPELLVALUE_BASE_POINT_END 
SPELLVALUE_RADIUS_MOD 
SPELLVALUE_MAX_TARGETS 
SPELLVALUE_AURA_STACK 
128 {
165 };
Definition: Unit.h:158
Definition: Unit.h:131
Definition: Unit.h:156
Definition: Unit.h:161
Definition: Unit.h:163
Definition: Unit.h:142
Definition: Unit.h:143
Definition: Unit.h:151
Definition: Unit.h:132
Definition: Unit.h:157
Definition: Unit.h:152
Definition: Unit.h:148
Definition: Unit.h:146
Definition: Unit.h:134
Definition: Unit.h:162
Definition: Unit.h:153
Definition: Unit.h:159
Definition: Unit.h:154
Definition: Unit.h:133
Definition: Unit.h:140
Definition: Unit.h:149
Definition: Unit.h:144
Definition: Unit.h:145
Definition: Unit.h:155
Definition: Unit.h:138
Definition: Unit.h:136
Definition: Unit.h:141
Definition: Unit.h:139
Definition: Unit.h:130
Definition: Unit.h:160
Definition: Unit.h:137
Definition: Unit.h:147
Definition: Unit.h:164
Definition: Unit.h:135
Definition: Unit.h:150
Definition: Unit.h:129
Enumerator
TRIGGERED_NONE 
TRIGGERED_IGNORE_GCD 

Not triggered.

TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD 

Will ignore GCD.

TRIGGERED_IGNORE_POWER_AND_REAGENT_COST 

Will ignore Spell and Category cooldowns.

TRIGGERED_IGNORE_CAST_ITEM 

Will ignore power and reagent cost.

TRIGGERED_IGNORE_AURA_SCALING 

Will not take away cast item or update related achievement criteria.

TRIGGERED_IGNORE_CAST_IN_PROGRESS 

Will ignore aura scaling.

TRIGGERED_IGNORE_COMBO_POINTS 

Will not check if a current cast is in progress.

TRIGGERED_CAST_DIRECTLY 

Will ignore combo point requirement.

TRIGGERED_IGNORE_AURA_INTERRUPT_FLAGS 

In Spell::prepare, will be cast directly without setting containers for executed spell.

TRIGGERED_IGNORE_SET_FACING 

Will ignore interruptible aura's at cast.

TRIGGERED_IGNORE_SHAPESHIFT 

Will not adjust facing to target (if any)

TRIGGERED_IGNORE_CASTER_AURASTATE 

Will ignore shapeshift checks.

TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE 

Will ignore caster aura states including combat requirements and death state.

TRIGGERED_IGNORE_CASTER_AURAS 

Will ignore mounted/on vehicle restrictions.

TRIGGERED_DISALLOW_PROC_EVENTS 

Will ignore caster aura restrictions or requirements.

TRIGGERED_DONT_REPORT_CAST_ERROR 

Disallows proc events from triggered spell (default)

TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT 

Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.

TRIGGERED_IGNORE_TARGET_CHECK 

Will ignore equipped item requirements.

TRIGGERED_FULL_MASK 

Will ignore most target checks (mostly DBC target checks)

459 {
460  TRIGGERED_NONE = 0x00000000,
461  TRIGGERED_IGNORE_GCD = 0x00000001,
464  TRIGGERED_IGNORE_CAST_ITEM = 0x00000008,
465  TRIGGERED_IGNORE_AURA_SCALING = 0x00000010,
466  TRIGGERED_IGNORE_CAST_IN_PROGRESS = 0x00000020,
467  TRIGGERED_IGNORE_COMBO_POINTS = 0x00000040,
468  TRIGGERED_CAST_DIRECTLY = 0x00000080,
470  TRIGGERED_IGNORE_SET_FACING = 0x00000200,
471  TRIGGERED_IGNORE_SHAPESHIFT = 0x00000400,
472  TRIGGERED_IGNORE_CASTER_AURASTATE = 0x00000800,
474  TRIGGERED_IGNORE_CASTER_AURAS = 0x00010000,
475  TRIGGERED_DISALLOW_PROC_EVENTS = 0x00020000,
476  TRIGGERED_DONT_REPORT_CAST_ERROR = 0x00040000,
478  TRIGGERED_IGNORE_TARGET_CHECK = 0x00100000,
479  TRIGGERED_FULL_MASK = 0xFFFFFFFF
480 };
Will ignore caster aura states including combat requirements and death state.
Definition: Unit.h:473
Will ignore shapeshift checks.
Definition: Unit.h:472
Will ignore caster aura restrictions or requirements.
Definition: Unit.h:475
Will ignore most target checks (mostly DBC target checks)
Definition: Unit.h:479
Will ignore Spell and Category cooldowns.
Definition: Unit.h:463
Not triggered.
Definition: Unit.h:461
Will ignore GCD.
Definition: Unit.h:462
Will ignore combo point requirement.
Definition: Unit.h:468
Will ignore interruptible aura's at cast.
Definition: Unit.h:470
Will ignore mounted/on vehicle restrictions.
Definition: Unit.h:474
Will not adjust facing to target (if any)
Definition: Unit.h:471
Will ignore power and reagent cost.
Definition: Unit.h:464
Disallows proc events from triggered spell (default)
Definition: Unit.h:476
Will ignore equipped item requirements.
Definition: Unit.h:478
Will ignore aura scaling.
Definition: Unit.h:466
Will not take away cast item or update related achievement criteria.
Definition: Unit.h:465
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
Definition: Unit.h:477
In Spell::prepare, will be cast directly without setting containers for executed spell.
Definition: Unit.h:469
Definition: Unit.h:460
Will not check if a current cast is in progress.
Definition: Unit.h:467
Enumerator
UNIT_BYTES_0_OFFSET_RACE 
UNIT_BYTES_0_OFFSET_CLASS 
UNIT_BYTES_0_OFFSET_GENDER 
231 {
235 };
Definition: Unit.h:234
Definition: Unit.h:233
Definition: Unit.h:232
Enumerator
UNIT_BYTE1_FLAG_ALWAYS_STAND 
UNIT_BYTE1_FLAG_HOVER 
UNIT_BYTE1_FLAG_UNK_3 
UNIT_BYTE1_FLAG_ALL 
252 {
254  UNIT_BYTE1_FLAG_HOVER = 0x02,
255  UNIT_BYTE1_FLAG_UNK_3 = 0x04,
256  UNIT_BYTE1_FLAG_ALL = 0xFF
257 };
Definition: Unit.h:256
Definition: Unit.h:254
Definition: Unit.h:253
Definition: Unit.h:255
Enumerator
UNIT_BYTES_1_OFFSET_STAND_STATE 
UNIT_BYTES_1_OFFSET_VIS_FLAG 
UNIT_BYTES_1_OFFSET_ANIM_TIER 
238 {
242 };
Definition: Unit.h:240
Definition: Unit.h:239
Definition: Unit.h:241
Enumerator
UNIT_BYTES_2_OFFSET_SHEATH_STATE 
UNIT_BYTES_2_OFFSET_PVP_FLAG 
245 {
248 };
Definition: Unit.h:247
Definition: Unit.h:246
enum UnitFlags : uint32
Enumerator
UNIT_FLAG_SERVER_CONTROLLED 
UNIT_FLAG_NON_ATTACKABLE 
UNIT_FLAG_DISABLE_MOVE 
UNIT_FLAG_PVP_ATTACKABLE 
UNIT_FLAG_RENAME 
UNIT_FLAG_PREPARATION 
UNIT_FLAG_UNK_6 
UNIT_FLAG_NOT_ATTACKABLE_1 
UNIT_FLAG_IMMUNE_TO_PC 
UNIT_FLAG_IMMUNE_TO_NPC 
UNIT_FLAG_LOOTING 
UNIT_FLAG_PET_IN_COMBAT 
UNIT_FLAG_PVP 
UNIT_FLAG_SILENCED 
UNIT_FLAG_UNK_14 
UNIT_FLAG_UNK_15 
UNIT_FLAG_UNK_16 
UNIT_FLAG_PACIFIED 
UNIT_FLAG_STUNNED 
UNIT_FLAG_IN_COMBAT 
UNIT_FLAG_TAXI_FLIGHT 
UNIT_FLAG_DISARMED 
UNIT_FLAG_CONFUSED 
UNIT_FLAG_FLEEING 
UNIT_FLAG_PLAYER_CONTROLLED 
UNIT_FLAG_NOT_SELECTABLE 
UNIT_FLAG_SKINNABLE 
UNIT_FLAG_MOUNT 
UNIT_FLAG_UNK_28 
UNIT_FLAG_UNK_29 
UNIT_FLAG_SHEATHE 
UNIT_FLAG_UNK_31 
MAX_UNIT_FLAGS 
671  : uint32
672 {
673  UNIT_FLAG_SERVER_CONTROLLED = 0x00000001, // set only when unit movement is controlled by server - by SPLINE/MONSTER_MOVE packets, together with UNIT_FLAG_STUNNED; only set to units controlled by client; client function CGUnit_C::IsClientControlled returns false when set for owner
674  UNIT_FLAG_NON_ATTACKABLE = 0x00000002, // not attackable
675  UNIT_FLAG_DISABLE_MOVE = 0x00000004,
676  UNIT_FLAG_PVP_ATTACKABLE = 0x00000008, // allow apply pvp rules to attackable state in addition to faction dependent state
677  UNIT_FLAG_RENAME = 0x00000010,
678  UNIT_FLAG_PREPARATION = 0x00000020, // don't take reagents for spells with SPELL_ATTR5_NO_REAGENT_WHILE_PREP
679  UNIT_FLAG_UNK_6 = 0x00000040,
680  UNIT_FLAG_NOT_ATTACKABLE_1 = 0x00000080, // ?? (UNIT_FLAG_PVP_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1) is NON_PVP_ATTACKABLE
681  UNIT_FLAG_IMMUNE_TO_PC = 0x00000100, // disables combat/assistance with PlayerCharacters (PC) - see Unit::_IsValidAttackTarget, Unit::_IsValidAssistTarget
682  UNIT_FLAG_IMMUNE_TO_NPC = 0x00000200, // disables combat/assistance with NonPlayerCharacters (NPC) - see Unit::_IsValidAttackTarget, Unit::_IsValidAssistTarget
683  UNIT_FLAG_LOOTING = 0x00000400, // loot animation
684  UNIT_FLAG_PET_IN_COMBAT = 0x00000800, // in combat?, 2.0.8
685  UNIT_FLAG_PVP = 0x00001000, // changed in 3.0.3
686  UNIT_FLAG_SILENCED = 0x00002000, // silenced, 2.1.1
687  UNIT_FLAG_UNK_14 = 0x00004000, // 2.0.8
688  UNIT_FLAG_UNK_15 = 0x00008000,
689  UNIT_FLAG_UNK_16 = 0x00010000,
690  UNIT_FLAG_PACIFIED = 0x00020000, // 3.0.3 ok
691  UNIT_FLAG_STUNNED = 0x00040000, // 3.0.3 ok
692  UNIT_FLAG_IN_COMBAT = 0x00080000,
693  UNIT_FLAG_TAXI_FLIGHT = 0x00100000, // disable casting at client side spell not allowed by taxi flight (mounted?), probably used with 0x4 flag
694  UNIT_FLAG_DISARMED = 0x00200000, // 3.0.3, disable melee spells casting..., "Required melee weapon" added to melee spells tooltip.
695  UNIT_FLAG_CONFUSED = 0x00400000,
696  UNIT_FLAG_FLEEING = 0x00800000,
697  UNIT_FLAG_PLAYER_CONTROLLED = 0x01000000, // used in spell Eyes of the Beast for pet... let attack by controlled creature
698  UNIT_FLAG_NOT_SELECTABLE = 0x02000000,
699  UNIT_FLAG_SKINNABLE = 0x04000000,
700  UNIT_FLAG_MOUNT = 0x08000000,
701  UNIT_FLAG_UNK_28 = 0x10000000,
702  UNIT_FLAG_UNK_29 = 0x20000000, // used in Feing Death spell
703  UNIT_FLAG_SHEATHE = 0x40000000,
704  UNIT_FLAG_UNK_31 = 0x80000000,
705  MAX_UNIT_FLAGS = 33
706 };
Definition: Unit.h:679
Definition: Unit.h:703
Definition: Unit.h:685
Definition: Unit.h:674
Definition: Unit.h:686
Definition: Unit.h:699
Definition: Unit.h:701
Definition: Unit.h:673
Definition: Unit.h:678
Definition: Unit.h:675
Definition: Unit.h:705
Definition: Unit.h:696
Definition: Unit.h:681
Definition: Unit.h:688
Definition: Unit.h:690
Definition: Unit.h:692
Definition: Unit.h:704
Definition: Unit.h:683
uint32_t uint32
Definition: Define.h:150
Definition: Unit.h:689
Definition: Unit.h:676
Definition: Unit.h:682
Definition: Unit.h:700
Definition: Unit.h:702
Definition: Unit.h:691
Definition: Unit.h:680
Definition: Unit.h:684
Definition: Unit.h:677
Definition: Unit.h:697
Definition: Unit.h:693
Definition: Unit.h:694
Definition: Unit.h:687
Definition: Unit.h:698
Definition: Unit.h:695
enum UnitFlags2
Enumerator
UNIT_FLAG2_FEIGN_DEATH 
UNIT_FLAG2_UNK1 
UNIT_FLAG2_IGNORE_REPUTATION 
UNIT_FLAG2_COMPREHEND_LANG 
UNIT_FLAG2_MIRROR_IMAGE 
UNIT_FLAG2_INSTANTLY_APPEAR_MODEL 
UNIT_FLAG2_FORCE_MOVEMENT 
UNIT_FLAG2_DISARM_OFFHAND 
UNIT_FLAG2_DISABLE_PRED_STATS 
UNIT_FLAG2_DISARM_RANGED 
UNIT_FLAG2_REGENERATE_POWER 
UNIT_FLAG2_RESTRICT_PARTY_INTERACTION 
UNIT_FLAG2_PREVENT_SPELL_CLICK 
UNIT_FLAG2_ALLOW_ENEMY_INTERACT 
UNIT_FLAG2_DISABLE_TURN 
UNIT_FLAG2_UNK2 
UNIT_FLAG2_PLAY_DEATH_ANIM 
UNIT_FLAG2_ALLOW_CHEAT_SPELLS 
710 {
711  UNIT_FLAG2_FEIGN_DEATH = 0x00000001,
712  UNIT_FLAG2_UNK1 = 0x00000002, // Hide unit model (show only player equip)
713  UNIT_FLAG2_IGNORE_REPUTATION = 0x00000004,
714  UNIT_FLAG2_COMPREHEND_LANG = 0x00000008,
715  UNIT_FLAG2_MIRROR_IMAGE = 0x00000010,
716  UNIT_FLAG2_INSTANTLY_APPEAR_MODEL = 0x00000020, // Unit model instantly appears when summoned (does not fade in)
717  UNIT_FLAG2_FORCE_MOVEMENT = 0x00000040,
718  UNIT_FLAG2_DISARM_OFFHAND = 0x00000080,
719  UNIT_FLAG2_DISABLE_PRED_STATS = 0x00000100, // Player has disabled predicted stats (Used by raid frames)
720  UNIT_FLAG2_DISARM_RANGED = 0x00000400, // this does not disable ranged weapon display (maybe additional flag needed?)
721  UNIT_FLAG2_REGENERATE_POWER = 0x00000800,
722  UNIT_FLAG2_RESTRICT_PARTY_INTERACTION = 0x00001000, // Restrict interaction to party or raid
723  UNIT_FLAG2_PREVENT_SPELL_CLICK = 0x00002000, // Prevent spellclick
724  UNIT_FLAG2_ALLOW_ENEMY_INTERACT = 0x00004000,
725  UNIT_FLAG2_DISABLE_TURN = 0x00008000,
726  UNIT_FLAG2_UNK2 = 0x00010000,
727  UNIT_FLAG2_PLAY_DEATH_ANIM = 0x00020000, // Plays special death animation upon death
728  UNIT_FLAG2_ALLOW_CHEAT_SPELLS = 0x00040000 // Allows casting spells with AttributesEx7 & SPELL_ATTR7_IS_CHEAT_SPELL
729 };
Definition: Unit.h:718
Definition: Unit.h:712
Definition: Unit.h:721
Definition: Unit.h:727
Definition: Unit.h:719
Definition: Unit.h:724
Definition: Unit.h:715
Definition: Unit.h:725
Definition: Unit.h:714
Definition: Unit.h:713
Definition: Unit.h:717
Definition: Unit.h:711
Definition: Unit.h:726
Definition: Unit.h:723
Definition: Unit.h:720
Definition: Unit.h:716
Definition: Unit.h:728
Enumerator
BASE_VALUE 
BASE_PCT_EXCLUDE_CREATE 
BASE_PCT 
TOTAL_VALUE 
TOTAL_PCT 
MODIFIER_TYPE_END 
433 {
434  BASE_VALUE = 0,
435  BASE_PCT_EXCLUDE_CREATE = 1, // percent modifier affecting all stat values from auras and gear but not player base for level
436  BASE_PCT = 2,
437  TOTAL_VALUE = 3,
438  TOTAL_PCT = 4,
440 };
Definition: Unit.h:434
Definition: Unit.h:437
Definition: Unit.h:438
Definition: Unit.h:435
Definition: Unit.h:439
Definition: Unit.h:436
enum UnitMods
Enumerator
UNIT_MOD_STAT_STRENGTH 
UNIT_MOD_STAT_AGILITY 
UNIT_MOD_STAT_STAMINA 
UNIT_MOD_STAT_INTELLECT 
UNIT_MOD_STAT_SPIRIT 
UNIT_MOD_HEALTH 
UNIT_MOD_MANA 
UNIT_MOD_RAGE 
UNIT_MOD_FOCUS 
UNIT_MOD_ENERGY 
UNIT_MOD_UNUSED 
UNIT_MOD_RUNE 
UNIT_MOD_RUNIC_POWER 
UNIT_MOD_SOUL_SHARDS 
UNIT_MOD_ECLIPSE 
UNIT_MOD_HOLY_POWER 
UNIT_MOD_ALTERNATIVE 
UNIT_MOD_ARMOR 
UNIT_MOD_RESISTANCE_HOLY 
UNIT_MOD_RESISTANCE_FIRE 
UNIT_MOD_RESISTANCE_NATURE 
UNIT_MOD_RESISTANCE_FROST 
UNIT_MOD_RESISTANCE_SHADOW 
UNIT_MOD_RESISTANCE_ARCANE 
UNIT_MOD_ATTACK_POWER 
UNIT_MOD_ATTACK_POWER_RANGED 
UNIT_MOD_DAMAGE_MAINHAND 
UNIT_MOD_DAMAGE_OFFHAND 
UNIT_MOD_DAMAGE_RANGED 
UNIT_MOD_END 
UNIT_MOD_STAT_START 
UNIT_MOD_STAT_END 
UNIT_MOD_RESISTANCE_START 
UNIT_MOD_RESISTANCE_END 
UNIT_MOD_POWER_START 
UNIT_MOD_POWER_END 
483 {
484  UNIT_MOD_STAT_STRENGTH, // UNIT_MOD_STAT_STRENGTH..UNIT_MOD_STAT_SPIRIT must be in existed order, it's accessed by index values of Stats enum.
490  UNIT_MOD_MANA, // UNIT_MOD_MANA..UNIT_MOD_RUNIC_POWER must be in existed order, it's accessed by index values of Powers enum.
494  UNIT_MOD_UNUSED, // Old UNIT_MOD_HAPPINESS
501  UNIT_MOD_ARMOR, // UNIT_MOD_ARMOR..UNIT_MOD_RESISTANCE_ARCANE must be in existed order, it's accessed by index values of SpellSchools enum.
513  UNIT_MOD_END,
514  // synonyms
516  UNIT_MOD_STAT_END = UNIT_MOD_STAT_SPIRIT + 1,
518  UNIT_MOD_RESISTANCE_END = UNIT_MOD_RESISTANCE_ARCANE + 1,
520  UNIT_MOD_POWER_END = UNIT_MOD_ALTERNATIVE + 1
521 };
Definition: Unit.h:485
Definition: Unit.h:520
Definition: Unit.h:484
Definition: Unit.h:502
Definition: Unit.h:510
Definition: Unit.h:492
Definition: Unit.h:488
Definition: Unit.h:508
Definition: Unit.h:517
Definition: Unit.h:498
Definition: Unit.h:512
Definition: Unit.h:513
Definition: Unit.h:511
Definition: Unit.h:496
Definition: Unit.h:518
Definition: Unit.h:495
Definition: Unit.h:516
Definition: Unit.h:486
Definition: Unit.h:494
Definition: Unit.h:504
Definition: Unit.h:503
Definition: Unit.h:487
Definition: Unit.h:490
Definition: Unit.h:489
Definition: Unit.h:515
Definition: Unit.h:506
Definition: Unit.h:519
Definition: Unit.h:507
Definition: Unit.h:499
Definition: Unit.h:509
Definition: Unit.h:491
Definition: Unit.h:497
Definition: Unit.h:493
Definition: Unit.h:505
Definition: Unit.h:500
Definition: Unit.h:501
Enumerator
MOVE_WALK 
MOVE_RUN 
MOVE_RUN_BACK 
MOVE_SWIM 
MOVE_SWIM_BACK 
MOVE_TURN_RATE 
MOVE_FLIGHT 
MOVE_FLIGHT_BACK 
MOVE_PITCH_RATE 
598 {
599  MOVE_WALK = 0,
600  MOVE_RUN = 1,
601  MOVE_RUN_BACK = 2,
602  MOVE_SWIM = 3,
603  MOVE_SWIM_BACK = 4,
604  MOVE_TURN_RATE = 5,
605  MOVE_FLIGHT = 6,
606  MOVE_FLIGHT_BACK = 7,
607  MOVE_PITCH_RATE = 8
608 };
Definition: Unit.h:605
Definition: Unit.h:599
Definition: Unit.h:601
Definition: Unit.h:602
Definition: Unit.h:607
Definition: Unit.h:600
Definition: Unit.h:604
Definition: Unit.h:606
Definition: Unit.h:603
Enumerator
UNIT_BYTE2_FLAG_PVP 
UNIT_BYTE2_FLAG_UNK1 
UNIT_BYTE2_FLAG_FFA_PVP 
UNIT_BYTE2_FLAG_SANCTUARY 
UNIT_BYTE2_FLAG_UNK4 
UNIT_BYTE2_FLAG_UNK5 
UNIT_BYTE2_FLAG_UNK6 
UNIT_BYTE2_FLAG_UNK7 
307 {
308  UNIT_BYTE2_FLAG_PVP = 0x01,
309  UNIT_BYTE2_FLAG_UNK1 = 0x02,
312  UNIT_BYTE2_FLAG_UNK4 = 0x10,
313  UNIT_BYTE2_FLAG_UNK5 = 0x20,
314  UNIT_BYTE2_FLAG_UNK6 = 0x40,
315  UNIT_BYTE2_FLAG_UNK7 = 0x80
316 };
Definition: Unit.h:315
Definition: Unit.h:312
Definition: Unit.h:310
Definition: Unit.h:309
Definition: Unit.h:314
Definition: Unit.h:308
Definition: Unit.h:313
Definition: Unit.h:311
enum UnitRename
Enumerator
UNIT_CAN_BE_RENAMED 
UNIT_CAN_BE_ABANDONED 
320 {
321  UNIT_CAN_BE_RENAMED = 0x01,
322  UNIT_CAN_BE_ABANDONED = 0x02
323 };
Definition: Unit.h:322
Definition: Unit.h:321
Enumerator
UNIT_STAND_FLAGS_UNK1 
UNIT_STAND_FLAGS_CREEP 
UNIT_STAND_FLAGS_UNTRACKABLE 
UNIT_STAND_FLAGS_UNK4 
UNIT_STAND_FLAGS_UNK5 
UNIT_STAND_FLAGS_ALL 
221 {
222  UNIT_STAND_FLAGS_UNK1 = 0x01,
223  UNIT_STAND_FLAGS_CREEP = 0x02,
225  UNIT_STAND_FLAGS_UNK4 = 0x08,
226  UNIT_STAND_FLAGS_UNK5 = 0x10,
227  UNIT_STAND_FLAGS_ALL = 0xFF
228 };
Definition: Unit.h:224
Definition: Unit.h:225
Definition: Unit.h:226
Definition: Unit.h:227
Definition: Unit.h:222
Definition: Unit.h:223
Enumerator
UNIT_STAND_STATE_STAND 
UNIT_STAND_STATE_SIT 
UNIT_STAND_STATE_SIT_CHAIR 
UNIT_STAND_STATE_SLEEP 
UNIT_STAND_STATE_SIT_LOW_CHAIR 
UNIT_STAND_STATE_SIT_MEDIUM_CHAIR 
UNIT_STAND_STATE_SIT_HIGH_CHAIR 
UNIT_STAND_STATE_DEAD 
UNIT_STAND_STATE_KNEEL 
UNIT_STAND_STATE_SUBMERGED 
206 {
217 };
Definition: Unit.h:208
Definition: Unit.h:214
Definition: Unit.h:207
Definition: Unit.h:212
Definition: Unit.h:215
Definition: Unit.h:209
Definition: Unit.h:213
Definition: Unit.h:211
Definition: Unit.h:216
Definition: Unit.h:210
enum UnitState
Enumerator
UNIT_STATE_DIED 
UNIT_STATE_MELEE_ATTACKING 
UNIT_STATE_STUNNED 
UNIT_STATE_ROAMING 
UNIT_STATE_CHASE 
UNIT_STATE_FLEEING 
UNIT_STATE_IN_FLIGHT 
UNIT_STATE_FOLLOW 
UNIT_STATE_ROOT 
UNIT_STATE_CONFUSED 
UNIT_STATE_DISTRACTED 
UNIT_STATE_ISOLATED 
UNIT_STATE_ATTACK_PLAYER 
UNIT_STATE_CASTING 
UNIT_STATE_POSSESSED 
UNIT_STATE_CHARGING 
UNIT_STATE_JUMPING 
UNIT_STATE_MOVE 
UNIT_STATE_ROTATING 
UNIT_STATE_EVADE 
UNIT_STATE_ROAMING_MOVE 
UNIT_STATE_CONFUSED_MOVE 
UNIT_STATE_FLEEING_MOVE 
UNIT_STATE_CHASE_MOVE 
UNIT_STATE_FOLLOW_MOVE 
UNIT_STATE_IGNORE_PATHFINDING 
UNIT_STATE_ALL_STATE_SUPPORTED 
UNIT_STATE_UNATTACKABLE 
UNIT_STATE_MOVING 
UNIT_STATE_CONTROLLED 
UNIT_STATE_LOST_CONTROL 
UNIT_STATE_SIGHTLESS 
UNIT_STATE_CANNOT_AUTOATTACK 
UNIT_STATE_CANNOT_TURN 
UNIT_STATE_NOT_MOVE 
UNIT_STATE_ALL_STATE 
549 {
550  UNIT_STATE_DIED = 0x00000001, // player has fake death aura
551  UNIT_STATE_MELEE_ATTACKING = 0x00000002, // player is melee attacking someone
552  //UNIT_STATE_MELEE_ATTACK_BY = 0x00000004, // player is melee attack by someone
553  UNIT_STATE_STUNNED = 0x00000008,
554  UNIT_STATE_ROAMING = 0x00000010,
555  UNIT_STATE_CHASE = 0x00000020,
556  //UNIT_STATE_SEARCHING = 0x00000040,
557  UNIT_STATE_FLEEING = 0x00000080,
558  UNIT_STATE_IN_FLIGHT = 0x00000100, // player is in flight mode
559  UNIT_STATE_FOLLOW = 0x00000200,
560  UNIT_STATE_ROOT = 0x00000400,
561  UNIT_STATE_CONFUSED = 0x00000800,
562  UNIT_STATE_DISTRACTED = 0x00001000,
563  UNIT_STATE_ISOLATED = 0x00002000, // area auras do not affect other players
564  UNIT_STATE_ATTACK_PLAYER = 0x00004000,
565  UNIT_STATE_CASTING = 0x00008000,
566  UNIT_STATE_POSSESSED = 0x00010000,
567  UNIT_STATE_CHARGING = 0x00020000,
568  UNIT_STATE_JUMPING = 0x00040000,
569  UNIT_STATE_MOVE = 0x00100000,
570  UNIT_STATE_ROTATING = 0x00200000,
571  UNIT_STATE_EVADE = 0x00400000,
572  UNIT_STATE_ROAMING_MOVE = 0x00800000,
573  UNIT_STATE_CONFUSED_MOVE = 0x01000000,
574  UNIT_STATE_FLEEING_MOVE = 0x02000000,
575  UNIT_STATE_CHASE_MOVE = 0x04000000,
576  UNIT_STATE_FOLLOW_MOVE = 0x08000000,
577  UNIT_STATE_IGNORE_PATHFINDING = 0x10000000, // do not use pathfinding in any MovementGenerator
585  // for real move using movegen check and stop (except unstoppable flight)
588  UNIT_STATE_LOST_CONTROL = (UNIT_STATE_CONTROLLED | UNIT_STATE_JUMPING | UNIT_STATE_CHARGING),
592  // stay by different reasons
594  UNIT_STATE_ALL_STATE = 0xffffffff //(UNIT_STATE_STOPPED | UNIT_STATE_MOVING | UNIT_STATE_IN_COMBAT | UNIT_STATE_IN_FLIGHT)
595 };
Definition: Unit.h:564
Definition: Unit.h:586
Definition: Unit.h:562
Definition: Unit.h:588
Definition: Unit.h:565
Definition: Unit.h:594
Definition: Unit.h:584
Definition: Unit.h:574
Definition: Unit.h:570
Definition: Unit.h:561
Definition: Unit.h:557
Definition: Unit.h:551
Definition: Unit.h:568
Definition: Unit.h:591
Definition: Unit.h:573
Definition: Unit.h:569
Definition: Unit.h:553
Definition: Unit.h:593
Definition: Unit.h:559
Definition: Unit.h:590
Definition: Unit.h:587
Definition: Unit.h:567
Definition: Unit.h:571
Definition: Unit.h:566
Definition: Unit.h:589
Definition: Unit.h:554
Definition: Unit.h:575
Definition: Unit.h:558
Definition: Unit.h:550
Definition: Unit.h:560
Definition: Unit.h:572
Definition: Unit.h:577
Definition: Unit.h:578
Definition: Unit.h:563
Definition: Unit.h:576
Definition: Unit.h:555
Enumerator
UNIT_MASK_NONE 
UNIT_MASK_SUMMON 
UNIT_MASK_MINION 
UNIT_MASK_GUARDIAN 
UNIT_MASK_TOTEM 
UNIT_MASK_PET 
UNIT_MASK_VEHICLE 
UNIT_MASK_PUPPET 
UNIT_MASK_HUNTER_PET 
UNIT_MASK_CONTROLABLE_GUARDIAN 
UNIT_MASK_ACCESSORY 
856 {
857  UNIT_MASK_NONE = 0x00000000,
858  UNIT_MASK_SUMMON = 0x00000001,
859  UNIT_MASK_MINION = 0x00000002,
860  UNIT_MASK_GUARDIAN = 0x00000004,
861  UNIT_MASK_TOTEM = 0x00000008,
862  UNIT_MASK_PET = 0x00000010,
863  UNIT_MASK_VEHICLE = 0x00000020,
864  UNIT_MASK_PUPPET = 0x00000040,
865  UNIT_MASK_HUNTER_PET = 0x00000080,
866  UNIT_MASK_CONTROLABLE_GUARDIAN = 0x00000100,
867  UNIT_MASK_ACCESSORY = 0x00000200
868 };
Definition: Unit.h:865
Definition: Unit.h:863
Definition: Unit.h:860
Definition: Unit.h:867
Definition: Unit.h:866
Definition: Unit.h:859
Definition: Unit.h:858
Definition: Unit.h:861
Definition: Unit.h:862
Definition: Unit.h:857
Definition: Unit.h:864
Enumerator
VICTIMSTATE_INTACT 
VICTIMSTATE_HIT 
VICTIMSTATE_DODGE 
VICTIMSTATE_PARRY 
VICTIMSTATE_INTERRUPT 
VICTIMSTATE_BLOCKS 
VICTIMSTATE_EVADES 
VICTIMSTATE_IS_IMMUNE 
VICTIMSTATE_DEFLECTS 
334 {
335  VICTIMSTATE_INTACT = 0, // set when attacker misses
336  VICTIMSTATE_HIT = 1, // victim got clear/blocked hit
337  VICTIMSTATE_DODGE = 2,
338  VICTIMSTATE_PARRY = 3,
340  VICTIMSTATE_BLOCKS = 5, // unused? not set when blocked, even on full block
341  VICTIMSTATE_EVADES = 6,
344 };
Definition: Unit.h:340
Definition: Unit.h:337
Definition: Unit.h:336
Definition: Unit.h:338
Definition: Unit.h:342
Definition: Unit.h:339
Definition: Unit.h:341
Definition: Unit.h:343
Definition: Unit.h:335
Enumerator
BASE_ATTACK 
OFF_ATTACK 
RANGED_ATTACK 
MAX_ATTACK 
615  : uint16
616 {
617  BASE_ATTACK = 0,
618  OFF_ATTACK = 1,
619  RANGED_ATTACK = 2,
620  MAX_ATTACK
621 };
Definition: Unit.h:620
Definition: Unit.h:619
Definition: Unit.h:618
uint16_t uint16
Definition: Define.h:151
Definition: Unit.h:617
Enumerator
MINDAMAGE 
MAXDAMAGE 
443 {
444  MINDAMAGE,
445  MAXDAMAGE
446 };
Definition: Unit.h:444
Definition: Unit.h:445

Function Documentation

uint32 createProcExtendMask ( SpellNonMeleeDamage damageInfo,
SpellMissInfo  missCondition 
)
12195 {
12196  uint32 procEx = PROC_EX_NONE;
12197  // Check victim state
12198  if (missCondition != SPELL_MISS_NONE)
12199  switch (missCondition)
12200  {
12201  case SPELL_MISS_MISS: procEx|=PROC_EX_MISS; break;
12202  case SPELL_MISS_RESIST: procEx|=PROC_EX_RESIST; break;
12203  case SPELL_MISS_DODGE: procEx|=PROC_EX_DODGE; break;
12204  case SPELL_MISS_PARRY: procEx|=PROC_EX_PARRY; break;
12205  case SPELL_MISS_BLOCK: procEx|=PROC_EX_BLOCK; break;
12206  case SPELL_MISS_EVADE: procEx|=PROC_EX_EVADE; break;
12207  case SPELL_MISS_IMMUNE: procEx|=PROC_EX_IMMUNE; break;
12208  case SPELL_MISS_IMMUNE2: procEx|=PROC_EX_IMMUNE; break;
12209  case SPELL_MISS_DEFLECT: procEx|=PROC_EX_DEFLECT;break;
12210  case SPELL_MISS_ABSORB: procEx|=PROC_EX_ABSORB; break;
12211  case SPELL_MISS_REFLECT: procEx|=PROC_EX_REFLECT;break;
12212  default:
12213  break;
12214  }
12215  else
12216  {
12217  // On block
12218  if (damageInfo->blocked)
12219  procEx|=PROC_EX_BLOCK;
12220  // On absorb
12221  if (damageInfo->absorb)
12222  procEx|=PROC_EX_ABSORB;
12223  // On crit
12224  if (damageInfo->HitInfo & SPELL_HIT_TYPE_CRIT)
12225  procEx|=PROC_EX_CRITICAL_HIT;
12226  else
12227  procEx|=PROC_EX_NORMAL_HIT;
12228  }
12229  return procEx;
12230 }
Definition: SpellMgr.h:200
Definition: SharedDefines.h:2038
Definition: SharedDefines.h:2028
Definition: SpellMgr.h:198
Definition: SharedDefines.h:2029
Definition: SpellMgr.h:205
Definition: SharedDefines.h:2025
Definition: SpellMgr.h:204
Definition: SharedDefines.h:2021
Definition: SharedDefines.h:2024
Definition: SharedDefines.h:2027
Definition: SharedDefines.h:2030
Definition: SharedDefines.h:2023
Definition: SharedDefines.h:2026
Definition: SharedDefines.h:2031
Definition: SpellMgr.h:209
Definition: SpellMgr.h:202
Definition: SpellMgr.h:207
uint32_t uint32
Definition: Define.h:150
uint32 blocked
Definition: Unit.h:1054
Definition: SpellMgr.h:203
Definition: SpellMgr.h:210
Definition: SpellMgr.h:208
Definition: SpellMgr.h:199
uint32 HitInfo
Definition: Unit.h:1055
Definition: SharedDefines.h:2032
Definition: SharedDefines.h:2022
Definition: SpellMgr.h:201
Definition: SpellMgr.h:206
uint32 absorb
Definition: Unit.h:1051

+ Here is the caller graph for this function:

Variable Documentation

TC_GAME_API float baseMoveSpeed[MAX_MOVE_TYPE]
TC_GAME_API float playerBaseMoveSpeed[MAX_MOVE_TYPE]