mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[10004] Add script effect of spell 43365, 50217, 50218 and 50238.
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
8988f0f609
commit
716afa0e4b
2 changed files with 64 additions and 1 deletions
|
|
@ -5557,6 +5557,15 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
|
||||||
unitTarget->CastSpell(unitTarget, 41131, true);
|
unitTarget->CastSpell(unitTarget, 41131, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 43365: // The Cleansing: Shrine Cast
|
||||||
|
{
|
||||||
|
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Script Effect Player Cast Mirror Image
|
||||||
|
m_caster->CastSpell(m_caster, 50217, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
case 44455: // Character Script Effect Reverse Cast
|
case 44455: // Character Script Effect Reverse Cast
|
||||||
{
|
{
|
||||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
|
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
|
||||||
|
|
@ -5753,6 +5762,60 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
|
||||||
// Torture the Torturer: High Executor's Branding Iron Impact
|
// Torture the Torturer: High Executor's Branding Iron Impact
|
||||||
unitTarget->CastSpell(unitTarget, 48614, true);
|
unitTarget->CastSpell(unitTarget, 48614, true);
|
||||||
return;
|
return;
|
||||||
|
case 50217: // The Cleansing: Script Effect Player Cast Mirror Image
|
||||||
|
{
|
||||||
|
// Summon Your Inner Turmoil
|
||||||
|
m_caster->CastSpell(m_caster, 50167, true);
|
||||||
|
|
||||||
|
// Spell 50218 has TARGET_SCRIPT, but other wild summons near may exist, and then target can become wrong
|
||||||
|
// Only way to make this safe is to get the actual summoned by m_caster
|
||||||
|
|
||||||
|
// Your Inner Turmoil's Mirror Image Aura
|
||||||
|
m_caster->CastSpell(m_caster, 50218, true);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
case 50218: // The Cleansing: Your Inner Turmoil's Mirror Image Aura
|
||||||
|
{
|
||||||
|
if (!m_originalCaster || m_originalCaster->GetTypeId() != TYPEID_PLAYER || !unitTarget)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// determine if and what weapons can be copied
|
||||||
|
switch(eff_idx)
|
||||||
|
{
|
||||||
|
case EFFECT_INDEX_1:
|
||||||
|
if (((Player*)m_originalCaster)->GetWeaponForAttack(BASE_ATTACK))
|
||||||
|
unitTarget->CastSpell(m_originalCaster, m_spellInfo->CalculateSimpleValue(eff_idx), true);
|
||||||
|
|
||||||
|
return;
|
||||||
|
case EFFECT_INDEX_2:
|
||||||
|
if (((Player*)m_originalCaster)->GetWeaponForAttack(OFF_ATTACK))
|
||||||
|
unitTarget->CastSpell(m_originalCaster, m_spellInfo->CalculateSimpleValue(eff_idx), true);
|
||||||
|
|
||||||
|
return;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
case 50238: // The Cleansing: Your Inner Turmoil's On Death Cast on Master
|
||||||
|
{
|
||||||
|
if (m_caster->GetTypeId() != TYPEID_UNIT)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (((Creature*)m_caster)->isTemporarySummon())
|
||||||
|
{
|
||||||
|
TemporarySummon* pSummon = (TemporarySummon*)m_caster;
|
||||||
|
|
||||||
|
if (pSummon->GetSummonerGuid().IsPlayer())
|
||||||
|
{
|
||||||
|
if (Player* pSummoner = sObjectMgr.GetPlayer(pSummon->GetSummonerGuid()))
|
||||||
|
pSummoner->CastSpell(pSummoner, m_spellInfo->CalculateSimpleValue(eff_idx), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
case 51770: // Emblazon Runeblade
|
case 51770: // Emblazon Runeblade
|
||||||
{
|
{
|
||||||
Unit* caster = GetAffectiveCaster();
|
Unit* caster = GetAffectiveCaster();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10003"
|
#define REVISION_NR "10004"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue