diff options
| author | megamage <none@none> | 2009-03-18 20:41:49 -0600 | 
|---|---|---|
| committer | megamage <none@none> | 2009-03-18 20:41:49 -0600 | 
| commit | ef47783882e609406f879856d2d3ce5ee865ec80 (patch) | |
| tree | 36b74ab2ac2b05d81a4f4ebc49434d83f13c8600 /src/game/Player.cpp | |
| parent | 1c8775258422f1c51f4aa363191f2386ff01cd08 (diff) | |
    [7487] Avoid attempt use InstanceSave data for non-dungeons. Author: VladimirMangos
    Also check map existance and correctness at instance data loading.
    Removed unused and totally bugged InstanceMap::GetResetTime.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
| -rw-r--r-- | src/game/Player.cpp | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index af78fd3b039..91c1672d5aa 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -15842,6 +15842,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);  | 
