[10195] Some gender dependent spells

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
virusav 2010-07-15 05:32:08 +04:00 committed by VladimirMangos
parent ea90f4e8c7
commit a27ecef96d
3 changed files with 41 additions and 17 deletions

View file

@ -1920,6 +1920,23 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
SetAuraDuration(rand()%30*IN_MILLISECONDS);
return;
}
// Gender spells
case 38224: // Illidari Agent Illusion
case 37096: // Blood Elf Illusion
case 46354: // Blood Elf Illusion
{
uint8 gender = target->getGender();
uint32 spellId;
switch (GetId())
{
case 38224: spellId = (gender == GENDER_MALE ? 38225 : 38227); break;
case 37096: spellId = (gender == GENDER_MALE ? 37092 : 37094); break;
case 46354: spellId = (gender == GENDER_MALE ? 46355 : 46356); break;
default: return;
}
target->CastSpell(target, spellId, true, NULL, this);
return;
}
case 39850: // Rocket Blast
if (roll_chance_i(20)) // backfire stun
target->CastSpell(target, 51581, true, NULL, this);
@ -1927,22 +1944,6 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
case 43873: // Headless Horseman Laugh
target->PlayDistanceSound(11965);
return;
case 46354: // Blood Elf Illusion
if (Unit* caster = GetCaster())
{
switch(caster->getGender())
{
case GENDER_FEMALE:
caster->CastSpell(target, 46356, true, NULL, this);
break;
case GENDER_MALE:
caster->CastSpell(target, 46355, true, NULL, this);
break;
default:
break;
}
}
return;
case 46699: // Requires No Ammo
if (target->GetTypeId() == TYPEID_PLAYER)
// not use ammo and not allow use