From 17ba04732178a3442a3e3a361c7a1d3676a4844f Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 21 一月 2019 14:58:50 +0800
Subject: [PATCH] 5924 【后端】【1.5.100】诛仙Boss功能

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py |   22 ++++++++++++++++++----
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py            |    4 ++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py                        |    3 +++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py                           |    2 +-
 4 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py
index c436a58..83eee3e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py
@@ -82,10 +82,11 @@
     if curPlayer.GetOfficialRank() < ipyData.GetRealmLV():
         return
     #诛仙总评分
-    
+    if ItemCommon.GetZhuXianEquipTotalGS(curPlayer) < ipyData.GetZhuXianScore():
+        return
     
     enterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntDay % ChConfig.Def_FBMapID_ZhuXianBoss)
-    if enterCnt >= FBCommon.GetEnterFBMaxCnt:
+    if enterCnt >= FBCommon.GetEnterFBMaxCnt(curPlayer, ChConfig.Def_FBMapID_ZhuXianBoss):
         if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhuXianBossHelpCnt):
             return
         if not curPlayer.GetFamilyID():
@@ -328,7 +329,7 @@
 #
 def UpdateHurtInfo(curPlayer, hurtHP, isAdd=False):
     enterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntDay % ChConfig.Def_FBMapID_ZhuXianBoss)
-    if enterCnt >= FBCommon.GetEnterFBMaxCnt:
+    if enterCnt >= FBCommon.GetEnterFBMaxCnt(curPlayer, ChConfig.Def_FBMapID_ZhuXianBoss):
         #没归属的不进伤害榜
         return
     lineID = GameWorld.GetGameWorld().GetPropertyID() - 1
@@ -661,4 +662,17 @@
 def DoPlayerDead(curPlayer):
     return
 
-
+## 检查是否可攻击, 主判定不可攻击的情况,其他逻辑由外层决定
+#  @param attacker 攻击方
+#  @param defender 防守方
+#  @return bool
+def CheckCanAttackTagObjInFB(attacker, defender):
+    atkObjType = attacker.GetGameObjType()
+    defObjType = defender.GetGameObjType()
+    if atkObjType == IPY_GameWorld.gotPlayer and defObjType == IPY_GameWorld.gotNPC:
+        gameWorld = GameWorld.GetGameWorld()
+        lineID = gameWorld.GetPropertyID() - 1
+        if not gameWorld.GetGameWorldDictByKey(FBDict_IsReduceing%lineID):
+            PlayerControl.NotifyCode(attacker, 'TryEnterJadeDynastyBossError_7')
+            return False
+    return True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
index a436f53..7f9f3b8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
@@ -482,6 +482,9 @@
         value = eval(FormulaControl.GetCompileFormula("EquipGSFormula", IpyGameDataPY.GetFuncCfg("EquipGSFormula")))
     return value
 
+def GetZhuXianEquipTotalGS(curPlayer):
+    ##诛仙装备总评分
+    return 10000000
 #---------------------------------------------------------------------
 ## 通过效果ID,检查是否为指定物品 
 #  @param curPlayer 当前玩家
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index b04232e..7f1ddd9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -1704,7 +1704,7 @@
             bossID = GameLogic_ZhuXianBoss.CurFBLineBOSSID(lineID)
             extendParamList = [bossID, -1]
             enterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntDay % ChConfig.Def_FBMapID_ZhuXianBoss)
-            if enterCnt >= FBCommon.GetEnterFBMaxCnt:
+            if enterCnt >= FBCommon.GetEnterFBMaxCnt(curPlayer, ChConfig.Def_FBMapID_ZhuXianBoss):
                 if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhuXianBossHelpCnt):
                     extendParamList = [bossID, curPlayer.GetFamilyID()]
             
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py
index a9c50a9..ef7d527 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py
@@ -179,11 +179,11 @@
                         break
                     
                 findGameWord = gameWorld
-                findPlayerManager = gameWorld
+                findPlayerManager = playerManager
                 break
             if not findGameWord and propertyID == 0:
                 findGameWord = gameWorld
-                findPlayerManager = gameWorld
+                findPlayerManager = playerManager
         
         if findPlayerManager and tagMapID == ChConfig.Def_FBMapID_ZhuXianBoss:
             if packCMDList[3] !=-1 and not GameLogic_ZhuXianBoss.GetHasSameFamilyMerber(packCMDList[3], findPlayerManager):

--
Gitblit v1.8.0