aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortartalo <none@none>2009-10-29 21:37:45 +0100
committertartalo <none@none>2009-10-29 21:37:45 +0100
commit57b46053e1f2f8110a785914b3da065a755cd03d (patch)
tree864892ff946ab7cfbae34027fec83eb8ca5615b7
parent65ec52f7a6f6bb45a35af86ea1c0284bd3297425 (diff)
Support for quest 'Merciful Freedom' (6566), by Sony
--HG-- branch : trunk
-rw-r--r--sql/FULL/world_scripts_full.sql2
-rw-r--r--sql/updates/6109_world_scripts.sql2
-rw-r--r--src/bindings/scripts/scripts/northrend/borean_tundra.cpp34
-rw-r--r--src/bindings/scripts/scripts/world/go_scripts.cpp24
4 files changed, 62 insertions, 0 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index afd96fcc3d3..944ba7cca25 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -356,6 +356,8 @@ UPDATE `creature_template` SET `ScriptName`='npc_keristrasza' WHERE `entry`=2620
UPDATE `creature_template` SET `ScriptName`='npc_iruk' WHERE `entry`=26219;
UPDATE `creature_template` SET `ScriptName`='npc_corastrasza' WHERE `entry`=32548;
UPDATE `creature_template` SET `ScriptName`='mob_nerubar_victim' WHERE `entry`=25284;
+UPDATE `creature_template` SET `ScriptName`='npc_gefangener_der_geißel' WHERE `entry`=25610;
+UPDATE `gameobject_template` SET `ScriptName`='go_scourge_cage' WHERE `entry`=187867;
/* BURNING STEPPES */
UPDATE `creature_template` SET `ScriptName`='npc_ragged_john' WHERE `entry`=9563;
diff --git a/sql/updates/6109_world_scripts.sql b/sql/updates/6109_world_scripts.sql
new file mode 100644
index 00000000000..627e2f34ef1
--- /dev/null
+++ b/sql/updates/6109_world_scripts.sql
@@ -0,0 +1,2 @@
+UPDATE `creature_template` SET `ScriptName`='npc_scourge_prisoner' WHERE `entry`=25610;
+UPDATE `gameobject_template` SET `ScriptName`='go_scourge_cage' WHERE `entry`=187867;
diff --git a/src/bindings/scripts/scripts/northrend/borean_tundra.cpp b/src/bindings/scripts/scripts/northrend/borean_tundra.cpp
index 13c483406bd..36c71be6a94 100644
--- a/src/bindings/scripts/scripts/northrend/borean_tundra.cpp
+++ b/src/bindings/scripts/scripts/northrend/borean_tundra.cpp
@@ -479,6 +479,35 @@ CreatureAI* GetAI_mob_nerubar_victim(Creature *pCreature)
{
return new mob_nerubar_victimAI (pCreature);
}
+/*######
+## npc_scourge_prisoner
+######*/
+
+enum eScourgePrisoner
+{
+ GO_SCOURGE_CAGE = 187867
+};
+
+struct TRINITY_DLL_DECL npc_scourge_prisonerAI : public ScriptedAI
+{
+ npc_scourge_prisonerAI(Creature* pCreature) : ScriptedAI (pCreature){}
+
+ void Reset()
+ {
+ m_creature->SetReactState(REACT_PASSIVE);
+
+ if(GameObject* pGO = m_creature->FindNearestGameObject(GO_SCOURGE_CAGE,5.0f))
+ {
+ if(pGO->GetGoState() == GO_STATE_ACTIVE)
+ pGO->SetGoState(GO_STATE_READY);
+ }
+ }
+
+};
+CreatureAI* GetAI_npc_scourge_prisoner(Creature* pCreature)
+{
+ return new npc_scourge_prisonerAI(pCreature);
+}
void AddSC_borean_tundra()
{
Script *newscript;
@@ -533,4 +562,9 @@ void AddSC_borean_tundra()
newscript->Name = "mob_nerubar_victim";
newscript->GetAI = &GetAI_mob_nerubar_victim;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "scourge_prisoner";
+ newscript->GetAI = &GetAI_npc_scourge_prisoner;
+ newscript->RegisterSelf();
}
diff --git a/src/bindings/scripts/scripts/world/go_scripts.cpp b/src/bindings/scripts/scripts/world/go_scripts.cpp
index 630006226bd..012ea4d911d 100644
--- a/src/bindings/scripts/scripts/world/go_scripts.cpp
+++ b/src/bindings/scripts/scripts/world/go_scripts.cpp
@@ -40,6 +40,7 @@ go_tablet_of_the_seven
go_tele_to_dalaran_crystal
go_tele_to_violet_stand
go_rusty_cage
+go_scourge_cage
EndContentData */
#include "precompiled.h"
@@ -555,6 +556,24 @@ bool GOHello_go_rusty_cage(Player* pPlayer, GameObject* pGO)
return true;
}
+enum eScourgeCage
+{
+ NPC_SCOURGE_PRISONER = 25610
+};
+
+bool GOHello_go_scourge_cage(Player* pPlayer, GameObject* pGO)
+{
+ if(Creature* m_creature = pGO->FindNearestCreature(NPC_SCOURGE_PRISONER,5.0f,true))
+ {
+ pGO->SetGoState(GO_STATE_ACTIVE);
+ pPlayer->KilledMonsterCredit(NPC_SCOURGE_PRISONER,m_creature->GetGUID());
+ m_creature->DisappearAndDie();
+ m_creature->RemoveCorpse();
+ }
+
+ return true;
+}
+
void AddSC_go_scripts()
{
Script *newscript;
@@ -679,5 +698,10 @@ void AddSC_go_scripts()
newscript->Name = "go_rusty_cage";
newscript->pGOHello = &GOHello_go_rusty_cage;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_scourge_cage";
+ newscript->pGOHello = &GOHello_go_scourge_cage;
+ newscript->RegisterSelf();
}