OregonCore  revision fb2a440-git
Your Favourite TBC server
Unit.h File Reference
#include "Common.h"
#include "Object.h"
#include "Opcodes.h"
#include "SpellAuraDefines.h"
#include "UpdateFields.h"
#include "SharedDefines.h"
#include "ThreatManager.h"
#include "HostileRefManager.h"
#include "FollowerReference.h"
#include "FollowerRefManager.h"
#include "Utilities/EventProcessor.h"
#include "MotionMaster.h"
#include "DBCStructure.h"
#include <list>

Go to the source code of this file.

Classes

class  CustomSpellValues
 
struct  SpellImmune
 
struct  DiminishingReturn
 
struct  CleanDamage
 
struct  CalcDamageInfo
 
struct  SpellNonMeleeDamage
 
struct  UnitActionBarEntry
 
struct  DeclinedName
 
struct  CharmSpellEntry
 
struct  CharmInfo
 
class  Unit
 

Namespaces

 Oregon
 

Macros

#define WORLD_TRIGGER   12999
 
#define NUM_SPELL_PARTIAL_RESISTS   5
 
#define MAX_SPELLMOD   32
 
#define BASE_MINDAMAGE   1.0f
 
#define BASE_MAXDAMAGE   2.0f
 
#define BASE_ATTACK_TIME   2000
 
#define MAX_SHEATH_STATE   3
 
#define CREATURE_MAX_SPELLS   4
 
#define MAX_SPELL_CHARM   4
 
#define MAX_SPELL_POSSESS   8
 
#define MAX_AGGRO_RESET_TIME   10
 
#define MAX_AGGRO_RADIUS   45.0f
 
#define MAX_MOVE_TYPE   8
 
#define MAX_ATTACK   3
 
#define MAX_COMBAT_RATING   24
 
#define MAX_DECLINED_NAME_CASES   5
 
#define CURRENT_FIRST_NON_MELEE_SPELL   1
 
#define CURRENT_MAX_SPELL   4
 
#define MAX_UNIT_ACTION_BAR_INDEX   (ACTION_BAR_INDEX_END-ACTION_BAR_INDEX_START)
 
#define REACTIVE_TIMER_START   4000
 
#define MAX_REACTIVE   6
 
#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 ATTACK_DISPLAY_DELAY   200
 
#define MAX_PLAYER_STEALTH_DETECT_RANGE   30.0f
 

Typedefs

typedef std::pair< SpellValueMod, int32CustomSpellValueMod
 
typedef std::list< SpellImmuneSpellImmuneList
 
typedef std::list< Player * > SharedVisionList
 

Enumerations

enum  SpellInterruptFlags {
  SPELL_INTERRUPT_FLAG_MOVEMENT = 0x01, SPELL_INTERRUPT_FLAG_PUSH_BACK = 0x02, SPELL_INTERRUPT_FLAG_INTERRUPT = 0x04, SPELL_INTERRUPT_FLAG_AUTOATTACK = 0x08,
  SPELL_INTERRUPT_FLAG_DAMAGE = 0x10
}
 
enum  SpellChannelInterruptFlags {
  CHANNEL_FLAG_DAMAGE = 0x0002, CHANNEL_FLAG_MOVEMENT = 0x0008, CHANNEL_FLAG_TURNING = 0x0010, CHANNEL_FLAG_DAMAGE2 = 0x0080,
  CHANNEL_FLAG_DELAY = 0x4000
}
 
enum  SpellAuraInterruptFlags {
  AURA_INTERRUPT_FLAG_HITBYSPELL = 0x00000001, AURA_INTERRUPT_FLAG_DAMAGE = 0x00000002, AURA_INTERRUPT_FLAG_CC = 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_ATTACK = 0x00001000, AURA_INTERRUPT_FLAG_CAST = 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_UNATTACKABLE = 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_NOT_VICTIM = (AURA_INTERRUPT_FLAG_HITBYSPELL | AURA_INTERRUPT_FLAG_DAMAGE | AURA_INTERRUPT_FLAG_DIRECT_DAMAGE)
}
 
enum  SpellPartialResist {
  SPELL_PARTIAL_RESIST_NONE = 0, SPELL_PARTIAL_RESIST_PCT_25, SPELL_PARTIAL_RESIST_PCT_50, SPELL_PARTIAL_RESIST_PCT_75,
  SPELL_PARTIAL_RESIST_PCT_100
}
 
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_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_EFFECT_PAST_FIRST = 20,
  SPELLMOD_GLOBAL_COOLDOWN = 21, SPELLMOD_DOT = 22, SPELLMOD_EFFECT3 = 23, SPELLMOD_SPELL_BONUS_DAMAGE = 24,
  SPELLMOD_MULTIPLE_VALUE = 27, SPELLMOD_RESIST_DISPEL_CHANCE = 28
}
 
enum  SpellValueMod {
  SPELLVALUE_BASE_POINT0, SPELLVALUE_BASE_POINT1, SPELLVALUE_BASE_POINT2, SPELLVALUE_MAX_TARGETS,
  SPELLVALUE_DURATION
}
 
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
}
 
enum  UnitStandFlags { UNIT_STAND_FLAGS_CREEP = 0x02, UNIT_STAND_FLAGS_ALL = 0xFF }
 
enum  UnitBytes1_Flags { UNIT_BYTE1_FLAG_ALWAYS_STAND = 0x01, UNIT_BYTE1_FLAG_UNTRACKABLE = 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_CREATUREBEAR = 0x0E, FORM_CREATURECAT = 0x0F, FORM_GHOSTWOLF = 0x10,
  FORM_BATTLESTANCE = 0x11, FORM_DEFENSIVESTANCE = 0x12, FORM_BERSERKERSTANCE = 0x13, FORM_TEST = 0x14,
  FORM_ZOMBIE = 0x15, 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 { SHEATH_STATE_UNARMED = 0, SHEATH_STATE_MELEE = 1, SHEATH_STATE_RANGED = 2 }
 
enum  UnitBytes2_Flags {
  UNIT_BYTE2_FLAG_UNK0 = 0x01, UNIT_BYTE2_FLAG_UNK1 = 0x02, UNIT_BYTE2_FLAG_FFA_PVP = 0x04, UNIT_BYTE2_FLAG_SANCTUARY = 0x08,
  UNIT_BYTE2_FLAG_AURAS = 0x10, UNIT_BYTE2_FLAG_UNK5 = 0x20, UNIT_BYTE2_FLAG_UNK6 = 0x40, UNIT_BYTE2_FLAG_UNK7 = 0x80
}
 
enum  UnitRename { UNIT_RENAME_NOT_ALLOWED = 0x02, UNIT_RENAME_ALLOWED = 0x03 }
 
enum  Swing { NOSWING = 0, SINGLEHANDEDSWING = 1, TWOHANDEDSWING = 2 }
 
enum  VictimState {
  VICTIMSTATE_UNKNOWN1 = 0, VICTIMSTATE_NORMAL = 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_NORMALSWING2 = 0x00000002, HITINFO_LEFTSWING = 0x00000004,
  HITINFO_MISS = 0x00000010, HITINFO_ABSORB = 0x00000020, HITINFO_RESIST = 0x00000040, HITINFO_CRITICALHIT = 0x00000080,
  HITINFO_UNK2 = 0x00000100, HITINFO_UNK3 = 0x00002000, HITINFO_GLANCING = 0x00004000, HITINFO_CRUSHING = 0x00008000,
  HITINFO_NOACTION = 0x00010000, HITINFO_SWINGNOHITSOUND = 0x00080000
}
 
enum  UnitBytes0Offsets : uint8 { UNIT_BYTES_0_OFFSET_RACE = 0, UNIT_BYTES_0_OFFSET_CLASS = 1, UNIT_BYTES_0_OFFSET_GENDER = 2, UNIT_BYTES_0_OFFSET_POWER_TYPE = 3 }
 
enum  UnitBytes1Offsets : uint8 { UNIT_BYTES_1_OFFSET_STAND_STATE = 0, UNIT_BYTES_1_OFFSET_PET_TALENTS = 1, UNIT_BYTES_1_OFFSET_VIS_FLAG = 2, UNIT_BYTES_1_OFFSET_ANIM_TIER = 3 }
 
enum  UnitBytes2Offsets : uint8 { UNIT_BYTES_2_OFFSET_SHEATH_STATE = 0, UNIT_BYTES_2_OFFSET_PVP_FLAG = 1, UNIT_BYTES_2_OFFSET_PET_FLAGS = 2, UNIT_BYTES_2_OFFSET_SHAPESHIFT_FORM = 3 }
 
enum  InventorySlot { NULL_BAG = 0, NULL_SLOT = 255 }
 
enum  UnitModifierType {
  BASE_VALUE = 0, BASE_PCT = 1, TOTAL_VALUE = 2, TOTAL_PCT = 3,
  MODIFIER_TYPE_END = 4
}
 
enum  WeaponDamageRange { MINDAMAGE, MAXDAMAGE }
 
enum  DamageTypeToSchool { RESISTANCE, DAMAGE_DEALT, DAMAGE_TAKEN }
 
enum  AuraRemoveMode {
  AURA_REMOVE_NONE = 0, AURA_REMOVE_BY_DEFAULT = 1, AURA_REMOVE_BY_STACK, AURA_REMOVE_BY_CANCEL,
  AURA_REMOVE_BY_DISPEL, AURA_REMOVE_BY_EXPIRE, AURA_REMOVE_BY_DEATH
}
 
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_HAPPINESS, 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_HAPPINESS + 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, DEAD_FALLING = 5
}
 
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_IGNORE_PATHFINDING = 0x10000000, UNIT_STATE_UNATTACKABLE = UNIT_STATE_IN_FLIGHT, UNIT_STATE_MOVING = (UNIT_STATE_ROAMING | UNIT_STATE_CHASE), UNIT_STATE_RUNNING_STATE = (UNIT_STATE_CHASE | UNIT_STATE_FLEEING),
  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_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
}
 
enum  WeaponAttackType { BASE_ATTACK = 0, OFF_ATTACK = 1, RANGED_ATTACK = 2 }
 
enum  CombatRating {
  CR_WEAPON_SKILL = 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_HIT_TAKEN_MELEE = 11,
  CR_HIT_TAKEN_RANGED = 12, CR_HIT_TAKEN_SPELL = 13, CR_CRIT_TAKEN_MELEE = 14, CR_CRIT_TAKEN_RANGED = 15,
  CR_CRIT_TAKEN_SPELL = 16, CR_HASTE_MELEE = 17, CR_HASTE_RANGED = 18, CR_HASTE_SPELL = 19,
  CR_WEAPON_SKILL_MAINHAND = 20, CR_WEAPON_SKILL_OFFHAND = 21, CR_WEAPON_SKILL_RANGED = 22, CR_EXPERTISE = 23
}
 
enum  DamageEffectType {
  DIRECT_DAMAGE = 0, SPELL_DIRECT_DAMAGE = 1, DOT = 2, HEAL = 3,
  NODAMAGE = 4, SELF_DAMAGE = 5
}
 
enum  UnitAuraFlags { UNIT_AURAFLAG_ALIVE_INVISIBLE = 0x1 }
 internal used flags for marking special auras - for example some dummy-auras More...
 
enum  UnitFlags {
  UNIT_FLAG_UNK_0 = 0x00000001, UNIT_FLAG_NON_ATTACKABLE = 0x00000002, UNIT_FLAG_REMOVE_CLIENT_CONTROL = 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_CANNOT_SWIM = 0x00004000, UNIT_FLAG_UNK_15 = 0x00008000,
  UNIT_FLAG_NOT_PL_SPELL_TARGET = 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
}
 
enum  UnitFlags2 {
  UNIT_FLAG2_FEIGN_DEATH = 0x00000001, UNIT_FLAG2_IGNORE_REPUTATION = 0x00000004, UNIT_FLAG2_COMPREHEND_LANG = 0x00000008, UNIT_FLAG2_MIRROR_IMAGE = 0x00000010,
  UNIT_FLAG2_FORCE_MOVE = 0x00000040
}
 
enum  NPCFlags {
  UNIT_NPC_FLAG_NONE = 0x00000000, UNIT_NPC_FLAG_GOSSIP = 0x00000001, UNIT_NPC_FLAG_QUESTGIVER = 0x00000002, UNIT_NPC_FLAG_UNK1 = 0x00000004,
  UNIT_NPC_FLAG_UNK2 = 0x00000008, UNIT_NPC_FLAG_TRAINER = 0x00000010, UNIT_NPC_FLAG_TRAINER_CLASS = 0x00000020, UNIT_NPC_FLAG_TRAINER_PROFESSION = 0x00000040,
  UNIT_NPC_FLAG_VENDOR = 0x00000080, UNIT_NPC_FLAG_VENDOR_AMMO = 0x00000100, UNIT_NPC_FLAG_VENDOR_FOOD = 0x00000200, UNIT_NPC_FLAG_VENDOR_POISON = 0x00000400,
  UNIT_NPC_FLAG_VENDOR_REAGENT = 0x00000800, UNIT_NPC_FLAG_REPAIR = 0x00001000, UNIT_NPC_FLAG_FLIGHTMASTER = 0x00002000, UNIT_NPC_FLAG_SPIRITHEALER = 0x00004000,
  UNIT_NPC_FLAG_SPIRITGUIDE = 0x00008000, UNIT_NPC_FLAG_INNKEEPER = 0x00010000, UNIT_NPC_FLAG_BANKER = 0x00020000, UNIT_NPC_FLAG_PETITIONER = 0x00040000,
  UNIT_NPC_FLAG_TABARDDESIGNER = 0x00080000, UNIT_NPC_FLAG_BATTLEMASTER = 0x00100000, UNIT_NPC_FLAG_AUCTIONEER = 0x00200000, UNIT_NPC_FLAG_STABLEMASTER = 0x00400000,
  UNIT_NPC_FLAG_GUILD_BANKER = 0x00800000, UNIT_NPC_FLAG_SPELLCLICK = 0x01000000
}
 
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_PUPPET = 0x00000040, UNIT_MASK_HUNTER_PET = 0x00000080,
  UNIT_MASK_CONTROLABLE_GUARDIAN = 0x00000100
}
 
enum  DiminishingLevels { DIMINISHING_LEVEL_1 = 0, DIMINISHING_LEVEL_2 = 1, DIMINISHING_LEVEL_3 = 2, DIMINISHING_LEVEL_IMMUNE = 3 }
 
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, MELEE_HIT_BLOCK_CRIT
}
 
enum  CurrentSpellTypes { CURRENT_MELEE_SPELL = 0, CURRENT_GENERIC_SPELL = 1, CURRENT_AUTOREPEAT_SPELL = 2, CURRENT_CHANNELED_SPELL = 3 }
 
enum  ActiveStates {
  ACT_ENABLED = 0xC100, ACT_DISABLED = 0x8100, ACT_COMMAND = 0x0700, ACT_REACTION = 0x0600,
  ACT_CAST = 0x0100, ACT_PASSIVE = 0x0000, ACT_DECIDE = 0x0001
}
 
enum  ReactStates { REACT_PASSIVE = 0, REACT_DEFENSIVE = 1, REACT_AGGRESSIVE = 2 }
 Pet's behavior. More...
 
enum  CommandStates { COMMAND_STAY = 0, COMMAND_FOLLOW = 1, COMMAND_ATTACK = 2, COMMAND_ABANDON = 3 }
 Pet's Commands. More...
 
enum  CharmType { CHARM_TYPE_CHARM, CHARM_TYPE_POSSESS }
 
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 = 1, REACTIVE_HUNTER_PARRY = 2, REACTIVE_CRIT = 3, REACTIVE_HUNTER_CRIT = 4,
  REACTIVE_OVERPOWER = 5
}
 
enum  { POSITION_UPDATE_DELAY = 400 }
 

Functions

uint32 createProcExtendMask (SpellNonMeleeDamage *damageInfo, SpellMissInfo missCondition)
 
template<class T >
void Oregon::RandomResizeList (std::list< T > &_list, uint32 _size)
 

Variables

float baseMoveSpeed [MAX_MOVE_TYPE]
 

Macro Definition Documentation

#define ATTACK_DISPLAY_DELAY   200

Definition at line 903 of file Unit.h.

Referenced by Unit::UpdateMeleeAttackingState().

#define BASE_MAXDAMAGE   2.0f

Definition at line 158 of file Unit.h.

Referenced by Player::_ApplyItemBonuses(), Player::CalculateMinMaxDamage(), and Unit::Unit().

#define BASE_MINDAMAGE   1.0f

Definition at line 157 of file Unit.h.

Referenced by Player::_ApplyItemBonuses(), Player::CalculateMinMaxDamage(), and Unit::Unit().

#define CURRENT_FIRST_NON_MELEE_SPELL   1
#define MAX_AGGRO_RADIUS   45.0f
#define MAX_AGGRO_RESET_TIME   10

Definition at line 253 of file Unit.h.

#define MAX_COMBAT_RATING   24

Definition at line 535 of file Unit.h.

Referenced by Aura::HandleModRating(), Player::InitStatsForLevel(), and Player::UpdateStats().

#define MAX_MOVE_TYPE   8

Definition at line 494 of file Unit.h.

Referenced by Unit::ClearInCombat(), Pet::LoadPetFromDB(), Player::Player(), and Unit::Unit().

#define MAX_PLAYER_STEALTH_DETECT_RANGE   30.0f

Definition at line 904 of file Unit.h.

Referenced by WorldObject::CanDetectStealthOf().

#define MAX_REACTIVE   6

Definition at line 894 of file Unit.h.

Referenced by Unit::ClearAllReactives(), Unit::Unit(), and Unit::UpdateReactives().

#define MAX_SHEATH_STATE   3
#define MAX_SPELL_CHARM   4
#define MAX_SPELL_POSSESS   8

Definition at line 251 of file Unit.h.

#define MAX_SPELLMOD   32
#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 NUM_SPELL_PARTIAL_RESISTS   5

Definition at line 97 of file Unit.h.

Referenced by Unit::CalcAbsorbResist().

#define REACTIVE_TIMER_START   4000

Definition at line 878 of file Unit.h.

Referenced by Unit::StartReactiveTimer().

#define SUMMON_SLOT_MINIPET   5

Definition at line 898 of file Unit.h.

#define SUMMON_SLOT_PET   0

Definition at line 895 of file Unit.h.

Referenced by Unit::GetPetGUID(), and Unit::SetPetGUID().

#define SUMMON_SLOT_QUEST   6

Definition at line 899 of file Unit.h.

#define SUMMON_SLOT_TOTEM   1
#define WORLD_TRIGGER   12999

Typedef Documentation

Definition at line 142 of file Unit.h.

typedef std::list<Player*> SharedVisionList

Definition at line 780 of file Unit.h.

typedef std::list<SpellImmune> SpellImmuneList

Definition at line 349 of file Unit.h.

Enumeration Type Documentation

anonymous enum
Enumerator
POSITION_UPDATE_DELAY 

Definition at line 889 of file Unit.h.

890 {
891  POSITION_UPDATE_DELAY = 400,
892 };
Enumerator
ACTION_BAR_INDEX_START 
ACTION_BAR_INDEX_PET_SPELL_START 
ACTION_BAR_INDEX_PET_SPELL_END 
ACTION_BAR_INDEX_END 

Definition at line 788 of file Unit.h.

Enumerator
ACT_ENABLED 
ACT_DISABLED 
ACT_COMMAND 
ACT_REACTION 
ACT_CAST 
ACT_PASSIVE 
ACT_DECIDE 

Definition at line 746 of file Unit.h.

747 {
748  ACT_ENABLED = 0xC100,
749  ACT_DISABLED = 0x8100,
750  ACT_COMMAND = 0x0700,
751  ACT_REACTION = 0x0600,
752  ACT_CAST = 0x0100,
753  ACT_PASSIVE = 0x0000,
754  ACT_DECIDE = 0x0001
755 };
Definition: Unit.h:752
Enumerator
AURA_REMOVE_NONE 
AURA_REMOVE_BY_DEFAULT 
AURA_REMOVE_BY_STACK 
AURA_REMOVE_BY_CANCEL 
AURA_REMOVE_BY_DISPEL 
AURA_REMOVE_BY_EXPIRE 
AURA_REMOVE_BY_DEATH 

Definition at line 373 of file Unit.h.

Enumerator
CRIT_PERCENTAGE 
RANGED_CRIT_PERCENTAGE 
OFFHAND_CRIT_PERCENTAGE 
SHIELD_BLOCK_VALUE 
BASEMOD_END 

Definition at line 419 of file Unit.h.

Enumerator
FLAT_MOD 
PCT_MOD 
MOD_END 

Definition at line 428 of file Unit.h.

429 {
430  FLAT_MOD,
431  PCT_MOD,
432  MOD_END
433 };
Definition: Unit.h:430
Definition: Unit.h:432
Definition: Unit.h:431
enum CharmType
Enumerator
CHARM_TYPE_CHARM 
CHARM_TYPE_POSSESS 

Definition at line 782 of file Unit.h.

Enumerator
CR_WEAPON_SKILL 
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_HIT_TAKEN_MELEE 
CR_HIT_TAKEN_RANGED 
CR_HIT_TAKEN_SPELL 
CR_CRIT_TAKEN_MELEE 
CR_CRIT_TAKEN_RANGED 
CR_CRIT_TAKEN_SPELL 
CR_HASTE_MELEE 
CR_HASTE_RANGED 
CR_HASTE_SPELL 
CR_WEAPON_SKILL_MAINHAND 
CR_WEAPON_SKILL_OFFHAND 
CR_WEAPON_SKILL_RANGED 
CR_EXPERTISE 

Definition at line 507 of file Unit.h.

508 {
509  CR_WEAPON_SKILL = 0,
510  CR_DEFENSE_SKILL = 1,
511  CR_DODGE = 2,
512  CR_PARRY = 3,
513  CR_BLOCK = 4,
514  CR_HIT_MELEE = 5,
515  CR_HIT_RANGED = 6,
516  CR_HIT_SPELL = 7,
517  CR_CRIT_MELEE = 8,
518  CR_CRIT_RANGED = 9,
519  CR_CRIT_SPELL = 10,
520  CR_HIT_TAKEN_MELEE = 11,
521  CR_HIT_TAKEN_RANGED = 12,
522  CR_HIT_TAKEN_SPELL = 13,
523  CR_CRIT_TAKEN_MELEE = 14,
525  CR_CRIT_TAKEN_SPELL = 16,
526  CR_HASTE_MELEE = 17,
527  CR_HASTE_RANGED = 18,
528  CR_HASTE_SPELL = 19,
532  CR_EXPERTISE = 23
533 };
Definition: Unit.h:513
Definition: Unit.h:511
Definition: Unit.h:512

Pet's Commands.

Enumerator
COMMAND_STAY 

orders pet to stop moving

COMMAND_FOLLOW 

orders pet to follow

COMMAND_ATTACK 

orders pet to attack

COMMAND_ABANDON 

abandons the pet

Definition at line 766 of file Unit.h.

767 {
768  COMMAND_STAY = 0,
769  COMMAND_FOLLOW = 1,
770  COMMAND_ATTACK = 2,
771  COMMAND_ABANDON = 3
772 };
orders pet to attack
Definition: Unit.h:770
abandons the pet
Definition: Unit.h:771
orders pet to follow
Definition: Unit.h:769
orders pet to stop moving
Definition: Unit.h:768
Enumerator
CURRENT_MELEE_SPELL 
CURRENT_GENERIC_SPELL 
CURRENT_AUTOREPEAT_SPELL 
CURRENT_CHANNELED_SPELL 

Definition at line 735 of file Unit.h.

Enumerator
DIRECT_DAMAGE 
SPELL_DIRECT_DAMAGE 
DOT 
HEAL 
NODAMAGE 
SELF_DAMAGE 

Definition at line 537 of file Unit.h.

538 {
539  DIRECT_DAMAGE = 0, // used for normal weapon damage (not for class abilities or spells)
540  SPELL_DIRECT_DAMAGE = 1, // spell/class abilities damage
541  DOT = 2,
542  HEAL = 3,
543  NODAMAGE = 4, // used also in case when damage applied to health but not applied to spell channelInterruptFlags/etc
544  SELF_DAMAGE = 5
545 };
Definition: Unit.h:541
Definition: Unit.h:543
Definition: Unit.h:542
Enumerator
RESISTANCE 
DAMAGE_DEALT 
DAMAGE_TAKEN 

Definition at line 366 of file Unit.h.

367 {
368  RESISTANCE,
369  DAMAGE_DEALT,
371 };
enum DeathState
Enumerator
ALIVE 
JUST_DIED 
CORPSE 
DEAD 
JUST_RESPAWNED 
DEAD_FALLING 

Definition at line 435 of file Unit.h.

436 {
437  ALIVE = 0,
438  JUST_DIED = 1,
439  CORPSE = 2,
440  DEAD = 3,
441  JUST_RESPAWNED = 4,
442  DEAD_FALLING = 5
443 };
Definition: Unit.h:440
Definition: Unit.h:437
Definition: Unit.h:439
Enumerator
DIMINISHING_LEVEL_1 
DIMINISHING_LEVEL_2 
DIMINISHING_LEVEL_3 
DIMINISHING_LEVEL_IMMUNE 

Definition at line 643 of file Unit.h.

enum HitInfo
Enumerator
HITINFO_NORMALSWING 
HITINFO_UNK1 
HITINFO_NORMALSWING2 
HITINFO_LEFTSWING 
HITINFO_MISS 
HITINFO_ABSORB 
HITINFO_RESIST 
HITINFO_CRITICALHIT 
HITINFO_UNK2 
HITINFO_UNK3 
HITINFO_GLANCING 
HITINFO_CRUSHING 
HITINFO_NOACTION 
HITINFO_SWINGNOHITSOUND 

Definition at line 276 of file Unit.h.

277 {
278  HITINFO_NORMALSWING = 0x00000000,
279  HITINFO_UNK1 = 0x00000001, // req correct packet structure
280  HITINFO_NORMALSWING2 = 0x00000002,
281  HITINFO_LEFTSWING = 0x00000004,
282  HITINFO_MISS = 0x00000010,
283  HITINFO_ABSORB = 0x00000020, // plays absorb sound
284  HITINFO_RESIST = 0x00000040, // resisted at least some damage
285  HITINFO_CRITICALHIT = 0x00000080,
286  HITINFO_UNK2 = 0x00000100, // wotlk?
287  HITINFO_UNK3 = 0x00002000, // wotlk?
288  HITINFO_GLANCING = 0x00004000,
289  HITINFO_CRUSHING = 0x00008000,
290  HITINFO_NOACTION = 0x00010000,
291  HITINFO_SWINGNOHITSOUND = 0x00080000
292 };
Enumerator
NULL_BAG 
NULL_SLOT 

Definition at line 319 of file Unit.h.

320 {
321  NULL_BAG = 0,
322  NULL_SLOT = 255
323 };
Definition: Unit.h:321
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 
MELEE_HIT_BLOCK_CRIT 

Definition at line 661 of file Unit.h.

enum NPCFlags
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 

Definition at line 600 of file Unit.h.

601 {
602  UNIT_NPC_FLAG_NONE = 0x00000000,
603  UNIT_NPC_FLAG_GOSSIP = 0x00000001, // 100%
604  UNIT_NPC_FLAG_QUESTGIVER = 0x00000002, // guessed, probably ok
605  UNIT_NPC_FLAG_UNK1 = 0x00000004,
606  UNIT_NPC_FLAG_UNK2 = 0x00000008,
607  UNIT_NPC_FLAG_TRAINER = 0x00000010, // 100%
608  UNIT_NPC_FLAG_TRAINER_CLASS = 0x00000020, // 100%
609  UNIT_NPC_FLAG_TRAINER_PROFESSION = 0x00000040, // 100%
610  UNIT_NPC_FLAG_VENDOR = 0x00000080, // 100%
611  UNIT_NPC_FLAG_VENDOR_AMMO = 0x00000100, // 100%, general goods vendor
612  UNIT_NPC_FLAG_VENDOR_FOOD = 0x00000200, // 100%
613  UNIT_NPC_FLAG_VENDOR_POISON = 0x00000400, // guessed
614  UNIT_NPC_FLAG_VENDOR_REAGENT = 0x00000800, // 100%
615  UNIT_NPC_FLAG_REPAIR = 0x00001000, // 100%
616  UNIT_NPC_FLAG_FLIGHTMASTER = 0x00002000, // 100%
617  UNIT_NPC_FLAG_SPIRITHEALER = 0x00004000, // guessed
618  UNIT_NPC_FLAG_SPIRITGUIDE = 0x00008000, // guessed
619  UNIT_NPC_FLAG_INNKEEPER = 0x00010000, // 100%
620  UNIT_NPC_FLAG_BANKER = 0x00020000, // 100%
621  UNIT_NPC_FLAG_PETITIONER = 0x00040000, // 100% 0xC0000 = guild petitions, 0x40000 = arena team petitions
622  UNIT_NPC_FLAG_TABARDDESIGNER = 0x00080000, // 100%
623  UNIT_NPC_FLAG_BATTLEMASTER = 0x00100000, // 100%
624  UNIT_NPC_FLAG_AUCTIONEER = 0x00200000, // 100%
625  UNIT_NPC_FLAG_STABLEMASTER = 0x00400000, // 100%
626  UNIT_NPC_FLAG_GUILD_BANKER = 0x00800000, // cause client to send 997 opcode
627  UNIT_NPC_FLAG_SPELLCLICK = 0x01000000, // cause client to send 1015 opcode (spell click)
628 };
Enumerator
REACTIVE_DEFENSE 
REACTIVE_HUNTER_PARRY 
REACTIVE_CRIT 
REACTIVE_HUNTER_CRIT 
REACTIVE_OVERPOWER 

Definition at line 880 of file Unit.h.

Pet's behavior.

Enumerator
REACT_PASSIVE 

pet will not attack

REACT_DEFENSIVE 

pet will attack only if he or his owner is attacked

REACT_AGGRESSIVE 

Definition at line 758 of file Unit.h.

759 {
760  REACT_PASSIVE = 0,
761  REACT_DEFENSIVE = 1,
762  REACT_AGGRESSIVE = 2
763 };
pet will not attack
Definition: Unit.h:760
pet will attack only if he or his owner is attacked
Definition: Unit.h:761
Enumerator
FORM_NONE 
FORM_CAT 
FORM_TREE 
FORM_TRAVEL 
FORM_AQUA 
FORM_BEAR 
FORM_AMBIENT 
FORM_GHOUL 
FORM_DIREBEAR 
FORM_CREATUREBEAR 
FORM_CREATURECAT 
FORM_GHOSTWOLF 
FORM_BATTLESTANCE 
FORM_DEFENSIVESTANCE 
FORM_BERSERKERSTANCE 
FORM_TEST 
FORM_ZOMBIE 
FORM_MASTER_ANGLER 
FORM_FLIGHT_EPIC 
FORM_SHADOW 
FORM_FLIGHT 
FORM_STEALTH 
FORM_MOONKIN 
FORM_SPIRITOFREDEMPTION 

Definition at line 191 of file Unit.h.

192 {
193  FORM_NONE = 0x00,
194  FORM_CAT = 0x01,
195  FORM_TREE = 0x02,
196  FORM_TRAVEL = 0x03,
197  FORM_AQUA = 0x04,
198  FORM_BEAR = 0x05,
199  FORM_AMBIENT = 0x06,
200  FORM_GHOUL = 0x07,
201  FORM_DIREBEAR = 0x08,
202  FORM_CREATUREBEAR = 0x0E,
203  FORM_CREATURECAT = 0x0F,
204  FORM_GHOSTWOLF = 0x10,
205  FORM_BATTLESTANCE = 0x11,
206  FORM_DEFENSIVESTANCE = 0x12,
207  FORM_BERSERKERSTANCE = 0x13,
208  FORM_TEST = 0x14,
209  FORM_ZOMBIE = 0x15,
210  FORM_MASTER_ANGLER = 0x1A,
211  FORM_FLIGHT_EPIC = 0x1B,
212  FORM_SHADOW = 0x1C,
213  FORM_FLIGHT = 0x1D,
214  FORM_STEALTH = 0x1E,
215  FORM_MOONKIN = 0x1F,
217 };
Definition: Unit.h:194
Enumerator
SHEATH_STATE_UNARMED 
SHEATH_STATE_MELEE 
SHEATH_STATE_RANGED 

Definition at line 220 of file Unit.h.

221 {
222  SHEATH_STATE_UNARMED = 0, // non prepared weapon
223  SHEATH_STATE_MELEE = 1, // prepared melee weapon
224  SHEATH_STATE_RANGED = 2 // prepared ranged weapon
225 };
Enumerator
AURA_INTERRUPT_FLAG_HITBYSPELL 
AURA_INTERRUPT_FLAG_DAMAGE 
AURA_INTERRUPT_FLAG_CC 
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_ATTACK 
AURA_INTERRUPT_FLAG_CAST 
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_UNATTACKABLE 
AURA_INTERRUPT_FLAG_UNK21 
AURA_INTERRUPT_FLAG_TELEPORTED 
AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT 
AURA_INTERRUPT_FLAG_DIRECT_DAMAGE 
AURA_INTERRUPT_FLAG_NOT_VICTIM 

Definition at line 58 of file Unit.h.

59 {
60  AURA_INTERRUPT_FLAG_HITBYSPELL = 0x00000001, // 0 removed when getting hit by a negative spell?
61  AURA_INTERRUPT_FLAG_DAMAGE = 0x00000002, // 1 removed by any damage
62  AURA_INTERRUPT_FLAG_CC = 0x00000004, // 2 crowd control
63  AURA_INTERRUPT_FLAG_MOVE = 0x00000008, // 3 removed by any movement
64  AURA_INTERRUPT_FLAG_TURNING = 0x00000010, // 4 removed by any turning
65  AURA_INTERRUPT_FLAG_JUMP = 0x00000020, // 5 removed by entering combat
66  AURA_INTERRUPT_FLAG_NOT_MOUNTED = 0x00000040, // 6 removed by unmounting
67  AURA_INTERRUPT_FLAG_NOT_ABOVEWATER = 0x00000080, // 7 removed by entering water
68  AURA_INTERRUPT_FLAG_NOT_UNDERWATER = 0x00000100, // 8 removed by leaving water
69  AURA_INTERRUPT_FLAG_NOT_SHEATHED = 0x00000200, // 9 removed by unsheathing
70  AURA_INTERRUPT_FLAG_TALK = 0x00000400, // 10 talk to npc / loot? action on creature
71  AURA_INTERRUPT_FLAG_USE = 0x00000800, // 11 mine/use/open action on gameobject
72  AURA_INTERRUPT_FLAG_ATTACK = 0x00001000, // 12 removed by attacking
73  AURA_INTERRUPT_FLAG_CAST = 0x00002000, // 13 ???
74  AURA_INTERRUPT_FLAG_UNK14 = 0x00004000, // 14
75  AURA_INTERRUPT_FLAG_TRANSFORM = 0x00008000, // 15 removed by transform?
76  AURA_INTERRUPT_FLAG_UNK16 = 0x00010000, // 16
77  AURA_INTERRUPT_FLAG_MOUNT = 0x00020000, // 17 misdirect, aspect, swim speed
78  AURA_INTERRUPT_FLAG_NOT_SEATED = 0x00040000, // 18 removed by standing up
79  AURA_INTERRUPT_FLAG_CHANGE_MAP = 0x00080000, // 19 leaving map/getting teleported
80  AURA_INTERRUPT_FLAG_UNATTACKABLE = 0x00100000, // 20 invulnerable or stealth
81  AURA_INTERRUPT_FLAG_UNK21 = 0x00200000, // 21
82  AURA_INTERRUPT_FLAG_TELEPORTED = 0x00400000, // 22
83  AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT = 0x00800000, // 23 removed by entering pvp combat
84  AURA_INTERRUPT_FLAG_DIRECT_DAMAGE = 0x01000000, // 24 removed by any direct damage
86 };
Enumerator
CHANNEL_FLAG_DAMAGE 
CHANNEL_FLAG_MOVEMENT 
CHANNEL_FLAG_TURNING 
CHANNEL_FLAG_DAMAGE2 
CHANNEL_FLAG_DELAY 

Definition at line 49 of file Unit.h.

Enumerator
SPELL_FACING_FLAG_INFRONT 

Definition at line 152 of file Unit.h.

153 {
155 };
Enumerator
SPELL_INTERRUPT_FLAG_MOVEMENT 
SPELL_INTERRUPT_FLAG_PUSH_BACK 
SPELL_INTERRUPT_FLAG_INTERRUPT 
SPELL_INTERRUPT_FLAG_AUTOATTACK 
SPELL_INTERRUPT_FLAG_DAMAGE 

Definition at line 40 of file Unit.h.

41 {
42  SPELL_INTERRUPT_FLAG_MOVEMENT = 0x01, // why need this for instant?
43  SPELL_INTERRUPT_FLAG_PUSH_BACK = 0x02, // push back
44  SPELL_INTERRUPT_FLAG_INTERRUPT = 0x04, // interrupt
46  SPELL_INTERRUPT_FLAG_DAMAGE = 0x10 // _complete_ interrupt on direct damage?
47 };
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_COST 
SPELLMOD_CRIT_DAMAGE_BONUS 
SPELLMOD_RESIST_MISS_CHANCE 
SPELLMOD_JUMP_TARGETS 
SPELLMOD_CHANCE_OF_SUCCESS 
SPELLMOD_ACTIVATION_TIME 
SPELLMOD_EFFECT_PAST_FIRST 
SPELLMOD_GLOBAL_COOLDOWN 
SPELLMOD_DOT 
SPELLMOD_EFFECT3 
SPELLMOD_SPELL_BONUS_DAMAGE 
SPELLMOD_MULTIPLE_VALUE 
SPELLMOD_RESIST_DISPEL_CHANCE 

Definition at line 99 of file Unit.h.

100 {
101  SPELLMOD_DAMAGE = 0,
102  SPELLMOD_DURATION = 1,
103  SPELLMOD_THREAT = 2,
104  SPELLMOD_EFFECT1 = 3,
105  SPELLMOD_CHARGES = 4,
106  SPELLMOD_RANGE = 5,
107  SPELLMOD_RADIUS = 6,
112  SPELLMOD_COOLDOWN = 11,
113  SPELLMOD_EFFECT2 = 12,
114  // spellmod 13 unused
115  SPELLMOD_COST = 14,
123  SPELLMOD_DOT = 22,
124  SPELLMOD_EFFECT3 = 23,
126  // spellmod 25, 26 unused
129 };
Enumerator
SPELL_PARTIAL_RESIST_NONE 
SPELL_PARTIAL_RESIST_PCT_25 
SPELL_PARTIAL_RESIST_PCT_50 
SPELL_PARTIAL_RESIST_PCT_75 
SPELL_PARTIAL_RESIST_PCT_100 

Definition at line 88 of file Unit.h.

Enumerator
SPELLVALUE_BASE_POINT0 
SPELLVALUE_BASE_POINT1 
SPELLVALUE_BASE_POINT2 
SPELLVALUE_MAX_TARGETS 
SPELLVALUE_DURATION 

Definition at line 133 of file Unit.h.

enum Swing
Enumerator
NOSWING 
SINGLEHANDEDSWING 
TWOHANDEDSWING 

Definition at line 256 of file Unit.h.

257 {
258  NOSWING = 0,
259  SINGLEHANDEDSWING = 1,
260  TWOHANDEDSWING = 2
261 };
Definition: Unit.h:258

internal used flags for marking special auras - for example some dummy-auras

Enumerator
UNIT_AURAFLAG_ALIVE_INVISIBLE 

Definition at line 548 of file Unit.h.

549 {
550  UNIT_AURAFLAG_ALIVE_INVISIBLE = 0x1, // aura which makes unit invisible for alive
551 };
Enumerator
UNIT_BYTES_0_OFFSET_RACE 
UNIT_BYTES_0_OFFSET_CLASS 
UNIT_BYTES_0_OFFSET_GENDER 
UNIT_BYTES_0_OFFSET_POWER_TYPE 

Definition at line 294 of file Unit.h.

Enumerator
UNIT_BYTE1_FLAG_ALWAYS_STAND 
UNIT_BYTE1_FLAG_UNTRACKABLE 
UNIT_BYTE1_FLAG_ALL 

Definition at line 183 of file Unit.h.

Enumerator
UNIT_BYTES_1_OFFSET_STAND_STATE 
UNIT_BYTES_1_OFFSET_PET_TALENTS 
UNIT_BYTES_1_OFFSET_VIS_FLAG 
UNIT_BYTES_1_OFFSET_ANIM_TIER 

Definition at line 302 of file Unit.h.

Enumerator
UNIT_BYTE2_FLAG_UNK0 
UNIT_BYTE2_FLAG_UNK1 
UNIT_BYTE2_FLAG_FFA_PVP 
UNIT_BYTE2_FLAG_SANCTUARY 
UNIT_BYTE2_FLAG_AURAS 
UNIT_BYTE2_FLAG_UNK5 
UNIT_BYTE2_FLAG_UNK6 
UNIT_BYTE2_FLAG_UNK7 

Definition at line 230 of file Unit.h.

231 {
232  UNIT_BYTE2_FLAG_UNK0 = 0x01,
233  UNIT_BYTE2_FLAG_UNK1 = 0x02,
236  UNIT_BYTE2_FLAG_AURAS = 0x10, // show possitive auras as positive, and allow its dispel
237  UNIT_BYTE2_FLAG_UNK5 = 0x20, // show negative auras as positive, disallowing dispel
238  UNIT_BYTE2_FLAG_UNK6 = 0x40,
239  UNIT_BYTE2_FLAG_UNK7 = 0x80
240 };
Enumerator
UNIT_BYTES_2_OFFSET_SHEATH_STATE 
UNIT_BYTES_2_OFFSET_PVP_FLAG 
UNIT_BYTES_2_OFFSET_PET_FLAGS 
UNIT_BYTES_2_OFFSET_SHAPESHIFT_FORM 

Definition at line 310 of file Unit.h.

enum UnitFlags
Enumerator
UNIT_FLAG_UNK_0 
UNIT_FLAG_NON_ATTACKABLE 
UNIT_FLAG_REMOVE_CLIENT_CONTROL 
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_CANNOT_SWIM 
UNIT_FLAG_UNK_15 
UNIT_FLAG_NOT_PL_SPELL_TARGET 
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 

Definition at line 554 of file Unit.h.

555 {
556  UNIT_FLAG_UNK_0 = 0x00000001,
557  UNIT_FLAG_NON_ATTACKABLE = 0x00000002, // not attackable
558  UNIT_FLAG_REMOVE_CLIENT_CONTROL = 0x00000004, // This is a legacy flag used to disable movement player's movement while controlling other units, SMSG_CLIENT_CONTROL replaces this functionality clientside now. CONFUSED and FLEEING flags have the same effect on client movement as DISABLE_MOVE_CONTROL in addition to preventing spell casts/autoattack (they all allow climbing steeper hills and emotes while moving)
559  UNIT_FLAG_PVP_ATTACKABLE = 0x00000008, // allow apply pvp rules to attackable state in addition to faction dependent state
560  UNIT_FLAG_RENAME = 0x00000010,
561  UNIT_FLAG_PREPARATION = 0x00000020, // don't take reagents for spells with SPELL_ATTR5_NO_REAGENT_WHILE_PREP
562  UNIT_FLAG_UNK_6 = 0x00000040,
563  UNIT_FLAG_NOT_ATTACKABLE_1 = 0x00000080, // ?? (UNIT_FLAG_PVP_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1) is NON_PVP_ATTACKABLE
564  UNIT_FLAG_IMMUNE_TO_PC = 0x00000100, // disables actions by PlayerCharacters (PC) on unit - see Unit::_IsValidAttackTarget, Unit::_IsValidAssistTarget
565  UNIT_FLAG_IMMUNE_TO_NPC = 0x00000200, // disables actions by NonPlayerCharacters (NPC) on unit - see Unit::_IsValidAttackTarget, Unit::_IsValidAssistTarget
566  UNIT_FLAG_LOOTING = 0x00000400, // loot animation
567  UNIT_FLAG_PET_IN_COMBAT = 0x00000800, // in combat?, 2.0.8
568  UNIT_FLAG_PVP = 0x00001000,
569  UNIT_FLAG_SILENCED = 0x00002000, // silenced, 2.1.1
570  UNIT_FLAG_CANNOT_SWIM = 0x00004000, // 2.0.8
571  UNIT_FLAG_UNK_15 = 0x00008000,
572  UNIT_FLAG_NOT_PL_SPELL_TARGET = 0x00010000, // Unit with that flag can not be direct target of player spell.
573  UNIT_FLAG_PACIFIED = 0x00020000,
574  UNIT_FLAG_STUNNED = 0x00040000, // stunned, 2.1.1
575  UNIT_FLAG_IN_COMBAT = 0x00080000,
576  UNIT_FLAG_TAXI_FLIGHT = 0x00100000, // disable casting at client side spell not allowed by taxi flight (mounted?), probably used with 0x4 flag
577  UNIT_FLAG_DISARMED = 0x00200000, // disable melee spells casting..., "Required melee weapon" added to melee spells tooltip.
578  UNIT_FLAG_CONFUSED = 0x00400000,
579  UNIT_FLAG_FLEEING = 0x00800000,
580  UNIT_FLAG_PLAYER_CONTROLLED = 0x01000000, // used in spell Eyes of the Beast for pet... let attack by controlled creature
581  UNIT_FLAG_NOT_SELECTABLE = 0x02000000,
582  UNIT_FLAG_SKINNABLE = 0x04000000,
583  UNIT_FLAG_MOUNT = 0x08000000,
584  UNIT_FLAG_UNK_28 = 0x10000000,
585  UNIT_FLAG_UNK_29 = 0x20000000, // used in Feing Death spell
586  UNIT_FLAG_SHEATHE = 0x40000000
587 };
enum UnitFlags2
Enumerator
UNIT_FLAG2_FEIGN_DEATH 
UNIT_FLAG2_IGNORE_REPUTATION 
UNIT_FLAG2_COMPREHEND_LANG 
UNIT_FLAG2_MIRROR_IMAGE 
UNIT_FLAG2_FORCE_MOVE 

Definition at line 590 of file Unit.h.

Enumerator
BASE_VALUE 
BASE_PCT 
TOTAL_VALUE 
TOTAL_PCT 
MODIFIER_TYPE_END 

Definition at line 351 of file Unit.h.

352 {
353  BASE_VALUE = 0,
354  BASE_PCT = 1,
355  TOTAL_VALUE = 2,
356  TOTAL_PCT = 3,
358 };
Definition: Unit.h:354
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_HAPPINESS 
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 

Definition at line 384 of file Unit.h.

385 {
386  UNIT_MOD_STAT_STRENGTH, // UNIT_MOD_STAT_STRENGTH..UNIT_MOD_STAT_SPIRIT must be in existing order, it's accessed by index values of Stats enum.
392  UNIT_MOD_MANA, // UNIT_MOD_MANA..UNIT_MOD_HAPPINESS must be in existing order, it's accessed by index values of Powers enum.
397  UNIT_MOD_ARMOR, // UNIT_MOD_ARMOR..UNIT_MOD_RESISTANCE_ARCANE must be in existing order, it's accessed by index values of SpellSchools enum.
409  UNIT_MOD_END,
410  // synonyms
412  UNIT_MOD_STAT_END = UNIT_MOD_STAT_SPIRIT + 1,
414  UNIT_MOD_RESISTANCE_END = UNIT_MOD_RESISTANCE_ARCANE + 1,
416  UNIT_MOD_POWER_END = UNIT_MOD_HAPPINESS + 1
417 };
Enumerator
MOVE_WALK 
MOVE_RUN 
MOVE_RUN_BACK 
MOVE_SWIM 
MOVE_SWIM_BACK 
MOVE_TURN_RATE 
MOVE_FLIGHT 
MOVE_FLIGHT_BACK 

Definition at line 482 of file Unit.h.

483 {
484  MOVE_WALK = 0,
485  MOVE_RUN = 1,
486  MOVE_RUN_BACK = 2,
487  MOVE_SWIM = 3,
488  MOVE_SWIM_BACK = 4,
489  MOVE_TURN_RATE = 5,
490  MOVE_FLIGHT = 6,
491  MOVE_FLIGHT_BACK = 7,
492 };
Definition: Unit.h:485
enum UnitRename
Enumerator
UNIT_RENAME_NOT_ALLOWED 
UNIT_RENAME_ALLOWED 

Definition at line 243 of file Unit.h.

244 {
246  UNIT_RENAME_ALLOWED = 0x03
247 };
Enumerator
UNIT_STAND_FLAGS_CREEP 
UNIT_STAND_FLAGS_ALL 

Definition at line 176 of file Unit.h.

177 {
178  UNIT_STAND_FLAGS_CREEP = 0x02,
179  UNIT_STAND_FLAGS_ALL = 0xFF
180 };
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 

Definition at line 162 of file Unit.h.

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_IGNORE_PATHFINDING 
UNIT_STATE_UNATTACKABLE 
UNIT_STATE_MOVING 
UNIT_STATE_RUNNING_STATE 
UNIT_STATE_CONTROLLED 
UNIT_STATE_LOST_CONTROL 
UNIT_STATE_SIGHTLESS 
UNIT_STATE_CANNOT_AUTOATTACK 
UNIT_STATE_CANNOT_TURN 
UNIT_STATE_ALL_STATE 

Definition at line 445 of file Unit.h.

446 {
447  UNIT_STATE_DIED = 0x00000001,
448  UNIT_STATE_MELEE_ATTACKING = 0x00000002, // player is melee attacking someone
449  //UNIT_STATE_MELEE_ATTACK_BY = 0x00000004, // player is melee attack by someone
450  UNIT_STATE_STUNNED = 0x00000008,
451  UNIT_STATE_ROAMING = 0x00000010,
452  UNIT_STATE_CHASE = 0x00000020,
453  //UNIT_STATE_SEARCHING = 0x00000040,
454  UNIT_STATE_FLEEING = 0x00000080,
455  UNIT_STATE_IN_FLIGHT = 0x00000100, // player is in flight mode
456  UNIT_STATE_FOLLOW = 0x00000200,
457  UNIT_STATE_ROOT = 0x00000400,
458  UNIT_STATE_CONFUSED = 0x00000800,
459  UNIT_STATE_DISTRACTED = 0x00001000,
460  UNIT_STATE_ISOLATED = 0x00002000, // area auras do not affect other players
461  UNIT_STATE_ATTACK_PLAYER = 0x00004000,
462  UNIT_STATE_CASTING = 0x00008000,
463  UNIT_STATE_POSSESSED = 0x00010000,
464  UNIT_STATE_CHARGING = 0x00020000,
465  UNIT_STATE_JUMPING = 0x00040000,
466  UNIT_STATE_MOVE = 0x00100000,
467  UNIT_STATE_ROTATING = 0x00200000,
468  UNIT_STATE_EVADE = 0x00400000,
469  UNIT_STATE_IGNORE_PATHFINDING = 0x10000000, // do not use pathfinding in any MovementGenerator
470 
479  UNIT_STATE_ALL_STATE = 0xffffffff //(UNIT_STATEE_STOPPED | UNIT_STATEE_MOVING | UNIT_STATEE_IN_COMBAT | UNIT_STATEE_IN_FLIGHT)
480 };
Enumerator
UNIT_MASK_NONE 
UNIT_MASK_SUMMON 
UNIT_MASK_MINION 
UNIT_MASK_GUARDIAN 
UNIT_MASK_TOTEM 
UNIT_MASK_PET 
UNIT_MASK_PUPPET 
UNIT_MASK_HUNTER_PET 
UNIT_MASK_CONTROLABLE_GUARDIAN 

Definition at line 630 of file Unit.h.

631 {
632  UNIT_MASK_NONE = 0x00000000,
633  UNIT_MASK_SUMMON = 0x00000001,
634  UNIT_MASK_MINION = 0x00000002,
635  UNIT_MASK_GUARDIAN = 0x00000004,
636  UNIT_MASK_TOTEM = 0x00000008,
637  UNIT_MASK_PET = 0x00000010,
638  UNIT_MASK_PUPPET = 0x00000040,
639  UNIT_MASK_HUNTER_PET = 0x00000080,
640  UNIT_MASK_CONTROLABLE_GUARDIAN = 0x00000100
641 };
Enumerator
VICTIMSTATE_UNKNOWN1 
VICTIMSTATE_NORMAL 
VICTIMSTATE_DODGE 
VICTIMSTATE_PARRY 
VICTIMSTATE_INTERRUPT 
VICTIMSTATE_BLOCKS 
VICTIMSTATE_EVADES 
VICTIMSTATE_IS_IMMUNE 
VICTIMSTATE_DEFLECTS 

Definition at line 263 of file Unit.h.

Enumerator
BASE_ATTACK 
OFF_ATTACK 
RANGED_ATTACK 

Definition at line 498 of file Unit.h.

499 {
500  BASE_ATTACK = 0,
501  OFF_ATTACK = 1,
502  RANGED_ATTACK = 2
503 };
Enumerator
MINDAMAGE 
MAXDAMAGE 

Definition at line 360 of file Unit.h.

361 {
362  MINDAMAGE,
363  MAXDAMAGE
364 };

Function Documentation

uint32 createProcExtendMask ( SpellNonMeleeDamage damageInfo,
SpellMissInfo  missCondition 
)

Definition at line 11472 of file Unit.cpp.

References SpellNonMeleeDamage::absorb, SpellNonMeleeDamage::blocked, SpellNonMeleeDamage::HitInfo, PROC_EX_ABSORB, PROC_EX_BLOCK, PROC_EX_CRITICAL_HIT, PROC_EX_DEFLECT, PROC_EX_DODGE, PROC_EX_EVADE, PROC_EX_IMMUNE, PROC_EX_MISS, PROC_EX_NONE, PROC_EX_NORMAL_HIT, PROC_EX_PARRY, PROC_EX_REFLECT, PROC_EX_RESIST, SPELL_HIT_TYPE_CRIT, SPELL_MISS_ABSORB, SPELL_MISS_BLOCK, SPELL_MISS_DEFLECT, SPELL_MISS_DODGE, SPELL_MISS_EVADE, SPELL_MISS_IMMUNE, SPELL_MISS_IMMUNE2, SPELL_MISS_MISS, SPELL_MISS_NONE, SPELL_MISS_PARRY, SPELL_MISS_REFLECT, and SPELL_MISS_RESIST.

Referenced by Spell::DoAllEffectOnTarget(), and Aura::PeriodicTick().

11473 {
11474  uint32 procEx = PROC_EX_NONE;
11475  // Check victim state
11476  if (missCondition != SPELL_MISS_NONE)
11477  switch (missCondition)
11478  {
11479  case SPELL_MISS_MISS:
11480  procEx |= PROC_EX_MISS;
11481  break;
11482  case SPELL_MISS_RESIST:
11483  procEx |= PROC_EX_RESIST;
11484  break;
11485  case SPELL_MISS_DODGE:
11486  procEx |= PROC_EX_DODGE;
11487  break;
11488  case SPELL_MISS_PARRY:
11489  procEx |= PROC_EX_PARRY;
11490  break;
11491  case SPELL_MISS_BLOCK:
11492  procEx |= PROC_EX_BLOCK;
11493  break;
11494  case SPELL_MISS_EVADE:
11495  procEx |= PROC_EX_EVADE;
11496  break;
11497  case SPELL_MISS_IMMUNE:
11498  procEx |= PROC_EX_IMMUNE;
11499  break;
11500  case SPELL_MISS_IMMUNE2:
11501  procEx |= PROC_EX_IMMUNE;
11502  break;
11503  case SPELL_MISS_DEFLECT:
11504  procEx |= PROC_EX_DEFLECT;
11505  break;
11506  case SPELL_MISS_ABSORB:
11507  procEx |= PROC_EX_ABSORB;
11508  break;
11509  case SPELL_MISS_REFLECT:
11510  procEx |= PROC_EX_REFLECT;
11511  break;
11512  default:
11513  break;
11514  }
11515  else
11516  {
11517  // On block
11518  if (damageInfo->blocked)
11519  procEx |= PROC_EX_BLOCK;
11520  // On absorb
11521  if (damageInfo->absorb)
11522  procEx |= PROC_EX_ABSORB;
11523  // On crit
11524  if (damageInfo->HitInfo & SPELL_HIT_TYPE_CRIT)
11525  procEx |= PROC_EX_CRITICAL_HIT;
11526  else
11527  procEx |= PROC_EX_NORMAL_HIT;
11528  }
11529  return procEx;
11530 }
uint32 blocked
Definition: Unit.h:714
uint32 HitInfo
Definition: Unit.h:715
ACE_UINT32 uint32
Definition: Define.h:71
uint32 absorb
Definition: Unit.h:710

Variable Documentation

float baseMoveSpeed[MAX_MOVE_TYPE]

Definition at line 58 of file Unit.cpp.

Referenced by Unit::GetSpeed(), Pet::LoadPetFromDB(), and Unit::UpdateSpeed().