4710 【1.3】【后端】魔族法宝副本修改(新增多个小关卡)
| | |
| | | BYTE AwardIndex; //返利奖励索引0~31,同个模板中不重复
|
| | | dict AwardItem; //返利物品信息列表 {职业:[(物品ID,个数,是否绑定),...]}
|
| | | char NotifyKey; //全服广播key,默认两个参数(玩家名, 档位额度)
|
| | | };
|
| | |
|
| | | //法宝副本表
|
| | |
|
| | | struct tagMagicWeaponFB
|
| | | {
|
| | | DWORD _MWID; //法宝ID
|
| | | BYTE LineID; //副本功能线路ID
|
| | | BYTE _Level; //关卡
|
| | | list RefreshNPC; //刷怪配置
|
| | | dict AttrDict; //属性
|
| | | }; |
| | |
| | | ("LV", c_ubyte),
|
| | | ("Exp", c_int),
|
| | | ("State", c_ubyte), #是否点击法宝认主
|
| | | ("FBPassLV", c_ubyte), #副本关卡
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.LV = 0
|
| | | self.Exp = 0
|
| | | self.State = 0
|
| | | self.FBPassLV = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | MWID:%d,
|
| | | LV:%d,
|
| | | Exp:%d,
|
| | | State:%d
|
| | | State:%d,
|
| | | FBPassLV:%d
|
| | | '''\
|
| | | %(
|
| | | self.MWID,
|
| | | self.LV,
|
| | | self.Exp,
|
| | | self.State
|
| | | self.State,
|
| | | self.FBPassLV
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | Def_PDict_MWSoulGotValue = "MWSoulGotValue_%s" #法宝特权已领取进度 参数特权ID
|
| | | Def_PDict_MWSoulGotItemState = "MWSoulGotItemState_%s" #法宝特权领取物品奖励状态 参数特权ID
|
| | | Def_PDict_MWSoulActiveState = "MWSoulActiveState_%s" #法宝之魂激活状态 参数(key编号)
|
| | |
|
| | | Def_PDict_MWFBPassLevel = "MWFBPassLevel_%s" #法宝副本通关关卡 参数(法宝ID)
|
| | | #炼丹炉
|
| | | Def_PDict_AlchemyLV = "AlchemyLV" #炼丹等级
|
| | | Def_PDict_AlchemyExp = "AlchemyExp" #炼丹经验
|
| | |
| | | ("LV", c_ubyte),
|
| | | ("Exp", c_int),
|
| | | ("State", c_ubyte), #是否点击法宝认主
|
| | | ("FBPassLV", c_ubyte), #副本关卡
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.LV = 0
|
| | | self.Exp = 0
|
| | | self.State = 0
|
| | | self.FBPassLV = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | MWID:%d,
|
| | | LV:%d,
|
| | | Exp:%d,
|
| | | State:%d
|
| | | State:%d,
|
| | | FBPassLV:%d
|
| | | '''\
|
| | | %(
|
| | | self.MWID,
|
| | | self.LV,
|
| | | self.Exp,
|
| | | self.State
|
| | | self.State,
|
| | | self.FBPassLV
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | import PlayerControl
|
| | | import EventReport
|
| | | import PlayerGoldGift
|
| | |
|
| | | import PlayerMagicWeapon
|
| | |
|
| | | #---副本配置对应key值---
|
| | | (
|
| | | Def_IsPointType, #是否积分类副本
|
| | | Def_PrepareTime, # 副本准备时间(秒)
|
| | | Def_FightTime, # 进行时间(秒)
|
| | | Def_LeaveTime, # 退出时间(秒)
|
| | | Def_IsPointType, #是否积分类副本
|
| | | Def_PrepareTime, # 副本准备时间(秒)
|
| | | Def_FightTime, # 进行时间(秒)
|
| | | Def_LeaveTime, # 退出时间(秒)
|
| | | ) = range(4)
|
| | |
|
| | | (
|
| | | DL_RefreshMark, # 刷怪标识点
|
| | | DL_NPCID, # NPCID
|
| | | DL_SingleNPCCnt, # 单次刷NPC个数
|
| | | DL_maxCnt, #当前点最大怪物数
|
| | | DL_TotalNPCCnt, # 累计刷NPC总个数
|
| | | DL_NeedKillCnt, # 需要击杀数量
|
| | | DL_RefreshCD, # 刷新间隔
|
| | | DL_RefreshMark, # 刷怪标识点
|
| | | DL_NPCID, # NPCID
|
| | | DL_SingleNPCCnt, # 单次刷NPC个数
|
| | | DL_maxCnt, #当前点最大怪物数
|
| | | DL_TotalNPCCnt, # 累计刷NPC总个数
|
| | | DL_NeedKillCnt, # 需要击杀数量
|
| | | DL_RefreshCD, # 刷新间隔
|
| | | ) = range(7)
|
| | |
|
| | |
|
| | | #当前副本地图的状态
|
| | | (
|
| | | FB_Step_Open, # 副本开启
|
| | | FB_Step_Prepare, # 副本等待
|
| | | FB_Step_Fighting, # 副本进行中
|
| | | FB_Step_Over, # 副本结束
|
| | | FB_Step_Close, # 副本关闭
|
| | | FB_Step_Open, # 副本开启
|
| | | FB_Step_Prepare, # 副本等待
|
| | | FB_Step_Fighting, # 副本进行中
|
| | | FB_Step_Over, # 副本结束
|
| | | FB_Step_Close, # 副本关闭
|
| | | ) = range(5)
|
| | |
|
| | | FBPlayerDict_MissionID = 'FBPlayerDict_MissionID' #副本任务ID
|
| | | FBPlayerDict_CostTime = 'FBPlayerDict_CostTime' #副本耗时
|
| | | FBPlayerDict_TotalPoint = 'FBPlayerDict_TotalPoint' # 获得的总积分
|
| | | FBPlayerDict_NPCRemainCnt = 'FBPlayerDict_NPCRemainCnt_%s' # NPC剩余数量
|
| | | FBPlayerDict_TotalExp = 'FBPlayerDict_TotalExp' # 获得的总经验
|
| | | FBPlayerDict_TotalExpPoint = 'FBPlayerDict_TotalExpPoint' # 获得的总经验点
|
| | | FBPlayerDict_MissionID = 'FBPlayerDict_MissionID' #副本任务ID
|
| | | FBPlayerDict_CostTime = 'FBPlayerDict_CostTime' #副本耗时
|
| | | FBPlayerDict_TotalPoint = 'FBPlayerDict_TotalPoint' # 获得的总积分
|
| | | FBPlayerDict_NPCRemainCnt = 'FBPlayerDict_NPCRemainCnt_%s' # NPC剩余数量
|
| | | FBPlayerDict_TotalExp = 'FBPlayerDict_TotalExp' # 获得的总经验
|
| | | FBPlayerDict_TotalExpPoint = 'FBPlayerDict_TotalExpPoint' # 获得的总经验点
|
| | | FBPlayerDict_Level = 'FBPlayerDict_Level' #关卡
|
| | | FBPlayerDict_MaxLevel = 'FBPlayerDict_MaxLevel' #最大关卡
|
| | |
|
| | |
|
| | | ##---获得副本配置---
|
| | |
| | |
|
| | |
|
| | | def GetClearDevilNPCCfg(lineID):
|
| | | level = GameWorld.GetGameFB().GetGameFBDictByKey(FBPlayerDict_Level)
|
| | | if level:
|
| | | ipyData = IpyGameDataPY.GetIpyGameDataByCondition('MagicWeaponFB', {'LineID':lineID, 'Level':level})
|
| | | if not ipyData:
|
| | | return []
|
| | | return ipyData.GetRefreshNPC()
|
| | | |
| | | mapID = GameWorld.GetMap().GetMapID()
|
| | | return FBCommon.GetFBLineRefreshNPC(mapID, lineID)
|
| | |
|
| | |
|
| | | def GetPointByNPCID(npcid):
|
| | | '''通过NPCID获取对应的积分'''
|
| | | npcPointDict = IpyGameDataPY.GetFuncEvalCfg('ClearDevilPoint', 2)
|
| | | return npcPointDict.get(npcid, 0)
|
| | |
|
| | |
|
| | | def GetIsPointFBType(lineID):
|
| | | #是否积分类副本
|
| | |
| | | if not FBLineStepTimeCfg:
|
| | | return
|
| | | return FBLineStepTimeCfg[Def_IsPointType]
|
| | |
|
| | |
|
| | | ## 是否能够通过活动查询进入
|
| | | # @param curPlayer 玩家实例
|
| | |
| | | mapID = FBCommon.GetRecordMapID(mapID)
|
| | | gameFB = GameWorld.GetGameFB()
|
| | | lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqFBFuncLine)
|
| | | GameWorld.DebugLog("DoEnterFB...lineID=%s,playerLV=%s" % (lineID, playerLV), playerID)
|
| | | level, maxLevel = 0, 0
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('MagicWeaponFB', {'LineID':lineID}, True)
|
| | | if ipyDataList:
|
| | | mwID = ipyDataList[0].GetMWID()
|
| | | level = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWFBPassLevel % mwID)
|
| | | maxLevel = ipyDataList[-1].GetLevel()
|
| | | if level >= maxLevel:
|
| | | GameWorld.Log('DoEnterFB 已通关该线路最大关卡!! lineID=%s, maxLevel=%s' % (lineID, maxLevel))
|
| | | PlayerControl.PlayerLeaveFB(curPlayer)
|
| | | return
|
| | | level +=1
|
| | | GameWorld.DebugLog("DoEnterFB...lineID=%s,playerLV=%s, level=%s" % (lineID, playerLV, level), playerID)
|
| | | hadDelTicket = FBCommon.GetHadDelTicket(curPlayer)
|
| | | if not hadDelTicket:
|
| | | |
| | | gameFB.SetGameFBDict(FBPlayerDict_Level, level)
|
| | | gameFB.SetGameFBDict(FBPlayerDict_MaxLevel, maxLevel)
|
| | | |
| | | FBCommon.SetHadDelTicket(curPlayer)
|
| | | FBCommon.SetFBPropertyMark(lineID)
|
| | | |
| | | EventReport.WriteEvent_FB(curPlayer, mapID, 0, ChConfig.CME_Log_Start)
|
| | | # if mapID == ChConfig.Def_FBMapID_ClearDevil2:
|
| | | # # 新手剧情副本重置所有技能CD
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ReqFBMissionID, 0)
|
| | |
|
| | | if not hadDelTicket \
|
| | | and IpyGameDataPY.GetIpyGameDataByCondition("NPCShow", {"MapID":mapID, "LineID":lineID}, isLogNone=False):
|
| | | GameWorld.DebugLog("法宝挑战刚进入时不直接开始,需等前端通知开始才开始!", playerID) # 掉线重上强制开始
|
| | | and IpyGameDataPY.GetIpyGameDataByCondition("NPCShow", {"MapID":mapID, "LineID":lineID}, isLogNone=False) and level == maxLevel:
|
| | | GameWorld.DebugLog("法宝挑战刚进入时不直接开始,需等前端通知开始才开始!", playerID) # 掉线重上强制开始
|
| | | return
|
| | |
|
| | | fbStep = gameFB.GetFBStep()
|
| | |
| | | DoFBHelp(curPlayer, tick, not hadDelTicket)
|
| | | return
|
| | |
|
| | |
|
| | | ## 客户端发送开始副本
|
| | | def OnClientStartFB(curPlayer, tick):
|
| | | gameFB = GameWorld.GetGameFB()
|
| | |
| | | DoFBHelp(curPlayer, tick, True)
|
| | | return
|
| | |
|
| | |
|
| | | ##玩家退出副本
|
| | | # @param curPlayer 玩家实例
|
| | | # @param tick 时间戳
|
| | |
| | | # GameWorldProcess.CloseFB(tick)
|
| | | return
|
| | |
|
| | |
|
| | | ##玩家主动离开副本.
|
| | | # @param curPlayer 玩家实例
|
| | | # @param tick 时间戳
|
| | | # @return 返回值无意义
|
| | | def DoPlayerLeaveFB(curPlayer, tick):
|
| | | return
|
| | |
|
| | |
|
| | | ## 获得副本帮助信息
|
| | | # @param curPlayer 当前玩家(被通知对象)
|
| | |
| | | if isEnter:
|
| | | killCnt = 0
|
| | | else:
|
| | | killCnt= info[DL_NeedKillCnt] - remainCnt
|
| | | killCnt = info[DL_NeedKillCnt] - remainCnt
|
| | | npcDict[npcID] = killCnt
|
| | | helpDict = {FBCommon.Help_npc:FBCommon.GetJsonNPCKillList(npcDict)}
|
| | |
|
| | |
| | | __DoLogic_FB_Fighting(tick)
|
| | | # 副本结束
|
| | | elif fbStep == FB_Step_Over:
|
| | | pass
|
| | | __DoLogic_FB_Over(tick)
|
| | |
|
| | | return
|
| | |
|
| | |
|
| | | ## 副本准备逻辑
|
| | | # @param tick:时间戳
|
| | |
| | | gameFB.SetGameFBDict(FBPlayerDict_NPCRemainCnt % npcID, npcInfo[DL_NeedKillCnt])
|
| | | refreshCD = npcInfo[DL_RefreshCD]
|
| | | NPCCustomRefresh.SetNPCRefresh(npcInfo[DL_RefreshMark], [(npcID, npcInfo[DL_SingleNPCCnt])], npcInfo[DL_maxCnt], npcInfo[DL_TotalNPCCnt], refreshTick=refreshCD)
|
| | | NPCCustomRefresh.ProcessAllNPCRefresh(tick) # 立即出发一次标识点刷新
|
| | | NPCCustomRefresh.ProcessAllNPCRefresh(tick) # 立即出发一次标识点刷新
|
| | |
|
| | | playerManager = GameWorld.GetMapCopyPlayerManager()
|
| | | if playerManager.GetPlayerCount() > 0:
|
| | |
| | | return
|
| | |
|
| | | #副本关闭
|
| | | GameWorldProcess.CloseFB(tick)
|
| | | FBCommon.SetFBStep(FB_Step_Close, tick)
|
| | | #GameWorldProcess.CloseFB(tick)
|
| | | #FBCommon.SetFBStep(FB_Step_Close, tick)
|
| | | return
|
| | |
|
| | |
|
| | | ## 获得经验
|
| | | # @param curPlayer 当前玩家
|
| | |
| | | gameFB.SetPlayerGameFBDict(playerID, FBPlayerDict_TotalExp, updExp)
|
| | | gameFB.SetPlayerGameFBDict(playerID, FBPlayerDict_TotalExpPoint, updExpPoint)
|
| | |
|
| | | |
| | | GameWorld.DebugLog("OnGetExp() totalExp=%s,addExp=%s,updTotalExp=%s"
|
| | | % (totalExp, addExp, updTotalExp), playerID)
|
| | |
|
| | | return
|
| | |
|
| | |
|
| | | ## 执行副本杀怪逻辑
|
| | | # @param curPlayer 杀怪的人
|
| | |
| | |
|
| | | npcid = curNPC.GetNPCID()
|
| | | lineID = FBCommon.GetFBPropertyMark()
|
| | | isFinish = False #是否完成
|
| | | isFinish = False #是否完成
|
| | |
|
| | | if GetIsPointFBType(lineID):#积分类
|
| | | if GetIsPointFBType(lineID): #积分类
|
| | | addPoint = GetPointByNPCID(npcid)
|
| | | if not addPoint:
|
| | | return
|
| | |
| | | if fbMissionID:
|
| | | EventShell.EventRespons_FBEvent(curPlayer, "cleardevil_pass_%s" % fbMissionID)
|
| | | # 成就
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_PassWagicWeapon, 1, [lineID+1])
|
| | | |
| | | level = gameFB.GetGameFBDictByKey(FBPlayerDict_Level)
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_PassWagicWeapon, 1, [lineID + 1, level])
|
| | | # 更新关卡
|
| | | if level:
|
| | | ipyData = IpyGameDataPY.GetIpyGameDataByCondition('MagicWeaponFB', {'LineID':lineID, 'Level':level})
|
| | | if ipyData:
|
| | | mwID = ipyData.GetMWID()
|
| | | PlayerMagicWeapon.UptateMWFBPasslv(curPlayer, mwID, level)
|
| | | |
| | |
|
| | | DoFBHelp(curPlayer, tick)
|
| | | return
|
| | |
| | | exp = addExp % ChConfig.Def_PerPointValue
|
| | | expPoint = addExp / ChConfig.Def_PerPointValue
|
| | | fbMissionID = gameFB.GetGameFBDictByKey(FBPlayerDict_MissionID)
|
| | | GameWorld.DebugLog("任务专用,触发事件(副本内完成某任务) curMissionID=%s, fbMissionID=%s, exp=%s,moneyDict=%s,itemList=%s" % (curMissionID, fbMissionID, exp, moneyDict,itemList))
|
| | | GameWorld.DebugLog("任务专用,触发事件(副本内完成某任务) curMissionID=%s, fbMissionID=%s, exp=%s,moneyDict=%s,itemList=%s" % (curMissionID, fbMissionID, exp, moneyDict, itemList))
|
| | | if fbMissionID != curMissionID:
|
| | | return
|
| | | costTime = gameFB.GetGameFBDictByKey(FBPlayerDict_CostTime)
|
| | |
| | | __SendOverInfo(curPlayer, awardDict)
|
| | | return
|
| | |
|
| | |
|
| | | ## 是否副本复活
|
| | | # @param None
|
| | | # @return 是否副本复活
|
| | | def OnPlayerReborn():
|
| | | return True
|
| | |
|
| | |
|
| | | ##玩家死亡.
|
| | | # @param curPlayer:死亡的玩家
|
| | |
| | | __DoClearDevilOver(False)
|
| | | return
|
| | |
|
| | |
|
| | | ## 检查是否可攻击, 主判定不可攻击的情况,其他逻辑由外层决定
|
| | | # @param attacker 攻击方
|
| | | # @param defender 防守方
|
| | |
| | | if gameFB.GetFBStep() != Def_FightTime:
|
| | | return False
|
| | | return True
|
| | |
|
| | |
|
| | | ## 副本行为
|
| | | # @param curPlayer 玩家
|
| | | # @param actionType 行为类型
|
| | | # @param actionInfo 行为信息
|
| | | # @param tick 当前时间
|
| | | # @return None
|
| | | def DoFBAction(curPlayer, actionType, actionInfo, tick):
|
| | | gameFB = GameWorld.GetGameFB()
|
| | | fbStep = gameFB.GetFBStep()
|
| | | if fbStep != FB_Step_Over:
|
| | | return
|
| | | |
| | | level = gameFB.GetGameFBDictByKey(FBPlayerDict_Level)
|
| | | maxLevel = gameFB.GetGameFBDictByKey(FBPlayerDict_MaxLevel)
|
| | | if level <= 0 or maxLevel <= 0:
|
| | | return
|
| | | if level >= maxLevel:
|
| | | return
|
| | | gameFB.SetGameFBDict(FBPlayerDict_Level, level+1)
|
| | | playerID = curPlayer.GetID()
|
| | | FBCommon.SetFBStep(FB_Step_Open, tick)
|
| | | lineID = FBCommon.GetFBPropertyMark()
|
| | | if level+1 == maxLevel and IpyGameDataPY.GetIpyGameDataByCondition("NPCShow", {"MapID":ChConfig.Def_FBMapID_MagicWeapon, "LineID":lineID}, isLogNone=False):
|
| | | GameWorld.DebugLog(" 副本行为 法宝挑战刚进入时不直接开始,需等前端通知开始才开始!", playerID) # 掉线重上强制开始
|
| | | return
|
| | | OnClientStartFB(curPlayer, tick)
|
| | | return
|
| | |
|
| | |
|
| | | ## 副本结束处理
|
| | | def __DoClearDevilOver(isPass):
|
| | |
| | | gameFB.SetGameFBDict(FBPlayerDict_CostTime, costTime)
|
| | | fbMissionID = gameFB.GetGameFBDictByKey(FBPlayerDict_MissionID)
|
| | | # 通知结果 此处只通知失败,成功在完成任务时通知, 不是通过任务进的副本也通知
|
| | | if not isPass or not fbMissionID:# or mapID == ChConfig.Def_FBMapID_ClearDevil2:
|
| | | __SendOverInfo(curPlayer, {FBCommon.Over_isPass:int(isPass), FBCommon.Over_exp:exp,FBCommon.Over_expPoint:expPoint, FBCommon.Over_costTime:costTime})
|
| | | if not isPass or not fbMissionID: # or mapID == ChConfig.Def_FBMapID_ClearDevil2:
|
| | | __SendOverInfo(curPlayer, {FBCommon.Over_isPass:int(isPass), FBCommon.Over_exp:exp, FBCommon.Over_expPoint:expPoint, FBCommon.Over_costTime:costTime})
|
| | |
|
| | | # 进入离开阶段
|
| | | FBCommon.SetFBStep(FB_Step_Over, tick)
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FirstGoldTry, 0)
|
| | | return
|
| | |
|
| | |
|
| | | ## 发送挑战结果信息
|
| | | def __SendOverInfo(curPlayer, overDict):
|
| | | overDict[FBCommon.Over_dataMapID] = FBCommon.GetRecordMapID(GameWorld.GetMap().GetMapID())
|
| | | overDict[FBCommon.Over_lineID] = FBCommon.GetFBPropertyMark()
|
| | | overDict[FBCommon.Over_wheel] = GameWorld.GetGameFB().GetGameFBDictByKey(FBPlayerDict_Level)
|
| | | GameWorld.DebugLog("__SendOverInfo overDict=%s" % (str(overDict)), curPlayer.GetPlayerID())
|
| | | FBCommon.Notify_FB_Over(curPlayer, overDict)
|
| | | return
|
| | |
| | | ("dict", "AwardItem", 0),
|
| | | ("char", "NotifyKey", 0),
|
| | | ),
|
| | |
|
| | | "MagicWeaponFB":(
|
| | | ("DWORD", "MWID", 1),
|
| | | ("BYTE", "LineID", 0),
|
| | | ("BYTE", "Level", 1),
|
| | | ("list", "RefreshNPC", 0),
|
| | | ("dict", "AttrDict", 0),
|
| | | ),
|
| | | }
|
| | |
|
| | | |
| | |
| | | def GetAwardIndex(self): return self.AwardIndex # 返利奖励索引0~31,同个模板中不重复
|
| | | def GetAwardItem(self): return self.AwardItem # 返利物品信息列表 {职业:[(物品ID,个数,是否绑定),...]}
|
| | | def GetNotifyKey(self): return self.NotifyKey # 全服广播key,默认两个参数(玩家名, 档位额度) |
| | | |
| | | # 法宝副本表 |
| | | class IPY_MagicWeaponFB(): |
| | | |
| | | def __init__(self): |
| | | self.MWID = 0
|
| | | self.LineID = 0
|
| | | self.Level = 0
|
| | | self.RefreshNPC = []
|
| | | self.AttrDict = {} |
| | | return |
| | | |
| | | def GetMWID(self): return self.MWID # 法宝ID
|
| | | def GetLineID(self): return self.LineID # 副本功能线路ID
|
| | | def GetLevel(self): return self.Level # 关卡
|
| | | def GetRefreshNPC(self): return self.RefreshNPC # 刷怪配置
|
| | | def GetAttrDict(self): return self.AttrDict # 属性 |
| | |
|
| | |
|
| | | def Log(msg, playerID=0, par=0):
|
| | |
| | | self.ipyActTotalRechargeLen = len(self.ipyActTotalRechargeCache)
|
| | | self.ipyTotalRechargeTemplateCache = self.__LoadFileData("TotalRechargeTemplate", IPY_TotalRechargeTemplate)
|
| | | self.ipyTotalRechargeTemplateLen = len(self.ipyTotalRechargeTemplateCache)
|
| | | self.ipyMagicWeaponFBCache = self.__LoadFileData("MagicWeaponFB", IPY_MagicWeaponFB)
|
| | | self.ipyMagicWeaponFBLen = len(self.ipyMagicWeaponFBCache)
|
| | | Log("IPY_FuncConfig count=%s" % len(self.ipyFuncConfigDict))
|
| | | Log("IPY_DataMgr InitOK!")
|
| | | return
|
| | |
| | | def GetActTotalRechargeByIndex(self, index): return self.ipyActTotalRechargeCache[index]
|
| | | def GetTotalRechargeTemplateCount(self): return self.ipyTotalRechargeTemplateLen
|
| | | def GetTotalRechargeTemplateByIndex(self, index): return self.ipyTotalRechargeTemplateCache[index]
|
| | | def GetMagicWeaponFBCount(self): return self.ipyMagicWeaponFBLen
|
| | | def GetMagicWeaponFBByIndex(self, index): return self.ipyMagicWeaponFBCache[index]
|
| | |
|
| | | IPYData = IPY_DataMgr()
|
| | | def IPY_Data(): return IPYData
|
| | |
| | | for attid, attnum in IpyGameDataPY.GetFuncEvalCfg('MWSignDayAttr', 1, {}).items():
|
| | | addAttr[int(attid)] = attnum * totalSignNum
|
| | | GameWorld.AddDictValue(allAttrDict, addAttr)
|
| | | |
| | | |
| | | fbpasslv = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWFBPassLevel % magicWeaponID)
|
| | | if fbpasslv: #副本关卡属性
|
| | | fbipyData = IpyGameDataPY.GetIpyGameData('MagicWeaponFB', magicWeaponID, fbpasslv)
|
| | | if fbipyData:
|
| | | attrDict = fbipyData.AttrDict()
|
| | | GameWorld.AddDictValue(allAttrDict, attrDict)
|
| | | |
| | | for effID, value in allAttrDict.items():
|
| | | if treasureType == 1:
|
| | | PlayerControl.CalcAttrDict_Type(effID, value, allAttrList1)
|
| | |
| | | mwLv = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MagicWeaponLV % mwID)
|
| | | curUpExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MagicWeaponUpExp % mwID)
|
| | | state = GetIsClickMagicWeapon(curPlayer, mwID)
|
| | | if not mwLv and not curUpExp and not state:
|
| | | FBPassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWFBPassLevel % mwID)
|
| | | if not mwLv and not curUpExp and not state and not FBPassLV:
|
| | | continue
|
| | | pack = ChPyNetSendPack.tagMCMagicWeaponInfo()
|
| | | pack.MWID = mwID
|
| | | pack.LV = mwLv
|
| | | pack.Exp = curUpExp
|
| | | pack.State = state
|
| | | pack.FBPassLV = FBPassLV
|
| | | sendPack.InfoList.append(pack)
|
| | | sendPack.Count = len(sendPack.InfoList)
|
| | | if sendPack.Count:
|
| | |
| | | for attrID, attrValue in allAttrDict.items():
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList)
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_MagicWeaponSoul, allAttrList)
|
| | | return
|
| | |
|
| | | def UptateMWFBPasslv(curPlayer, mwID, passLV):
|
| | | GameWorld.Log('更新关卡 mwID=%s,level=%s'%(mwID, passLV))
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MWFBPassLevel % mwID, passLV)
|
| | | CalcMagicWeaponAttr(curPlayer)
|
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | Sycn_MagicWeaponLV(curPlayer, mwID)
|
| | | return |