4740 子 【开发】【1.3】通过多倍修行点额外获得的修行点有上限限制(每日)
| | |
| | | dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
|
| | | WORD Multiple; //倍数
|
| | | WORD LVLimit; //限制等级
|
| | | DWORD PointLimit; //限制额外修行点
|
| | | };
|
| | |
|
| | | //限时抢购表
|
| | |
| | | DWORD _CfgID; //配置ID
|
| | | WORD Multiple; //倍数
|
| | | WORD LVLimit; //限制等级
|
| | | DWORD PointLimit; //限制额外修行点
|
| | | };
|
| | |
|
| | | //宗门试炼兑换表
|
| | |
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | Multiple = 0 #(BYTE Multiple)// 倍数
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | LimitPoint = 0 #(DWORD LimitPoint)// 限制获得修行点
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.Multiple,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.LimitPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.EndtDate = ""
|
| | | self.Multiple = 0
|
| | | self.LimitLV = 0
|
| | | self.LimitPoint = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 10
|
| | | length += 1
|
| | | length += 2
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteBYTE(data, self.Multiple)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteDWORD(data, self.LimitPoint)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | Multiple:%d,
|
| | | LimitLV:%d
|
| | | LimitLV:%d,
|
| | | LimitPoint:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.Multiple,
|
| | | self.LimitLV
|
| | | self.LimitLV,
|
| | | self.LimitPoint
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | ("RealmPoint", c_int), # 可领取修行点
|
| | | ("StageIndex", c_ubyte), # 当前阶段索引
|
| | | ("AwardRecord", c_int), # 领奖记录 按位存储
|
| | | ("ExtraPoint", c_int), # 多倍活动获得的额外修行点
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.RealmPoint = 0
|
| | | self.StageIndex = 0
|
| | | self.AwardRecord = 0
|
| | | self.ExtraPoint = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | CurValue:%d,
|
| | | RealmPoint:%d,
|
| | | StageIndex:%d,
|
| | | AwardRecord:%d
|
| | | AwardRecord:%d,
|
| | | ExtraPoint:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | |
| | | self.CurValue,
|
| | | self.RealmPoint,
|
| | | self.StageIndex,
|
| | | self.AwardRecord
|
| | | self.AwardRecord,
|
| | | self.ExtraPoint
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | multiRealmPointInfo.EndtDate = GameWorld.GetOperationActionDateStr(ipyData.GetEndDate(), openServerDay)
|
| | | multiRealmPointInfo.Multiple = ipyData.GetMultiple()
|
| | | multiRealmPointInfo.LimitLV = ipyData.GetLVLimit()
|
| | | multiRealmPointInfo.LimitPoint = ipyData.GetPointLimit()
|
| | | if not curPlayer:
|
| | | # 全服广播在线玩家
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | |
| | | ("dict", "NotifyInfoEnd", 0),
|
| | | ("WORD", "Multiple", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("DWORD", "PointLimit", 0),
|
| | | ),
|
| | |
|
| | | "ActFlashSale":(
|
| | |
| | | self.NotifyInfoEnd = {}
|
| | | self.Multiple = 0
|
| | | self.LVLimit = 0 |
| | | self.PointLimit = 0 |
| | | return |
| | | |
| | | def GetCfgID(self): return self.CfgID # 配置ID
|
| | |
| | | def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
|
| | | def GetMultiple(self): return self.Multiple # 倍数
|
| | | def GetLVLimit(self): return self.LVLimit # 限制等级 |
| | | def GetPointLimit(self): return self.PointLimit # 限制额外修行点 |
| | | |
| | | # 限时抢购表 |
| | | class IPY_ActFlashSale(): |
| | |
| | | Def_PDict_ActivityAwardRecord = "ActivityAwardRecord" # 活跃度奖励领取记录,按二进制位标识
|
| | | Def_PDict_Activity_AwardStage = "Activity_AwardStage" # 当前活跃奖励阶段
|
| | | Def_PDict_Activity_RealmPoint = "Activity_RealmPoint" # 当前可领修行点
|
| | | Def_PDict_Activity_ExtraRealmPoint = "Activity_ExtraRealmPoint" # 多倍活动额外获得的修行点
|
| | | # 每日活动
|
| | | Def_PDict_DailyActionDayTimes = "DailyActionDayTimes_%s" # 每日活动今日完成次数 参数每日活动ID
|
| | | Def_PDict_DailyActionWeekTimes = "DailyActionWeekTimes_%s" # 每日活动本周完成次数 参数每日活动ID
|
| | |
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | Multiple = 0 #(BYTE Multiple)// 倍数
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | LimitPoint = 0 #(DWORD LimitPoint)// 限制获得修行点
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.Multiple,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.LimitPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.EndtDate = ""
|
| | | self.Multiple = 0
|
| | | self.LimitLV = 0
|
| | | self.LimitPoint = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 10
|
| | | length += 1
|
| | | length += 2
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteBYTE(data, self.Multiple)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteDWORD(data, self.LimitPoint)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | Multiple:%d,
|
| | | LimitLV:%d
|
| | | LimitLV:%d,
|
| | | LimitPoint:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.Multiple,
|
| | | self.LimitLV
|
| | | self.LimitLV,
|
| | | self.LimitPoint
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | ("RealmPoint", c_int), # 可领取修行点
|
| | | ("StageIndex", c_ubyte), # 当前阶段索引
|
| | | ("AwardRecord", c_int), # 领奖记录 按位存储
|
| | | ("ExtraPoint", c_int), # 多倍活动获得的额外修行点
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.RealmPoint = 0
|
| | | self.StageIndex = 0
|
| | | self.AwardRecord = 0
|
| | | self.ExtraPoint = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | CurValue:%d,
|
| | | RealmPoint:%d,
|
| | | StageIndex:%d,
|
| | | AwardRecord:%d
|
| | | AwardRecord:%d,
|
| | | ExtraPoint:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | |
| | | self.CurValue,
|
| | | self.RealmPoint,
|
| | | self.StageIndex,
|
| | | self.AwardRecord
|
| | | self.AwardRecord,
|
| | | self.ExtraPoint
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | ("DWORD", "CfgID", 1),
|
| | | ("WORD", "Multiple", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("DWORD", "PointLimit", 0),
|
| | | ),
|
| | |
|
| | | "TrialExchange":(
|
| | |
| | | self.CfgID = 0
|
| | | self.Multiple = 0
|
| | | self.LVLimit = 0 |
| | | self.PointLimit = 0 |
| | | return |
| | | |
| | | def GetCfgID(self): return self.CfgID # 配置ID
|
| | | def GetMultiple(self): return self.Multiple # 倍数
|
| | | def GetLVLimit(self): return self.LVLimit # 限制等级 |
| | | def GetPointLimit(self): return self.PointLimit # 限制额外修行点 |
| | | |
| | | # 宗门试炼兑换表 |
| | | class IPY_TrialExchange(): |
| | |
| | | multiple = 1
|
| | | if addValue:
|
| | | #__SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint, nuwTotalPoint)
|
| | | multiple = __GetActionAddPer(curPlayer)
|
| | | addValue *= multiple
|
| | | multiple, extraPointLimit = __GetActionAddPer(curPlayer)
|
| | | curExtraPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint)
|
| | | addExtraPoint = max(0, min(addValue*(multiple-1),extraPointLimit-curExtraPoint)) if extraPointLimit else addValue*(multiple-1)
|
| | | __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint, curExtraPoint+addExtraPoint)
|
| | | addValue = addValue + addExtraPoint
|
| | |
|
| | | realmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint)
|
| | | __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint, realmPoint+addValue)
|
| | | SyncDailyActivityInfo(curPlayer)
|
| | |
|
| | | GameWorld.DebugLog("增加活跃度任务次数,activityNum=%s,addPbCnt=%s,addValue=%s, multiple=%s" |
| | | % (activityNum, addPbCnt, addValue, multiple), curPlayer.GetPlayerID())
|
| | | GameWorld.DebugLog("增加活跃度任务次数,activityNum=%s,addPbCnt=%s,addValue=%s, multiple=%s, addExtraPoint=%s,curExtraPoint=%s" |
| | | % (activityNum, addPbCnt, addValue, multiple, addExtraPoint, curExtraPoint), curPlayer.GetPlayerID())
|
| | | return
|
| | |
|
| | | def __GetActionAddPer(curPlayer):
|
| | | multiple = 1
|
| | | multiple, extraPointLimit = 1, 0 #倍数、额外可获得修行点上限
|
| | | actRealmPointInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_RealmPoint, {})# 多倍修行点活动
|
| | | if not actRealmPointInfo:
|
| | | return multiple
|
| | | return multiple, extraPointLimit
|
| | | if not actRealmPointInfo.get(ShareDefine.ActKey_State):
|
| | | return multiple
|
| | | return multiple, extraPointLimit
|
| | | actRealmPointIpyData = IpyGameDataPY.GetIpyGameData("ActRealmPoint", actRealmPointInfo.get(ShareDefine.ActKey_CfgID, 0))
|
| | | if not actRealmPointIpyData:
|
| | | return multiple
|
| | | return multiple, extraPointLimit
|
| | | if curPlayer.GetLV() < actRealmPointIpyData.GetLVLimit():
|
| | | return multiple
|
| | | return actRealmPointIpyData.GetMultiple()
|
| | | return multiple, extraPointLimit
|
| | | return actRealmPointIpyData.GetMultiple(), actRealmPointIpyData.GetPointLimit()
|
| | |
|
| | | ## 同步活跃度信息
|
| | | # @param curPlayer
|
| | |
| | | sendPack.StageIndex = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_AwardStage)
|
| | | sendPack.AwardRecord = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityAwardRecord)
|
| | | sendPack.RealmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint)
|
| | | sendPack.ExtraPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint)
|
| | | NetPackCommon.SendFakePack(curPlayer, sendPack)
|
| | | return
|
| | |
|