aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/FULL/world_scripts_full.sql2
-rw-r--r--sql/updates/6066_world_scripts.sql2
-rw-r--r--src/bindings/scripts/scripts/northrend/storm_peaks.cpp36
-rw-r--r--src/bindings/scripts/scripts/world/go_scripts.cpp26
4 files changed, 65 insertions, 1 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index 89fdef4ba4c..67dbcaacea4 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -968,6 +968,8 @@ UPDATE `creature_template` SET `ScriptName`='npc_kaya_flathoof' WHERE `entry`=11
UPDATE `creature_template` SET `ScriptName`='npc_agnetta_tyrsdottar' WHERE `entry`=30154;
UPDATE `creature_template` SET `ScriptName`='npc_frostborn_scout' WHERE `entry`=29811;
UPDATE `creature_template` SET `ScriptName`='npc_thorim' WHERE `entry`=29445;
+UPDATE `creature_template` SET `ScriptName`='npc_goblin_prisioner' WHERE `entry`=29446;
+UPDATE `gameobject_template` SET ScriptName = 'go_rusty_cage' WHERE `entry`=191544;
/* STORMWIND CITY */
UPDATE `creature_template` SET `ScriptName`='npc_archmage_malin' WHERE `entry`=2708;
diff --git a/sql/updates/6066_world_scripts.sql b/sql/updates/6066_world_scripts.sql
new file mode 100644
index 00000000000..655fbaf8a7d
--- /dev/null
+++ b/sql/updates/6066_world_scripts.sql
@@ -0,0 +1,2 @@
+UPDATE `creature_template` SET `ScriptName`='npc_goblin_prisioner' WHERE `entry`=29446;
+UPDATE `gameobject_template` SET ScriptName = 'go_rusty_cage' WHERE `entry`=191544;
diff --git a/src/bindings/scripts/scripts/northrend/storm_peaks.cpp b/src/bindings/scripts/scripts/northrend/storm_peaks.cpp
index ab55c2e1341..c456b91805c 100644
--- a/src/bindings/scripts/scripts/northrend/storm_peaks.cpp
+++ b/src/bindings/scripts/scripts/northrend/storm_peaks.cpp
@@ -169,6 +169,37 @@ bool GossipSelect_npc_thorim(Player* pPlayer, Creature* pCreature, uint32 uiSend
return true;
}
+/*######
+## npc_goblin_prisioner
+######*/
+
+enum eGoblinPrisioner
+{
+ GO_RUSTY_CAGE = 191544
+};
+
+struct TRINITY_DLL_DECL npc_goblin_prisionerAI : public ScriptedAI
+{
+ npc_goblin_prisionerAI(Creature* pCreature) : ScriptedAI (pCreature){}
+
+ void Reset()
+ {
+ m_creature->SetReactState(REACT_PASSIVE);
+
+ if(GameObject* pGO = m_creature->FindNearestGameObject(GO_RUSTY_CAGE,5.0f))
+ {
+ if(pGO->GetGoState() == GO_STATE_ACTIVE)
+ pGO->SetGoState(GO_STATE_READY);
+ }
+ }
+
+};
+
+CreatureAI* GetAI_npc_goblin_prisioner(Creature* pCreature)
+{
+ return new npc_goblin_prisionerAI(pCreature);
+}
+
void AddSC_storm_peaks()
{
Script* newscript;
@@ -191,4 +222,9 @@ void AddSC_storm_peaks()
newscript->pGossipHello = &GossipHello_npc_thorim;
newscript->pGossipSelect = &GossipSelect_npc_thorim;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_goblin_prisioner";
+ newscript->GetAI = &GetAI_npc_goblin_prisioner;
+ newscript->RegisterSelf();
}
diff --git a/src/bindings/scripts/scripts/world/go_scripts.cpp b/src/bindings/scripts/scripts/world/go_scripts.cpp
index 668dd513191..630006226bd 100644
--- a/src/bindings/scripts/scripts/world/go_scripts.cpp
+++ b/src/bindings/scripts/scripts/world/go_scripts.cpp
@@ -17,7 +17,7 @@
/* ScriptData
SDName: GO_Scripts
SD%Complete: 100
-SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 6481, 10990, 10991, 10992, Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089
+SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 6481, 10990, 10991, 10992, Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089,12843
SDCategory: Game Objects
EndScriptData */
@@ -39,6 +39,7 @@ go_tablet_of_madness
go_tablet_of_the_seven
go_tele_to_dalaran_crystal
go_tele_to_violet_stand
+go_rusty_cage
EndContentData */
#include "precompiled.h"
@@ -536,6 +537,24 @@ bool GOHello_go_matrix_punchograph(Player* pPlayer, GameObject* pGo)
return false;
}
+enum eRustyCage
+{
+ NPC_GOBLIN_PRISIONER = 29466
+};
+
+bool GOHello_go_rusty_cage(Player* pPlayer, GameObject* pGO)
+{
+ if(Creature* m_creature = pGO->FindNearestCreature(NPC_GOBLIN_PRISIONER,5.0f,true))
+ {
+ pGO->SetGoState(GO_STATE_ACTIVE);
+ pPlayer->KilledMonsterCredit(NPC_GOBLIN_PRISIONER,m_creature->GetGUID());
+ m_creature->DisappearAndDie();
+ m_creature->RemoveCorpse();
+ }
+
+ return true;
+}
+
void AddSC_go_scripts()
{
Script *newscript;
@@ -655,5 +674,10 @@ void AddSC_go_scripts()
newscript->Name = "go_matrix_punchograph";
newscript->pGOHello = &GOHello_go_matrix_punchograph;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_rusty_cage";
+ newscript->pGOHello = &GOHello_go_rusty_cage;
+ newscript->RegisterSelf();
}