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

@ -47,7 +47,7 @@ class go_noblegarden_colored_egg : public GameObjectScript
public:
go_noblegarden_colored_egg() : GameObjectScript("go_noblegarden_colored_egg") { }
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
bool OnGossipHello(Player* player, GameObject* /*go*/) override
{
if (roll_chance_i(5))
player->CastSpell(player, 61734, true); // SPELL NOBLEGARDEN BUNNY
@ -60,7 +60,7 @@ class go_seer_of_zebhalak : public GameObjectScript
public:
go_seer_of_zebhalak() : GameObjectScript("go_seer_of_zebhalak") { }
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
bool OnGossipHello(Player* player, GameObject* /*go*/) override
{
if (player->GetQuestStatus(12007) == QUEST_STATUS_INCOMPLETE)
player->CastSpell(player, 47293, true);
@ -73,16 +73,16 @@ class go_mistwhisper_treasure : public GameObjectScript
public:
go_mistwhisper_treasure() : GameObjectScript("go_mistwhisper_treasure") { }
bool OnGossipHello(Player* pPlayer, GameObject *pGo)
bool OnGossipHello(Player* pPlayer, GameObject *go) override
{
if (!pGo->FindNearestCreature(28105, 30.0f)) // Tartek
if (!go->FindNearestCreature(28105, 30.0f)) // Tartek
{
if (Creature *cr = pGo->SummonCreature(28105, 6708.7f, 5115.45f, -18.3f, 0.7f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
if (Creature *cr = go->SummonCreature(28105, 6708.7f, 5115.45f, -18.3f, 0.7f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
{
cr->MonsterYell("My treasure! You no steal from Tartek, dumb big-tongue traitor thing. Tartek and nasty dragon going to kill you! You so dumb.", LANG_UNIVERSAL, 0);
cr->AI()->AttackStart(pPlayer);
}
}
}
return false;
}
};
@ -127,11 +127,11 @@ class go_arena_ready_marker : public GameObjectScript
public:
go_arena_ready_marker() : GameObjectScript("go_arena_ready_marker") { }
bool OnGossipHello(Player* player, GameObject * /*go*/)
bool OnGossipHello(Player* player, GameObject * /*go*/) override
{
if (Battleground* bg = player->GetBattleground())
bg->ReadyMarkerClicked(player);
return false;
}
};
@ -161,7 +161,7 @@ class go_ethereum_prison : public GameObjectScript
public:
go_ethereum_prison() : GameObjectScript("go_ethereum_prison") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
int Random = rand() % (sizeof(NpcPrisonEntry) / sizeof(uint32));
@ -205,7 +205,7 @@ class go_ethereum_stasis : public GameObjectScript
public:
go_ethereum_stasis() : GameObjectScript("go_ethereum_stasis") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
int Random = rand() % (sizeof(NpcStasisEntry) / sizeof(uint32));
@ -230,7 +230,7 @@ class go_resonite_cask : public GameObjectScript
public:
go_resonite_cask() : GameObjectScript("go_resonite_cask") { }
bool OnGossipHello(Player* /*player*/, GameObject* go)
bool OnGossipHello(Player* /*player*/, GameObject* go) override
{
// xinef: prevent spawning hundreds of them
if (go->GetGoType() == GAMEOBJECT_TYPE_GOOBER && !go->FindNearestCreature(NPC_GOGGEROC, 20.0f))
@ -329,7 +329,7 @@ class go_cat_figurine : public GameObjectScript
public:
go_cat_figurine() : GameObjectScript("go_cat_figurine") { }
bool OnGossipHello(Player* player, GameObject* /*go*/)
bool OnGossipHello(Player* player, GameObject* /*go*/) override
{
player->CastSpell(player, SPELL_SUMMON_GHOST_SABER, true);
return false;
@ -350,7 +350,7 @@ class go_gilded_brazier : public GameObjectScript
public:
go_gilded_brazier() : GameObjectScript("go_gilded_brazier") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
if (go->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
{
@ -373,7 +373,7 @@ class go_tablet_of_madness : public GameObjectScript
public:
go_tablet_of_madness() : GameObjectScript("go_tablet_of_madness") { }
bool OnGossipHello(Player* player, GameObject* /*go*/)
bool OnGossipHello(Player* player, GameObject* /*go*/) override
{
if (player->HasSkill(SKILL_ALCHEMY) && player->GetSkillValue(SKILL_ALCHEMY) >= 300 && !player->HasSpell(24266))
player->CastSpell(player, 24267, false);
@ -392,7 +392,7 @@ public:
go_tablet_of_the_seven() : GameObjectScript("go_tablet_of_the_seven") { }
//TODO: use gossip option ("Transcript the Tablet") instead, if Trinity adds support.
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
if (go->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER)
return true;
@ -413,7 +413,7 @@ class go_jump_a_tron : public GameObjectScript
public:
go_jump_a_tron() : GameObjectScript("go_jump_a_tron") { }
bool OnGossipHello(Player* player, GameObject* /*go*/)
bool OnGossipHello(Player* player, GameObject* /*go*/) override
{
if (player->GetQuestStatus(10111) == QUEST_STATUS_INCOMPLETE)
player->CastSpell(player, 33382, true);
@ -436,7 +436,7 @@ class go_sacred_fire_of_life : public GameObjectScript
public:
go_sacred_fire_of_life() : GameObjectScript("go_sacred_fire_of_life") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
if (go->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
player->SummonCreature(NPC_ARIKARA, -5008.338f, -2118.894f, 83.657f, 0.874f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
@ -464,7 +464,7 @@ class go_shrine_of_the_birds : public GameObjectScript
public:
go_shrine_of_the_birds() : GameObjectScript("go_shrine_of_the_birds") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
uint32 BirdEntry = 0;
@ -507,7 +507,7 @@ class go_southfury_moonstone : public GameObjectScript
public:
go_southfury_moonstone() : GameObjectScript("go_southfury_moonstone") { }
bool OnGossipHello(Player* player, GameObject* /*go*/)
bool OnGossipHello(Player* player, GameObject* /*go*/) 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);
@ -536,7 +536,7 @@ class go_tele_to_dalaran_crystal : public GameObjectScript
public:
go_tele_to_dalaran_crystal() : GameObjectScript("go_tele_to_dalaran_crystal") { }
bool OnGossipHello(Player* player, GameObject* /*go*/)
bool OnGossipHello(Player* player, GameObject* /*go*/) override
{
if (player->GetQuestRewardStatus(QUEST_TELE_CRYSTAL_FLAG))
return false;
@ -556,7 +556,7 @@ class go_tele_to_violet_stand : public GameObjectScript
public:
go_tele_to_violet_stand() : GameObjectScript("go_tele_to_violet_stand") { }
bool OnGossipHello(Player* player, GameObject* /*go*/)
bool OnGossipHello(Player* player, GameObject* /*go*/) override
{
if (player->GetQuestRewardStatus(QUEST_LEARN_LEAVE_RETURN) || player->GetQuestStatus(QUEST_LEARN_LEAVE_RETURN) == QUEST_STATUS_INCOMPLETE)
return false;
@ -586,38 +586,38 @@ class go_fel_crystalforge : public GameObjectScript
public:
go_fel_crystalforge() : GameObjectScript("go_fel_crystalforge") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) /* != GAMEOBJECT_TYPE_QUESTGIVER) */
player->PrepareQuestMenu(go->GetGUID()); /* return true*/
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_TEXT, go->GetGUID());
SendGossipMenuFor(player, GOSSIP_FEL_CRYSTALFORGE_TEXT, go->GetGUID());
return true;
}
bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action) override
{
player->PlayerTalkClass->ClearMenus();
ClearGossipMenuFor(player);
switch (action)
{
case GOSSIP_ACTION_INFO_DEF:
player->CastSpell(player, SPELL_CREATE_1_FLASK_OF_BEAST, false);
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN, go->GetGUID());
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
SendGossipMenuFor(player, GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN, go->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 1:
player->CastSpell(player, SPELL_CREATE_5_FLASK_OF_BEAST, false);
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN, go->GetGUID());
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
SendGossipMenuFor(player, GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN, go->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 2:
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_TEXT, go->GetGUID());
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
SendGossipMenuFor(player, GOSSIP_FEL_CRYSTALFORGE_TEXT, go->GetGUID());
break;
}
return true;
@ -645,38 +645,38 @@ class go_bashir_crystalforge : public GameObjectScript
public:
go_bashir_crystalforge() : GameObjectScript("go_bashir_crystalforge") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) /* != GAMEOBJECT_TYPE_QUESTGIVER) */
player->PrepareQuestMenu(go->GetGUID()); /* return true*/
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_TEXT, go->GetGUID());
SendGossipMenuFor(player, GOSSIP_BASHIR_CRYSTALFORGE_TEXT, go->GetGUID());
return true;
}
bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action) override
{
player->PlayerTalkClass->ClearMenus();
ClearGossipMenuFor(player);
switch (action)
{
case GOSSIP_ACTION_INFO_DEF:
player->CastSpell(player, SPELL_CREATE_1_FLASK_OF_SORCERER, false);
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_ITEM_TEXT_RETURN, go->GetGUID());
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
SendGossipMenuFor(player, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_TEXT_RETURN, go->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 1:
player->CastSpell(player, SPELL_CREATE_5_FLASK_OF_SORCERER, false);
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_ITEM_TEXT_RETURN, go->GetGUID());
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
SendGossipMenuFor(player, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_TEXT_RETURN, go->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 2:
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_TEXT, go->GetGUID());
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
SendGossipMenuFor(player, GOSSIP_BASHIR_CRYSTALFORGE_TEXT, go->GetGUID());
break;
}
return true;
@ -697,7 +697,7 @@ class go_scourge_cage : public GameObjectScript
public:
go_scourge_cage() : GameObjectScript("go_scourge_cage") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
go->UseDoorOrButton();
if (Creature* pNearestPrisoner = go->FindNearestCreature(NPC_SCOURGE_PRISONER, 5.0f, true))
@ -725,7 +725,7 @@ class go_arcane_prison : public GameObjectScript
public:
go_arcane_prison() : GameObjectScript("go_arcane_prison") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
// xinef: prevent spawning hundreds of them
if (player->GetQuestStatus(QUEST_PRISON_BREAK) == QUEST_STATUS_INCOMPLETE && !go->FindNearestCreature(25318, 20.0f))
@ -760,7 +760,7 @@ class go_jotunheim_cage : public GameObjectScript
public:
go_jotunheim_cage() : GameObjectScript("go_jotunheim_cage") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
go->UseDoorOrButton();
Creature* pPrisoner = go->FindNearestCreature(NPC_EBON_BLADE_PRISONER_HUMAN, 5.0f, true);
@ -810,12 +810,12 @@ class go_table_theka : public GameObjectScript
public:
go_table_theka() : GameObjectScript("go_table_theka") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
if (player->GetQuestStatus(QUEST_SPIDER_GOLD) == QUEST_STATUS_INCOMPLETE)
player->AreaExploredOrEventHappens(QUEST_SPIDER_GOLD);
player->SEND_GOSSIP_MENU(GOSSIP_TABLE_THEKA, go->GetGUID());
SendGossipMenuFor(player, GOSSIP_TABLE_THEKA, go->GetGUID());
return true;
}
@ -839,7 +839,7 @@ class go_inconspicuous_landmark : public GameObjectScript
_lastUsedTime = time(NULL);
}
bool OnGossipHello(Player* player, GameObject* /*go*/)
bool OnGossipHello(Player* player, GameObject* /*go*/) override
{
if (player->HasItemCount(ITEM_CUERGOS_KEY))
return true;
@ -992,7 +992,7 @@ class go_dragonflayer_cage : public GameObjectScript
public:
go_dragonflayer_cage() : GameObjectScript("go_dragonflayer_cage") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
go->UseDoorOrButton();
if (player->GetQuestStatus(QUEST_PRISONERS_OF_WYRMSKULL) != QUEST_STATUS_INCOMPLETE)
@ -1048,26 +1048,26 @@ class go_amberpine_outhouse : public GameObjectScript
public:
go_amberpine_outhouse() : GameObjectScript("go_amberpine_outhouse") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
QuestStatus status = player->GetQuestStatus(QUEST_DOING_YOUR_DUTY);
if (status == QUEST_STATUS_INCOMPLETE || status == QUEST_STATUS_COMPLETE || status == QUEST_STATUS_REWARDED)
{
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_USE_OUTHOUSE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(GOSSIP_OUTHOUSE_VACANT, go->GetGUID());
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_USE_OUTHOUSE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
SendGossipMenuFor(player, GOSSIP_OUTHOUSE_VACANT, go->GetGUID());
}
else
player->SEND_GOSSIP_MENU(GOSSIP_OUTHOUSE_INUSE, go->GetGUID());
SendGossipMenuFor(player, GOSSIP_OUTHOUSE_INUSE, go->GetGUID());
return true;
}
bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action) override
{
player->PlayerTalkClass->ClearMenus();
ClearGossipMenuFor(player);
if (action == GOSSIP_ACTION_INFO_DEF +1)
{
player->CLOSE_GOSSIP_MENU();
CloseGossipMenuFor(player);
Creature* target = GetClosestCreatureWithEntry(player, NPC_OUTHOUSE_BUNNY, 3.0f);
if (target)
{
@ -1081,7 +1081,7 @@ public:
}
else
{
player->CLOSE_GOSSIP_MENU();
CloseGossipMenuFor(player);
player->GetSession()->SendNotification(GO_ANDERHOLS_SLIDER_CIDER_NOT_FOUND);
return false;
}
@ -1104,7 +1104,7 @@ class go_hive_pod : public GameObjectScript
public:
go_hive_pod() : GameObjectScript("go_hive_pod") { }
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* go) override
{
player->SendLoot(go->GetGUID(), LOOT_CORPSE);
@ -1123,7 +1123,7 @@ class go_massive_seaforium_charge : public GameObjectScript
public:
go_massive_seaforium_charge() : GameObjectScript("go_massive_seaforium_charge") { }
bool OnGossipHello(Player* /*player*/, GameObject* go)
bool OnGossipHello(Player* /*player*/, GameObject* go) override
{
go->SetLootState(GO_JUST_DEACTIVATED);
return true;
@ -1143,27 +1143,27 @@ enum MissingFriends
class go_veil_skith_cage : public GameObjectScript
{
public:
go_veil_skith_cage() : GameObjectScript("go_veil_skith_cage") { }
public:
go_veil_skith_cage() : GameObjectScript("go_veil_skith_cage") { }
bool OnGossipHello(Player* player, GameObject* go)
{
go->UseDoorOrButton();
if (player->GetQuestStatus(QUEST_MISSING_FRIENDS) == QUEST_STATUS_INCOMPLETE)
{
std::list<Creature*> childrenList;
GetCreatureListWithEntryInGrid(childrenList, go, NPC_CAPTIVE_CHILD, INTERACTION_DISTANCE);
for (std::list<Creature*>::const_iterator itr = childrenList.begin(); itr != childrenList.end(); ++itr)
{
player->KilledMonsterCredit(NPC_CAPTIVE_CHILD, (*itr)->GetGUID());
(*itr)->DespawnOrUnsummon(5000);
(*itr)->GetMotionMaster()->MovePoint(1, go->GetPositionX()+5, go->GetPositionY(), go->GetPositionZ());
(*itr)->AI()->Talk(SAY_FREE_0);
(*itr)->GetMotionMaster()->Clear();
}
}
return false;
}
bool OnGossipHello(Player* player, GameObject* go) override
{
go->UseDoorOrButton();
if (player->GetQuestStatus(QUEST_MISSING_FRIENDS) == QUEST_STATUS_INCOMPLETE)
{
std::list<Creature*> childrenList;
GetCreatureListWithEntryInGrid(childrenList, go, NPC_CAPTIVE_CHILD, INTERACTION_DISTANCE);
for (std::list<Creature*>::const_iterator itr = childrenList.begin(); itr != childrenList.end(); ++itr)
{
player->KilledMonsterCredit(NPC_CAPTIVE_CHILD, (*itr)->GetGUID());
(*itr)->DespawnOrUnsummon(5000);
(*itr)->GetMotionMaster()->MovePoint(1, go->GetPositionX()+5, go->GetPositionY(), go->GetPositionZ());
(*itr)->AI()->Talk(SAY_FREE_0);
(*itr)->GetMotionMaster()->Clear();
}
}
return false;
}
};
void AddSC_go_scripts()