|
@@ -97,7 +97,10 @@ namespace ET.Server
|
|
|
|
|
|
GameMapComponent component = player.DomainScene().GetComponent<GameMapComponent>();
|
|
|
|
|
|
- map = component.Get(player.Map.Id);
|
|
|
+ if (player.Map != null)
|
|
|
+ {
|
|
|
+ map = component.Get(player.Map.Id);
|
|
|
+ }
|
|
|
|
|
|
// 老场景
|
|
|
if (map != null)
|
|
@@ -109,12 +112,12 @@ namespace ET.Server
|
|
|
JObject jsonObject = new JObject();
|
|
|
jsonObject.Add("id", player.GetId());
|
|
|
jsonObject.Add("logicServerId", player.GetLogicServerId());
|
|
|
- jsonObject.Add("areaId", 10098);
|
|
|
+ jsonObject.Add("areaId", 10099);
|
|
|
map = CreateMap(player, jsonObject, false);
|
|
|
|
|
|
if (map != null)
|
|
|
{
|
|
|
- map = ChangeArea(player, new AreaData(10098, map.Id), false);
|
|
|
+ map = ChangeArea(player, new AreaData(10099, map.Id), false);
|
|
|
}
|
|
|
|
|
|
return map;
|
|
@@ -192,6 +195,7 @@ namespace ET.Server
|
|
|
{
|
|
|
Log.Info($"创建Area场景:{map.MapId}, instanceId:{instanceId}, srvId:" + map.LogicServerId);
|
|
|
map.BindBattleServer(player, bsServerId);
|
|
|
+ scene.GetComponent<GameMapComponent>().Add(map);
|
|
|
}
|
|
|
else
|
|
|
{
|