*Do not create new instance when player is logging in. (Try to fix "Instance Relog & Reset Exploit")
--HG-- branch : trunk
This commit is contained in:
1 parent
08d259e0cc
commit
b36929bc79
2 files changed
+15
-7
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user