Scripts/Pit of Saron: Fixed spawning quest creatures in Pit of Saron

DB/Quests: Fixed quest "The Path to the Citadel"
SQL credits - Tome
This commit is contained in:
SnakeIce
2011-03-18 15:35:16 +01:00
committed by Shauren
parent 98646c5328
commit fa8b30a45c
2 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
DELETE FROM `creature_questrelation` WHERE `quest` IN (24510,24499,24498,24710,24711,24506,24511,24682,24507,24712,24713);
DELETE FROM `creature_involvedrelation` WHERE `quest` IN (24510,24499,24498,24710,24711,24506,24511,24682,24507,24712,24713);
INSERT INTO `creature_questrelation` (`id`,`quest`) VALUES
-- alliance
(37776,24510),
(37597,24499),
(38160,24683),
(36993,24498),
(37591,24710),
(38188,24711),
-- horde
(37780,24506),
(37596,24511),
(38161,24682),
(36990,24507),
(37592,24712),
(38189,24713);
INSERT INTO `creature_involvedrelation` (`id`,`quest`) VALUES
-- alliance
(37597,24510),
(38160,24499),
(36993,24683),
(37591,24498),
(38188,24710),
(37221,24711),
-- horde
(37596,24506),
(38161,24511),
(36990,24682),
(37592,24507),
(38189,24712),
(37223,24713);
SET @GOBJ := 201969; -- ball and chain
UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@GOBJ;
DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=@GOBJ;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@GOBJ,1,0,0,64,0,100,0,0,0,0,0,33,36764,0,0,0,0,0,7,0,0,0,0,0,0,0, 'credit on gossip hello - alliance'),
(@GOBJ,1,1,0,64,0,100,0,0,0,0,0,33,36770,0,0,0,0,0,7,0,0,0,0,0,0,0, 'credit on gossip hello - horde');

View File

@@ -18,6 +18,11 @@
#include "ScriptPCH.h"
#include "pit_of_saron.h"
// positions for Martin Victus (37591) and Gorkun Ironskull (37592)
Position const SlaveLeaderPos = {689.7158f, -104.8736f, 513.7360f, 0.0f};
// position for Jaina and Sylvanas
Position const EventLeaderPos2 = {1054.368f, 107.14620f, 628.4467f, 0.0f};
class instance_pit_of_saron : public InstanceMapScript
{
public:
@@ -149,6 +154,44 @@ class instance_pit_of_saron : public InstanceMapScript
}
}
bool SetBossState(uint32 type, EncounterState state)
{
if (!InstanceScript::SetBossState(type, state))
return false;
switch (type)
{
case DATA_GARFROST:
if(state == DONE)
{
if (Creature* summoner = instance->GetCreature(_garfrostGUID))
{
if (_teamInInstance == ALLIANCE)
summoner->SummonCreature(NPC_MARTIN_VICTUS_1, SlaveLeaderPos, TEMPSUMMON_MANUAL_DESPAWN);
else
summoner->SummonCreature(NPC_GORKUN_IRONSKULL_2, SlaveLeaderPos, TEMPSUMMON_MANUAL_DESPAWN);
}
}
break;
case DATA_TYRANNUS:
if (state == DONE)
{
if (Creature* summoner = instance->GetCreature(_tyrannusGUID))
{
if (_teamInInstance == ALLIANCE)
summoner->SummonCreature(NPC_JAINA_PART2, EventLeaderPos2, TEMPSUMMON_MANUAL_DESPAWN);
else
summoner->SummonCreature(NPC_SYLVANAS_PART2, EventLeaderPos2, TEMPSUMMON_MANUAL_DESPAWN);
}
}
break;
default:
break;
}
return true;
}
uint32 GetData(uint32 type)
{
switch (type)