aboutsummaryrefslogtreecommitdiff
path: root/src
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 /src
parent65ec52f7a6f6bb45a35af86ea1c0284bd3297425 (diff)
Support for quest 'Merciful Freedom' (6566), by Sony
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/northrend/borean_tundra.cpp34
-rw-r--r--src/bindings/scripts/scripts/world/go_scripts.cpp24
2 files changed, 58 insertions, 0 deletions
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();
}