aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaanuel <none@none>2009-12-20 13:22:25 -0300
committermaanuel <none@none>2009-12-20 13:22:25 -0300
commita85544cb9c51e412169afe82a63cec602f71b1bd (patch)
tree7b1b28b09d26924176db58126a547657081efac0
parent6fe36efe0f2a05421965ad57c69b2f950a2cdb72 (diff)
Icecrown: Support for quest "Ebon Blade Prisoners" Q12982.
--HG-- branch : trunk
-rw-r--r--sql/FULL/world_scripts_full.sql1
-rw-r--r--sql/updates/6648_world_gameobject_template.sql1
-rw-r--r--src/bindings/scripts/scripts/world/go_scripts.cpp62
3 files changed, 61 insertions, 3 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index 5bc728b6ee4..4488b8af8db 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -41,6 +41,7 @@ UPDATE `gameobject_template` SET `ScriptName`='go_orb_of_the_blue_flight' WHERE
UPDATE `gameobject_template` SET `ScriptName`='go_acherus_soul_prison' WHERE `entry` IN (191577,191580,191581,191582,191583,191584,191585,191586,191587,191588,191589,191590);
UPDATE `gameobject_template` SET `ScriptName`='go_shrine_of_the_birds' WHERE `entry` IN (185547,185553,185551);
UPDATE `gameobject_template` SET `ScriptName`='go_matrix_punchograph' WHERE `entry` IN (142345,142475,142476,142696);
+UPDATE `gameobject_template` SET `ScriptName`='go_jotunheim_cage' WHERE `entry`=192135;
/* GUARD */
diff --git a/sql/updates/6648_world_gameobject_template.sql b/sql/updates/6648_world_gameobject_template.sql
new file mode 100644
index 00000000000..470c2e2e036
--- /dev/null
+++ b/sql/updates/6648_world_gameobject_template.sql
@@ -0,0 +1 @@
+UPDATE `gameobject_template` SET `ScriptName`='go_jotunheim_cage' WHERE `entry`=192135;
diff --git a/src/bindings/scripts/scripts/world/go_scripts.cpp b/src/bindings/scripts/scripts/world/go_scripts.cpp
index 052310ad057..06d7a1b44b5 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,12843
+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,12982
SDCategory: Game Objects
EndScriptData */
@@ -41,6 +41,7 @@ go_tele_to_dalaran_crystal
go_tele_to_violet_stand
go_rusty_cage
go_scourge_cage
+go_jotunheim_cage
EndContentData */
#include "precompiled.h"
@@ -568,7 +569,7 @@ bool GOHello_go_scourge_cage(Player *pPlayer, GameObject *pGO)
pPlayer->KilledMonsterCredit(NPC_SCOURGE_PRISONER, pNearestPrisoner->GetGUID());
pNearestPrisoner->DisappearAndDie();
}
-
+
return true;
}
@@ -607,6 +608,57 @@ bool GOHello_go_blood_filled_orb(Player *pPlayer, GameObject *pGO)
return true;
}
+/*######
+## go_jotunheim_cage
+######*/
+
+enum eJotunheimCage
+{
+ NPC_EBON_BLADE_PRISONER_HUMAN = 30186,
+ NPC_EBON_BLADE_PRISONER_NE = 30194,
+ NPC_EBON_BLADE_PRISONER_TROLL = 30196,
+ NPC_EBON_BLADE_PRISONER_ORC = 30195,
+
+ SPELL_SUMMON_BLADE_KNIGHT_H = 56207,
+ SPELL_SUMMON_BLADE_KNIGHT_NE = 56209,
+ SPELL_SUMMON_BLADE_KNIGHT_ORC = 56212,
+ SPELL_SUMMON_BLADE_KNIGHT_TROLL = 56214
+};
+
+bool GOHello_go_jotunheim_cage(Player* pPlayer, GameObject* pGO)
+{
+ Creature* pPrisoner;
+ pPrisoner = NULL;
+
+ if ((pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_HUMAN, 5.0f, true)) ||
+ (pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_TROLL, 5.0f, true)) ||
+ (pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_ORC, 5.0f, true)) ||
+ (pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_NE, 5.0f, true)))
+ {
+ if (pPrisoner && pPrisoner->isAlive())
+ {
+ pPrisoner->DisappearAndDie();
+ pPlayer->KilledMonsterCredit(NPC_EBON_BLADE_PRISONER_HUMAN, 0);
+ switch(pPrisoner->GetEntry())
+ {
+ case NPC_EBON_BLADE_PRISONER_HUMAN:
+ pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_H,true);
+ break;
+ case NPC_EBON_BLADE_PRISONER_NE:
+ pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_NE,true);
+ break;
+ case NPC_EBON_BLADE_PRISONER_TROLL:
+ pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_TROLL,true);
+ break;
+ case NPC_EBON_BLADE_PRISONER_ORC:
+ pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_ORC,true);
+ break;
+ }
+ }
+ }
+ return true;
+}
+
void AddSC_go_scripts()
{
Script *newscript;
@@ -741,5 +793,9 @@ void AddSC_go_scripts()
newscript->Name = "go_blood_filled_orb";
newscript->pGOHello = &GOHello_go_blood_filled_orb;
newscript->RegisterSelf();
-}
+ newscript = new Script;
+ newscript->Name = "go_jotunheim_cage";
+ newscript->pGOHello = &GOHello_go_jotunheim_cage;
+ newscript->RegisterSelf();
+}