Commit
Thanks to overy for reporting the issue. Fix and close #56
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -975,14 +975,11 @@ void MapPersistentStateManager::LoadCreatureRespawnTimes() | |
if (!data) | ||
continue; | ||
|
||
if (mapId != data->mapid) | ||
MapEntry const* mapEntry = sMapStore.LookupEntry(data->mapid); | ||
if (!mapEntry || (instanceId && (mapId != data->mapid || mapEntry->Instanceable()))) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Zakamurite
Contributor
|
||
continue; | ||
|
||
MapEntry const* mapEntry = sMapStore.LookupEntry(mapId); | ||
if (!mapEntry || (mapEntry->Instanceable() != (instanceId != 0))) | ||
continue; | ||
|
||
if (difficulty >= (!mapEntry->Instanceable() ? REGULAR_DIFFICULTY : (mapEntry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY))) | ||
if (difficulty >= (!mapEntry->Instanceable() ? REGULAR_DIFFICULTY + 1 : (mapEntry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY))) | ||
continue; | ||
|
||
MapPersistentState* state = AddPersistentState(mapEntry, instanceId, Difficulty(difficulty), resetTime, mapEntry->IsDungeon(), true, true, completedEncounters); | ||
|
@@ -1041,14 +1038,11 @@ void MapPersistentStateManager::LoadGameobjectRespawnTimes() | |
if (!data) | ||
continue; | ||
|
||
if (mapId != data->mapid) | ||
continue; | ||
|
||
MapEntry const* mapEntry = sMapStore.LookupEntry(mapId); | ||
if (!mapEntry || (mapEntry->Instanceable() != (instanceId != 0))) | ||
MapEntry const* mapEntry = sMapStore.LookupEntry(data->mapid); | ||
if (!mapEntry || (instanceId && (mapId != data->mapid || mapEntry->Instanceable()))) | ||
continue; | ||
|
||
if (difficulty >= (!mapEntry->Instanceable() ? REGULAR_DIFFICULTY : (mapEntry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY))) | ||
if (difficulty >= (!mapEntry->Instanceable() ? REGULAR_DIFFICULTY + 1 : (mapEntry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY))) | ||
continue; | ||
|
||
MapPersistentState* state = AddPersistentState(mapEntry, instanceId, Difficulty(difficulty), resetTime, mapEntry->IsDungeon(), true, true, completedEncounters); | ||
|
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 "12334" | ||
#define REVISION_NR "12335" | ||
#endif // __REVISION_NR_H__ |
2 comments
on commit 052d41e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really think that this commit actually broke stuff.
The respawn times in instances don't work anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xfurry
I hope maybe a look into mangosR2 code can help you
do
{
Field* fields = result->Fetch();
bar.step();
uint32 loguid = fields[0].GetUInt32();
uint64 respawn_time = fields[1].GetUInt64();
uint32 mapId = fields[2].GetUInt32();
uint32 instanceId = fields[3].GetUInt32();
uint8 difficulty = fields[4].GetUInt8();
time_t resetTime = (time_t)fields[5].GetUInt64();
uint32 completedEncounters = fields[6].GetUInt32();
CreatureData const* data = sObjectMgr.GetCreatureData(loguid);
if (!data)
continue;
if (instanceId && mapId != data->mapid)
continue;
MapEntry const* mapEntry = sMapStore.LookupEntry(data->mapid);
if (!mapEntry || (mapEntry->Instanceable() != (instanceId != 0)))
continue;
if (mapEntry->Instanceable() && difficulty >= (mapEntry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY))
continue;
MapPersistentState* state = AddPersistentState(mapEntry, instanceId, Difficulty(difficulty), resetTime, mapEntry->IsDungeon(), true, true, completedEncounters);
if (!state)
continue;
state->SetCreatureRespawnTime(loguid, time_t(respawn_time));
++count;
} while (result->NextRow());
Yes, I can confirm that this commit actually breaks the instance respawn times. If I revert this line will work just fine.