fix(Scripts/MoltenCore): Fixed some Geddon encounter issues (#8941)
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1635964941654899600');
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id`=20478 AND `ScriptName`='spell_geddon_armageddon';
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||||
|
(20478, 'spell_geddon_armageddon');
|
||||||
+66
-6
@@ -73,13 +73,13 @@ public:
|
|||||||
// If boss is below 2% hp - cast Armageddon
|
// If boss is below 2% hp - cast Armageddon
|
||||||
if (!armageddonCasted && damage < me->GetHealth() && me->HealthBelowPctDamaged(2, damage))
|
if (!armageddonCasted && damage < me->GetHealth() && me->HealthBelowPctDamaged(2, damage))
|
||||||
{
|
{
|
||||||
me->InterruptNonMeleeSpells(true);
|
me->RemoveAurasDueToSpell(SPELL_INFERNO);
|
||||||
if (me->CastSpell(me, SPELL_ARMAGEDDON) == SPELL_CAST_OK)
|
me->StopMoving();
|
||||||
|
if (me->CastSpell(me, SPELL_ARMAGEDDON, TRIGGERED_FULL_MASK) == SPELL_CAST_OK)
|
||||||
{
|
{
|
||||||
Talk(EMOTE_SERVICE);
|
Talk(EMOTE_SERVICE);
|
||||||
|
armageddonCasted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
armageddonCasted = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ public:
|
|||||||
{
|
{
|
||||||
case EVENT_INFERNO:
|
case EVENT_INFERNO:
|
||||||
{
|
{
|
||||||
DoCastSelf(SPELL_INFERNO);
|
DoCastAOE(SPELL_INFERNO);
|
||||||
events.RepeatEvent(urand(21000, 26000));
|
events.RepeatEvent(urand(21000, 26000));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -141,6 +141,23 @@ public:
|
|||||||
return ValidateSpellInfo({ SPELL_INFERNO_DUMMY_EFFECT });
|
return ValidateSpellInfo({ SPELL_INFERNO_DUMMY_EFFECT });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HandleAfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
|
{
|
||||||
|
if (Creature* pCreatureTarget = GetTarget()->ToCreature())
|
||||||
|
{
|
||||||
|
pCreatureTarget->SetReactState(REACT_PASSIVE);
|
||||||
|
pCreatureTarget->AttackStop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleAfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
|
{
|
||||||
|
if (Creature* pCreatureTarget = GetTarget()->ToCreature())
|
||||||
|
{
|
||||||
|
pCreatureTarget->SetReactState(REACT_AGGRESSIVE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void PeriodicTick(AuraEffect const* aurEff)
|
void PeriodicTick(AuraEffect const* aurEff)
|
||||||
{
|
{
|
||||||
PreventDefaultAction();
|
PreventDefaultAction();
|
||||||
@@ -168,12 +185,14 @@ public:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
caster->CastCustomSpell(SPELL_INFERNO_DUMMY_EFFECT, SPELLVALUE_BASE_POINT0, 500 * multiplier, caster, TRIGGERED_NONE, nullptr, aurEff);
|
caster->CastCustomSpell(SPELL_INFERNO_DUMMY_EFFECT, SPELLVALUE_BASE_POINT0, 500 * multiplier, (Unit*)nullptr, TRIGGERED_NONE, nullptr, aurEff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
|
AfterEffectApply += AuraEffectApplyFn(spell_geddon_inferno_AuraScript::HandleAfterApply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
|
||||||
|
AfterEffectRemove += AuraEffectRemoveFn(spell_geddon_inferno_AuraScript::HandleAfterRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
|
||||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_geddon_inferno_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
OnEffectPeriodic += AuraEffectPeriodicFn(spell_geddon_inferno_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -184,10 +203,51 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 20478 Armageddon
|
||||||
|
class spell_geddon_armageddon : public SpellScriptLoader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
spell_geddon_armageddon() : SpellScriptLoader("spell_geddon_armageddon") { }
|
||||||
|
|
||||||
|
class spell_geddon_armageddon_AuraScript : public AuraScript
|
||||||
|
{
|
||||||
|
PrepareAuraScript(spell_geddon_armageddon_AuraScript);
|
||||||
|
|
||||||
|
void HandleAfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
|
{
|
||||||
|
if (Creature* pCreatureTarget = GetTarget()->ToCreature())
|
||||||
|
{
|
||||||
|
pCreatureTarget->SetReactState(REACT_PASSIVE);
|
||||||
|
pCreatureTarget->AttackStop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleAfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
|
{
|
||||||
|
if (Creature* pCreatureTarget = GetTarget()->ToCreature())
|
||||||
|
{
|
||||||
|
pCreatureTarget->SetReactState(REACT_AGGRESSIVE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
AfterEffectApply += AuraEffectApplyFn(spell_geddon_armageddon_AuraScript::HandleAfterApply, EFFECT_1, SPELL_AURA_MOD_PACIFY, AURA_EFFECT_HANDLE_REAL);
|
||||||
|
AfterEffectRemove += AuraEffectRemoveFn(spell_geddon_armageddon_AuraScript::HandleAfterRemove, EFFECT_1, SPELL_AURA_MOD_PACIFY, AURA_EFFECT_HANDLE_REAL);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
AuraScript* GetAuraScript() const override
|
||||||
|
{
|
||||||
|
return new spell_geddon_armageddon_AuraScript();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_boss_baron_geddon()
|
void AddSC_boss_baron_geddon()
|
||||||
{
|
{
|
||||||
new boss_baron_geddon();
|
new boss_baron_geddon();
|
||||||
|
|
||||||
// Spells
|
// Spells
|
||||||
new spell_geddon_inferno();
|
new spell_geddon_inferno();
|
||||||
|
new spell_geddon_armageddon();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user