8710 【开发】【主干】【BT2】根据世界等级配置奖励(成长必买世界等级不同奖励配置改为放在充值表);

# Conflicts:
# ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
5个文件已修改
52 ■■■■■ 已修改文件
PySysDB/PySysDBPY.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGrowupBuy.py 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -1244,6 +1244,7 @@
    WORD        GainGoldPrize;    //赠送仙玉数
    WORD        FirstGoldPrize;    //首次充值该档位赠送仙玉
    list        GainItemList;    //获得物品列表[[物品ID,个数,是否绑定], ...]
    dict        ActWorldLVGainItemInfo;    //根据活动世界等级获得物品信息,活动专用 {"世界等级":[[物品ID,个数,是否绑定], ...], ...}
    char        NotifyMark;    //广播提示
    BYTE        PayType;    //充值类型
};
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -24542,6 +24542,7 @@
    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
    GroupCount = 0    #(BYTE GroupCount)// 循环购买礼包组数
    GroupList = list()    #(vector<tagMCActGrowupBuyGroup> GroupList)//循环购买礼包组列表
    ActWorldLV = 0    #(WORD ActWorldLV)// 活动世界等级
    data = None
    def __init__(self):
@@ -24560,6 +24561,7 @@
            temGroupList = tagMCActGrowupBuyGroup()
            _pos = temGroupList.ReadData(_lpData, _pos)
            self.GroupList.append(temGroupList)
        self.ActWorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
        return _pos
    def Clear(self):
@@ -24571,6 +24573,7 @@
        self.EndtDate = ""
        self.GroupCount = 0
        self.GroupList = list()
        self.ActWorldLV = 0
        return
    def GetLength(self):
@@ -24581,6 +24584,7 @@
        length += 1
        for i in range(self.GroupCount):
            length += self.GroupList[i].GetLength()
        length += 2
        return length
@@ -24592,6 +24596,7 @@
        data = CommFunc.WriteBYTE(data, self.GroupCount)
        for i in range(self.GroupCount):
            data = CommFunc.WriteString(data, self.GroupList[i].GetLength(), self.GroupList[i].GetBuffer())
        data = CommFunc.WriteWORD(data, self.ActWorldLV)
        return data
    def OutputString(self):
@@ -24600,14 +24605,16 @@
                                StartDate:%s,
                                EndtDate:%s,
                                GroupCount:%d,
                                GroupList:%s
                                GroupList:%s,
                                ActWorldLV:%d
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.StartDate,
                                self.EndtDate,
                                self.GroupCount,
                                "..."
                                "...",
                                self.ActWorldLV
                                )
        return DumpString
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -24542,6 +24542,7 @@
    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
    GroupCount = 0    #(BYTE GroupCount)// 循环购买礼包组数
    GroupList = list()    #(vector<tagMCActGrowupBuyGroup> GroupList)//循环购买礼包组列表
    ActWorldLV = 0    #(WORD ActWorldLV)// 活动世界等级
    data = None
    def __init__(self):
@@ -24560,6 +24561,7 @@
            temGroupList = tagMCActGrowupBuyGroup()
            _pos = temGroupList.ReadData(_lpData, _pos)
            self.GroupList.append(temGroupList)
        self.ActWorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
        return _pos
    def Clear(self):
@@ -24571,6 +24573,7 @@
        self.EndtDate = ""
        self.GroupCount = 0
        self.GroupList = list()
        self.ActWorldLV = 0
        return
    def GetLength(self):
@@ -24581,6 +24584,7 @@
        length += 1
        for i in range(self.GroupCount):
            length += self.GroupList[i].GetLength()
        length += 2
        return length
@@ -24592,6 +24596,7 @@
        data = CommFunc.WriteBYTE(data, self.GroupCount)
        for i in range(self.GroupCount):
            data = CommFunc.WriteString(data, self.GroupList[i].GetLength(), self.GroupList[i].GetBuffer())
        data = CommFunc.WriteWORD(data, self.ActWorldLV)
        return data
    def OutputString(self):
@@ -24600,14 +24605,16 @@
                                StartDate:%s,
                                EndtDate:%s,
                                GroupCount:%d,
                                GroupList:%s
                                GroupList:%s,
                                ActWorldLV:%d
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.StartDate,
                                self.EndtDate,
                                self.GroupCount,
                                "..."
                                "...",
                                self.ActWorldLV
                                )
        return DumpString
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -1000,6 +1000,7 @@
                        ("WORD", "GainGoldPrize", 0),
                        ("WORD", "FirstGoldPrize", 0),
                        ("list", "GainItemList", 0),
                        ("dict", "ActWorldLVGainItemInfo", 0),
                        ("char", "NotifyMark", 0),
                        ("BYTE", "PayType", 0),
                        ),
@@ -3703,6 +3704,7 @@
        self.GainGoldPrize = 0
        self.FirstGoldPrize = 0
        self.GainItemList = []
        self.ActWorldLVGainItemInfo = {}
        self.NotifyMark = ""
        self.PayType = 0
        return
@@ -3715,6 +3717,7 @@
    def GetGainGoldPrize(self): return self.GainGoldPrize # 赠送仙玉数
    def GetFirstGoldPrize(self): return self.FirstGoldPrize # 首次充值该档位赠送仙玉
    def GetGainItemList(self): return self.GainItemList # 获得物品列表[[物品ID,个数,是否绑定], ...]
    def GetActWorldLVGainItemInfo(self): return self.ActWorldLVGainItemInfo # 根据活动世界等级获得物品信息,活动专用 {"世界等级":[[物品ID,个数,是否绑定], ...], ...}
    def GetNotifyMark(self): return self.NotifyMark # 广播提示
    def GetPayType(self): return self.PayType # 充值类型
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGrowupBuy.py
@@ -79,7 +79,7 @@
    ipyData = IpyGameDataPY.GetIpyGameData("ActGrowupBuy", cfgID)
    if not ipyData:
        return
    ctgIDGroupList = __GetCTGIDGroupList(ipyData.GetCTGIDGroupList(), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
    ctgIDGroupList = ipyData.GetCTGIDGroupList()
    
    buyState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GrowupBuyState)
    GameWorld.DebugLog("更新成长必买今日可购买礼包索引! buyState=%s,ctgIDGroupList=%s" % (buyState, ctgIDGroupList))
@@ -108,11 +108,6 @@
    Sync_GrowupActionInfo(curPlayer)
    return
def __GetCTGIDGroupList(cfgGroupList, worldLV):
    if isinstance(cfgGroupList, dict):
        return GameWorld.GetDictValueByRangeKey(cfgGroupList, worldLV, [])
    return cfgGroupList
def CheckGrowupBuyState(curPlayer, ctgID):
    ## 检查是否可购买成长必买礼包ID
    # @return: 是否可买, 不可买原因说明
@@ -125,7 +120,7 @@
    ipyData = IpyGameDataPY.GetIpyGameData("ActGrowupBuy", cfgID)
    if not ipyData:
        return False, "not grow up buy action ipyData cfgID(%s)!" % cfgID
    ctgIDGroupList = __GetCTGIDGroupList(ipyData.GetCTGIDGroupList(), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
    ctgIDGroupList = ipyData.GetCTGIDGroupList()
    buyState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GrowupBuyState)
    curCTGIDList = []
    playerBuyIndex = -1
@@ -156,23 +151,24 @@
    ipyData = IpyGameDataPY.GetIpyGameData("ActGrowupBuy", cfgID)
    if not ipyData:
        return
    ctgIDGroupList = __GetCTGIDGroupList(ipyData.GetCTGIDGroupList(), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
    ctgIDGroupList = ipyData.GetCTGIDGroupList()
    if not ctgIDGroupList:
        return
    
    buyState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GrowupBuyState)
    
    openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
    actInfo = ChPyNetSendPack.tagMCActGrowupBuyInfo()
    actInfo.StartDate = GameWorld.GetOperationActionDateStr(ipyData.GetStartDate(), openServerDay)
    actInfo.EndtDate = GameWorld.GetOperationActionDateStr(ipyData.GetEndDate(), openServerDay)
    actInfo.GroupList = []
    actPack = ChPyNetSendPack.tagMCActGrowupBuyInfo()
    actPack.StartDate = GameWorld.GetOperationActionDateStr(ipyData.GetStartDate(), openServerDay)
    actPack.EndtDate = GameWorld.GetOperationActionDateStr(ipyData.GetEndDate(), openServerDay)
    actPack.GroupList = []
    for i, ctgIDList in enumerate(ctgIDGroupList):
        groupInfo = ChPyNetSendPack.tagMCActGrowupBuyGroup()
        groupInfo.BuyCTGIDList = ctgIDList
        groupInfo.BuyCount = len(groupInfo.BuyCTGIDList)
        groupInfo.PlayerBuyIndex = GameWorld.GetDataByDigitPlace(buyState, i)
        actInfo.GroupList.append(groupInfo)
    actInfo.GroupCount = len(actInfo.GroupList)
    NetPackCommon.SendFakePack(curPlayer, actInfo)
        actPack.GroupList.append(groupInfo)
    actPack.GroupCount = len(actPack.GroupList)
    actPack.ActWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
    NetPackCommon.SendFakePack(curPlayer, actPack)
    return