From 88effa2034b78c46426b2e7f7924a9493da9af4f Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 03 十二月 2018 16:22:15 +0800
Subject: [PATCH] 5161 子 【1.3.100】修复在仙盟任务副本中退出仙盟还能继续任务的BUG
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py | 5 +++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ClearDevil.py | 18 +++++++++++++++++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 1 +
3 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index f38a528..6314321 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3321,6 +3321,7 @@
Def_Player_Dict_TeamFBMaxLV = "TeamFBMaxLV" # 请求进入的组队副本最大等级, 临时用,进入副本设置完后删除
Def_Player_Dict_TeamFBPlayerCnt = "TeamFBPlayerCnt" # 请求进入的组队副本玩家个数, 临时用,进入副本设置完后删除
Def_Player_Dict_ReqFBMissionID = "ReqFBMissionID" # 请求进入副本的任务ID
+Def_Player_Dict_ReqFBMissionType = "ReqFBMissionType" # 请求进入副本的任务类型
Def_Player_Dict_PlayerFBStar_MapId = "FBStar_%s_%s" # 副本星级星级信息, 参数为[mapID, key编号], 按位存储每个lineID对应的星级
Def_Player_Dict_EnterFbCntDay = "EnterFbCntDay_%s" # 今日进入副本次数, 参数为副本ID
Def_Player_Dict_BuyFbCntDay = "BuyFbCntDay_%s" # 今日购买副本进入次数, 参数为副本ID
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
index a07015b..19a85bd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -5875,6 +5875,11 @@
#记录副本对应的任务ID
if FBCommon.GetRecordMapID(mapID) in [ChConfig.Def_FBMapID_ClearDevil, ChConfig.Def_FBMapID_MagicWeapon]:
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ReqFBMissionID, curMission.GetMissionID())
+ missionID = curMission.GetMissionID()
+ curMissionData = FindQuestFunc(missionID)
+ if curMissionData:
+ missionType = curMissionData.Type
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ReqFBMissionType, missionType)
return
#---------------------------------------------------------------------
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ClearDevil.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ClearDevil.py
index b678f1d..49bb331 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ClearDevil.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ClearDevil.py
@@ -26,6 +26,7 @@
import ShareDefine
import EventReport
import PlayerControl
+import QuestCommon
#---副本配置对应key值---
@@ -57,6 +58,7 @@
) = range(5)
FBPlayerDict_MissionID = 'FBPlayerDict_MissionID' #副本任务ID
+FBPlayerDict_MissionType = 'FBPlayerDict_MissionType' #副本任务类型
FBPlayerDict_CostTime = 'FBPlayerDict_CostTime' #副本耗时
FBPlayerDict_TotalPoint = 'FBPlayerDict_TotalPoint' # 获得的总积分
FBPlayerDict_NPCRemainCnt = 'FBPlayerDict_NPCRemainCnt_%s' # NPC剩余数量
@@ -140,8 +142,11 @@
fbMissionID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqFBMissionID)
if fbMissionID:
+ fbMissionType = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqFBMissionType)
gameFB.SetGameFBDict(FBPlayerDict_MissionID, fbMissionID)
+ gameFB.SetGameFBDict(FBPlayerDict_MissionType, fbMissionType)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ReqFBMissionID, 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ReqFBMissionType, 0)
fbStep = gameFB.GetFBStep()
if fbStep < FB_Step_Prepare:
@@ -395,6 +400,16 @@
return
+##玩家退出家族处理
+# @param curPlayer 玩家实例
+# @param tick 时间戳
+# @return 返回值无意义
+def OnLeaveFamily(curPlayer, tick):
+ gameFB = GameWorld.GetGameFB()
+ fbMissionType = gameFB.GetGameFBDictByKey(FBPlayerDict_MissionType)
+ if fbMissionType == QuestCommon.Def_Mission_Type_RunFamily:
+ gameFB.SetGameFBDict(FBPlayerDict_MissionType, 0)
+ return
## 任务专用,触发事件(副本内完成某任务)
# @param curPlayer:玩家实例
@@ -473,8 +488,9 @@
costTime = tick - GameWorld.GetGameFB().GetFBStepTick()
gameFB.SetGameFBDict(FBPlayerDict_CostTime, costTime)
fbMissionID = gameFB.GetGameFBDictByKey(FBPlayerDict_MissionID)
+ fbMissionType = gameFB.GetGameFBDictByKey(FBPlayerDict_MissionType)
# 通知结果 此处只通知失败,成功在完成任务时通知, 不是通过任务进的副本也通知
- if not isPass or not fbMissionID:
+ if not isPass or not fbMissionID or not fbMissionType:
__SendOverInfo(curPlayer, {FBCommon.Over_isPass:int(isPass), FBCommon.Over_exp:exp,FBCommon.Over_expPoint:expPoint, FBCommon.Over_costTime:costTime})
# 进入离开阶段
--
Gitblit v1.8.0