*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:
megamage
2009-08-12 08:01:06 -05:00
parent 1bdc65e5ee
commit cd78172c7d
4 changed files with 25 additions and 0 deletions
@@ -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();
}