Core/Scripts: remove hack that caused aura to not be applied and saved twice on owned auras, causing an error on save

- This is handled by group stack rules actually
- Also reset removed aura counter when cleaning removed auras
This commit is contained in:
Ovahlord
2022-07-05 21:57:27 +02:00
parent 6640641cce
commit 3e89f6c8e3
2 changed files with 1 additions and 43 deletions

View File

@@ -0,0 +1 @@
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_pal_improved_concentraction_aura_effect', 'spell_pal_improved_devotion_aura_effect', 'spell_pal_sanctified_retribution_effect');

View File

@@ -601,46 +601,6 @@ class spell_pal_holy_shock : public SpellScript
}
};
// 63510 - Improved Concentraction Aura (Area Aura)
// 63514 - Improved Devotion Aura (Area Aura)
// 63531 - Sanctified Retribution (Area Aura)
class spell_pal_improved_aura_effect : public SpellScriptLoader
{
public:
spell_pal_improved_aura_effect(char const* name) : SpellScriptLoader(name) { }
class spell_pal_improved_aura_effect_AuraScript : public AuraScript
{
bool CheckAreaTarget(Unit* target)
{
Unit::AuraApplicationMap& appliedAuras = target->GetAppliedAuras();
for (Unit::AuraApplicationMap::iterator itr = appliedAuras.begin(); itr != appliedAuras.end(); ++itr)
{
Aura const* aura = itr->second->GetBase();
if (aura->GetSpellInfo()->GetSpellSpecific() == SPELL_SPECIFIC_AURA && aura->GetCasterGUID() == GetCasterGUID())
{
// Not allow for Retribution Aura (prevent stacking) - Retribution Aura Overflow and Retribution Aura has same spell effects
if (GetSpellInfo()->Id == SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA && aura->GetSpellInfo()->SpellIconID == PALADIN_ICON_ID_RETRIBUTION_AURA)
return false;
return true;
}
}
return false;
}
void Register() override
{
DoCheckAreaTarget.Register(&spell_pal_improved_aura_effect_AuraScript::CheckAreaTarget);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_pal_improved_aura_effect_AuraScript();
}
};
// 37705 - Healing Discount
class spell_pal_item_healing_discount : public AuraScript
{
@@ -1895,9 +1855,6 @@ void AddSC_paladin_spell_scripts()
RegisterSpellScript(spell_pal_hand_of_sacrifice);
RegisterSpellScript(spell_pal_holy_shock);
RegisterSpellScript(spell_pal_illuminated_healing);
new spell_pal_improved_aura_effect("spell_pal_improved_concentraction_aura_effect");
new spell_pal_improved_aura_effect("spell_pal_improved_devotion_aura_effect");
new spell_pal_improved_aura_effect("spell_pal_sanctified_retribution_effect");
RegisterSpellScript(spell_pal_inquisition);
RegisterSpellScript(spell_pal_item_healing_discount);
RegisterSpellScript(spell_pal_judgement);