From 2ee379b4bfc25630f1a2b2d182a6ca6a2edaec36 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期一, 03 十二月 2018 20:35:00 +0800 Subject: [PATCH] 5180 【后端】【1.3】【1.3.100】直购商品需要触发充值累计活动 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py | 74 ++++++++++++++++++++++++------------- 1 files changed, 48 insertions(+), 26 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py index f39b17a..6e5be03 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py @@ -30,12 +30,14 @@ import PlayerSuccess import EventShell import EventReport +import FBHelpBattle + import math import time #当前副本地图的状态 ( -FB_Step_Open, # 地图开启 +FB_Step_CallHelp, # 助战召唤 FB_Step_MapPrepare, # 地图准备 FB_Step_Fighting, # 战斗中 FB_Step_LeaveTime, # 自由时间 @@ -57,7 +59,7 @@ def GetRealmFBTimeCfg(): - lineID = FBCommon.GetFBPropertyMark() + lineID = 1 if FBCommon.GetFBPropertyMark() else 0 return FBCommon.GetFBLineStepTime(ChConfig.Def_FBMapID_DuJie, lineID) def GetDuJieBossID(): @@ -180,9 +182,14 @@ return lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqFBFuncLine) + if lineID: #小境界0 大境界为境界等级 + lineID = curPlayer.GetOfficialRank() if not FBCommon.GetHadSetFBPropertyMark(): FBCommon.SetFBPropertyMark(lineID) - FBCommon.SetFBStep(FB_Step_MapPrepare, tick) + if lineID == 0: + FBCommon.SetFBStep(FB_Step_MapPrepare, tick) + + fbPlayerCnt = gameFB.GetGameFBDictByKey(ChConfig.Def_FB_NPCStrengthenPlayerCnt) @@ -195,16 +202,16 @@ GameWorld.DebugLog('玩家进入副本') - if fbPlayerCnt == 1 or curPlayer.GetTeamLV() == IPY_GameWorld.tmlLeader: - __SetFBLeaderPlayer(curPlayer) - if gameFB.GetFBStep() == FB_Step_Fighting: - __OnDuJieFBStart(tick) - isHelpFight = lineID == 1 and curPlayer.GetTeamLV() != IPY_GameWorld.tmlLeader and fbPlayerCnt > 1 - joinType = FBCommon.GetFBJoinType(curPlayer, isHelpFight) - EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_DuJie, lineID, ChConfig.CME_Log_Start, joinType) - - + #if lineID == 0 or fbPlayerCnt == 1 or curPlayer.GetTeamLV() == IPY_GameWorld.tmlLeader: + __SetFBLeaderPlayer(curPlayer) +# if gameFB.GetFBStep() == FB_Step_Fighting: +# __OnDuJieFBStart(tick) fbStep = gameFB.GetFBStep() + + if lineID !=0 and fbStep == FB_Step_CallHelp: + FBHelpBattle.SendGameServer_RefreshHelpBattlePlayer(curPlayer, ChConfig.Def_FBMapID_DuJie, lineID) + return + if fbStep == FB_Step_MapPrepare: #初始化并通知等待倒计时 __EnterFBInPrepare(curPlayer, DuJieFBCfg[Def_Time_MapPrepare] * 1000, gameFB, tick) @@ -217,6 +224,15 @@ DoFBHelp(curPlayer, tick) + return + +## 召唤助战完成 +def OnCallHelpBattleOK(curPlayer, tick): + lineID = 1 if FBCommon.GetFBPropertyMark() else 0 + EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_DuJie, lineID, ChConfig.CME_Log_Start, 0) + DuJieFBCfg = GetRealmFBTimeCfg() + FBCommon.SetFBStep(FB_Step_MapPrepare, tick) + __EnterFBInPrepare(curPlayer, DuJieFBCfg[Def_Time_MapPrepare] * 1000, GameWorld.GetGameFB(), tick) return def __SetFBLeaderPlayer(curPlayer): @@ -323,6 +339,7 @@ return def __OnDuJieFBStart(tick): + lineID = 1 if FBCommon.GetFBPropertyMark() else 0 if not GameWorld.GetGameFB().GetGameFBDictByKey(DuJieFB_LeaderPlayerID): findLeader = False playerManager = GameWorld.GetMapCopyPlayerManager() @@ -330,19 +347,20 @@ curPlayer = playerManager.GetPlayerByIndex(index) if not curPlayer: continue - if curPlayer.GetTeamLV() == IPY_GameWorld.tmlLeader: + if curPlayer.GetTeamLV() == IPY_GameWorld.tmlLeader or (lineID == 1 and curPlayer.GetTeamID() == 0): __SetFBLeaderPlayer(curPlayer) findLeader = True break if not findLeader: GameWorld.Log(' 准备倒计时已过,队长仍未进入副本!!! ') + FBCommon.DoLogic_FBKickAllPlayer() return DuJieFBCfg = GetRealmFBTimeCfg() bossID = GetDuJieBossID() if not bossID: return mapID = GameWorld.GetMap().GetMapID() - lineID = FBCommon.GetFBPropertyMark() + refreshBossMark = FBCommon.GetFBLineRefreshNPC(mapID, lineID) NPCCustomRefresh.SetNPCRefresh(refreshBossMark, [bossID]) @@ -377,7 +395,8 @@ curStar = gameFB.GetGameFBDictByKey(DuJieFB_Star) realmLV = gameFB.GetGameFBDictByKey(DuJieFB_RealmLV) realmIpyData = PlayerPrestigeSys.GetRealmIpyData(realmLV) - lineID = FBCommon.GetFBPropertyMark() + FBPropertyMark = FBCommon.GetFBPropertyMark() + lineID = 1 if FBPropertyMark else 0 leaveTick = invadeCfg[Def_Time_Leave] * 1000 overDict = {FBCommon.Over_costTime:costTime,FBCommon.Over_grade:curStar, FBCommon.Over_leaderID:leaderPlayerID} playerCnt = copyMapPlayerManager.GetPlayerCount() @@ -387,12 +406,11 @@ if curPlayer == None or curPlayer.IsEmpty(): continue - isHelpFight = lineID == 1 and curPlayer.GetPlayerID() != leaderPlayerID - joinType = FBCommon.GetFBJoinType(curPlayer, isHelpFight) - EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_DuJie, lineID, ChConfig.CME_Log_End, joinType, isPass) +# isHelpFight = lineID == 1 and curPlayer.GetPlayerID() != leaderPlayerID +# joinType = FBCommon.GetFBJoinType(curPlayer, isHelpFight) + EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_DuJie, lineID, ChConfig.CME_Log_End, 0, isPass) curPlayer.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, leaveTick, True) - FBCommon.NotifyFBOver(curPlayer, ChConfig.Def_FBMapID_DuJie, lineID, isPass, overDict) if isPass and leaderPlayer: if curPlayer.GetPlayerID() == leaderPlayerID: #渡劫通过处理 @@ -400,17 +418,16 @@ #清除CD FBCommon.SetFBPDictValue(curPlayer, ChConfig.Def_PDict_LastEnterFBTick % ChConfig.Def_FBMapID_DuJie, 0) FBCommon.SyncFBEnterTick(curPlayer) - else: - #帮忙打的给奖励 - __GiveTeamAward(curPlayer, leaderPlayer, realmIpyData, curStar) - EventShell.EventRespons_DujieFBHelpPass(curPlayer) - FBCommon.AddFBHelpPoint(curPlayer, ChConfig.Def_FBMapID_DuJie, 1) + if lineID: + addXianyuanCoin, reason = FBHelpBattle.DoFBAddXianyuanCoin(curPlayer, ChConfig.Def_FBMapID_DuJie, FBPropertyMark) + overDict[FBCommon.Over_xianyuanCoin] = [addXianyuanCoin, reason] if realmIpyData and realmIpyData.GetIsBigRealm(): #成就 PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_DujieFBHelpPass, 1) if playerCnt > 1: #多人组队渡劫 EventShell.EventRespons_FBEvent(curPlayer, 'teamdujie') + FBCommon.NotifyFBOver(curPlayer, ChConfig.Def_FBMapID_DuJie, lineID, isPass, overDict) return @@ -449,6 +466,9 @@ FBCommon.Notify_FBHelp(curPlayer, helpDict) return +def DoFB_Npc_KillNPC(attacker, curNPC, tick): + __FBNPCOnKilled(curNPC, tick) + return ## 执行副本杀怪逻辑 # @param curPlayer 杀怪的人 @@ -456,7 +476,10 @@ # @param tick 当前时间 # @return None def DoFB_Player_KillNPC(curPlayer, curNPC, tick): - + __FBNPCOnKilled(curNPC, tick) + return + +def __FBNPCOnKilled(curNPC, tick): bossID = curNPC.GetNPCID() if bossID != GetDuJieBossID(): return @@ -466,7 +489,6 @@ # PlayerControl.WorldNotify(0, "jiazu_liubo_202580", [curPlayer.GetFamilyName(), mapID, bossID]) __DoDoJieFBOver(True, tick) return - ## 检查是否可攻击, 主判定不可攻击的情况,其他逻辑由外层决定 # @param attacker 攻击方 # @param defender 防守方 -- Gitblit v1.8.0