From ca358a222ca80d523fb232b1fd95b01450f8c1b6 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 24 十二月 2019 14:46:22 +0800
Subject: [PATCH] 8346 【恺英】【后端】协助系统(增加协助boss成功仙盟广播)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py |   74 +++++++++++++++++++++++++++++--------
 1 files changed, 58 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..a8a08f3 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)
@@ -525,6 +538,10 @@
     if gameMap.GetMapFBType() == IPY_GameWorld.fbtNull:
         return
     
+    #进入副本默认回满血
+    if curPlayer.GetHP() < curPlayer.GetMaxHP():
+        curPlayer.SetHP(curPlayer.GetMaxHP())
+        
     #副本管理器
     gameFBMgr = GameWorld.GetGameFB()
     
@@ -553,6 +570,9 @@
     if callFunc != None:
         GameWorld.Log("DoEnterFBLogic...", curPlayer.GetPlayerID())
         callFunc(curPlayer, tick)
+    #扣费一般都是在进入副本逻辑里处理,免费只有一次性的,所以放在后面进行重置,防止一直免费
+    if curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFBFree):
+        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_EnterFBFree, 0)
     return
 
 def OnCallHelpBattleOK(curPlayer, tick):
@@ -780,6 +800,18 @@
     
     #执行副本逻辑
     return callFunc(curPlayer, mapID, lineID)
+
+## 是否可以获得副本地图区域经验
+def OnCanGetAreaExp(curPlayer, mapID):
+    do_FBLogic_ID = __GetFBLogic_MapID(mapID)
+    
+    callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnCanGetAreaExp"))
+    
+    if callFunc == None:
+        return True
+    
+    #执行副本逻辑
+    return callFunc(curPlayer)
 
 ## 是否可以开始收集
 #  @param curPlayer 当前玩家
@@ -1556,7 +1588,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 +2204,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