mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-15 04:32:35 -04:00
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:
@@ -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()
|
||||
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)
|
||||
void EnterCombat(Unit* who) OVERRIDE
|
||||
{
|
||||
//Say some stuff
|
||||
Talk(SAY_AGGRO, who->GetGUID());
|
||||
@@ -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)
|
||||
//void AttackStart(Unit* who) OVERRIDE
|
||||
//{
|
||||
// ScriptedAI::AttackStart(who);
|
||||
//}
|
||||
|
||||
// *** HANDLED FUNCTION ***
|
||||
// Called when going out of combat. Reset is called just after.
|
||||
void EnterEvadeMode()
|
||||
void EnterEvadeMode() OVERRIDE
|
||||
{
|
||||
Talk(SAY_EVADE);
|
||||
}
|
||||
|
||||
// *** HANDLED FUNCTION ***
|
||||
//Our Receive emote function
|
||||
void ReceiveEmote(Player* /*player*/, uint32 uiTextEmote)
|
||||
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)
|
||||
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
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new example_creatureAI(creature);
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
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)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
|
||||
Reference in New Issue
Block a user