From 5ad2bd52bfbdf91a93ecf3a6c98c5e578edabb2b Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 26 三月 2019 17:18:50 +0800
Subject: [PATCH] 6373 【后端】【2.0】删除无用功能代码、封包、配置(页游天梯)
---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MunekadoTrial.py |   30 +++++++++++++++++++-----------
 1 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MunekadoTrial.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MunekadoTrial.py
index 3cdf01e..22e5cba 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MunekadoTrial.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MunekadoTrial.py
@@ -35,6 +35,9 @@
 import EventShell
 import NPCCommon
 import FBHelpBattle
+import PlayerActLogin
+import PlayerPet
+import PlayerHorse
 
 import math
 
@@ -118,12 +121,16 @@
 #  @param tick 时间戳
 #  @return 布尔值
 def OnEnterFBEvent(curPlayer, mapID, lineID, tick):
-    if lineID == 0:
-        return True
-    historyStar = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID-1, False, [mapID])
-    needStar = IpyGameDataPY.GetFuncCfg('MunekadoLockLimit')
-    if historyStar < needStar:
-        GameWorld.DebugLog('    上一层评级未达到%s,无法挑战本层!' % needStar)
+    if lineID != 0:
+        historyStar = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID-1, False, [mapID])
+        needStar = IpyGameDataPY.GetFuncCfg('MunekadoLockLimit')
+        if historyStar < needStar:
+            GameWorld.DebugLog('    上一层评级未达到%s,无法挑战本层!' % needStar)
+            return False
+    #坐骑与灵宠总等级
+    needSumLV = IpyGameDataPY.GetFuncEvalCfg('MunekadoLockLimit', 2, {}).get(lineID, 0)
+    if PlayerPet.GetTotalPetLV(curPlayer) + PlayerHorse.GetHorseSumLV(curPlayer) < needSumLV:
+        GameWorld.DebugLog('    坐骑与灵宠总等级未达到%s,无法挑战本层!' % needSumLV)
         return False
     return True
 
@@ -426,7 +433,7 @@
         if star == 5:
             EventReport.WriteEvent_FB(curPlayer, mapID, lineID, ChConfig.CME_Log_End, 0, 1)
         EventShell.EventRespons_FBEvent(curPlayer, "zmsl_%s_%s" % (lineID, star))
-        #PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_MunekadoTrial, 1, [playerCount, star, lineID+1])
+        PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_MunekadoTrial, 1, [playerCount, star, lineID+1])
         EventShell.EventRespons_FBEvent(curPlayer, "passzmsl")
         # 如果在副本中过天,则只给物品奖励,不变更过关信息
         if not isInFBOnDay:
@@ -437,7 +444,7 @@
         else:
             curPlayer.SetDict(ChConfig.Def_PlayerKey_IsInFBOnDay, 0)
         PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_MunekadoTrialEx, 1)
-            
+        PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_MunekadoTrial, 1)
             #=======================================================================================
             # #给奖励
             # needSpace = len(prizeItemList)
@@ -448,7 +455,7 @@
             #    GameWorld.DebugLog("背包空间不够,发送邮件: mailItemList=%s" % str(prizeItemList), curPlayer.GetPlayerID())
             # else:
             #    for itemID, itemCnt, isBind in prizeItemList:
-            #        ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind, [IPY_GameWorld.rptItem], event=["MunekadoTrial", False, {}])
+            #        ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem], event=["MunekadoTrial", False, {}])
             #overDict[FBCommon.Over_itemInfo] = FBCommon.GetJsonItemList(prizeItemList)
             #=======================================================================================
             
@@ -500,7 +507,8 @@
     EventShell.EventRespons_FBEvent(curPlayer, "zmsl_%s_%s" % (lineID, star))
     EventShell.EventRespons_FBEvent(curPlayer, "passzmsl")
     PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_MunekadoTrialEx, 1)
-    
+    PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_MunekadoTrial, 1, [1, star, lineID+1])
+    PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_MunekadoTrial, 1)
     jsonItemList, totalExp, totalMoney = NPCCommon.GiveKillNPCDropPrize(curPlayer, ChConfig.Def_FBMapID_MunekadoTrial, {killNPCID:1}, curGrade=star)
     
     # 通知结果
@@ -787,7 +795,7 @@
     ItemCommon.DelCostItem(curPlayer, itemPack, delInfoDict)
     
     #给物品
-    ItemControler.GivePlayerItem(curPlayer, exchangeItemID, exchangeItemCount, exchangeItemIsBind, [IPY_GameWorld.rptItem], 
+    ItemControler.GivePlayerItem(curPlayer, exchangeItemID, exchangeItemCount, 0, [IPY_GameWorld.rptItem], 
                                  event=[ChConfig.ItemGive_TrialExchange, False, {}])
     #任务
     EventShell.EventRespons_TrialExchange(curPlayer, costItemID)
--
Gitblit v1.8.0