mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
Refactor(Core/Gossip): Replacing old macros with new (#1338)
* Correct support new macro
This commit is contained in:
@@ -164,12 +164,12 @@ class npc_death_knight_initiate : public CreatureScript
|
||||
public:
|
||||
npc_death_knight_initiate() : CreatureScript("npc_death_knight_initiate") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
if (action == GOSSIP_ACTION_INFO_DEF)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
|
||||
if (player->IsInCombat() || creature->IsInCombat())
|
||||
return true;
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_DEATH_CHALLENGE) == QUEST_STATUS_INCOMPLETE && creature->IsFullHealth())
|
||||
{
|
||||
@@ -197,14 +197,14 @@ public:
|
||||
return true;
|
||||
|
||||
if (!creature->AI()->GetData(player->GetGUIDLow()))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ACCEPT_DUEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ACCEPT_DUEL, 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;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_death_knight_initiateAI(creature);
|
||||
}
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
std::set<uint32> playerGUIDs;
|
||||
uint32 timer = 0;
|
||||
|
||||
uint32 GetData(uint32 data) const
|
||||
uint32 GetData(uint32 data) const override
|
||||
{
|
||||
if (data == DATA_IN_PROGRESS)
|
||||
return _duelInProgress;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
return playerGUIDs.find(data) != playerGUIDs.end();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
_duelInProgress = false;
|
||||
_duelGUID = 0;
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* pSpell)
|
||||
void SpellHit(Unit* caster, const SpellInfo* pSpell) override
|
||||
{
|
||||
if (!_duelInProgress && pSpell->Id == SPELL_DUEL)
|
||||
{
|
||||
@@ -257,7 +257,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType, SpellSchoolMask)
|
||||
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if (attacker && _duelInProgress && attacker->IsControlledByPlayer())
|
||||
{
|
||||
@@ -281,7 +281,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (timer != 0)
|
||||
{
|
||||
@@ -508,7 +508,7 @@ public:
|
||||
events.RepeatEvent(1000);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
@@ -894,7 +894,7 @@ class go_acherus_soul_prison : public GameObjectScript
|
||||
public:
|
||||
go_acherus_soul_prison() : GameObjectScript("go_acherus_soul_prison") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if (Creature* anchor = go->FindNearestCreature(29521, 15))
|
||||
if (uint64 prisonerGUID = anchor->AI()->GetGUID())
|
||||
@@ -1121,7 +1121,7 @@ class go_inconspicuous_mine_car : public GameObjectScript
|
||||
public:
|
||||
go_inconspicuous_mine_car() : GameObjectScript("go_inconspicuous_mine_car") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* /*go*/)
|
||||
bool OnGossipHello(Player* player, GameObject* /*go*/) override
|
||||
{
|
||||
if (player->GetQuestStatus(12701) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
@@ -1139,6 +1139,7 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user