4740 子 【开发】【1.3】通过多倍修行点额外获得的修行点有上限限制(每日)
9个文件已修改
72 ■■■■ 已修改文件
PySysDB/PySysDBG.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBG.h
@@ -329,6 +329,7 @@
    dict        NotifyInfoEnd;    //全服提示信息 - 相对结束时间
    WORD        Multiple;    //倍数
    WORD        LVLimit;    //限制等级
    DWORD        PointLimit;    //限制额外修行点
};
//限时抢购表
PySysDB/PySysDBPY.h
@@ -1238,6 +1238,7 @@
    DWORD        _CfgID;    //配置ID
    WORD        Multiple;    //倍数
    WORD        LVLimit;    //限制等级
    DWORD        PointLimit;    //限制额外修行点
};
//宗门试炼兑换表
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -5197,6 +5197,7 @@
    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
    Multiple = 0    #(BYTE Multiple)// 倍数
    LimitLV = 0    #(WORD LimitLV)// 限制等级
    LimitPoint = 0    #(DWORD LimitPoint)// 限制获得修行点
    data = None
    def __init__(self):
@@ -5212,6 +5213,7 @@
        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):
@@ -5223,6 +5225,7 @@
        self.EndtDate = ""
        self.Multiple = 0
        self.LimitLV = 0
        self.LimitPoint = 0
        return
    def GetLength(self):
@@ -5232,6 +5235,7 @@
        length += 10
        length += 1
        length += 2
        length += 4
        return length
@@ -5242,6 +5246,7 @@
        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):
@@ -5250,14 +5255,16 @@
                                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
@@ -11089,6 +11096,7 @@
                  ("RealmPoint", c_int),    # 可领取修行点
                  ("StageIndex", c_ubyte),    # 当前阶段索引
                  ("AwardRecord", c_int),    # 领奖记录 按位存储
                  ("ExtraPoint", c_int),    # 多倍活动获得的额外修行点
                  ]
    def __init__(self):
@@ -11109,6 +11117,7 @@
        self.RealmPoint = 0
        self.StageIndex = 0
        self.AwardRecord = 0
        self.ExtraPoint = 0
        return
    def GetLength(self):
@@ -11124,7 +11133,8 @@
                                CurValue:%d,
                                RealmPoint:%d,
                                StageIndex:%d,
                                AwardRecord:%d
                                AwardRecord:%d,
                                ExtraPoint:%d
                                '''\
                                %(
                                self.Cmd,
@@ -11132,7 +11142,8 @@
                                self.CurValue,
                                self.RealmPoint,
                                self.StageIndex,
                                self.AwardRecord
                                self.AwardRecord,
                                self.ExtraPoint
                                )
        return DumpString
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -539,6 +539,7 @@
    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()
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
@@ -287,6 +287,7 @@
                        ("dict", "NotifyInfoEnd", 0),
                        ("WORD", "Multiple", 0),
                        ("WORD", "LVLimit", 0),
                        ("DWORD", "PointLimit", 0),
                        ),
                "ActFlashSale":(
@@ -869,6 +870,7 @@
        self.NotifyInfoEnd = {}
        self.Multiple = 0
        self.LVLimit = 0
        self.PointLimit = 0
        return
        
    def GetCfgID(self): return self.CfgID # 配置ID
@@ -882,6 +884,7 @@
    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():
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3725,6 +3725,7 @@
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
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -5197,6 +5197,7 @@
    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
    Multiple = 0    #(BYTE Multiple)// 倍数
    LimitLV = 0    #(WORD LimitLV)// 限制等级
    LimitPoint = 0    #(DWORD LimitPoint)// 限制获得修行点
    data = None
    def __init__(self):
@@ -5212,6 +5213,7 @@
        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):
@@ -5223,6 +5225,7 @@
        self.EndtDate = ""
        self.Multiple = 0
        self.LimitLV = 0
        self.LimitPoint = 0
        return
    def GetLength(self):
@@ -5232,6 +5235,7 @@
        length += 10
        length += 1
        length += 2
        length += 4
        return length
@@ -5242,6 +5246,7 @@
        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):
@@ -5250,14 +5255,16 @@
                                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
@@ -11089,6 +11096,7 @@
                  ("RealmPoint", c_int),    # 可领取修行点
                  ("StageIndex", c_ubyte),    # 当前阶段索引
                  ("AwardRecord", c_int),    # 领奖记录 按位存储
                  ("ExtraPoint", c_int),    # 多倍活动获得的额外修行点
                  ]
    def __init__(self):
@@ -11109,6 +11117,7 @@
        self.RealmPoint = 0
        self.StageIndex = 0
        self.AwardRecord = 0
        self.ExtraPoint = 0
        return
    def GetLength(self):
@@ -11124,7 +11133,8 @@
                                CurValue:%d,
                                RealmPoint:%d,
                                StageIndex:%d,
                                AwardRecord:%d
                                AwardRecord:%d,
                                ExtraPoint:%d
                                '''\
                                %(
                                self.Cmd,
@@ -11132,7 +11142,8 @@
                                self.CurValue,
                                self.RealmPoint,
                                self.StageIndex,
                                self.AwardRecord
                                self.AwardRecord,
                                self.ExtraPoint
                                )
        return DumpString
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -988,6 +988,7 @@
                        ("DWORD", "CfgID", 1),
                        ("WORD", "Multiple", 0),
                        ("WORD", "LVLimit", 0),
                        ("DWORD", "PointLimit", 0),
                        ),
                "TrialExchange":(
@@ -3105,11 +3106,13 @@
        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():
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -232,30 +232,33 @@
    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
@@ -268,6 +271,7 @@
    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