834 {
837 if (!caster)
838 return;
840 {
844 if (
Player* plr = itr->GetSource())
846 {
852 int32 resilienceReduction = damage;
855 resilienceReduction = damage - resilienceReduction;
856 damage -= resilienceReduction;
857 uint32 mitigated_damage = resilienceReduction;
861 int32 overkill = damage - plr->GetHealth();
862 if (overkill < 0)
863 overkill = 0;
865 plr->SendPeriodicAuraLog(&pInfo);
867 }
868 }
869 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
std::int32_t int32
Definition: Define.h:103
std::uint32_t uint32
Definition: Define.h:107
@ BASE_ATTACK
Definition: Unit.h:209
@ CR_CRIT_TAKEN_SPELL
Definition: Unit.h:233
@ DOT
Definition: Unit.h:250
@ MELEE_HIT_NORMAL
Definition: Unit.h:286
@ SPELL_AURA_SPIRIT_OF_REDEMPTION
Definition: SpellAuraDefines.h:239
Definition: LinkedList.h:139
Map * GetMap() const
Definition: Object.h:531
Definition: Player.h:1064
bool CanApplyResilience() const
Definition: Unit.h:1736
static void ApplyResilience(Unit const *victim, float *crit, int32 *damage, bool isCrit, CombatRating type)
Definition: Unit.cpp:18883
static void CalcAbsorbResist(DamageInfo &dmgInfo, bool Splited=false)
Definition: Unit.cpp:2131
static void DealDamageMods(Unit const *victim, uint32 &damage, uint32 *absorb)
Definition: Unit.cpp:801
static uint32 DealDamage(Unit *attacker, Unit *victim, uint32 damage, CleanDamage const *cleanDamage=nullptr, DamageEffectType damagetype=DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *spellProto=nullptr, bool durabilityLoss=true, bool allowGM=false, Spell const *spell=nullptr)
Definition: Unit.cpp:811
uint32 GetId() const
Definition: Map.h:379
Difficulty GetDifficulty() const
Definition: Map.h:443
PlayerList const & GetPlayers() const
Definition: Map.h:486
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37
uint32 ExcludeTargetAuraSpell
Definition: SpellInfo.h:346
void PreventDefaultAction()
Definition: SpellScript.cpp:985
SpellInfo const * GetSpellInfo() const
Definition: SpellScript.cpp:1005
Unit * GetCaster() const
Definition: SpellScript.cpp:1020