[9104] Avoid send reset warning to map/difficulty cases without fixed reset time.

This commit is contained in:
VladimirMangos 2010-01-02 20:49:00 +03:00
parent aa372cbfda
commit e8e5bbddea
2 changed files with 11 additions and 5 deletions

View file

@ -137,13 +137,19 @@ void WorldSession::HandleMoveWorldportAckOpcode()
} }
} }
if (mInstance && mEntry->IsDungeon()) if (mInstance)
{ {
Difficulty diff = GetPlayer()->GetDifficulty(mEntry->IsRaid()); 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); if (mapDiff->resetTime)
GetPlayer()->SendInstanceResetWarning(GetPlayer()->GetMapId(), diff, timeleft); {
if (uint32 timeReset = sInstanceSaveMgr.GetResetTimeFor(mEntry->MapID,diff))
{
uint32 timeleft = timeReset - time(NULL);
GetPlayer()->SendInstanceResetWarning(mEntry->MapID, diff, timeleft);
}
}
} }
} }

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "9103" #define REVISION_NR "9104"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__