diff --git a/src/scripts/CMakeLists.txt b/src/scripts/CMakeLists.txt index ed42a1d65..edb456ad6 100644 --- a/src/scripts/CMakeLists.txt +++ b/src/scripts/CMakeLists.txt @@ -214,7 +214,6 @@ set (SCRIPTS_SRCS kalimdor/moonglade/boss_omen.cpp kalimdor/moonglade/moonglade.cpp kalimdor/mulgore/mulgore.cpp - kalimdor/orgrimmar/orgrimmar.cpp kalimdor/silithus/silithus.cpp kalimdor/silithus/ruins_of_ahnqiraj/boss_ayamiss.cpp kalimdor/silithus/ruins_of_ahnqiraj/boss_buru.cpp diff --git a/src/scripts/ScriptLoader.cpp b/src/scripts/ScriptLoader.cpp index ee24088a4..77b6bcb01 100644 --- a/src/scripts/ScriptLoader.cpp +++ b/src/scripts/ScriptLoader.cpp @@ -235,7 +235,6 @@ void AddSC_felwood(); void AddSC_feralas(); void AddSC_moonglade(); void AddSC_mulgore(); -void AddSC_orgrimmar(); void AddSC_silithus(); void AddSC_stonetalon_mountains(); void AddSC_tanaris(); @@ -480,7 +479,6 @@ void AddScripts() AddSC_feralas(); AddSC_moonglade(); AddSC_mulgore(); - AddSC_orgrimmar(); AddSC_silithus(); AddSC_stonetalon_mountains(); AddSC_tanaris(); diff --git a/src/scripts/kalimdor/desolace/desolace.cpp b/src/scripts/kalimdor/desolace/desolace.cpp index 6fe257f91..d5a46932f 100644 --- a/src/scripts/kalimdor/desolace/desolace.cpp +++ b/src/scripts/kalimdor/desolace/desolace.cpp @@ -297,78 +297,7 @@ bool QuestAccept_npc_dalinda_malem(Player* pPlayer, Creature* pCreature, Quest c } return true; } -enum -{ -//guid 12609 entry 177673 Serpant statue - NPC_LORD_KRAGARU = 12369, - QUEST_BOOK_OF_THE_ANCIENTS = 6027 -}; -struct go_serpent_statueAI: public GameObjectAI -{ - go_serpent_statueAI(GameObject* pGo) : GameObjectAI(pGo) - { - timer = 0; - state = 0; - guid_kragaru = 0; - } - uint64 guid_kragaru; - uint32 timer; - bool state;//0 = usual, can launch. //1 = in use, cannot launch - - void UpdateAI(uint32 const uiDiff) override - { - if (state) - { - if (timer < uiDiff) - { - state = 0; - me->SetGoState(GO_STATE_READY); - me->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); - } - else - timer -= uiDiff; - } - } - bool CheckCanStartEvent() - { - return !state && !me->GetMap()->GetCreature(guid_kragaru); - } - - void SetInUse(Creature* kragaru) - { - guid_kragaru = kragaru->GetGUID(); - me->SetGoState(GO_STATE_ACTIVE); - me->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); - state = 1; - timer = 120000; - } -}; -GameObjectAI* GetAIgo_serpent_statue(GameObject *pGo) -{ - return new go_serpent_statueAI(pGo); -} -bool GOHello_go_serpent_statue(Player* pPlayer, GameObject* pGo) -{ - if (go_serpent_statueAI* pMarkAI = dynamic_cast(pGo->AI())) - { - if (pMarkAI->CheckCanStartEvent()) - { - if (pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON) - { - if (pPlayer->GetQuestStatus(QUEST_BOOK_OF_THE_ANCIENTS) == QUEST_STATUS_INCOMPLETE) - { - if (Creature* kragaru = pGo->SummonCreature(NPC_LORD_KRAGARU, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 310000)) - { - kragaru->SetRespawnDelay(350000); - pMarkAI->SetInUse(kragaru); - } - } - } - } - } - return true; -} enum { NPC_MAGRAMI_SPECTRE = 11560, @@ -1139,12 +1068,6 @@ void AddSC_desolace() newscript->pQuestAcceptNPC = &QuestAccept_npc_dalinda_malem; newscript->RegisterSelf(); - newscript = new Script; - newscript->Name = "go_serpent_statue"; - newscript->GOGetAI = &GetAIgo_serpent_statue; - newscript->pGOHello = &GOHello_go_serpent_statue; - newscript->RegisterSelf(); - newscript = new Script; newscript->Name = "go_ghost_magnet"; newscript->GOGetAI = &GetAIgo_ghost_magnet; diff --git a/src/scripts/kalimdor/orgrimmar/orgrimmar.cpp b/src/scripts/kalimdor/orgrimmar/orgrimmar.cpp deleted file mode 100644 index 89f7334ca..000000000 --- a/src/scripts/kalimdor/orgrimmar/orgrimmar.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: Orgrimmar -SD%Complete: 100 -SDComment: Quest support: 2460 -SDCategory: Orgrimmar -EndScriptData */ - -/* ContentData -npc_shenthul -EndContentData */ - -#include "scriptPCH.h" - -/*###### -## npc_shenthul -######*/ - -enum -{ - QUEST_SHATTERED_SALUTE = 2460 -}; - -struct npc_shenthulAI : public ScriptedAI -{ - npc_shenthulAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - - bool CanTalk; - bool CanEmote; - uint32 Salute_Timer; - uint32 Reset_Timer; - uint64 playerGUID; - - void Reset() override - { - CanTalk = false; - CanEmote = false; - Salute_Timer = 6000; - Reset_Timer = 0; - playerGUID = 0; - } - - void ReceiveEmote(Player* pPlayer, uint32 emote) override - { - if (emote == TEXTEMOTE_SALUTE && pPlayer->GetQuestStatus(QUEST_SHATTERED_SALUTE) == QUEST_STATUS_INCOMPLETE) - { - if (CanEmote) - { - pPlayer->AreaExploredOrEventHappens(QUEST_SHATTERED_SALUTE); - Reset(); - } - } - } - - void UpdateAI(uint32 const diff) override - { - if (CanEmote) - { - if (Reset_Timer < diff) - { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(playerGUID)) - { - if (pPlayer->GetTypeId() == TYPEID_PLAYER && pPlayer->GetQuestStatus(QUEST_SHATTERED_SALUTE) == QUEST_STATUS_INCOMPLETE) - pPlayer->FailQuest(QUEST_SHATTERED_SALUTE); - } - Reset(); - } - else Reset_Timer -= diff; - } - - if (CanTalk && !CanEmote) - { - if (Salute_Timer < diff) - { - m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE); - CanEmote = true; - Reset_Timer = 60000; - } - else Salute_Timer -= diff; - } - - if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_npc_shenthul(Creature* pCreature) -{ - return new npc_shenthulAI(pCreature); -} - -bool QuestAccept_npc_shenthul(Player* pPlayer, Creature* pCreature, Quest const* pQuest) -{ - if (pQuest->GetQuestId() == QUEST_SHATTERED_SALUTE) - { - ((npc_shenthulAI*)pCreature->AI())->CanTalk = true; - ((npc_shenthulAI*)pCreature->AI())->playerGUID = pPlayer->GetGUID(); - } - return true; -} - -void AddSC_orgrimmar() -{ - Script* newscript; - - newscript = new Script; - newscript->Name = "npc_shenthul"; - newscript->GetAI = &GetAI_npc_shenthul; - newscript->pQuestAcceptNPC = &QuestAccept_npc_shenthul; - newscript->RegisterSelf(); -} diff --git a/src/scripts/world/go_scripts.cpp b/src/scripts/world/go_scripts.cpp index e1c064e00..0c14b9596 100644 --- a/src/scripts/world/go_scripts.cpp +++ b/src/scripts/world/go_scripts.cpp @@ -17,15 +17,12 @@ /* ScriptData SDName: GO_Scripts SD%Complete: 100 -SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 5088, 6481, 10990, 10991, 10992. Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089 +SDComment: Quest support: 4296, 5088, 6481, 10990, 10991, 10992. Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089 SDCategory: Game Objects EndScriptData */ /* ContentData go_cat_figurine (the "trap" version of GO, two different exist) -go_northern_crystal_pylon -go_eastern_crystal_pylon -go_western_crystal_pylon go_barov_journal go_field_repair_bot_74A go_orb_of_command @@ -58,54 +55,6 @@ bool GOHello_go_cat_figurine(Player* pPlayer, GameObject* pGo) return false; } -/*###### -## go_crystal_pylons (3x) -######*/ - - -bool GOHello_go_eastern_crystal_pylon(Player* pPlayer, GameObject* pGo) -{ - if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) - { - pPlayer->PrepareQuestMenu(pGo->GetGUID()); - pPlayer->SendPreparedQuest(pGo->GetGUID()); - } - - if (pPlayer->GetQuestStatus(4287) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(4287); - - return true; -} - -bool GOHello_go_western_crystal_pylon(Player* pPlayer, GameObject* pGo) -{ - if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) - { - pPlayer->PrepareQuestMenu(pGo->GetGUID()); - pPlayer->SendPreparedQuest(pGo->GetGUID()); - } - - if (pPlayer->GetQuestStatus(4288) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(4288); - - return true; -} - -bool GOHello_go_northern_crystal_pylon(Player* pPlayer, GameObject* pGo) -{ - if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) - { - pPlayer->PrepareQuestMenu(pGo->GetGUID()); - pPlayer->SendPreparedQuest(pGo->GetGUID()); - } - - if (pPlayer->GetQuestStatus(4285) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(4285); - - return true; -} - - /*###### ## go_barov_journal ######*/ @@ -596,21 +545,6 @@ void AddSC_go_scripts() newscript->pGOHello = &GOHello_go_cat_figurine; newscript->RegisterSelf(); - newscript = new Script; - newscript->Name = "go_eastern_crystal_pylon"; - newscript->pGOHello = &GOHello_go_eastern_crystal_pylon; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_northern_crystal_pylon"; - newscript->pGOHello = &GOHello_go_northern_crystal_pylon; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_western_crystal_pylon"; - newscript->pGOHello = &GOHello_go_western_crystal_pylon; - newscript->RegisterSelf(); - newscript = new Script; newscript->Name = "go_barov_journal"; newscript->pGOHello = &GOHello_go_barov_journal;