diff options
5 files changed, 4 insertions, 215 deletions
diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql index b395f798636..12cdba24a79 100644 --- a/sql/scripts/world_scripts_full.sql +++ b/sql/scripts/world_scripts_full.sql @@ -362,11 +362,6 @@ UPDATE `creature_template` SET `ScriptName`='mob_phalanx' WHERE `entry`=9502; UPDATE `gameobject_template` SET `ScriptName`='go_shadowforge_brazier' WHERE `entry` IN (174744,174745); /* BLACKROCK SPIRE */ - -UPDATE `instance_template` SET `script`='instance_blackrock_spire' WHERE `map`=229; -UPDATE `creature_template` SET `ScriptName`='npc_rookey_whelp' WHERE `entry`=10161; -UPDATE `gameobject_template` SET `ScriptName`='go_rookey_egg' WHERE `entry`=175124; - /* BLACKROCK SPIRE Lower bosses */ UPDATE `creature_template` SET `ScriptName`='boss_highlord_omokk' WHERE `entry`=9196; UPDATE `creature_template` SET `ScriptName`='boss_shadow_hunter_voshgajin' WHERE `entry`=9236; diff --git a/sql/updates/9246_world_scriptname.sql b/sql/updates/9246_world_scriptname.sql new file mode 100644 index 00000000000..0a1a18d015f --- /dev/null +++ b/sql/updates/9246_world_scriptname.sql @@ -0,0 +1,4 @@ +-- Remove by script name in case someone ever applied these names to other stuff +UPDATE `instance_template` SET `script`='' WHERE `script`='instance_blackrock_spire'; +UPDATE `creature_template` SET `ScriptName`='' WHERE `ScriptName`='npc_rookey_whelp'; +UPDATE `gameobject_template` SET `ScriptName`='' WHERE `ScriptName`='go_rookey_egg'; diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.cpp deleted file mode 100644 index 86de9f60920..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> - * - * 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, see <http://www.gnu.org/licenses/>. - */ - -#include "ScriptPCH.h" -#include "blackrock_spire.h" - -enum Creatures -{ - NPC_ROOKERY_WHELP = 10161 -}; - -struct npc_rookey_whelpAI : public ScriptedAI -{ - npc_rookey_whelpAI(Creature *c) : ScriptedAI(c) - { - pInstance = c->GetInstanceData(); - } - - ScriptedInstance* pInstance; - - void JustDied(Unit * /*who*/) - { - if (pInstance) - pInstance->SetData(WHELP_DEATH_COUNT, pInstance->GetData(WHELP_DEATH_COUNT)+1); - } - - void UpdateAI(const uint32 /*diff*/) - { - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_rookey_whelp(Creature* pCreature) -{ - return new npc_rookey_whelpAI(pCreature); -} - -bool GOHello_rookey_egg(Player *pPlayer, GameObject * /*pGO*/) -{ - Position pos; - pPlayer->GetPosition(&pos); - pPlayer->SummonCreature(NPC_ROOKERY_WHELP, pos, TEMPSUMMON_TIMED_DESPAWN, 15*IN_MILLISECONDS); - //destroy gobject need to be implemented - - return true; -}; - -void AddSC_blackrock_spire() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_rookey_whelp"; - newscript->GetAI = &GetAI_rookey_whelp; - newscript->RegisterSelf(); - newscript = new Script; - - newscript->Name = "go_rookey_egg"; - newscript->pGOHello = &GOHello_rookey_egg; - newscript->RegisterSelf(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h deleted file mode 100644 index 94ad1c24ef4..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> - * - * 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, see <http://www.gnu.org/licenses/>. - */ - -#ifndef DEF_BRS_H -#define DEF_BRS_H - -enum Data -{ - EVENT_LEEEROY, - WHELP_DEATH_COUNT -}; - -#endif diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp deleted file mode 100644 index 53f2b730a80..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/> - * - * 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, see <http://www.gnu.org/licenses/>. - */ - -#include "ScriptPCH.h" -#include "blackrock_spire.h" - -enum Achievements -{ - ACHIEV_LEROY_JENKINS = 2188 -}; - -struct instance_blackrock_spire : public ScriptedInstance -{ - instance_blackrock_spire(Map* pMap) : ScriptedInstance(pMap) {} - - uint32 uiLeeroyTimer; - uint32 uiWhelpCount; - uint32 uiLeroyData; - - bool bLeeeeeeeeroy; - - void Initialize() - { - uiLeeroyTimer = 15*IN_MILLISECONDS; - uiWhelpCount = 0; - bLeeeeeeeeroy = true; - uiLeroyData = 0; - } - - void SetData(uint32 type, uint32 data) - { - switch(type) - { - case EVENT_LEEEROY: - if (data == DONE) - DoCompleteAchievement(ACHIEV_LEROY_JENKINS); - uiLeroyData = data; - break; - case WHELP_DEATH_COUNT: - if (data == 1) - { - SetData(EVENT_LEEEROY, IN_PROGRESS); - //DoSendNotifyToInstance("Leeeeeeeeeeeeeroy! Started"); - } - uiWhelpCount = data; - break; - } - } - - uint32 GetData(uint32 type) - { - switch(type) - { - case EVENT_LEEEROY: return uiLeroyData; - case WHELP_DEATH_COUNT: return uiWhelpCount; - } - return 0; - } - - void Update(uint32 diff) - { - if (GetData(EVENT_LEEEROY) != FAIL && GetData(EVENT_LEEEROY) == IN_PROGRESS) - { - if (uiLeeroyTimer <= diff) - { - SetData(EVENT_LEEEROY, FAIL); - bLeeeeeeeeroy = false; - //DoSendNotifyToInstance("Leeeeeeeeeeeeeroy! Failed"); - } else uiLeeroyTimer -= diff; - if (uiWhelpCount >= 50 && bLeeeeeeeeroy) - { - SetData(EVENT_LEEEROY, DONE); - //DoSendNotifyToInstance("Leeeeeeeeeeeeeroy! Success"); - } - } - } -}; - -InstanceData* GetInstanceData_instance_blackrock_spire(Map* pMap) -{ - return new instance_blackrock_spire(pMap); -} - -void AddSC_instance_blackrock_spire() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "instance_blackrock_spire"; - newscript->GetInstanceData = &GetInstanceData_instance_blackrock_spire; - newscript->RegisterSelf(); -} |
