mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/ScriptSystem:
Add basic code for runtime checks of function calls in AuraScripts Make AuraScript::PreventDefaultAction() do not take parameters and add description for the function Remove PreventDefaultEffect() from aura script, use PreventDefaultAction() instead Unload aura scripts memory on aura delete --HG-- branch : trunk
This commit is contained in:
@@ -961,11 +961,12 @@ class spell_deathbringer_blood_link_aura : public SpellScriptLoader
|
||||
if (GetUnitOwner()->getPowerType() == POWER_ENERGY && GetUnitOwner()->GetPower(POWER_ENERGY) == GetUnitOwner()->GetMaxPower(POWER_ENERGY))
|
||||
if (Creature* saurfang = GetUnitOwner()->ToCreature())
|
||||
saurfang->AI()->DoAction(ACTION_MARK_OF_THE_FALLEN_CHAMPION);
|
||||
|
||||
PreventDefaultAction();
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
PreventDefaultEffect(EFFECT_1);
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_deathbringer_blood_link_AuraScript::HandlePeriodicTick, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
|
||||
|
||||
@@ -754,11 +754,11 @@ class spell_deathwhisper_mana_barrier : public SpellScriptLoader
|
||||
int32 missingHealth = caster->GetMaxHealth() - caster->GetHealth();
|
||||
caster->ModifyHealth(missingHealth);
|
||||
caster->ModifyPower(POWER_MANA, -missingHealth);
|
||||
PreventDefaultAction();
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
PreventDefaultEffect(EFFECT_0);
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_deathwhisper_mana_barrier_AuraScript::HandlePeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user