2222 {
2224 return;
2225
2227
2229 switch (
urand(0, 3))
2230 {
2231 case 0:
2233 break;
2234 case 1:
2236 break;
2237 case 2:
2239 break;
2240 case 3:
2243 else
2245 break;
2246 }
2247
2248 caster->
CastSpell(caster, spellId,
true);
2249 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
bool roll_chance_i(int chance)
Definition: Random.h:59
std::uint32_t uint32
Definition: Define.h:107
@ SPELL_TRANSFORM_ALLIANCE
Definition: spell_item.cpp:2207
@ SPELL_SOUL_SPLIT_EVIL
Definition: spell_item.cpp:2208
@ SPELL_TRANSFORM_HORDE
Definition: spell_item.cpp:2206
@ SPELL_TRANSPORTER_MALFUNCTION
Definition: spell_item.cpp:2205
@ SPELL_SOUL_SPLIT_GOOD
Definition: spell_item.cpp:2209
@ TEAM_ALLIANCE
Definition: SharedDefines.h:760
Player * ToPlayer()
Definition: Object.h:198
TeamId GetTeamId(bool original=false) const
Definition: Player.h:2088
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:1168
Unit * GetCaster()
Definition: SpellScript.cpp:401