[8106] Revert "Fixed instance heroic/raid reset cooldown at switch normal/heroic difficalty."

This reverts commit 655bb6125abcba28318b2074e1624bb4eb21cadd.

After discussion with Wyk3d fix considered as wrong way.
This commit is contained in:
VladimirMangos 2009-07-02 00:00:13 +04:00
parent 3f7351ec25
commit 8089b3bc91
2 changed files with 8 additions and 3 deletions

View file

@ -128,7 +128,7 @@ void InstanceSaveManager::RemoveInstanceSave(uint32 InstanceId)
InstanceSaveHashMap::iterator itr = m_instanceSaveById.find( InstanceId );
if(itr != m_instanceSaveById.end())
{
// save the resettime for instances only when they get unloaded
// save the resettime for normal instances only when they get unloaded
if(time_t resettime = itr->second->GetResetTimeForDB())
CharacterDatabase.PExecute("UPDATE instance SET resettime = '"UI64FMTD"' WHERE id = '%u'", (uint64)resettime, InstanceId);
delete itr->second;
@ -173,7 +173,12 @@ void InstanceSave::SaveToDB()
time_t InstanceSave::GetResetTimeForDB()
{
return GetResetTime();
// only save the reset time for normal instances
const MapEntry *entry = sMapStore.LookupEntry(GetMapId());
if(!entry || entry->map_type == MAP_RAID || GetDifficulty() == DIFFICULTY_HEROIC)
return 0;
else
return GetResetTime();
}
// to cache or not to cache, that is the question

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8105"
#define REVISION_NR "8106"
#endif // __REVISION_NR_H__