Scripts/ZG: fixed up the Chain Breaking mechanic in Jindo's encounter

This commit is contained in:
Ovahlord committed 2022-11-19 11:39:47 +01:00
1 parent eeecf8780e
commit cbf43d855b
2 files changed
+12 -2

No files matched your search

+6
View File
@@ -5958,6 +5958,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx8 |= SPELL_ATTR8_PERIODIC_CAN_CRIT;
});
// Body Slam
ApplySpellFix({ 97252 }, [](SpellInfo* spellInfo)
{
spellInfo->Attributes |= SPELL_ATTR0_NO_IMMUNITIES;
});
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
SpellInfo* spellInfo = mSpellInfoMap[i];
@@ -655,11 +655,15 @@ struct spell_jindo_body_slam : public SpellScript
{
void HandleShieldBreakEffect(SpellEffIndex /*effIndex*/)
{
Unit* target = GetHitCreature();
Unit* target = GetHitUnit();
if (!target)
return;
if (target->GetEntry() == NPC_HAKKARS_CHAINS && target->HasAura(SPELL_BRITTLE_BARRIER))
// Sniffs confirm that the spell is going to negate the damage against immune targets rather than not hitting at all
if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE))
SetHitDamage(0);
if (target->IsCreature() && target->GetEntry() == NPC_HAKKARS_CHAINS && target->HasAura(SPELL_BRITTLE_BARRIER))
{
target->RemoveAurasDueToSpell(SPELL_BRITTLE_BARRIER);
target->CastSpell(target, SPELL_ARCANE_EXPLOSION_VISUAL);