| | |
| | | # summonIndex += 1
|
| | |
|
| | |
|
| | | # 更新最后一次离开的非中立常规地图, 从中立地图退出时需要回到该地方,必须在 DoResetWorldPosAndClear 之前更新
|
| | | if GameWorld.GetMap().GetMapFBType() == IPY_GameWorld.fbtNull and curPlayer.GetMapID() not in IpyGameDataPY.GetFuncEvalCfg("MapLine", 4):
|
| | | mapID = curPlayer.GetMapID()
|
| | | posX = curPlayer.GetPosX()
|
| | | posY = curPlayer.GetPosY()
|
| | | lineID = curPlayer.GetClientLineID()
|
| | | NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromMapID, mapID)
|
| | | NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromPosX, posX)
|
| | | NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromPosY, posY)
|
| | | NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromLineID, lineID)
|
| | | GameWorld.DebugLog("最后一次离开的非中立常规地图更新!mapID=%s,lineID=%s,Pos(%s,%s)" % (mapID, lineID, posX, posY))
|
| | | else:
|
| | | mapID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromMapID)
|
| | | posX = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromPosX)
|
| | | posY = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromPosY)
|
| | | lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromLineID)
|
| | | GameWorld.DebugLog("最后一次离开的非中立常规地图不变!mapID=%s,lineID=%s,Pos(%s,%s)" % (mapID, lineID, posX, posY))
|
| | | |
| | | #2. 调用切换地图接口
|
| | | curPlayer.DoResetWorldPosAndClear()
|
| | |
|
| | |
| | | #RouteServer未初始化不允许切换地图, 缓存处理
|
| | | GameServerRefresh.Set_PlayerRouteServerInitOK_OnLeaveFB(curPlayer, 1)
|
| | | return
|
| | | |
| | |
|
| | | #中立地图回到上一次非中立常规地图 |
| | | if curPlayer.GetMapID() in IpyGameDataPY.GetFuncEvalCfg("MapLine", 4):
|
| | | mapID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromMapID)
|
| | | posX = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromPosX)
|
| | | posY = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromPosY)
|
| | | lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromLineID)
|
| | | # 老号支持,本来就在中立地图的,返回新手村
|
| | | if not mapID:
|
| | | # {ְҵ:[dataMapID,posX,posY], ...}
|
| | | createRoleMapDict = IpyGameDataPY.GetFuncEvalCfg("CreateRoleMap", 1, {})
|
| | | if not createRoleMapDict:
|
| | | return
|
| | | job = curPlayer.GetJob()
|
| | | lineID = 0
|
| | | if job in createRoleMapDict:
|
| | | mapID, posX, posY = createRoleMapDict[job]
|
| | | else:
|
| | | mapInfoList = createRoleMapDict.values()
|
| | | mapID, posX, posY = mapInfoList[0]
|
| | | #离开副本
|
| | | mapID = curPlayer.GetFromMapID()
|
| | | posX = curPlayer.GetFromPosX()
|
| | | posY = curPlayer.GetFromPosY()
|
| | | |
| | | else:
|
| | | mapID = curPlayer.GetFromMapID()
|
| | | posX = curPlayer.GetFromPosX()
|
| | | posY = curPlayer.GetFromPosY()
|
| | | lineID = curPlayer.GetFromLineID()
|
| | | |
| | | if mapID == curPlayer.GetMapID():
|
| | | # 如果在同一张地图, 取DB重生点, 普通地图下线重上时FromMapID会被设置为本地图
|
| | | gameMap = GameWorld.GetMap()
|
| | |
| | | # ChangePlayerAction(curPlayer, IPY_GameWorld.paNull)
|
| | | #===============================================================================================
|
| | |
|
| | | PlayerResetWorldPosFB(curPlayer, mapID, posX, posY, False, curPlayer.GetFromLineID())
|
| | | PlayerResetWorldPosFB(curPlayer, mapID, posX, posY, False, lineID)
|
| | |
|
| | | #在空闲或者移动状态下,才能锁死玩家
|
| | | if curPlayer.GetPlayerAction() in [IPY_GameWorld.paNull] or curPlayer.IsMoving():
|