Script Naxx40 Hub Portal

This commit is contained in:
郑佩茹
2022-09-03 12:26:03 -06:00
parent da8a229643
commit 9397e3697a
3 changed files with 29 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
# Remove exit teleport and replace with script
DELETE FROM `areatrigger_teleport` WHERE `ID` IN (5196, 5197, 5198, 5199);
DELETE FROM `areatrigger_teleport` WHERE `ID` IN (5196, 5197, 5198, 5199, 4156);
DELETE FROM `areatrigger_scripts` WHERE `entry` IN (5196, 5197, 5198, 5199);
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
@@ -15,6 +15,10 @@ INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
(5193, 'naxx_northrend_entrance'),
(5194, 'naxx_northrend_entrance');
DELETE FROM `areatrigger_scripts` WHERE `entry` = 4156;
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
(4156, 'naxx_hub_portal');
UPDATE `creature` SET `spawnMask` = 3 WHERE `spawnMask` = 7 AND `map` = 533;
UPDATE `gameobject` SET `spawnMask` = 7 WHERE `spawnMask` = 3 AND `map` = 533;

View File

@@ -1421,6 +1421,28 @@ public:
}
};
class naxx_hub_portal : public AreaTriggerScript
{
public:
naxx_hub_portal() : AreaTriggerScript("naxx_hub_portal") { }
bool OnTrigger(Player* player, AreaTrigger const* /*areaTrigger*/) override
{
if (player->GetMap()->GetSpawnMode() == RAID_DIFFICULTY_10MAN_HEROIC)
{
InstanceScript* instance = player->GetInstanceScript();
for (int i = 0; i < BOSS_SAPPHIRON; ++i)
{
if (instance->GetBossState(i) != DONE)
return false;
}
}
player->TeleportTo(533, 3500.87f, -5339.03f, 145.0f, 1.34f);
return true;
}
};
void AddSC_instance_naxxramas_combined()
{
new instance_naxxramas_combined();
@@ -1428,5 +1450,6 @@ void AddSC_instance_naxxramas_combined()
new NaxxPlayerScript();
new naxx_exit_trigger();
new naxx_northrend_entrance();
new naxx_hub_portal();
// new boss_naxxramas_misc();
}

View File

@@ -23,7 +23,7 @@
#define NaxxramasScriptName "instance_naxxramas"
enum Encouters
enum Encounters
{
BOSS_PATCHWERK = 0,
BOSS_GROBBULUS = 1,