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());
|
Difficulty diff = GetPlayer()->GetDifficulty(mEntry->IsRaid());
|
||||||
if (uint32 timeReset = sInstanceSaveManager.GetResetTimeFor(GetPlayer()->GetMapId(),diff))
|
if(MapDifficulty const* mapDiff = GetMapDifficultyData(mEntry->MapID,diff))
|
||||||
|
{
|
||||||
|
if (mapDiff->resetTime)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (uint32 timeReset = sInstanceSaveManager.GetResetTimeFor(mEntry->MapID,diff))
|
||||||
{
|
{
|
||||||
uint32 timeleft = timeReset - time(NULL);
|
uint32 timeleft = timeReset - time(NULL);
|
||||||
GetPlayer()->SendInstanceResetWarning(GetPlayer()->GetMapId(), diff, timeleft);
|
GetPlayer()->SendInstanceResetWarning(mEntry->MapID, diff, timeleft);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user