mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7487] Avoid attempt use InstanceSave data for non-dungeons.
Also check map existance and correctness at instance data loading. Removed unused and totally bugged InstanceMap::GetResetTime.
This commit is contained in:
parent
b3490d3b74
commit
a7fd57cc74
6 changed files with 85 additions and 70 deletions
|
|
@ -15469,6 +15469,14 @@ void Player::_LoadBoundInstances(QueryResult *result)
|
|||
// so the value read from the DB may be wrong here but only if the InstanceSave is loaded
|
||||
// and in that case it is not used
|
||||
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(mapId);
|
||||
if(!mapEntry || !mapEntry->IsDungeon())
|
||||
{
|
||||
sLog.outError("_LoadBoundInstances: player %s(%d) has bind to not existed or not dungeon map %d", GetName(), GetGUIDLow(), mapId);
|
||||
CharacterDatabase.PExecute("DELETE FROM character_instance WHERE guid = '%d' AND instance = '%d'", GetGUIDLow(), instanceId);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!perm && group)
|
||||
{
|
||||
sLog.outError("_LoadBoundInstances: player %s(%d) is in group %d but has a non-permanent character bind to map %d,%d,%d", GetName(), GetGUIDLow(), GUID_LOPART(group->GetLeaderGUID()), mapId, instanceId, difficulty);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue