aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/World
diff options
context:
space:
mode:
authorMaks Szokalski <42069493+illunix@users.noreply.github.com>2020-09-10 16:57:11 +0200
committerGitHub <noreply@github.com>2020-09-10 16:57:11 +0200
commit41188eb535e445b73909659980257da2939e4be4 (patch)
tree7c4efaa1a9d2478447624ab13c2e101dbbc4e4a4 /src/server/scripts/World
parentfeaaa595cae735bb6093b24a88562c27b2723cfe (diff)
Add "On" to some gossip methods in AI (#25415)
* Add "On" to some methods * Update npc_innkeeper.cpp * Update zone_borean_tundra.cpp
Diffstat (limited to 'src/server/scripts/World')
-rw-r--r--src/server/scripts/World/go_scripts.cpp46
-rw-r--r--src/server/scripts/World/npc_innkeeper.cpp4
-rw-r--r--src/server/scripts/World/npc_professions.cpp18
-rw-r--r--src/server/scripts/World/npcs_special.cpp22
4 files changed, 45 insertions, 45 deletions
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index 107a9a734aa..870b5eaf221 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -70,7 +70,7 @@ public:
{
go_gilded_brazierAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
if (me->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
{
@@ -104,7 +104,7 @@ public:
go_tablet_of_the_sevenAI(GameObject* go) : GameObjectAI(go) { }
/// @todo use gossip option ("Transcript the Tablet") instead, if Trinity adds support.
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
if (me->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER)
return true;
@@ -151,7 +151,7 @@ public:
{
go_ethereum_prisonAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
me->UseDoorOrButton();
int Random = rand32() % (sizeof(NpcPrisonEntry) / sizeof(uint32));
@@ -211,7 +211,7 @@ public:
{
go_ethereum_stasisAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
me->UseDoorOrButton();
int Random = rand32() % (sizeof(NpcStasisEntry) / sizeof(uint32));
@@ -247,7 +247,7 @@ public:
{
go_resonite_caskAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* /*player*/) override
+ bool OnGossipHello(Player* /*player*/) override
{
if (me->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
me->SummonCreature(NPC_GOGGEROC, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5min);
@@ -282,7 +282,7 @@ public:
{
go_southfury_moonstoneAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
//implicitTarget=48 not implemented as of writing this code, and manual summon may be just ok for our purpose
//player->CastSpell(player, SPELL_SUMMON_RIZZLE, false);
@@ -321,7 +321,7 @@ public:
{
go_tele_to_dalaran_crystalAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
if (player->GetQuestRewardStatus(QUEST_TELE_CRYSTAL_FLAG))
return false;
@@ -350,7 +350,7 @@ public:
{
go_tele_to_violet_standAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
if (player->GetQuestRewardStatus(QUEST_LEARN_LEAVE_RETURN) || player->GetQuestStatus(QUEST_LEARN_LEAVE_RETURN) == QUEST_STATUS_INCOMPLETE)
return false;
@@ -395,7 +395,7 @@ public:
{
go_matrix_punchographAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
switch (me->GetEntry())
{
@@ -458,7 +458,7 @@ public:
{
go_scourge_cageAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
me->UseDoorOrButton();
if (Creature* pNearestPrisoner = me->FindNearestCreature(NPC_SCOURGE_PRISONER, 5.0f, true))
@@ -496,7 +496,7 @@ public:
{
go_arcane_prisonAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
if (player->GetQuestStatus(QUEST_PRISON_BREAK) == QUEST_STATUS_INCOMPLETE)
{
@@ -533,7 +533,7 @@ public:
{
go_blood_filled_orbAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
if (me->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
player->SummonCreature(NPC_ZELEMAR, -369.746f, 166.759f, -21.50f, 5.235f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30s);
@@ -564,7 +564,7 @@ public:
{
go_table_thekaAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
if (player->GetQuestStatus(QUEST_SPIDER_GOLD) == QUEST_STATUS_INCOMPLETE)
player->AreaExploredOrEventHappens(QUEST_SPIDER_GOLD);
@@ -645,7 +645,7 @@ class go_soulwell : public GameObjectScript
_stoneId = spellInfo->Effects[EFFECT_0].ItemType;
}
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
Unit* owner = me->GetOwner();
if (_stoneSpell == 0 || _stoneId == 0)
@@ -709,7 +709,7 @@ public:
{
go_amberpine_outhouseAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
QuestStatus status = player->GetQuestStatus(QUEST_DOING_YOUR_DUTY);
if (status == QUEST_STATUS_INCOMPLETE || status == QUEST_STATUS_COMPLETE || status == QUEST_STATUS_REWARDED)
@@ -723,7 +723,7 @@ public:
return true;
}
- bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
+ bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
{
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
ClearGossipMenuFor(player);
@@ -776,7 +776,7 @@ public:
{
go_hive_podAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
player->SendLoot(me->GetGUID(), LOOT_CORPSE);
me->SummonCreature(NPC_HIVE_AMBUSHER, me->GetPositionX() + 1, me->GetPositionY(), me->GetPositionZ(), me->GetAbsoluteAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1min);
@@ -800,7 +800,7 @@ class go_massive_seaforium_charge : public GameObjectScript
{
go_massive_seaforium_chargeAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* /*player*/) override
+ bool OnGossipHello(Player* /*player*/) override
{
me->SetLootState(GO_JUST_DEACTIVATED);
return true;
@@ -833,7 +833,7 @@ class go_veil_skith_cage : public GameObjectScript
{
go_veil_skith_cageAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
me->UseDoorOrButton();
if (player->GetQuestStatus(QUEST_MISSING_FRIENDS) == QUEST_STATUS_INCOMPLETE)
@@ -880,7 +880,7 @@ public:
{
go_frostblade_shrineAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
me->UseDoorOrButton(10);
if (!player->HasAura(SPELL_RECENT_MEDITATION))
@@ -919,7 +919,7 @@ public:
{
go_midsummer_bonfireAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
+ bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
{
player->CastSpell(player, STAMP_OUT_BONFIRE_QUEST_COMPLETE, true);
CloseGossipMenuFor(player);
@@ -958,7 +958,7 @@ public:
{
go_midsummer_ribbon_poleAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
if (Creature* creature = me->FindNearestCreature(NPC_POLE_RIBBON_BUNNY, 10.0f))
{
@@ -1545,4 +1545,4 @@ void AddSC_go_scripts()
new go_darkmoon_faire_music();
new go_pirate_day_music();
new go_bells();
-}
+} \ No newline at end of file
diff --git a/src/server/scripts/World/npc_innkeeper.cpp b/src/server/scripts/World/npc_innkeeper.cpp
index 0fbf1e18616..4a0ac7165c6 100644
--- a/src/server/scripts/World/npc_innkeeper.cpp
+++ b/src/server/scripts/World/npc_innkeeper.cpp
@@ -60,7 +60,7 @@ public:
{
npc_innkeeperAI(Creature* creature) : ScriptedAI(creature) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
if (IsHolidayActive(HOLIDAY_HALLOWS_END) && !player->HasAura(SPELL_TRICK_OR_TREATED))
{
@@ -109,7 +109,7 @@ public:
return true;
}
- bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
+ bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
{
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
ClearGossipMenuFor(player);
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 615b2ac433e..48722939fe2 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -420,7 +420,7 @@ public:
return (player->HasSpell(S_HAMMER) || player->HasSpell(S_AXE) || player->HasSpell(S_SWORD));
}
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
if (me->IsQuestGiver())
player->PrepareQuestMenu(me->GetGUID());
@@ -611,7 +611,7 @@ public:
}
}
- bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
+ bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
{
uint32 const sender = player->PlayerTalkClass->GetGossipOptionSender(gossipListId);
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
@@ -693,7 +693,7 @@ public:
return res;
}
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
uint32 npcTextId = 0;
std::string gossipItem;
@@ -733,7 +733,7 @@ public:
return true;
}
- bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
+ bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
{
uint32 const sender = player->PlayerTalkClass->GetGossipOptionSender(gossipListId);
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
@@ -797,7 +797,7 @@ class go_soothsaying_for_dummies : public GameObjectScript
{
go_soothsaying_for_dummiesAI(GameObject* go) : GameObjectAI(go) { }
- bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
+ bool OnGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
{
if (menuId != GOSSIP_ID)
return false;
@@ -853,7 +853,7 @@ public:
{
npc_prof_leatherAI(Creature* creature) : ScriptedAI(creature) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
if (me->IsQuestGiver())
player->PrepareQuestMenu(me->GetGUID());
@@ -941,7 +941,7 @@ public:
}
}
- bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
+ bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
{
uint32 const sender = player->PlayerTalkClass->GetGossipOptionSender(gossipListId);
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
@@ -988,7 +988,7 @@ public:
return (player->HasSpell(S_MOONCLOTH) || player->HasSpell(S_SHADOWEAVE) || player->HasSpell(S_SPELLFIRE));
}
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
if (me->IsQuestGiver())
player->PrepareQuestMenu(me->GetGUID());
@@ -1115,7 +1115,7 @@ public:
}
}
- bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
+ bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
{
uint32 const sender = player->PlayerTalkClass->GetGossipOptionSender(gossipListId);
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 563c0e20d44..1313af583d9 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -274,13 +274,13 @@ public:
}
}
- void QuestAccept(Player* /*player*/, Quest const* quest) override
+ void OnQuestAccept(Player* /*player*/, Quest const* quest) override
{
if (quest->GetQuestId() == QUEST_CLUCK)
Reset();
}
- void QuestReward(Player* /*player*/, Quest const* quest, uint32 /*opt*/) override
+ void OnQuestReward(Player* /*player*/, Quest const* quest, uint32 /*opt*/) override
{
if (quest->GetQuestId() == QUEST_CLUCK)
Reset();
@@ -745,7 +745,7 @@ public:
void JustEngagedWith(Unit* /*who*/) override { }
- void QuestAccept(Player* player, Quest const* quest) override
+ void OnQuestAccept(Player* player, Quest const* quest) override
{
if ((quest->GetQuestId() == 6624) || (quest->GetQuestId() == 6622))
BeginEvent(player);
@@ -1606,7 +1606,7 @@ class npc_wormhole : public CreatureScript
Initialize();
}
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
if (me->IsSummon())
{
@@ -1628,7 +1628,7 @@ class npc_wormhole : public CreatureScript
return true;
}
- bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
+ bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
{
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
ClearGossipMenuFor(player);
@@ -1693,7 +1693,7 @@ public:
{
npc_pet_trainerAI(Creature* creature) : ScriptedAI(creature) { }
- bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
+ bool OnGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
{
if (menuId == MENU_ID_PET_UNLEARN && gossipListId == OPTION_ID_PLEASE_DO)
{
@@ -1731,7 +1731,7 @@ public:
{
npc_experienceAI(Creature* creature) : ScriptedAI(creature) { }
- bool GossipHello(Player* player) override
+ bool OnGossipHello(Player* player) override
{
if (player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN)) // not gaining XP
{
@@ -1746,7 +1746,7 @@ public:
return true;
}
- bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
+ bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
{
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
ClearGossipMenuFor(player);
@@ -2228,9 +2228,9 @@ class npc_stable_master : public CreatureScript
{
npc_stable_masterAI(Creature* creature) : SmartAI(creature) { }
- bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
+ bool OnGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
{
- SmartAI::GossipSelect(player, menuId, gossipListId);
+ SmartAI::OnGossipSelect(player, menuId, gossipListId);
if (menuId != STABLE_MASTER_GOSSIP_SUB_MENU)
return false;
@@ -2483,7 +2483,7 @@ public:
});
}
- bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
+ bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
{
switch (gossipListId)
{