diff options
author | megamage <none@none> | 2008-12-03 17:06:31 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-03 17:06:31 -0600 |
commit | b36929bc79c164d2a0e727d35445d7c700b5d762 (patch) | |
tree | a5eaaad8494426a8ff6e541d41c2d8867760133d /src/game/MapInstanced.cpp | |
parent | 08d259e0cc3ed1c9b7addee6ad3595776a8af1c3 (diff) |
*Do not create new instance when player is logging in. (Try to fix "Instance Relog & Reset Exploit")
--HG--
branch : trunk
Diffstat (limited to 'src/game/MapInstanced.cpp')
-rw-r--r-- | src/game/MapInstanced.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/MapInstanced.cpp b/src/game/MapInstanced.cpp index 7b8f5fb9b64..06d38ed791a 100644 --- a/src/game/MapInstanced.cpp +++ b/src/game/MapInstanced.cpp @@ -179,13 +179,18 @@ Map* MapInstanced::GetInstance(const WorldObject* obj) map = CreateInstance(NewInstanceId, pSave, pSave->GetDifficulty()); return map; } - else + else if(!player->GetSession()->PlayerLoading()) { // if no instanceId via group members or instance saves is found // the instance will be created for the first time NewInstanceId = MapManager::Instance().GenerateInstanceId(); return CreateInstance(NewInstanceId, NULL, player->GetDifficulty()); } + else + { + sLog.outError("MAPINSTANCED: Player %s is trying to create instance (MapId %u) when login.", player->GetName(), player->GetMapId()); + return NULL; + } } } } |