diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 1893b5070..71edde5ad 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -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 diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 94e060732..bff584fb1 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -5805,6 +5805,29 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx) // Torture the Torturer: High Executor's Branding Iron Impact unitTarget->CastSpell(unitTarget, 48614, true); return; + + // Gender spells + case 48762: // A Fall from Grace: Scarlet Raven Priest Image - Master + case 45759: // Warsong Orc Disguise + case 69672: // Sunreaver Disguise + case 69673: // Silver Covenant Disguise + { + if (!unitTarget) + return; + + uint8 gender = unitTarget->getGender(); + uint32 spellId; + switch (m_spellInfo->Id) + { + case 48762: spellId = (gender == GENDER_MALE ? 48763 : 48761); break; + case 45759: spellId = (gender == GENDER_MALE ? 45760 : 45762); break; + case 69672: spellId = (gender == GENDER_MALE ? 70974 : 70973); break; + case 69673: spellId = (gender == GENDER_MALE ? 70972 : 70971); break; + default: return; + } + unitTarget->CastSpell(unitTarget, spellId, true); + return; + } case 50217: // The Cleansing: Script Effect Player Cast Mirror Image { // Summon Your Inner Turmoil diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 0400d6798..583aaa08b 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10194" + #define REVISION_NR "10195" #endif // __REVISION_NR_H__