249 {
251 {
252 int32 damage =
int32(unitTarget->GetHealth()) -
int32(unitTarget->CountPctFromMaxHealth(5));
253 if (damage <= 0)
254 return;
255
257 {
258 cTarget->SetWalk(true);
262 return;
263 }
265 }
266 }
std::int32_t int32
Definition: Define.h:104
@ REACT_PASSIVE
Definition: Unit.h:1023
@ MOTION_SLOT_CONTROLLED
Definition: MotionMaster.h:63
@ SPELLVALUE_BASE_POINT0
Definition: SpellDefines.h:114
Definition: Creature.h:46
Creature * ToCreature()
Definition: Object.h:197
SpellCastResult CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1226
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:815
Unit * GetHitUnit()
Definition: SpellScript.cpp:448
Unit * GetCaster()
Definition: SpellScript.cpp:401