fix(Scripts/BlackwingLair): Nefarian (#10536)

This commit is contained in:
Nefertumm
2022-03-09 13:32:09 -03:00
committed by GitHub
parent 59b5568d4f
commit 707968ee95
6 changed files with 842 additions and 222 deletions

View File

@@ -6377,6 +6377,14 @@ SpellCastResult Spell::CheckCast(bool strict)
}
break;
}
case SPELL_AURA_MOD_SHAPESHIFT:
{
if (m_caster && m_caster->HasAura(23397)) // Nefarian Class Call (Warrior): Berserk -- Nefertum: I don't really like this but I didn't find another way.
{
return SPELL_FAILED_NOT_SHAPESHIFT;
}
break;
}
default:
break;
}

View File

@@ -1590,6 +1590,19 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/)
addhealth = unitTarget->SpellHealingBonusTaken(caster, m_spellInfo, addhealth, HEAL);
}
// Implemented this way as there is no other way to do it currently (that I know :P)...
if (caster->ToPlayer() && caster->ToPlayer()->HasAura(23401)) // Nefarian Corrupted Healing (priest)
{
if (m_spellInfo->Effects[EFFECT_0].ApplyAuraName != SPELL_AURA_PERIODIC_HEAL ||
m_spellInfo->Effects[EFFECT_1].ApplyAuraName != SPELL_AURA_PERIODIC_HEAL ||
m_spellInfo->Effects[EFFECT_2].ApplyAuraName != SPELL_AURA_PERIODIC_HEAL)
{
m_damage = 0;
caster->CastSpell(unitTarget, 23402, false); // Nefarian Corrupted Healing Periodic Damage effect.
return;
}
}
m_damage -= addhealth;
}
}

View File

@@ -4154,6 +4154,20 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_1].SpellClassMask[1] = 0x00020000;
});
// Nefarian: Shadowbolt, Shadow Command
ApplySpellFix({ 22667, 22677 }, [](SpellInfo* spellInfo)
{
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(152); // 150 yards
});
// Shadowbolt Volley
ApplySpellFix({ 22665 }, [](SpellInfo* spellInfo)
{
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(152); // 150 yards
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(41); // 150 yards
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});
// Manastorm
ApplySpellFix({ 21097 }, [](SpellInfo* spellInfo)
{
@@ -4180,6 +4194,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AuraInterruptFlags |= AURA_INTERRUPT_FLAG_CHANGE_MAP;
});
// Improved Blessing Protection (Nefarian Class Call)
ApplySpellFix({ 23415 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_DEST_TARGET_ENEMY);
});
// Bestial Wrath
ApplySpellFix({ 19574 }, [](SpellInfo* spellInfo)
{

View File

@@ -99,4 +99,6 @@ inline AI* GetBlackwingLairAI(T* obj)
return GetInstanceAI<AI>(obj, BWLScriptName);
}
#define RegisterBlackwingLairCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetBlackwingLairAI)
#endif