2470 {
2473 {
2476 if (rand < 25)
2478 else if (rand < 50)
2480 else if (rand < 70)
2482 else if (rand < 80)
2483 {
2485 if (
urand(0, 100) <= 30)
2486 target = caster;
2487 }
2488 else if (rand < 95)
2490 else
2491 {
2493 target = caster;
2494 }
2495
2497 }
2498 }
std::uint32_t uint32
Definition: Define.h:108
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ SPELL_FROSTBOLT
Definition: spell_item.cpp:2444
@ SPELL_SUMMON_FELHOUND_MINION
Definition: spell_item.cpp:2446
@ SPELL_FIREBALL
Definition: spell_item.cpp:2447
@ SPELL_CHAIN_LIGHTNING
Definition: spell_item.cpp:2448
@ SPELL_ENVELOPING_WINDS
Definition: spell_item.cpp:2449
@ SPELL_POLYMORPH
Definition: spell_item.cpp:2445
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:1169
Item * GetCastItem()
Definition: SpellScript.cpp:620
Unit * GetHitUnit()
Definition: SpellScript.cpp:448
Unit * GetCaster()
Definition: SpellScript.cpp:401