[11099] Add script effect of spell 24720

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2011-02-02 12:32:30 +01:00
parent abb7c64fb1
commit 6f74fa1be8
2 changed files with 36 additions and 1 deletions

View file

@ -5965,6 +5965,41 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
m_caster->CastSpell(unitTarget, unitTarget->getGender() == GENDER_MALE ? 24712 : 24713, true);
return;
}
case 24720: // Random Costume
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
uint32 spellId = 0;
switch(urand(0, 6))
{
case 0:
spellId = unitTarget->getGender() == GENDER_MALE ? 24708 : 24709;
break;
case 1:
spellId = unitTarget->getGender() == GENDER_MALE ? 24711 : 24710;
break;
case 2:
spellId = unitTarget->getGender() == GENDER_MALE ? 24712 : 24713;
break;
case 3:
spellId = 24723;
break;
case 4:
spellId = 24732;
break;
case 5:
spellId = unitTarget->getGender() == GENDER_MALE ? 24735 : 24736;
break;
case 6:
spellId = 24740;
break;
}
m_caster->CastSpell(unitTarget, spellId, true);
return;
}
case 24737: // Ghost Costume
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11098"
#define REVISION_NR "11099"
#endif // __REVISION_NR_H__