From 9aec240e848ba4bb6b473707ad8f48aee5180141 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 29 四月 2019 10:06:52 +0800
Subject: [PATCH] 6632 子 【开发】增加新的符印属性 / 【后端】增加新的符印属性
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
index 1689677..ee6d852 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
@@ -18,9 +18,11 @@
import IPY_GameWorld
import PlayerControl
import GameWorldProcess
+import CrossRealmPlayer
import PlayerSuccess
import ReadChConfig
import ShareDefine
+import PyGameData
import FBCommon
import GameMap
import GameObj
@@ -484,6 +486,29 @@
def DoEnterFBLogic(curPlayer, tick):
curPlayerID = curPlayer.GetID()
+ if GameWorld.IsCrossServer():
+ mapID = GameWorld.GetMap().GetMapID()
+ mapID = FBCommon.GetRecordMapID(mapID)
+ if mapID in ChConfig.Def_CrossDynamicLineMap:
+ fbZoneID = FBCommon.GetCrossDynamicLineMapZoneID()
+ fbFuncLineID = FBCommon.GetCrossDynamicLineMapFuncLineID()
+ playerZoneID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqCrossFBZoneID)
+ playerFuncLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqCrossFBFuncLine)
+ if fbZoneID != playerZoneID or fbFuncLineID != playerFuncLineID:
+ GameWorld.ErrLog("DoEnterFB 玩家与当前副本线路所属分区或功能分线不同,踢出玩家!fbZoneID=%s,playerZoneID=%s,fbFuncLineID=%s,playerFuncLineID=%s"
+ % (fbZoneID, playerZoneID, fbFuncLineID, playerFuncLineID), curPlayerID)
+ CrossRealmPlayer.PlayerExitCrossServer(curPlayer)
+ return
+ GameWorld.Log("玩家进入跨服副本动态分配的线路: fbZoneID=%s,playerZoneID=%s,fbFuncLineID=%s,playerFuncLineID=%s"
+ % (fbZoneID, playerZoneID, fbFuncLineID, playerFuncLineID), curPlayerID)
+
+ gameWorld = GameWorld.GetGameWorld()
+ copyMapID = gameWorld.GetCopyMapID()
+ if copyMapID not in PyGameData.g_crossPlayerServerGroupIDInfo:
+ PyGameData.g_crossPlayerServerGroupIDInfo[copyMapID] = {}
+ playerServerGroupIDDict = PyGameData.g_crossPlayerServerGroupIDInfo[copyMapID]
+ playerServerGroupIDDict[curPlayerID] = PlayerControl.GetPlayerServerGroupID(curPlayer)
+
# 自伸缩副本根据玩家进入开启,主动调用一次,避免间隔调用时机未触发导致逻辑错乱
GameWorldProcess.EnterOpenFB(tick)
@@ -1555,9 +1580,10 @@
callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnGetFBEnterPos"))
if callFunc == None:
- return
-
- posInfo = callFunc(curPlayer, mapID, lineId, ipyEnterPosInfo, tick)
+ posInfo = ipyEnterPosInfo
+ else:
+ posInfo = callFunc(curPlayer, mapID, lineId, ipyEnterPosInfo, tick)
+
if not posInfo:
return
enterX, enterY = posInfo[:2]
@@ -2177,6 +2203,17 @@
return callFunc(curPlayer, mapID, lineID)
+## 进入跨服副本注册数据前逻辑
+## @return: 是否可以注册前往跨服副本,次函数中可以写一些扣除消耗逻辑等
+def OnRegEnterCrossFB(curPlayer, mapID, lineID):
+ do_FBLogic_ID = __GetFBLogic_MapID(mapID)
+
+ callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnRegEnterCrossFB"))
+
+ if callFunc == None:
+ return True
+
+ return callFunc(curPlayer, mapID, lineID)
## 结束跨服副本
def OnEndCrossFB(curPlayer, mapID, lineID, exData):
@@ -2197,6 +2234,17 @@
return
return callFunc()
+## 是否需要做进入副本通用检查条件逻辑,默认需要检查
+def OnNeedCheckCanEnterFBComm(curPlayer, mapID, lineID):
+ do_FBLogic_ID = __GetFBLogic_MapID(mapID)
+
+ callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnNeedCheckCanEnterFBComm"))
+
+ if callFunc == None:
+ return True
+
+ return callFunc(curPlayer, mapID, lineID)
+
def OnPlayerLVUp(curPlayer):
## 玩家升级
do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())
--
Gitblit v1.8.0