mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Scripts/Naxxramas: Fix Frogger event. Closes #16488.
This commit is contained in:
16
sql/updates/world/3.3.5/9999_99_99_99_world_FROGGER.sql
Normal file
16
sql/updates/world/3.3.5/9999_99_99_99_world_FROGGER.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- delete frogger spawn locations from `creature`, move them to `creature_summon_groups`
|
||||
SET @FROGGER = 16027;
|
||||
DELETE FROM `creature` WHERE `id` = @FROGGER;
|
||||
DELETE FROM `creature_summon_groups` WHERE `summonerId`=533 AND `summonerType`=2;
|
||||
INSERT INTO `creature_summon_groups` (`summonerType`,`summonerId`,`groupId`,`entry`,`position_x`,`position_y`,`position_z`,`orientation`,`summonType`,`summonTime`) VALUES
|
||||
(2,533,0,@FROGGER,3175.281,-3134.764,293.4368,4.244924,3,7500),
|
||||
(2,533,1,@FROGGER,3154.581,-3126.18 ,293.5911,4.430199,3,7500),
|
||||
(2,533,2,@FROGGER,3128.622,-3119.604,293.4113,4.738929,3,7500);
|
||||
DELETE FROM `waypoint_data` WHERE `id` BETWEEN @FROGGER*10+0 AND @FROGGER*10+2;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`) VALUES
|
||||
(@FROGGER*10+0,1,3158.253,-3163.889,293.3027),
|
||||
(@FROGGER*10+1,1,3145.881,-3158.563,293.3215),
|
||||
(@FROGGER*10+2,1,3130.79 ,-3156.624,293.3239);
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` BETWEEN -76313 AND -76311 AND `source_type`=0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@FROGGER AND `source_type`=0 AND `id` BETWEEN 2 AND 5;
|
||||
UPDATE `creature_template` SET `unit_flags`=(`unit_flags`|256) WHERE `entry`=@FROGGER;
|
||||
@@ -123,6 +123,9 @@ class instance_naxxramas : public InstanceMapScript
|
||||
CurrentWingTaunt = SAY_KELTHUZAD_FIRST_WING_TAUNT;
|
||||
|
||||
playerDied = 0;
|
||||
|
||||
nextFroggerWave = 0;
|
||||
events.ScheduleEvent(EVENT_SUMMON_FROGGER_WAVE, Seconds(1));
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
@@ -477,6 +480,16 @@ class instance_naxxramas : public InstanceMapScript
|
||||
kelthuzad->AI()->Talk(CurrentWingTaunt);
|
||||
++CurrentWingTaunt;
|
||||
break;
|
||||
case EVENT_SUMMON_FROGGER_WAVE:
|
||||
{
|
||||
std::list<TempSummon*> spawns;
|
||||
instance->SummonCreatureGroup(nextFroggerWave, &spawns);
|
||||
if (!spawns.empty())
|
||||
(*spawns.begin())->GetMotionMaster()->MovePath(10 * NPC_FROGGER + nextFroggerWave, false);
|
||||
events.Repeat(Seconds(1) + Milliseconds(666));
|
||||
nextFroggerWave = (nextFroggerWave+1) % 3;
|
||||
break;
|
||||
}
|
||||
case EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD:
|
||||
if (Creature* kelthuzad = instance->GetCreature(KelthuzadGUID))
|
||||
kelthuzad->AI()->Talk(SAY_DIALOGUE_SAPPHIRON_KELTHUZAD);
|
||||
@@ -613,6 +626,8 @@ class instance_naxxramas : public InstanceMapScript
|
||||
/* The Immortal / The Undying */
|
||||
uint32 playerDied;
|
||||
|
||||
int8 nextFroggerWave;
|
||||
|
||||
EventMap events;
|
||||
};
|
||||
|
||||
|
||||
@@ -107,7 +107,8 @@ enum CreaturesIds
|
||||
NPC_DK_UNDERSTUDY = 16803,
|
||||
NPC_BIGGLESWORTH = 16998,
|
||||
NPC_LICH_KING = 16980,
|
||||
NPC_OLD_WORLD_TRIGGER = 15384
|
||||
NPC_OLD_WORLD_TRIGGER = 15384,
|
||||
NPC_FROGGER = 16027
|
||||
};
|
||||
|
||||
enum GameObjectsIds
|
||||
@@ -175,6 +176,9 @@ enum InstanceEvents
|
||||
// Dialogue that happens after each wing.
|
||||
EVENT_KELTHUZAD_WING_TAUNT,
|
||||
|
||||
// Periodic Frogger summon
|
||||
EVENT_SUMMON_FROGGER_WAVE,
|
||||
|
||||
// Dialogue that happens after Sapphiron's death.
|
||||
EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD,
|
||||
EVENT_DIALOGUE_SAPPHIRON_LICHKING,
|
||||
|
||||
Reference in New Issue
Block a user