TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Unit.cpp File Reference
#include "Unit.h"
#include "Common.h"
#include "Battlefield.h"
#include "BattlefieldMgr.h"
#include "Battleground.h"
#include "BattlegroundScore.h"
#include "CellImpl.h"
#include "ChatTextBuilder.h"
#include "ConditionMgr.h"
#include "CreatureAI.h"
#include "CreatureAIImpl.h"
#include "CreatureGroups.h"
#include "Creature.h"
#include "Formulas.h"
#include "GridNotifiersImpl.h"
#include "Group.h"
#include "InstanceSaveMgr.h"
#include "InstanceScript.h"
#include "Log.h"
#include "MoveSpline.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "Opcodes.h"
#include "OutdoorPvP.h"
#include "PassiveAI.h"
#include "PetAI.h"
#include "Pet.h"
#include "Player.h"
#include "QuestDef.h"
#include "ReputationMgr.h"
#include "SpellAuraEffects.h"
#include "SpellAuras.h"
#include "Spell.h"
#include "SpellInfo.h"
#include "SpellHistory.h"
#include "SpellMgr.h"
#include "TemporarySummon.h"
#include "Transport.h"
#include "Totem.h"
#include "UpdateFieldFlags.h"
#include "Util.h"
#include "Vehicle.h"
#include "World.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "ChatPackets.h"
#include "MiscPackets.h"
#include "MovementPackets.h"
#include "CombatPackets.h"
#include "CombatLogPackets.h"
#include "VehiclePackets.h"
#include "LootPackets.h"
#include "PartyPackets.h"
#include <cmath>

Classes

struct  ProcTriggeredData
 
struct  CombatLogSender
 

Typedefs

typedef std::list
< ProcTriggeredData
ProcTriggeredList
 

Functions

static bool InitTriggerAuraData ()
 
uint32 createProcExtendMask (SpellNonMeleeDamage *damageInfo, SpellMissInfo missCondition)
 

Variables

float baseMoveSpeed [MAX_MOVE_TYPE]
 
float playerBaseMoveSpeed [MAX_MOVE_TYPE]
 
static bool isTriggerAura [TOTAL_AURAS]
 
static bool isNonTriggerAura [TOTAL_AURAS]
 
static bool isAlwaysTriggeredAura [TOTAL_AURAS]
 
static bool procPrepared = InitTriggerAuraData()
 

Typedef Documentation

typedef std::list< ProcTriggeredData > ProcTriggeredList

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:

bool InitTriggerAuraData ( )
static
12132 {
12133  for (uint16 i = 0; i < TOTAL_AURAS; ++i)
12134  {
12135  isTriggerAura[i] = false;
12136  isNonTriggerAura[i] = false;
12137  isAlwaysTriggeredAura[i] = false;
12138  }
12143  isTriggerAura[SPELL_AURA_MOD_STUN] = true; // Aura does not have charges but needs to be removed on trigger
12148  isTriggerAura[SPELL_AURA_MOD_FEAR] = true; // Aura does not have charges but needs to be removed on trigger
12156  isTriggerAura[SPELL_AURA_SCHOOL_ABSORB] = true; // Savage Defense untested
12178 
12181 
12190 
12191  return true;
12192 }
Definition: SpellAuraDefines.h:379
Definition: SpellAuraDefines.h:74
Definition: SpellAuraDefines.h:209
Definition: SpellAuraDefines.h:331
Definition: SpellAuraDefines.h:147
Definition: SpellAuraDefines.h:72
Definition: SpellAuraDefines.h:543
Definition: SpellAuraDefines.h:285
Definition: SpellAuraDefines.h:159
Definition: SpellAuraDefines.h:132
Definition: SpellAuraDefines.h:388
static bool isAlwaysTriggeredAura[TOTAL_AURAS]
Definition: Unit.cpp:108
Definition: SpellAuraDefines.h:76
Definition: SpellAuraDefines.h:70
Definition: SpellAuraDefines.h:171
Definition: SpellAuraDefines.h:67
Definition: SpellAuraDefines.h:100
Definition: SpellAuraDefines.h:133
Definition: SpellAuraDefines.h:88
Definition: SpellAuraDefines.h:283
Definition: SpellAuraDefines.h:86
Definition: SpellAuraDefines.h:244
Definition: SpellAuraDefines.h:116
Definition: SpellAuraDefines.h:170
Definition: SpellAuraDefines.h:291
static bool isTriggerAura[TOTAL_AURAS]
Definition: Unit.cpp:104
Definition: SpellAuraDefines.h:172
Definition: SpellAuraDefines.h:117
uint16_t uint16
Definition: Define.h:151
Definition: SpellAuraDefines.h:322
Definition: SpellAuraDefines.h:73
Definition: SpellAuraDefines.h:137
Definition: SpellAuraDefines.h:145
Definition: SpellAuraDefines.h:125
Definition: SpellAuraDefines.h:156
Definition: SpellAuraDefines.h:187
static bool isNonTriggerAura[TOTAL_AURAS]
Definition: Unit.cpp:106
Definition: SpellAuraDefines.h:102
Definition: SpellAuraDefines.h:64
Definition: SpellAuraDefines.h:82
Definition: SpellAuraDefines.h:134
Definition: SpellAuraDefines.h:177
Definition: SpellAuraDefines.h:65
Definition: SpellAuraDefines.h:129
Definition: SpellAuraDefines.h:198
Definition: SpellAuraDefines.h:103

Variable Documentation

float baseMoveSpeed[MAX_MOVE_TYPE]
Initial value:
=
{
2.5f,
7.0f,
4.5f,
4.722222f,
2.5f,
3.141594f,
7.0f,
4.5f,
3.14f
}
bool isAlwaysTriggeredAura[TOTAL_AURAS]
static
bool isNonTriggerAura[TOTAL_AURAS]
static
bool isTriggerAura[TOTAL_AURAS]
static
float playerBaseMoveSpeed[MAX_MOVE_TYPE]
Initial value:
=
{
2.5f,
7.0f,
4.5f,
4.722222f,
2.5f,
3.141594f,
7.0f,
4.5f,
3.14f
}
bool procPrepared = InitTriggerAuraData()
static