mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
Use reset time for normal/heroic from new DBC. Improve basic support for raid difficalties.
This commit is contained in:
parent
9850551751
commit
a9af7f2b1c
24 changed files with 340 additions and 173 deletions
|
|
@ -137,10 +137,21 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
|||
}
|
||||
}
|
||||
|
||||
if((mEntry->IsRaid() || (mEntry->IsNonRaidDungeon() && mEntry->SupportsHeroicMode() && GetPlayer()->IsHeroicDungeon())) && mInstance)
|
||||
if (mInstance)
|
||||
{
|
||||
uint32 timeleft = sInstanceSaveManager.GetResetTimeFor(GetPlayer()->GetMapId()) - time(NULL);
|
||||
GetPlayer()->SendInstanceResetWarning(GetPlayer()->GetMapId(), GetPlayer()->GetDungeonDifficulty(), timeleft);
|
||||
if(mEntry->IsRaid())
|
||||
{
|
||||
uint32 timeleft = sInstanceSaveManager.GetResetTimeFor(GetPlayer()->GetMapId()) - time(NULL);
|
||||
GetPlayer()->SendInstanceResetWarning(GetPlayer()->GetMapId(), GetPlayer()->GetRaidDifficulty(), timeleft);
|
||||
}
|
||||
else if(mEntry->IsNonRaidDungeon() && GetPlayer()->GetDungeonDifficulty() > DUNGEON_DIFFICULTY_NORMAL)
|
||||
{
|
||||
if(MapDifficulty const* mapDiff = GetMapDifficultyData(mEntry->MapID,GetPlayer()->GetDungeonDifficulty()))
|
||||
{
|
||||
uint32 timeleft = sInstanceSaveManager.GetResetTimeFor(GetPlayer()->GetMapId()) - time(NULL);
|
||||
GetPlayer()->SendInstanceResetWarning(GetPlayer()->GetMapId(), GetPlayer()->GetDungeonDifficulty(), timeleft);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// mount allow check
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue