|
@@ -137,13 +137,13 @@ namespace ET.Server
|
|
|
Map map = null;
|
|
|
|
|
|
// 角色身上绑定的场景信息
|
|
|
- PlayerMapInfo mapData = player.GetComponent<PlayerTempDataComponent>().MapData;
|
|
|
+ PlayerMapInfo playerMapInfo = player.GetComponent<PlayerTempDataComponent>().MapData;
|
|
|
|
|
|
// 执行普通场景逻辑
|
|
|
- MapConfig prop = MapConfigCategory.Instance.Get(mapData.mapId);
|
|
|
+ MapConfig prop = MapConfigCategory.Instance.Get(playerMapInfo.mapId);
|
|
|
if (prop != null)
|
|
|
{
|
|
|
- map = player.DomainScene().GetComponent<GameMapComponent>().Get(mapData.mapInstanceId);
|
|
|
+ map = player.DomainScene().GetComponent<GameMapComponent>().Get(playerMapInfo.mapInstanceId);
|
|
|
}
|
|
|
|
|
|
if (map != null)
|
|
@@ -151,11 +151,16 @@ namespace ET.Server
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
+ if (map == null)
|
|
|
+ {
|
|
|
+ playerMapInfo.mapId = 10098;
|
|
|
+ }
|
|
|
+
|
|
|
// 创建一个场景
|
|
|
JObject jsonObject = new JObject();
|
|
|
jsonObject.Add("id", player.GetId());
|
|
|
jsonObject.Add("logicServerId", player.GetLogicServerId());
|
|
|
- jsonObject.Add("areaId", mapData.mapId);
|
|
|
+ jsonObject.Add("areaId", playerMapInfo.mapId);
|
|
|
map = CreateMap(player, jsonObject, false);
|
|
|
|
|
|
return map;
|
|
@@ -205,6 +210,7 @@ namespace ET.Server
|
|
|
if (resCode == 0)
|
|
|
{
|
|
|
jsonObject.Add("instanceId", instanceId);
|
|
|
+ jsonObject.Add("areaId", mapId);
|
|
|
return CreaLocalMap(player, prop, jsonObject, instanceId, mapId, player.GetLogicServerId().ToString());
|
|
|
}
|
|
|
|