mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
*Do not allow to enter frostwyrm wing before killing all previous bosses. If you do not like it, simply do not apply the sql.
--HG-- branch : trunk
This commit is contained in:
@@ -1187,3 +1187,6 @@ INSERT INTO `creature_ai_scripts` VALUES
|
||||
/* EOF */
|
||||
|
||||
UPDATE `creature_template` SET `ScriptName` = 'npc_skywing' WHERE entry=22424;
|
||||
|
||||
DELETE FROM areatrigger_scripts WHERE entry = 4156;
|
||||
INSERT INTO areatrigger_scripts VALUES (4156, 'at_naxxramas_frostwyrm_wing');
|
||||
|
||||
2
sql/updates/4927_world_scripts_naxx.sql
Normal file
2
sql/updates/4927_world_scripts_naxx.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
DELETE FROM areatrigger_scripts WHERE entry = 4156;
|
||||
INSERT INTO areatrigger_scripts VALUES (4156, 'at_naxxramas_frostwyrm_wing');
|
||||
@@ -183,6 +183,20 @@ struct TRINITY_DLL_DECL instance_naxxramas : public InstanceData
|
||||
}
|
||||
};
|
||||
|
||||
bool AreaTrigger_at_naxxramas_frostwyrm_wing(Player *player, AreaTriggerEntry *at)
|
||||
{
|
||||
if(player->isGameMaster())
|
||||
return false;
|
||||
|
||||
InstanceData *data = player->GetInstanceData();
|
||||
if(data)
|
||||
for(uint32 i = BOSS_ANUBREKHAN; i < BOSS_SAPPHIRON; ++i)
|
||||
if(data->GetBossState(i) != DONE)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
InstanceData* GetInstanceData_instance_naxxramas(Map* map)
|
||||
{
|
||||
return new instance_naxxramas(map);
|
||||
@@ -195,4 +209,9 @@ void AddSC_instance_naxxramas()
|
||||
newscript->Name = "instance_naxxramas";
|
||||
newscript->GetInstanceData = &GetInstanceData_instance_naxxramas;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "at_naxxramas_frostwyrm_wing";
|
||||
newscript->pAreaTrigger = &AreaTrigger_at_naxxramas_frostwyrm_wing;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -150,6 +150,7 @@ class TRINITY_DLL_SPEC InstanceData : public ZoneScript
|
||||
void DoRespawnGameObject(uint64 uiGuid, uint32 uiTimeToDespawn = MINUTE);
|
||||
|
||||
virtual bool SetBossState(uint32 id, EncounterState state);
|
||||
EncounterState GetBossState(uint32 id) const { return id < bosses.size() ? bosses[id].state : TO_BE_DECIDED; }
|
||||
const BossBoundaryMap * GetBossBoundary(uint32 id) const { return id < bosses.size() ? &bosses[id].boundary : NULL; }
|
||||
protected:
|
||||
void SetBossNumber(uint32 number) { bosses.resize(number); }
|
||||
|
||||
Reference in New Issue
Block a user