aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Examples
diff options
context:
space:
mode:
authorDehravor <dehravor@gmail.com>2014-04-29 16:35:11 +0200
committerDehravor <dehravor@gmail.com>2014-04-29 16:35:11 +0200
commit24ae6a6802da5fc3f90b075d21cd4275e7138441 (patch)
tree3501d986aaf1ec9df27a873a16bf5b3e5dac2225 /src/server/scripts/Examples
parent414554aefa8af569a96c952dcf36707c9c77c7cb (diff)
Core/Misc: Remove obsolete C++11 backward compatibility macros
OVERRIDE, FINAL, DELETE_MEMBER
Diffstat (limited to 'src/server/scripts/Examples')
-rw-r--r--src/server/scripts/Examples/example_commandscript.cpp2
-rw-r--r--src/server/scripts/Examples/example_creature.cpp18
-rw-r--r--src/server/scripts/Examples/example_escort.cpp18
-rw-r--r--src/server/scripts/Examples/example_gossip_codebox.cpp6
-rw-r--r--src/server/scripts/Examples/example_misc.cpp6
-rw-r--r--src/server/scripts/Examples/example_spell.cpp38
6 files changed, 44 insertions, 44 deletions
diff --git a/src/server/scripts/Examples/example_commandscript.cpp b/src/server/scripts/Examples/example_commandscript.cpp
index eb87a58be77..8b7003c6666 100644
--- a/src/server/scripts/Examples/example_commandscript.cpp
+++ b/src/server/scripts/Examples/example_commandscript.cpp
@@ -43,7 +43,7 @@ class example_commandscript : public CommandScript
return true;
}
- ChatCommand* GetCommands() const OVERRIDE
+ ChatCommand* GetCommands() const override
{
static ChatCommand HelloWorldCommandTable[] =
{
diff --git a/src/server/scripts/Examples/example_creature.cpp b/src/server/scripts/Examples/example_creature.cpp
index 1ef0290af53..d573241137f 100644
--- a/src/server/scripts/Examples/example_creature.cpp
+++ b/src/server/scripts/Examples/example_creature.cpp
@@ -111,7 +111,7 @@ class example_creature : public CreatureScript
// *** HANDLED FUNCTION ***
//This is called after spawn and whenever the core decides we need to evade
- void Reset() OVERRIDE
+ void Reset() override
{
m_uiPhase = 1; // Start in phase 1
m_uiPhaseTimer = 60000; // 60 seconds
@@ -125,7 +125,7 @@ class example_creature : public CreatureScript
// *** HANDLED FUNCTION ***
// Enter Combat called once per combat
- void EnterCombat(Unit* who) OVERRIDE
+ void EnterCombat(Unit* who) override
{
//Say some stuff
Talk(SAY_AGGRO, who);
@@ -134,21 +134,21 @@ class example_creature : public CreatureScript
// *** HANDLED FUNCTION ***
// Attack Start is called when victim change (including at start of combat)
// By default, attack who and start movement toward the victim.
- //void AttackStart(Unit* who) OVERRIDE
+ //void AttackStart(Unit* who) override
//{
// ScriptedAI::AttackStart(who);
//}
// *** HANDLED FUNCTION ***
// Called when going out of combat. Reset is called just after.
- void EnterEvadeMode() OVERRIDE
+ void EnterEvadeMode() override
{
Talk(SAY_EVADE);
}
// *** HANDLED FUNCTION ***
//Our Receive emote function
- void ReceiveEmote(Player* /*player*/, uint32 uiTextEmote) OVERRIDE
+ void ReceiveEmote(Player* /*player*/, uint32 uiTextEmote) override
{
me->HandleEmoteCommand(uiTextEmote);
@@ -165,7 +165,7 @@ class example_creature : public CreatureScript
// *** HANDLED FUNCTION ***
//Update AI is called Every single map update (roughly once every 50ms if a player is within the grid)
- void UpdateAI(uint32 uiDiff) OVERRIDE
+ void UpdateAI(uint32 uiDiff) override
{
//Out of combat timers
if (!me->GetVictim())
@@ -262,12 +262,12 @@ class example_creature : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ CreatureAI* GetAI(Creature* creature) const override
{
return new example_creatureAI(creature);
}
- bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
+ bool OnGossipHello(Player* player, Creature* creature) override
{
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(907, creature->GetGUID());
@@ -275,7 +275,7 @@ class example_creature : public CreatureScript
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+1)
diff --git a/src/server/scripts/Examples/example_escort.cpp b/src/server/scripts/Examples/example_escort.cpp
index 57fe27ad041..88188a45296 100644
--- a/src/server/scripts/Examples/example_escort.cpp
+++ b/src/server/scripts/Examples/example_escort.cpp
@@ -79,13 +79,13 @@ class example_escort : public CreatureScript
uint32 m_uiDeathCoilTimer;
uint32 m_uiChatTimer;
- void JustSummoned(Creature* summoned) OVERRIDE
+ void JustSummoned(Creature* summoned) override
{
summoned->AI()->AttackStart(me);
}
// Pure Virtual Functions (Have to be implemented)
- void WaypointReached(uint32 waypointId) OVERRIDE
+ void WaypointReached(uint32 waypointId) override
{
switch (waypointId)
{
@@ -108,7 +108,7 @@ class example_escort : public CreatureScript
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE
+ void EnterCombat(Unit* /*who*/) override
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
@@ -119,13 +119,13 @@ class example_escort : public CreatureScript
Talk(SAY_AGGRO2);
}
- void Reset() OVERRIDE
+ void Reset() override
{
m_uiDeathCoilTimer = 4000;
m_uiChatTimer = 4000;
}
- void JustDied(Unit* killer) OVERRIDE
+ void JustDied(Unit* killer) override
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
@@ -142,7 +142,7 @@ class example_escort : public CreatureScript
Talk(SAY_DEATH_3);
}
- void UpdateAI(uint32 uiDiff) OVERRIDE
+ void UpdateAI(uint32 uiDiff) override
{
//Must update npc_escortAI
npc_escortAI::UpdateAI(uiDiff);
@@ -186,12 +186,12 @@ class example_escort : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ CreatureAI* GetAI(Creature* creature) const override
{
return new example_escortAI(creature);
}
- bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
+ bool OnGossipHello(Player* player, Creature* creature) override
{
player->TalkedToCreature(creature->GetEntry(), creature->GetGUID());
player->PrepareGossipMenu(creature, 0);
@@ -205,7 +205,7 @@ class example_escort : public CreatureScript
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
{
player->PlayerTalkClass->ClearMenus();
npc_escortAI* pEscortAI = CAST_AI(example_escort::example_escortAI, creature->AI());
diff --git a/src/server/scripts/Examples/example_gossip_codebox.cpp b/src/server/scripts/Examples/example_gossip_codebox.cpp
index 4ab39f429b1..801159ff6ae 100644
--- a/src/server/scripts/Examples/example_gossip_codebox.cpp
+++ b/src/server/scripts/Examples/example_gossip_codebox.cpp
@@ -55,7 +55,7 @@ class example_gossip_codebox : public CreatureScript
{
}
- bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
+ bool OnGossipHello(Player* player, Creature* creature) override
{
player->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1, "", 0, true);
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
@@ -65,7 +65,7 @@ class example_gossip_codebox : public CreatureScript
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+2)
@@ -78,7 +78,7 @@ class example_gossip_codebox : public CreatureScript
return true;
}
- bool OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, char const* code) OVERRIDE
+ bool OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, char const* code) override
{
player->PlayerTalkClass->ClearMenus();
if (sender == GOSSIP_SENDER_MAIN)
diff --git a/src/server/scripts/Examples/example_misc.cpp b/src/server/scripts/Examples/example_misc.cpp
index 938a5f9e623..1cf0d1375be 100644
--- a/src/server/scripts/Examples/example_misc.cpp
+++ b/src/server/scripts/Examples/example_misc.cpp
@@ -35,7 +35,7 @@ class AT_example_areatrigger : public AreaTriggerScript
{
}
- bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) OVERRIDE
+ bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) override
{
player->Kill(player);
return true;
@@ -51,7 +51,7 @@ class ItemUse_example_item : public ItemScript
{
}
- bool OnUse(Player* /*player*/, Item* /*item*/, SpellCastTargets const& /*targets*/) OVERRIDE
+ bool OnUse(Player* /*player*/, Item* /*item*/, SpellCastTargets const& /*targets*/) override
{
sScriptMgr->LoadDatabase();
return true;
@@ -67,7 +67,7 @@ class GOHello_example_go_teleporter : public GameObjectScript
{
}
- bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE
+ bool OnGossipHello(Player* player, GameObject* /*go*/) override
{
player->TeleportTo(0, 1807.07f, 336.105f, 70.3975f, 0.0f);
return false;
diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp
index 9bf91d08ac0..9097f7cd650 100644
--- a/src/server/scripts/Examples/example_spell.cpp
+++ b/src/server/scripts/Examples/example_spell.cpp
@@ -50,7 +50,7 @@ class spell_ex_5581 : public SpellScriptLoader
// function called on server startup
// checks if script has data required for it to work
- bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) override
{
// check if spellid 70522 exists in dbc, we will trigger it later
if (!sSpellMgr->GetSpellInfo(SPELL_TRIGGERED))
@@ -60,7 +60,7 @@ class spell_ex_5581 : public SpellScriptLoader
// function called just after script is added to spell
// we initialize local variables if needed
- bool Load() OVERRIDE
+ bool Load() override
{
localVariable = "we're using local variable";
localVariable2 = new char();
@@ -73,7 +73,7 @@ class spell_ex_5581 : public SpellScriptLoader
// function called just before script delete
// we free allocated memory
- void Unload() OVERRIDE
+ void Unload() override
{
delete localVariable2;
}
@@ -159,7 +159,7 @@ class spell_ex_5581 : public SpellScriptLoader
}
// register functions used in spell script - names of these functions do not matter
- void Register() OVERRIDE
+ void Register() override
{
// we're registering our functions here
BeforeCast += SpellCastFn(spell_ex_5581SpellScript::HandleBeforeCast);
@@ -192,7 +192,7 @@ class spell_ex_5581 : public SpellScriptLoader
};
// function which creates SpellScript
- SpellScript* GetSpellScript() const OVERRIDE
+ SpellScript* GetSpellScript() const override
{
return new spell_ex_5581SpellScript();
}
@@ -208,7 +208,7 @@ class spell_ex_66244 : public SpellScriptLoader
PrepareAuraScript(spell_ex_66244AuraScript);
// function called on server startup
// checks if script has data required for it to work
- bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) override
{
// check if spellid exists in dbc, we will trigger it later
if (!sSpellMgr->GetSpellInfo(SPELL_TRIGGERED))
@@ -218,7 +218,7 @@ class spell_ex_66244 : public SpellScriptLoader
// function called in aura constructor
// we initialize local variables if needed
- bool Load() OVERRIDE
+ bool Load() override
{
// do not load script if aura is cast by player or caster not avalible
if (Unit* caster = GetCaster())
@@ -316,7 +316,7 @@ class spell_ex_66244 : public SpellScriptLoader
}
// function registering
- void Register() OVERRIDE
+ void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_ex_66244AuraScript::HandleOnEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_ex_66244AuraScript::HandleOnEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
@@ -347,7 +347,7 @@ class spell_ex_66244 : public SpellScriptLoader
};
// function which creates AuraScript
- AuraScript* GetAuraScript() const OVERRIDE
+ AuraScript* GetAuraScript() const override
{
return new spell_ex_66244AuraScript();
}
@@ -379,7 +379,7 @@ class spell_ex_absorb_aura : public SpellScriptLoader
}
// function registering
- void Register() OVERRIDE
+ void Register() override
{
OnEffectAbsorb += AuraEffectAbsorbFn(spell_ex_absorb_auraAuraScript::HandleOnEffectAbsorb, EFFECT_0);
AfterEffectAbsorb += AuraEffectAbsorbFn(spell_ex_absorb_auraAuraScript::HandleAfterEffectAbsorb, EFFECT_0);
@@ -387,7 +387,7 @@ class spell_ex_absorb_aura : public SpellScriptLoader
};
// function which creates AuraScript
- AuraScript* GetAuraScript() const OVERRIDE
+ AuraScript* GetAuraScript() const override
{
return new spell_ex_absorb_auraAuraScript();
}
@@ -408,14 +408,14 @@ class spell_ex_463 : public SpellScriptLoader
// in our script we allow only players to be affected
return target->GetTypeId() == TYPEID_PLAYER;
}
- void Register() OVERRIDE
+ void Register() override
{
DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_ex_463AuraScript::CheckAreaTarget);
}
};
// function which creates AuraScript
- AuraScript* GetAuraScript() const OVERRIDE
+ AuraScript* GetAuraScript() const override
{
return new spell_ex_463AuraScript();
}
@@ -440,18 +440,18 @@ class spell_ex : public SpellScriptLoader
{
PrepareSpellScript(spell_ex_SpellScript);
- //bool Validate(SpellInfo const* spellEntry){return true;} OVERRIDE
+ //bool Validate(SpellInfo const* spellEntry){return true;} override
//bool Load(){return true;}
//void Unload(){ }
//void Function(SpellEffIndex effIndex) //OnEffect += SpellEffectFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_EFFECT_ANY);
//void Function() //OnHit += SpellEffectFn(spell_ex_SpellScript::Function);
- void Register() OVERRIDE
+ void Register() override
{
}
};
- SpellScript* GetSpellScript() const OVERRIDE
+ SpellScript* GetSpellScript() const override
{
return new spell_ex_SpellScript();
}
@@ -467,7 +467,7 @@ class spell_ex : public SpellScriptLoader
class spell_ex_AuraScript : public AuraScript
{
PrepareAuraScript(spell_ex)
- //bool Validate(SpellInfo const* spellEntry){return true;} OVERRIDE
+ //bool Validate(SpellInfo const* spellEntry){return true;} override
//bool Load(){return true;}
//void Unload(){ }
@@ -478,12 +478,12 @@ class spell_ex : public SpellScriptLoader
//void spell_ex_SpellScript::Function(AuraEffect const* aurEff, int32& amount, bool& canBeRecalculated) //DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_AURA_ANY);
//void spell_ex_SpellScript::Function(AuraEffect const* aurEff, bool& isPeriodic, int32& amplitude) //OnEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_AURA_ANY);
//void spell_ex_SpellScript::Function(AuraEffect const* aurEff, SpellModifier*& spellMod) //OnEffectCalcSpellMod += AuraEffectCalcSpellModFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_AURA_ANY);
- void Register() OVERRIDE
+ void Register() override
{
}
};
- AuraScript* GetAuraScript() const OVERRIDE
+ AuraScript* GetAuraScript() const override
{
return new spell_ex_AuraScript();
}