mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Avoid send reset warning to map/difficulty cases without fixedreset time, by VladimirMangos.
--HG-- branch : trunk
This commit is contained in:
@@ -150,13 +150,20 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
||||
}
|
||||
}
|
||||
|
||||
if (mInstance && mEntry->IsDungeon())
|
||||
if (mInstance)
|
||||
{
|
||||
Difficulty diff = GetPlayer()->GetDifficulty(mEntry->IsRaid());
|
||||
if (uint32 timeReset = sInstanceSaveManager.GetResetTimeFor(GetPlayer()->GetMapId(),diff))
|
||||
if(MapDifficulty const* mapDiff = GetMapDifficultyData(mEntry->MapID,diff))
|
||||
{
|
||||
uint32 timeleft = timeReset - time(NULL);
|
||||
GetPlayer()->SendInstanceResetWarning(GetPlayer()->GetMapId(), diff, timeleft);
|
||||
if (mapDiff->resetTime)
|
||||
{
|
||||
|
||||
if (uint32 timeReset = sInstanceSaveManager.GetResetTimeFor(mEntry->MapID,diff))
|
||||
{
|
||||
uint32 timeleft = timeReset - time(NULL);
|
||||
GetPlayer()->SendInstanceResetWarning(mEntry->MapID, diff, timeleft);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user