Misc: Use override and final C++11 keywords in a few places (mostly scripts)

OVERRIDE and FINAL are TC macros (expand to nothing if compiler does not  support C++11)
This commit is contained in:
Nay committed 2013-07-06 20:21:45 +01:00
1 parent 0c911af24c
commit 3561ab98ba
577 files changed
+8945 -8757

No files matched your search

+39 -39
View File
@@ -62,7 +62,7 @@ class spell_pri_divine_aegis : public SpellScriptLoader
{
PrepareAuraScript(spell_pri_divine_aegis_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_DIVINE_AEGIS))
return false;
@@ -89,14 +89,14 @@ class spell_pri_divine_aegis : public SpellScriptLoader
GetTarget()->CastCustomSpell(SPELL_PRIEST_DIVINE_AEGIS, SPELLVALUE_BASE_POINT0, absorb, eventInfo.GetProcTarget(), true, NULL, aurEff);
}
void Register()
void Register() OVERRIDE
{
DoCheckProc += AuraCheckProcFn(spell_pri_divine_aegis_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_pri_divine_aegis_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pri_divine_aegis_AuraScript();
}
@@ -112,7 +112,7 @@ class spell_pri_glyph_of_prayer_of_healing : public SpellScriptLoader
{
PrepareAuraScript(spell_pri_glyph_of_prayer_of_healing_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL))
return false;
@@ -128,13 +128,13 @@ class spell_pri_glyph_of_prayer_of_healing : public SpellScriptLoader
GetTarget()->CastCustomSpell(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL, SPELLVALUE_BASE_POINT0, heal, eventInfo.GetProcTarget(), true, NULL, aurEff);
}
void Register()
void Register() OVERRIDE
{
OnEffectProc += AuraEffectProcFn(spell_pri_glyph_of_prayer_of_healing_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pri_glyph_of_prayer_of_healing_AuraScript();
}
@@ -152,14 +152,14 @@ class spell_pri_guardian_spirit : public SpellScriptLoader
uint32 healPct;
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL))
return false;
return true;
}
bool Load()
bool Load() OVERRIDE
{
healPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
return true;
@@ -184,14 +184,14 @@ class spell_pri_guardian_spirit : public SpellScriptLoader
absorbAmount = dmgInfo.GetDamage();
}
void Register()
void Register() OVERRIDE
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_pri_guardian_spirit_AuraScript::CalculateAmount, EFFECT_1, SPELL_AURA_SCHOOL_ABSORB);
OnEffectAbsorb += AuraEffectAbsorbFn(spell_pri_guardian_spirit_AuraScript::Absorb, EFFECT_1);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pri_guardian_spirit_AuraScript();
}
@@ -217,13 +217,13 @@ class spell_pri_lightwell_renew : public SpellScriptLoader
}
}
void Register()
void Register() OVERRIDE
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_pri_lightwell_renew_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_PERIODIC_HEAL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pri_lightwell_renew_AuraScript();
}
@@ -245,13 +245,13 @@ class spell_pri_mana_burn : public SpellScriptLoader
unitTarget->RemoveAurasWithMechanic((1 << MECHANIC_FEAR) | (1 << MECHANIC_POLYMORPH));
}
void Register()
void Register() OVERRIDE
{
AfterHit += SpellHitFn(spell_pri_mana_burn_SpellScript::HandleAfterHit);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_pri_mana_burn_SpellScript;
}
@@ -267,14 +267,14 @@ class spell_pri_mana_leech : public SpellScriptLoader
{
PrepareAuraScript(spell_pri_mana_leech_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_MANA_LEECH_PROC))
return false;
return true;
}
bool Load()
bool Load() OVERRIDE
{
_procTarget = NULL;
return true;
@@ -292,7 +292,7 @@ class spell_pri_mana_leech : public SpellScriptLoader
GetTarget()->CastSpell(_procTarget, SPELL_PRIEST_MANA_LEECH_PROC, true, NULL, aurEff);
}
void Register()
void Register() OVERRIDE
{
DoCheckProc += AuraCheckProcFn(spell_pri_mana_leech_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_pri_mana_leech_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
@@ -302,7 +302,7 @@ class spell_pri_mana_leech : public SpellScriptLoader
Unit* _procTarget;
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pri_mana_leech_AuraScript();
}
@@ -323,13 +323,13 @@ class spell_pri_mind_sear : public SpellScriptLoader
unitList.remove_if(Trinity::ObjectGUIDCheck(GetCaster()->GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT)));
}
void Register()
void Register() OVERRIDE
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pri_mind_sear_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_pri_mind_sear_SpellScript();
}
@@ -353,13 +353,13 @@ class spell_pri_pain_and_suffering_proc : public SpellScriptLoader
aur->GetBase()->RefreshDuration();
}
void Register()
void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_pri_pain_and_suffering_proc_SpellScript::HandleEffectScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_pri_pain_and_suffering_proc_SpellScript;
}
@@ -375,12 +375,12 @@ class spell_pri_penance : public SpellScriptLoader
{
PrepareSpellScript(spell_pri_penance_SpellScript);
bool Load()
bool Load() OVERRIDE
{
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
bool Validate(SpellInfo const* spellInfo)
bool Validate(SpellInfo const* spellInfo) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_PENANCE_R1))
return false;
@@ -423,14 +423,14 @@ class spell_pri_penance : public SpellScriptLoader
return SPELL_CAST_OK;
}
void Register()
void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_pri_penance_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnCheckCast += SpellCheckCastFn(spell_pri_penance_SpellScript::CheckCast);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_pri_penance_SpellScript;
}
@@ -446,7 +446,7 @@ class spell_pri_power_word_shield : public SpellScriptLoader
{
PrepareAuraScript(spell_pri_power_word_shield_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED))
return false;
@@ -499,14 +499,14 @@ class spell_pri_power_word_shield : public SpellScriptLoader
}
}
void Register()
void Register() OVERRIDE
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_pri_power_word_shield_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
AfterEffectAbsorb += AuraEffectAbsorbFn(spell_pri_power_word_shield_AuraScript::ReflectDamage, EFFECT_0);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pri_power_word_shield_AuraScript();
}
@@ -535,13 +535,13 @@ class spell_pri_prayer_of_mending_heal : public SpellScriptLoader
}
}
void Register()
void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_pri_prayer_of_mending_heal_SpellScript::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_pri_prayer_of_mending_heal_SpellScript();
}
@@ -557,7 +557,7 @@ class spell_pri_renew : public SpellScriptLoader
{
PrepareAuraScript(spell_pri_renew_AuraScript);
bool Load()
bool Load() OVERRIDE
{
return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
@@ -578,13 +578,13 @@ class spell_pri_renew : public SpellScriptLoader
}
}
void Register()
void Register() OVERRIDE
{
OnEffectApply += AuraEffectApplyFn(spell_pri_renew_AuraScript::HandleApplyEffect, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pri_renew_AuraScript();
}
@@ -611,13 +611,13 @@ class spell_pri_shadow_word_death : public SpellScriptLoader
GetCaster()->CastCustomSpell(GetCaster(), SPELL_PRIEST_SHADOW_WORD_DEATH, &damage, 0, 0, true);
}
void Register()
void Register() OVERRIDE
{
OnHit += SpellHitFn(spell_pri_shadow_word_death_SpellScript::HandleDamage);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_pri_shadow_word_death_SpellScript();
}
@@ -633,7 +633,7 @@ class spell_pri_vampiric_touch : public SpellScriptLoader
{
PrepareAuraScript(spell_pri_vampiric_touch_AuraScript);
bool Validate(SpellInfo const* /*spell*/)
bool Validate(SpellInfo const* /*spell*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL))
return false;
@@ -652,13 +652,13 @@ class spell_pri_vampiric_touch : public SpellScriptLoader
}
}
void Register()
void Register() OVERRIDE
{
AfterDispel += AuraDispelFn(spell_pri_vampiric_touch_AuraScript::HandleDispel);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pri_vampiric_touch_AuraScript();
}