From b69fe56d5ebb784c4430cb5e86f460efafa1b30a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 28 三月 2019 16:57:29 +0800
Subject: [PATCH] 6373 【后端】【2.0】删除无用功能代码、封包、配置(生产系统)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/BossHurtMng.py |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/BossHurtMng.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/BossHurtMng.py
index 3b4c329..87ee2c5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/BossHurtMng.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/BossHurtMng.py
@@ -45,8 +45,11 @@
 import DataRecordPack
 import IpyGameDataPY
 import ItemControler
+import CrossRealmPlayer
+import ShareDefine
 import ChConfig
 import FBLogic
+import PlayerVip
 
 import operator
 import json
@@ -352,8 +355,7 @@
                 randAwardList = GameWorld.GetResultByRandomList(actionRandAwardList)
                 if randAwardList:
                     for itemID, itemCnt, isBind in randAwardList:
-                        ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind,
-                                                     [IPY_GameWorld.rptItem, IPY_GameWorld.rptAnyWhere], True)
+                        ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem, IPY_GameWorld.rptAnyWhere])
             
                 
         # 同步伤害列表
@@ -499,9 +501,10 @@
 ## 过天
 def OnDay(curPlayer):
     #清空当天摸boss次数
+    setCrossDict = {}
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WorldBoss_HurtCnt, 0)
     killBossCntLimitDict = IpyGameDataPY.GetFuncEvalCfg('KillBossCntLimit', 2, {})
-    for index,limitCnt in killBossCntLimitDict.items():
+    for index, limitCnt in killBossCntLimitDict.items():
  
         killCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCnt%index, 0)
         #hasBuyKillCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntBuyCnt%index, 0)
@@ -512,8 +515,14 @@
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Boss_KillCntItemAddCnt % index, 0)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Boss_KillCnt % index, 0)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Boss_KillCntBuyCnt % index, 0)
+        if index == ShareDefine.Def_Boss_Func_Dogz:
+            setCrossDict.update({ChConfig.Def_PDict_Boss_KillCntItemAddCnt % index:0,
+                                 ChConfig.Def_PDict_Boss_KillCnt % index:0,
+                                 ChConfig.Def_PDict_Boss_KillCntBuyCnt % index:0,
+                                 })
         
     NotifyAttackBossCnt(curPlayer)
+    CrossRealmPlayer.SetCrossPlayerNomalDict(curPlayer, setCrossDict)
     return
 
 ## 登录处理
@@ -548,3 +557,18 @@
     NetPackCommon.SendFakePack(curPlayer, packdata)
     return
 
+
+# BOSS剩余可击杀次数
+def GetCanKillBossCnt(curPlayer, bossFuncIndex):
+    hasKillCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCnt%bossFuncIndex, 0)
+    itemAddKillCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntItemAddCnt%bossFuncIndex, 0)
+    killLimitPrivilege = IpyGameDataPY.GetFuncEvalCfg('KillBossCntLimit', 4, {}).get(bossFuncIndex, 0)
+    if killLimitPrivilege:
+        limitCnt = PlayerVip.GetPrivilegeValue(curPlayer, killLimitPrivilege)
+    else:
+        limitCnt = IpyGameDataPY.GetFuncEvalCfg('KillBossCntLimit', 2, {}).get(bossFuncIndex, 0)
+    
+    
+    return max(limitCnt + itemAddKillCnt - hasKillCnt, 0)
+
+

--
Gitblit v1.8.0