Refactor(Core/Gossip): Replacing old macros with new (#1338)

* Correct support new macro
This commit is contained in:
Kargatum 2019-03-25 21:10:57 +07:00 committed by GitHub
parent 4abe082190
commit b6cb9247ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
99 changed files with 2840 additions and 2775 deletions

View file

@ -80,7 +80,7 @@ enum DisguiseEvent
ACTION_SHIRTS = 2,
ACTION_PANTS = 3,
ACTION_UNMENTIONABLES = 4,
EVENT_INTRO_DH1 = 1,
EVENT_INTRO_DH2 = 2,
EVENT_INTRO_DH3 = 3,
@ -133,13 +133,13 @@ public:
{
npc_shandy_dalaranAI(Creature* creature) : ScriptedAI(creature) { }
void Reset()
void Reset() override
{
_events.Reset();
_aquanosGUID = 0;
}
void SetData(uint32 type, uint32 /*data*/)
}
void SetData(uint32 type, uint32 /*data*/) override
{
switch(type)
{
@ -177,8 +177,8 @@ public:
Talk(SAY_SHANDY_WATER + _lSource - 1);
_canWash = true;
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
_events.Update(diff);
switch (_events.GetEvent())
@ -193,7 +193,7 @@ public:
_events.ScheduleEvent(EVENT_INTRO_DH3, 6000);
else
RollTask();
_events.PopEvent();
break;
case EVENT_INTRO_DH3:
@ -202,7 +202,7 @@ public:
_events.PopEvent();
break;
case EVENT_INTRO_DH4:
Talk(SAY_SHANDY5);
Talk(SAY_SHANDY5);
_events.ScheduleEvent(EVENT_INTRO_DH5, 3000);
_events.PopEvent();
break;
@ -234,30 +234,30 @@ public:
bool _canWash;
};
bool OnGossipHello(Player* player, Creature* creature)
bool OnGossipHello(Player* player, Creature* creature) override
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
if (player->GetQuestStatus(QUEST_SUITABLE_DISGUISE_A) == QUEST_STATUS_INCOMPLETE ||
if (player->GetQuestStatus(QUEST_SUITABLE_DISGUISE_A) == QUEST_STATUS_INCOMPLETE ||
player->GetQuestStatus(QUEST_SUITABLE_DISGUISE_H) == QUEST_STATUS_INCOMPLETE)
{
if(player->GetTeamId() == TEAM_ALLIANCE)
player->ADD_GOSSIP_ITEM(0, "Arcanist Tybalin said you might be able to lend me a certain tabard.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
AddGossipItemFor(player, 0, "Arcanist Tybalin said you might be able to lend me a certain tabard.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
else
player->ADD_GOSSIP_ITEM(0, "Magister Hathorel said you might be able to lend me a certain tabard.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
AddGossipItemFor(player, 0, "Magister Hathorel said you might be able to lend me a certain tabard.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
}
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
return true;
}
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
{
switch (action)
{
case GOSSIP_ACTION_INFO_DEF:
player->CLOSE_GOSSIP_MENU();
CloseGossipMenuFor(player);
creature->SetUInt32Value(UNIT_NPC_FLAGS, 0);
creature->AI()->SetData(ACTION_SHANDY_INTRO, 0);
break;
@ -265,7 +265,7 @@ public:
return true;
}
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_shandy_dalaranAI(creature);
}
@ -760,7 +760,7 @@ public:
}
void UpdateAI(uint32 diff)
{
if (!UpdateVictim())
return;