Skip to content

Commit

Permalink
[9104] Avoid send reset warning to map/difficulty cases without fixed…
Browse files Browse the repository at this point in the history
… reset time.
  • Loading branch information
VladimirMangos committed Jan 2, 2010
1 parent e943083 commit ef557ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions src/game/MovementHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,19 @@ void WorldSession::HandleMoveWorldportAckOpcode()
}
}

if (mInstance && mEntry->IsDungeon())
if (mInstance)
{
Difficulty diff = GetPlayer()->GetDifficulty(mEntry->IsRaid());
if (uint32 timeReset = sInstanceSaveMgr.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 = sInstanceSaveMgr.GetResetTimeFor(mEntry->MapID,diff))
{
uint32 timeleft = timeReset - time(NULL);
GetPlayer()->SendInstanceResetWarning(mEntry->MapID, diff, timeleft);
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9103"
#define REVISION_NR "9104"
#endif // __REVISION_NR_H__

0 comments on commit ef557ae

Please sign in to comment.