From 4df232daf6817c19f410e3187b7be7c33c74d9b0 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期二, 04 六月 2019 11:31:31 +0800 Subject: [PATCH] 6501 修改任务类型 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py | 55 +++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 39 insertions(+), 16 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 e2a5eeb..f761133 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py @@ -22,6 +22,7 @@ import PlayerSuccess import ReadChConfig import ShareDefine +import PyGameData import FBCommon import GameMap import GameObj @@ -271,6 +272,12 @@ # @return None # @remarks 函数详细说明. def DoFB_Player_KillNPC(curPlayer , curNPC , tick): + mapID = PlayerControl.GetCustomMapID(curPlayer) + lineID = PlayerControl.GetCustomLineID(curPlayer) + if mapID: + DoCustomScene_Player_KillNPC(curPlayer, curNPC, mapID, lineID) + return + do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID()) callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFB_Player_KillNPC")) @@ -501,6 +508,13 @@ 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) @@ -511,9 +525,8 @@ gameMap = GameWorld.GetMap() gameMapID = gameMap.GetMapID() - #如果已经设置过副本功能线路属性,则进入时同步玩家,一般下线重登或者非第一个进入该副本的玩家(如队友)会收到该包 - if FBCommon.GetHadSetFBPropertyMark() and gameMap.GetMapFBType() != IPY_GameWorld.fbtSingle: - PlayerControl.SetFBFuncLineID(curPlayer, FBCommon.GetFBPropertyMark()) + reqFuncLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqFBFuncLine) + PlayerControl.SetFBFuncLineID(curPlayer, reqFuncLineID) #成长NPC所需数据初始化 InitFBNPCStrengthenData(curPlayer, gameMap) @@ -1556,7 +1569,7 @@ callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnEnterFBEvent")) if callFunc == None: - return False + return True return callFunc(curPlayer, mapID, lineID, tick) @@ -2172,28 +2185,38 @@ return callFunc(curPlayer, mapID, lineID) -## 客户端发送刷新自定义副本奖励 -def OnRefreshCustomFBPrize(curPlayer, mapID, lineID): +## 判断可否召唤木桩怪 +def OnCanSummonPriWoodPile(curPlayer, mapID, lineID, npcID, count): do_FBLogic_ID = __GetFBLogic_MapID(mapID) - callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnRefreshCustomFBPrize")) + callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnCanSummonPriWoodPile")) if callFunc == None: - return [] + return True - return callFunc(curPlayer, mapID, lineID) + return callFunc(curPlayer, mapID, lineID, npcID, count) -## 给自定义副本奖励后续处理 -## @return: 返回结算副本over信息字典,不含jsonItem信息 -def OnGiveCustomFBPrizeOK(curPlayer, mapID, lineID): +## 自定义场景副本击杀NPC +def DoCustomScene_Player_KillNPC(curPlayer, curNPC, mapID, lineID): do_FBLogic_ID = __GetFBLogic_MapID(mapID) - callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnGiveCustomFBPrizeOK")) + callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoCustomScene_Player_KillNPC")) - if callFunc == None: - return {} + if callFunc: + callFunc(curPlayer, curNPC, mapID, lineID) + + return + +## 自定义场景采集OK,需自带是否允许采集的判断 +def OnCustomSceneCollectOK(curPlayer, mapID, lineID, npcID): + do_FBLogic_ID = __GetFBLogic_MapID(mapID) - return callFunc(curPlayer, mapID, lineID) + callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnCustomSceneCollectOK")) + + if callFunc: + return callFunc(curPlayer, mapID, lineID, npcID) + + return ## 进入跨服副本注册数据前逻辑 ## @return: 是否可以注册前往跨服副本,次函数中可以写一些扣除消耗逻辑等 -- Gitblit v1.8.0