mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 23:44:51 +08:00
Script Naxx40 Hub Portal
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#define NaxxramasScriptName "instance_naxxramas"
|
||||
|
||||
enum Encouters
|
||||
enum Encounters
|
||||
{
|
||||
BOSS_PATCHWERK = 0,
|
||||
BOSS_GROBBULUS = 1,
|
||||
|
||||
Reference in New Issue
Block a user