10297 【越南】【英语】【砍树】【tqxbqy】轮回殿-服务端(轮回殿活动时间表增加配置轮回类型对应的CTGID跟商店类型)
6个文件已修改
84 ■■■■■ 已修改文件
PySysDB/PySysDBPY.h 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLunhuidian.py 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -2685,6 +2685,8 @@
    WORD        LVLimit;    //限制等级
    BYTE        ResetType;    //重置类型,0-0点重置;1-5点重置
    dict        RoundSetInfo;    //开放轮回设定
    dict        RoundCTGIDInfo;    //轮回类型对应充值ID列表
    dict        RoundShopTypeInfo;    //轮回类型对应商店类型
};
//轮回殿活动奖励表
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -38701,6 +38701,9 @@
    RoundMax = 0    #(BYTE RoundMax)// 最大可循环轮次
    AwardCount = 0    #(BYTE AwardCount)
    AwardList = list()    #(vector<tagMCActLunhuidianAward> AwardList)// 每轮奖励列表
    CTGIDCount = 0    #(BYTE CTGIDCount)
    CTGIDList = list()    #(vector<WORD> CTGIDList)// CTGID列表
    ShopType = 0    #(WORD ShopType)// 开放商店类型,可能为0不开放
    data = None
    def __init__(self):
@@ -38718,6 +38721,11 @@
            temAwardList = tagMCActLunhuidianAward()
            _pos = temAwardList.ReadData(_lpData, _pos)
            self.AwardList.append(temAwardList)
        self.CTGIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.CTGIDCount):
            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
            self.CTGIDList.append(value)
        self.ShopType,_pos = CommFunc.ReadWORD(_lpData, _pos)
        return _pos
    def Clear(self):
@@ -38727,6 +38735,9 @@
        self.RoundMax = 0
        self.AwardCount = 0
        self.AwardList = list()
        self.CTGIDCount = 0
        self.CTGIDList = list()
        self.ShopType = 0
        return
    def GetLength(self):
@@ -38738,6 +38749,9 @@
        length += 1
        for i in range(self.AwardCount):
            length += self.AwardList[i].GetLength()
        length += 1
        length += 2 * self.CTGIDCount
        length += 2
        return length
@@ -38750,6 +38764,10 @@
        data = CommFunc.WriteBYTE(data, self.AwardCount)
        for i in range(self.AwardCount):
            data = CommFunc.WriteString(data, self.AwardList[i].GetLength(), self.AwardList[i].GetBuffer())
        data = CommFunc.WriteBYTE(data, self.CTGIDCount)
        for i in range(self.CTGIDCount):
            data = CommFunc.WriteWORD(data, self.CTGIDList[i])
        data = CommFunc.WriteWORD(data, self.ShopType)
        return data
    def OutputString(self):
@@ -38759,7 +38777,10 @@
                                AwardTypeValue:%d,
                                RoundMax:%d,
                                AwardCount:%d,
                                AwardList:%s
                                AwardList:%s,
                                CTGIDCount:%d,
                                CTGIDList:%s,
                                ShopType:%d
                                '''\
                                %(
                                self.RoundType,
@@ -38767,7 +38788,10 @@
                                self.AwardTypeValue,
                                self.RoundMax,
                                self.AwardCount,
                                "..."
                                "...",
                                self.CTGIDCount,
                                "...",
                                self.ShopType
                                )
        return DumpString
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -38701,6 +38701,9 @@
    RoundMax = 0    #(BYTE RoundMax)// 最大可循环轮次
    AwardCount = 0    #(BYTE AwardCount)
    AwardList = list()    #(vector<tagMCActLunhuidianAward> AwardList)// 每轮奖励列表
    CTGIDCount = 0    #(BYTE CTGIDCount)
    CTGIDList = list()    #(vector<WORD> CTGIDList)// CTGID列表
    ShopType = 0    #(WORD ShopType)// 开放商店类型,可能为0不开放
    data = None
    def __init__(self):
@@ -38718,6 +38721,11 @@
            temAwardList = tagMCActLunhuidianAward()
            _pos = temAwardList.ReadData(_lpData, _pos)
            self.AwardList.append(temAwardList)
        self.CTGIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.CTGIDCount):
            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
            self.CTGIDList.append(value)
        self.ShopType,_pos = CommFunc.ReadWORD(_lpData, _pos)
        return _pos
    def Clear(self):
@@ -38727,6 +38735,9 @@
        self.RoundMax = 0
        self.AwardCount = 0
        self.AwardList = list()
        self.CTGIDCount = 0
        self.CTGIDList = list()
        self.ShopType = 0
        return
    def GetLength(self):
@@ -38738,6 +38749,9 @@
        length += 1
        for i in range(self.AwardCount):
            length += self.AwardList[i].GetLength()
        length += 1
        length += 2 * self.CTGIDCount
        length += 2
        return length
@@ -38750,6 +38764,10 @@
        data = CommFunc.WriteBYTE(data, self.AwardCount)
        for i in range(self.AwardCount):
            data = CommFunc.WriteString(data, self.AwardList[i].GetLength(), self.AwardList[i].GetBuffer())
        data = CommFunc.WriteBYTE(data, self.CTGIDCount)
        for i in range(self.CTGIDCount):
            data = CommFunc.WriteWORD(data, self.CTGIDList[i])
        data = CommFunc.WriteWORD(data, self.ShopType)
        return data
    def OutputString(self):
@@ -38759,7 +38777,10 @@
                                AwardTypeValue:%d,
                                RoundMax:%d,
                                AwardCount:%d,
                                AwardList:%s
                                AwardList:%s,
                                CTGIDCount:%d,
                                CTGIDList:%s,
                                ShopType:%d
                                '''\
                                %(
                                self.RoundType,
@@ -38767,7 +38788,10 @@
                                self.AwardTypeValue,
                                self.RoundMax,
                                self.AwardCount,
                                "..."
                                "...",
                                self.CTGIDCount,
                                "...",
                                self.ShopType
                                )
        return DumpString
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
@@ -291,6 +291,8 @@
def ResetShopItemBuyCountByShopType(curPlayer, shopTypeList):
    ##根据商店类型重置商店限购物品次数
    if not shopTypeList:
        return
    syncIndexList = []
    ipyDataMgr = IpyGameDataPY.IPY_Data()
    for i in xrange(ipyDataMgr.GetStoreCount()):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -2091,6 +2091,8 @@
                        ("WORD", "LVLimit", 0),
                        ("BYTE", "ResetType", 0),
                        ("dict", "RoundSetInfo", 0),
                        ("dict", "RoundCTGIDInfo", 0),
                        ("dict", "RoundShopTypeInfo", 0),
                        ),
                "ActLunhuidianAward":(
@@ -5641,7 +5643,9 @@
    def GetEndDate(self): return self.attrTuple[2] # 结束日期 char
    def GetLVLimit(self): return self.attrTuple[3] # 限制等级 WORD
    def GetResetType(self): return self.attrTuple[4] # 重置类型,0-0点重置;1-5点重置 BYTE
    def GetRoundSetInfo(self): return self.attrTuple[5] # 开放轮回设定 dict
    def GetRoundSetInfo(self): return self.attrTuple[5] # 开放轮回设定 dict
    def GetRoundCTGIDInfo(self): return self.attrTuple[6] # 轮回类型对应充值ID列表 dict
    def GetRoundShopTypeInfo(self): return self.attrTuple[7] # 轮回类型对应商店类型 dict
# 轮回殿活动奖励表
class IPY_ActLunhuidianAward():
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLunhuidian.py
@@ -20,8 +20,10 @@
import PlayerControl
import IpyGameDataPY
import ChPyNetSendPack
import FunctionNPCCommon
import NetPackCommon
import ItemControler
import PlayerCoin
import GameWorld
import ChConfig
@@ -88,11 +90,22 @@
        ipyData = IpyGameDataPY.GetIpyGameData("ActLunhuidian", cfgID)
        if ipyData:
            roundSetDict = ipyData.GetRoundSetInfo()
            ctgIDDict = ipyData.GetRoundCTGIDInfo()
            shopTypeDict = ipyData.GetRoundShopTypeInfo()
            resetCTGIDList, resetShopTypeList = [], []
            for roundType in roundSetDict.keys():
                PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActLunhuidianValue % (actNum, roundType), 0)
                PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActLunhuidianRound % (actNum, roundType), 1) # 从第1轮开始
                PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActLunhuidianAward % (actNum, roundType), 0)
                Sync_ActLunhuidianPlayerInfo(curPlayer, actNum, roundType)
                resetCTGIDList += ctgIDDict.get(roundType, [])
                shopType = shopTypeDict.get(roundType, 0)
                if shopType and shopType not in resetShopTypeList:
                    resetShopTypeList.append(shopType)
            PlayerCoin.DoResetCTGCountByIDList(curPlayer, "ActLunhuidian", resetCTGIDList)
            FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, resetShopTypeList)
    return True
def GetRoundSetValue(roundSet, setIndex): return roundSet[setIndex] if len(roundSet) > setIndex else 0
@@ -238,6 +251,8 @@
    clientPack.LimitLV = ipyData.GetLVLimit()
    
    roundSetDict = ipyData.GetRoundSetInfo()
    ctgIDDict = ipyData.GetRoundCTGIDInfo()
    shopTypeDict = ipyData.GetRoundShopTypeInfo()
    for roundType, roundSet in roundSetDict.items():
        roundInfo = ChPyNetSendPack.tagMCActLunhuidianRound()
        roundInfo.RoundType = roundType
@@ -262,6 +277,9 @@
                
                roundInfo.AwardList.append(award)
        roundInfo.AwardCount = len(roundInfo.AwardList)
        roundInfo.CTGIDList = ctgIDDict.get(roundType, [])
        roundInfo.CTGIDCount = len(roundInfo.CTGIDList)
        roundInfo.ShopType = shopTypeDict.get(roundType, 0)
        
        clientPack.RoundList.append(roundInfo)
    clientPack.RoundCount = len(clientPack.RoundList)