823 {
826 if (!caster)
827 return;
829 {
833 if (
Player* plr = itr->GetSource())
834 if (plr->IsAlive() && !plr->HasAura(excludedID) && !plr->HasSpiritOfRedemptionAura())
835 {
841 int32 resilienceReduction = damage;
844 resilienceReduction = damage - resilienceReduction;
845 damage -= resilienceReduction;
846 uint32 mitigated_damage = resilienceReduction;
850 int32 overkill = damage - plr->GetHealth();
851 if (overkill < 0)
852 overkill = 0;
854 plr->SendPeriodicAuraLog(&pInfo);
856 }
857 }
858 }
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
Definition: LinkedList.h:139
Map * GetMap() const
Definition: Object.h:536
Definition: Player.h:1081
bool CanApplyResilience() const
Definition: Unit.h:1093
static void ApplyResilience(Unit const *victim, float *crit, int32 *damage, bool isCrit, CombatRating type)
Definition: Unit.cpp:18927
static void CalcAbsorbResist(DamageInfo &dmgInfo, bool Splited=false)
Definition: Unit.cpp:2147
static void DealDamageMods(Unit const *victim, uint32 &damage, uint32 *absorb)
Definition: Unit.cpp:800
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:810
uint32 GetId() const
Definition: Map.h:377
Difficulty GetDifficulty() const
Definition: Map.h:441
PlayerList const & GetPlayers() const
Definition: Map.h:484
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