241 {
243 {
244 int32 damage =
int32(unitTarget->GetHealth()) -
int32(unitTarget->CountPctFromMaxHealth(5));
245 if (damage <= 0)
246 return;
247
249 {
250 cTarget->SetWalk(true);
254 return;
255 }
256
258 }
259 }
std::int32_t int32
Definition Define.h:103
@ MOTION_SLOT_CONTROLLED
Definition MotionMaster.h:66
@ REACT_PASSIVE
Definition Unit.h:567
@ SPELL_DECIMATE_DAMAGE
Definition boss_gluth.cpp:30
Creature * ToCreature()
Definition Object.h:206
Unit * GetHitUnit()
Definition SpellScript.cpp:448
Unit * GetCaster()
Definition SpellScript.cpp:401
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1361
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:982