Core/AI: segregate GameObject ReportUse from normal Use (lock open/normal click)
Closes #19819 (cherry picked from commit 2335b9de1a46a409c714a1dc89cbd0565545e70e)
This commit is contained in:
@@ -49,7 +49,7 @@ class TC_GAME_API GameObjectAI
|
||||
static int32 Permissible(GameObject const* /*go*/);
|
||||
|
||||
// Called when a player opens a gossip dialog with the gameobject.
|
||||
virtual bool GossipHello(Player* /*player*/, bool /*reportUse*/) { return false; }
|
||||
virtual bool GossipHello(Player* /*player*/) { return false; }
|
||||
|
||||
// Called when a player selects a gossip item in the gameobject's gossip menu.
|
||||
virtual bool GossipSelect(Player* /*player*/, uint32 /*menuId*/, uint32 /*gossipListId*/) { return false; }
|
||||
@@ -66,6 +66,10 @@ class TC_GAME_API GameObjectAI
|
||||
// Called when the dialog status between a player and the gameobject is requested.
|
||||
virtual uint32 GetDialogStatus(Player* player);
|
||||
|
||||
// Called when a Player clicks a GameObject, before GossipHello
|
||||
// prevents achievement tracking if returning true
|
||||
virtual bool OnReportUse(Player* /*player*/) { return false; }
|
||||
|
||||
virtual void Destroyed(Player* /*player*/, uint32 /*eventId*/) { }
|
||||
virtual void Damaged(Player* /*player*/, uint32 /*eventId*/) { }
|
||||
|
||||
|
||||
@@ -983,10 +983,17 @@ void SmartGameObjectAI::Reset()
|
||||
}
|
||||
|
||||
// Called when a player opens a gossip dialog with the gameobject.
|
||||
bool SmartGameObjectAI::GossipHello(Player* player, bool reportUse)
|
||||
bool SmartGameObjectAI::GossipHello(Player* player)
|
||||
{
|
||||
_gossipReturn = false;
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_HELLO, player, uint32(reportUse), 0, false, nullptr, me);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_HELLO, player, 0, 0, false, nullptr, me);
|
||||
return _gossipReturn;
|
||||
}
|
||||
|
||||
bool SmartGameObjectAI::OnReportUse(Player* player)
|
||||
{
|
||||
_gossipReturn = false;
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_HELLO, player, 1, 0, false, nullptr, me);
|
||||
return _gossipReturn;
|
||||
}
|
||||
|
||||
|
||||
@@ -260,7 +260,8 @@ class TC_GAME_API SmartGameObjectAI : public GameObjectAI
|
||||
SmartScript* GetScript() { return &mScript; }
|
||||
static int32 Permissible(GameObject const* /*go*/) { return PERMIT_BASE_NO; }
|
||||
|
||||
bool GossipHello(Player* player, bool reportUse) override;
|
||||
bool GossipHello(Player* player) override;
|
||||
bool OnReportUse(Player* player) override;
|
||||
bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override;
|
||||
bool GossipSelectCode(Player* player, uint32 menuId, uint32 gossipListId, const char* code) override;
|
||||
void QuestAccept(Player* player, Quest const* quest) override;
|
||||
|
||||
@@ -1417,7 +1417,7 @@ void GameObject::Use(Unit* user)
|
||||
if (Player* playerUser = user->ToPlayer())
|
||||
{
|
||||
playerUser->PlayerTalkClass->ClearMenus();
|
||||
if (AI()->GossipHello(playerUser, false))
|
||||
if (AI()->GossipHello(playerUser))
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ void WorldSession::HandleGameobjectReportUse(WorldPackets::GameObject::GameObjRe
|
||||
|
||||
if (GameObject* go = GetPlayer()->GetGameObjectIfCanInteractWith(packet.Guid))
|
||||
{
|
||||
if (go->AI()->GossipHello(_player, true))
|
||||
if (go->AI()->OnReportUse(_player))
|
||||
return;
|
||||
|
||||
_player->UpdateCriteria(CRITERIA_TYPE_USE_GAMEOBJECT, go->GetEntry());
|
||||
|
||||
@@ -1602,7 +1602,7 @@ void Spell::SendLoot(ObjectGuid guid, LootType loottype)
|
||||
}
|
||||
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
if (gameObjTarget->AI()->GossipHello(player, false))
|
||||
if (gameObjTarget->AI()->GossipHello(player))
|
||||
return;
|
||||
|
||||
switch (gameObjTarget->GetGoType())
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ class go_shadowforge_brazier : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
if (instance->GetData(TYPE_LYCEUM) == IN_PROGRESS)
|
||||
instance->SetData(TYPE_LYCEUM, DONE);
|
||||
|
||||
+1
-1
@@ -185,7 +185,7 @@ class go_orb_of_domination : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (instance->GetData(DATA_EGG_EVENT) != DONE)
|
||||
{
|
||||
|
||||
@@ -427,7 +427,7 @@ class go_blackened_urn : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
if (me->HasFlag(GO_FLAG_IN_USE))
|
||||
return false;
|
||||
|
||||
@@ -330,7 +330,7 @@ class go_acherus_soul_prison : public GameObjectScript
|
||||
{
|
||||
go_acherus_soul_prisonAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (Creature* anchor = me->FindNearestCreature(29521, 15))
|
||||
{
|
||||
|
||||
@@ -890,7 +890,7 @@ class go_loosely_turned_soil : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (instance->GetBossState(DATA_HORSEMAN_EVENT) == IN_PROGRESS || player->GetQuestStatus(QUEST_CALL_THE_HEADLESS_HORSEMAN) != QUEST_STATUS_COMPLETE)
|
||||
return true;
|
||||
|
||||
@@ -288,7 +288,7 @@ class go_brazier_of_the_herald : public GameObjectScript
|
||||
{
|
||||
go_brazier_of_the_heraldAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton();
|
||||
me->PlayDirectSound(SOUND_SCREECH, 0);
|
||||
|
||||
@@ -56,7 +56,7 @@ class go_gauntlet_gate : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (instance->GetData(TYPE_BARON_RUN) != NOT_STARTED)
|
||||
return false;
|
||||
|
||||
@@ -66,7 +66,7 @@ class go_atalai_statue : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
instance->SetData(EVENT_STATE, me->GetEntry());
|
||||
return false;
|
||||
|
||||
@@ -552,7 +552,7 @@ public:
|
||||
{
|
||||
kalecgos_teleporterAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
#if MAX_PLAYERS_IN_SPECTRAL_REALM > 0
|
||||
uint8 SpectralPlayers = 0;
|
||||
|
||||
@@ -375,7 +375,7 @@ class go_orb_of_the_blue_flight : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (me->GetFaction() == 35)
|
||||
{
|
||||
|
||||
@@ -406,7 +406,7 @@ class go_altar_of_archaedas : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
player->CastSpell(player, SPELL_BOSS_OBJECT_VISUAL, false);
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ class go_keystone_chamber : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
instance->SetData(DATA_IRONAYA_SEAL, IN_PROGRESS); //door animation and save state.
|
||||
return false;
|
||||
|
||||
@@ -45,7 +45,7 @@ class go_blackfathom_altar : public GameObjectScript
|
||||
{
|
||||
go_blackfathom_altarAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (!player->HasAura(SPELL_BLESSING_OF_BLACKFATHOM))
|
||||
player->AddAura(SPELL_BLESSING_OF_BLACKFATHOM, player);
|
||||
@@ -70,7 +70,7 @@ class go_blackfathom_fire : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
me->SetGoState(GO_STATE_ACTIVE);
|
||||
me->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
if (instance->GetData(TYPE_BARREL_DIVERSION) == DONE)
|
||||
return false;
|
||||
|
||||
@@ -381,7 +381,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
me->SendCustomAnim(0);
|
||||
instance->SetData(DATA_WAVE, IN_PROGRESS);
|
||||
|
||||
@@ -290,7 +290,7 @@ class go_ossirian_crystal : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
Creature* ossirian = player->FindNearestCreature(NPC_OSSIRIAN, 30.0f);
|
||||
if (!ossirian || instance->GetBossState(DATA_OSSIRIAN) != IN_PROGRESS)
|
||||
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
instance->SetData(EVENT_PYRAMID, PYRAMID_CAGES_OPEN);
|
||||
//set bly & co to aggressive & start moving to top of stairs
|
||||
@@ -410,7 +410,7 @@ public:
|
||||
{
|
||||
go_shallow_graveAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
// randomly summon a zombie or dead hero the first time a grave is used
|
||||
if (me->GetUseCount() == 0)
|
||||
|
||||
@@ -332,7 +332,7 @@ class go_naga_brazier : public GameObjectScript
|
||||
{
|
||||
go_naga_brazierAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
if (Creature* creature = GetClosestCreatureWithEntry(me, NPC_MUGLASH, INTERACTION_DISTANCE * 2))
|
||||
{
|
||||
|
||||
@@ -636,7 +636,7 @@ public:
|
||||
{
|
||||
go_ravager_cageAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton();
|
||||
if (player->GetQuestStatus(QUEST_STRENGTH_ONE) == QUEST_STATUS_INCOMPLETE)
|
||||
@@ -816,7 +816,7 @@ class go_bristlelimb_cage : public GameObjectScript
|
||||
{
|
||||
go_bristlelimb_cageAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->SetGoState(GO_STATE_READY);
|
||||
if (player->GetQuestStatus(QUEST_THE_PROPHECY_OF_AKIDA) == QUEST_STATUS_INCOMPLETE)
|
||||
|
||||
@@ -1239,7 +1239,7 @@ class go_wind_stone : public GameObjectScript
|
||||
}
|
||||
|
||||
public:
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
uint8 rank = GetPlayerRank(player);
|
||||
|
||||
|
||||
@@ -616,7 +616,7 @@ public:
|
||||
{
|
||||
go_elune_fireAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
// Check if we are using the torches or the altar
|
||||
bool isAltar = false;
|
||||
|
||||
@@ -393,7 +393,7 @@ class go_prince_taldaram_sphere : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
Creature* princeTaldaram = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PRINCE_TALDARAM));
|
||||
if (princeTaldaram && princeTaldaram->IsAlive())
|
||||
|
||||
@@ -1373,7 +1373,7 @@ class go_twilight_portal : public GameObjectScript
|
||||
}
|
||||
}
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (_spellId != 0)
|
||||
player->CastSpell(player, _spellId, true);
|
||||
|
||||
@@ -359,7 +359,7 @@ class go_gundrak_altar : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
me->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
Creature* keristrasza = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_KERISTRASZA));
|
||||
if (keristrasza && keristrasza->IsAlive())
|
||||
|
||||
@@ -987,7 +987,7 @@ class go_celestial_planetarium_access : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (me->HasFlag(GO_FLAG_IN_USE))
|
||||
return true;
|
||||
|
||||
@@ -1655,7 +1655,7 @@ class go_mimiron_hardmode_button : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
if (me->HasFlag(GO_FLAG_NOT_SELECTABLE))
|
||||
return true;
|
||||
|
||||
@@ -328,7 +328,7 @@ class go_razorscale_harpoon : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
if (instance->GetCreature(BOSS_RAZORSCALE))
|
||||
me->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
@@ -567,7 +567,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
if (Creature* palehoof = instance->GetCreature(DATA_GORTOK_PALEHOOF))
|
||||
{
|
||||
|
||||
@@ -1304,7 +1304,7 @@ class go_activation_crystal : public GameObjectScript
|
||||
{
|
||||
go_activation_crystalAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
player->CastSpell(player, SPELL_CRYSTAL_ACTIVATION, true);
|
||||
return false;
|
||||
|
||||
@@ -312,7 +312,7 @@ public:
|
||||
{
|
||||
go_scourge_enclosureAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton();
|
||||
if (player->GetQuestStatus(QUEST_OUR_ONLY_HOPE) == QUEST_STATUS_INCOMPLETE)
|
||||
@@ -597,7 +597,7 @@ public:
|
||||
{
|
||||
go_finklesteins_cauldronAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
player->CastSpell(player, SPELL_POT_CHECK);
|
||||
return true;
|
||||
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (Creature* najentus = instance->GetCreature(DATA_HIGH_WARLORD_NAJENTUS))
|
||||
{
|
||||
|
||||
@@ -444,7 +444,7 @@ class go_strange_pool : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
// 25%
|
||||
if (!urand(0, 3))
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ class go_bridge_console : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_CONTROL_CONSOLE, DONE);
|
||||
|
||||
@@ -34,7 +34,7 @@ class go_main_chambers_access_panel : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
if (me->GetEntry() == GO_ACCESS_PANEL_HYDRO && (instance->GetBossState(DATA_HYDROMANCER_THESPIA) == DONE || instance->GetBossState(DATA_HYDROMANCER_THESPIA) == SPECIAL))
|
||||
instance->SetBossState(DATA_HYDROMANCER_THESPIA, SPECIAL);
|
||||
|
||||
@@ -138,7 +138,7 @@ class go_broggok_lever : public GameObjectScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
if (instance->GetBossState(DATA_BROGGOK) != DONE && instance->GetBossState(DATA_BROGGOK) != IN_PROGRESS)
|
||||
{
|
||||
|
||||
@@ -472,7 +472,7 @@ public:
|
||||
{
|
||||
go_manticron_cubeAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->HasAura(SPELL_MIND_EXHAUSTION) || player->HasAura(SPELL_SHADOW_GRASP))
|
||||
return true;
|
||||
|
||||
@@ -303,7 +303,7 @@ public:
|
||||
{
|
||||
go_legion_obeliskAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_YOURE_FIRED) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
@@ -890,7 +890,7 @@ class go_simon_cluster : public GameObjectScript
|
||||
{
|
||||
go_simon_clusterAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (Creature* bunny = me->FindNearestCreature(NPC_SIMON_BUNNY, 12.0f, true))
|
||||
bunny->AI()->SetData(me->GetEntry(), 0);
|
||||
@@ -926,7 +926,7 @@ class go_apexis_relic : public GameObjectScript
|
||||
{
|
||||
go_apexis_relicAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
player->PrepareGossipMenu(me, me->GetGOInfo()->questgiver.gossipID);
|
||||
player->SendPreparedGossip(me);
|
||||
|
||||
@@ -295,7 +295,7 @@ public:
|
||||
{
|
||||
go_corkis_prisonAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->SetGoState(GO_STATE_READY);
|
||||
if (me->GetEntry() == GO_CORKIS_PRISON)
|
||||
@@ -613,7 +613,7 @@ class go_warmaul_prison : public GameObjectScript
|
||||
{
|
||||
go_warmaul_prisonAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton();
|
||||
if (player->GetQuestStatus(QUEST_FINDING_THE_SURVIVORS) != QUEST_STATUS_INCOMPLETE)
|
||||
|
||||
@@ -687,7 +687,7 @@ class go_captain_tyralius_prison : public GameObjectScript
|
||||
{
|
||||
go_captain_tyralius_prisonAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton();
|
||||
if (Creature* tyralius = me->FindNearestCreature(NPC_CAPTAIN_TYRALIUS, 1.0f))
|
||||
|
||||
@@ -550,7 +550,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if ((player->GetQuestStatus(ADVERSARIAL_BLOOD) == QUEST_STATUS_INCOMPLETE) || player->GetQuestRewardStatus(ADVERSARIAL_BLOOD))
|
||||
{
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
{
|
||||
go_cat_figurineAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
player->CastSpell(player, SPELL_SUMMON_GHOST_SABER, true);
|
||||
return false;
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
{
|
||||
go_barov_journalAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->HasSkill(SKILL_TAILORING) && player->GetBaseSkillValue(SKILL_TAILORING) >= 280 && !player->HasSpell(26086))
|
||||
player->CastSpell(player, 26095, false);
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
{
|
||||
go_gilded_brazierAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (me->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
|
||||
{
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
{
|
||||
go_orb_of_commandAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->GetQuestRewardStatus(7761))
|
||||
player->CastSpell(player, 23460, true);
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
{
|
||||
go_tablet_of_madnessAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->HasSkill(SKILL_ALCHEMY) && player->GetSkillValue(SKILL_ALCHEMY) >= 300 && !player->HasSpell(24266))
|
||||
player->CastSpell(player, 24267, false);
|
||||
@@ -228,7 +228,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, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (me->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER)
|
||||
return true;
|
||||
@@ -259,7 +259,7 @@ public:
|
||||
{
|
||||
go_jump_a_tronAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->GetQuestStatus(10111) == QUEST_STATUS_INCOMPLETE)
|
||||
player->CastSpell(player, 33382, true);
|
||||
@@ -303,7 +303,7 @@ public:
|
||||
{
|
||||
go_ethereum_prisonAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton();
|
||||
int Random = rand32() % (sizeof(NpcPrisonEntry) / sizeof(uint32));
|
||||
@@ -363,7 +363,7 @@ public:
|
||||
{
|
||||
go_ethereum_stasisAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton();
|
||||
int Random = rand32() % (sizeof(NpcStasisEntry) / sizeof(uint32));
|
||||
@@ -399,7 +399,7 @@ public:
|
||||
{
|
||||
go_resonite_caskAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(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, 300000);
|
||||
@@ -432,7 +432,7 @@ public:
|
||||
{
|
||||
go_sacred_fire_of_lifeAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (me->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
|
||||
player->SummonCreature(NPC_ARIKARA, -5008.338f, -2118.894f, 83.657f, 0.874f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
@@ -470,7 +470,7 @@ public:
|
||||
{
|
||||
go_shrine_of_the_birdsAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
uint32 BirdEntry = 0;
|
||||
|
||||
@@ -523,7 +523,7 @@ public:
|
||||
{
|
||||
go_southfury_moonstoneAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(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);
|
||||
@@ -562,7 +562,7 @@ public:
|
||||
{
|
||||
go_tele_to_dalaran_crystalAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->GetQuestRewardStatus(QUEST_TELE_CRYSTAL_FLAG))
|
||||
return false;
|
||||
@@ -591,7 +591,7 @@ public:
|
||||
{
|
||||
go_tele_to_violet_standAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->GetQuestRewardStatus(QUEST_LEARN_LEAVE_RETURN) || player->GetQuestStatus(QUEST_LEARN_LEAVE_RETURN) == QUEST_STATUS_INCOMPLETE)
|
||||
return false;
|
||||
@@ -631,7 +631,7 @@ public:
|
||||
{
|
||||
go_fel_crystalforgeAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (me->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) /* != GAMEOBJECT_TYPE_QUESTGIVER) */
|
||||
player->PrepareQuestMenu(me->GetGUID()); /* return true*/
|
||||
@@ -701,7 +701,7 @@ public:
|
||||
{
|
||||
go_bashir_crystalforgeAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (me->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) /* != GAMEOBJECT_TYPE_QUESTGIVER) */
|
||||
player->PrepareQuestMenu(me->GetGUID()); /* return true*/
|
||||
@@ -776,7 +776,7 @@ public:
|
||||
{
|
||||
go_matrix_punchographAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
@@ -839,7 +839,7 @@ public:
|
||||
{
|
||||
go_scourge_cageAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton();
|
||||
if (Creature* pNearestPrisoner = me->FindNearestCreature(NPC_SCOURGE_PRISONER, 5.0f, true))
|
||||
@@ -877,7 +877,7 @@ public:
|
||||
{
|
||||
go_arcane_prisonAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_PRISON_BREAK) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
@@ -914,7 +914,7 @@ public:
|
||||
{
|
||||
go_blood_filled_orbAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(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, 30000);
|
||||
@@ -955,7 +955,7 @@ public:
|
||||
{
|
||||
go_jotunheim_cageAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton();
|
||||
Creature* pPrisoner = me->FindNearestCreature(NPC_EBON_BLADE_PRISONER_HUMAN, 5.0f, true);
|
||||
@@ -1015,7 +1015,7 @@ public:
|
||||
{
|
||||
go_table_thekaAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_SPIDER_GOLD) == QUEST_STATUS_INCOMPLETE)
|
||||
player->AreaExploredOrEventHappens(QUEST_SPIDER_GOLD);
|
||||
@@ -1050,7 +1050,7 @@ public:
|
||||
{
|
||||
go_inconspicuous_landmarkAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->HasItemCount(ITEM_CUERGOS_KEY))
|
||||
return false;
|
||||
@@ -1081,7 +1081,7 @@ class go_soulwell : public GameObjectScript
|
||||
{
|
||||
}
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
Unit* owner = me->GetOwner();
|
||||
if (!owner || owner->GetTypeId() != TYPEID_PLAYER || !player->IsInSameRaidWith(owner->ToPlayer()))
|
||||
@@ -1120,7 +1120,7 @@ public:
|
||||
{
|
||||
go_dragonflayer_cageAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton();
|
||||
if (player->GetQuestStatus(QUEST_PRISONERS_OF_WYRMSKULL) != QUEST_STATUS_INCOMPLETE)
|
||||
@@ -1174,7 +1174,7 @@ public:
|
||||
{
|
||||
go_tadpole_cageAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton();
|
||||
if (player->GetQuestStatus(QUEST_OH_NOES_THE_TADPOLES) == QUEST_STATUS_INCOMPLETE)
|
||||
@@ -1225,7 +1225,7 @@ public:
|
||||
{
|
||||
go_amberpine_outhouseAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
QuestStatus status = player->GetQuestStatus(QUEST_DOING_YOUR_DUTY);
|
||||
if (status == QUEST_STATUS_INCOMPLETE || status == QUEST_STATUS_COMPLETE || status == QUEST_STATUS_REWARDED)
|
||||
@@ -1292,7 +1292,7 @@ public:
|
||||
{
|
||||
go_hive_podAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
player->SendLoot(me->GetGUID(), LOOT_CORPSE);
|
||||
me->SummonCreature(NPC_HIVE_AMBUSHER, me->GetPositionX() + 1, me->GetPositionY(), me->GetPositionZ(), me->GetAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
|
||||
@@ -1316,7 +1316,7 @@ class go_massive_seaforium_charge : public GameObjectScript
|
||||
{
|
||||
go_massive_seaforium_chargeAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
me->SetLootState(GO_JUST_DEACTIVATED);
|
||||
return true;
|
||||
@@ -1349,7 +1349,7 @@ class go_veil_skith_cage : public GameObjectScript
|
||||
{
|
||||
go_veil_skith_cageAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton();
|
||||
if (player->GetQuestStatus(QUEST_MISSING_FRIENDS) == QUEST_STATUS_INCOMPLETE)
|
||||
@@ -1396,7 +1396,7 @@ public:
|
||||
{
|
||||
go_frostblade_shrineAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton(10);
|
||||
if (!player->HasAura(SPELL_RECENT_MEDITATION))
|
||||
@@ -1466,7 +1466,7 @@ public:
|
||||
{
|
||||
go_midsummer_ribbon_poleAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player, bool /*reportUse*/) override
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (Creature* creature = me->FindNearestCreature(NPC_POLE_RIBBON_BUNNY, 10.0f))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user