2732 {
2735 {
2738 if (rand < 25)
2740 else if (rand < 50)
2742 else if (rand < 70)
2744 else if (rand < 80)
2745 {
2747 if (
urand(0, 100) <= 30)
2748 target = caster;
2749 }
2750 else if (rand < 95)
2752 else
2753 {
2755 target = caster;
2756 }
2757
2759 }
2760 }
std::uint32_t uint32
Definition Define.h:107
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
Item * GetCastItem()
Definition SpellScript.cpp:625
Unit * GetHitUnit()
Definition SpellScript.cpp:453
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:1372
@ SPELL_FROSTBOLT
Definition spell_item.cpp:2706
@ SPELL_SUMMON_FELHOUND_MINION
Definition spell_item.cpp:2708
@ SPELL_FIREBALL
Definition spell_item.cpp:2709
@ SPELL_CHAIN_LIGHTNING
Definition spell_item.cpp:2710
@ SPELL_ENVELOPING_WINDS
Definition spell_item.cpp:2711
@ SPELL_POLYMORPH
Definition spell_item.cpp:2707