2688 {
2691 {
2694 if (rand < 25)
2696 else if (rand < 50)
2698 else if (rand < 70)
2700 else if (rand < 80)
2701 {
2703 if (
urand(0, 100) <= 30)
2704 target = caster;
2705 }
2706 else if (rand < 95)
2708 else
2709 {
2711 target = caster;
2712 }
2713
2715 }
2716 }
std::uint32_t uint32
Definition Define.h:107
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
Item * GetCastItem()
Definition SpellScript.cpp:620
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:1375
@ SPELL_FROSTBOLT
Definition spell_item.cpp:2662
@ SPELL_SUMMON_FELHOUND_MINION
Definition spell_item.cpp:2664
@ SPELL_FIREBALL
Definition spell_item.cpp:2665
@ SPELL_CHAIN_LIGHTNING
Definition spell_item.cpp:2666
@ SPELL_ENVELOPING_WINDS
Definition spell_item.cpp:2667
@ SPELL_POLYMORPH
Definition spell_item.cpp:2663