From 6545e5e45d8e523ebe7dbfe4719ba0f08007edeb Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 11 三月 2019 10:11:01 +0800
Subject: [PATCH] 6312 【后端】【2.0】删除神兵特效
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MunekadoTrial.py | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 54 insertions(+), 5 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 1329f17..7a07176 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,7 @@
import EventShell
import NPCCommon
import FBHelpBattle
+import PlayerActLogin
import math
@@ -85,8 +86,9 @@
##---获得副本刷怪配置---
# @param None
# @return 配置信息
-def __GetZMSLnpcCfg(lineID):
- mapID = GameWorld.GetMap().GetMapID()
+def __GetZMSLnpcCfg(lineID, mapID=0):
+ if not mapID:
+ mapID = GameWorld.GetMap().GetMapID()
return FBCommon.GetFBLineRefreshNPC(mapID, lineID)
def GetMTFBLineStepTime(lineID=-1):
@@ -436,7 +438,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)
@@ -447,7 +449,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)
#=======================================================================================
@@ -463,6 +465,53 @@
GameWorld.DebugLog(' overDict=%s'%overDict, curPlayer.GetID())
FBCommon.Notify_FB_Over(curPlayer, overDict)
return
+
+## 可否扫荡
+def OnPlayerFBSweepAsk(curPlayer, mapID, lineID, sweepCnt, isFinish, dataEx):
+ if mapID != ChConfig.Def_FBMapID_MunekadoTrial:
+ return
+ # 暂写死,前两层不能扫
+ if lineID < 2:
+ GameWorld.DebugLog("前两层不能扫荡!")
+ return
+ historyStar = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID-1, False, [mapID])
+ if historyStar < 5:
+ GameWorld.DebugLog("没有S级不能扫荡!")
+ return
+
+ return True
+
+## 助战扫荡结果
+def OnPlayerFBHelpBattleSweepResult(curPlayer, mapID, lineID, helpBattlePlayerDict, addXianyuanCoin, reason):
+ #扣门票要在公共逻辑中完成
+
+ refreshNPCList = __GetZMSLnpcCfg(lineID, mapID)[0]
+ if not refreshNPCList:
+ return
+ lastNPCList = refreshNPCList[-1]
+ if not lastNPCList:
+ return
+ killNPCID = lastNPCList[0][0] # 默认最后一波的NPCID为通关boss奖励ID
+ GameWorld.DebugLog("扫荡宗门试炼: killNPCID=%s,addXianyuanCoin=%s,reason=%s,helpBattlePlayerDict=%s"
+ % (killNPCID, addXianyuanCoin, reason, helpBattlePlayerDict))
+
+ star = 5
+ EventReport.WriteEvent_FB(curPlayer, mapID, lineID, ChConfig.CME_Log_End, 0, 1)
+
+ 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)
+
+ # 通知结果
+ overDict = {FBCommon.Over_grade:star,FBCommon.Over_dataMapID:mapID,FBCommon.Over_isPass:1, FBCommon.Over_isSweep:1}
+ overDict[FBCommon.Over_helpPlayer] = helpBattlePlayerDict
+ overDict[FBCommon.Over_xianyuanCoin] = [addXianyuanCoin, reason]
+ overDict[FBCommon.Over_itemInfo] = jsonItemList
+ FBCommon.Notify_FB_Over(curPlayer, overDict)
+ return True
## 检查是否可攻击, 主判定不可攻击的情况,其他逻辑由外层决定
# @param attacker 攻击方
@@ -740,7 +789,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