8701 【主干】【后端】活动相关的充值界面显示优化(跨服充值排行活动支持分);
8个文件已修改
39 ■■■■■ 已修改文件
PySysDB/PySysDBG.h 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/CommFunc.py 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboardCross.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossActCTGBillboard.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossActCTGBillboard.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBG.h
@@ -780,7 +780,7 @@
    DWORD        _TemplateID;    //模板ID
    WORD        OrderA;    //名次A
    WORD        OrderB;    //至名次B
    DWORD        CTGAtleast;    //至少充值RMB
    float        CTGAtleast;    //至少充值RMB
    list        AwardItemList;    //奖励物品列表[[物品ID,个数,是否拍品], ...]
};
PySysDB/PySysDBPY.h
@@ -1935,7 +1935,7 @@
struct tagCrossActCTGBillboardDabiao
{
    DWORD        _TemplateID;    //模板ID
    DWORD        CTGNeed;    //需充值RMB
    float        CTGNeed;    //需充值RMB
    BYTE        AwardIndex;    //奖励记录索引,从0开始,同个模板不可重复,不可变更
    list        AwardItemList;    //奖励物品列表[[物品ID,个数,是否拍品], ...]
};
@@ -1947,7 +1947,7 @@
    DWORD        _TemplateID;    //模板ID
    WORD        OrderA;    //名次A
    WORD        OrderB;    //至名次B
    DWORD        CTGAtleast;    //至少充值RMB
    float        CTGAtleast;    //至少充值RMB
    list        AwardItemList;    //奖励物品列表[[物品ID,个数,是否拍品], ...]
};
ServerPython/CoreServerGroup/GameServer/Script/CommFunc.py
@@ -546,6 +546,7 @@
#  @param maxLen 最大长度
#  @return
def GetStrCutoff(srcStr, maxLen):
    import ShareDefine
    if len(srcStr) <= maxLen:
        return srcStr
    tempComment = srcStr[:maxLen]
@@ -558,3 +559,11 @@
        
    return ""
def RMBToCoin(floatRMB):
    ''' 元转为分,统一函数,方便修改及搜索
    @param floatRMB: 单位元,float 类型,支持 RMB 或 美元
    @return: 转化为分数值
    '''
    # 由于float会有不精确的现象出现xxx.9999999的问题,所以这里计算出的结果向上取整
    return int(math.ceil(floatRMB * 100))
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboardCross.py
@@ -72,6 +72,10 @@
                             "CmpValue3":billboardData.CmpValue3,
                             }
            
            # 20210120 后台没做区分不同版本,暂时用游戏版本代码做返回值区分;(BT版存的是元,主干港台版存的是分,美元支持到分)
            if billboardType in [ShareDefine.Def_CBT_ActCTG]:
                billboardDict["CmpValue"] = billboardData.CmpValue / 100.0
            for k, v in billboardDict.items():
                if not v:
                    billboardDict.pop(k)
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossActCTGBillboard.py
@@ -20,6 +20,7 @@
import PlayerCompensation
import IpyGameDataPY
import GameWorld
import CommFunc
def OnActIDChange(cfgID, dbTemplateID, state):
    ## 活动ID变更
@@ -69,7 +70,7 @@
    for ipyData in orderIpyDataList:
        orderA = ipyData.GetOrderA()
        orderB = ipyData.GetOrderB()
        ctgAtleast = ipyData.GetCTGAtleast()
        ctgAtleast = CommFunc.RMBToCoin(ipyData.GetCTGAtleast())
        awardItemList = ipyData.GetAwardItemList()
        orderCountTotal = orderB - orderA + 1 # 奖励名次数量
        orderCount = 0
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
@@ -641,7 +641,7 @@
                        ("DWORD", "TemplateID", 1),
                        ("WORD", "OrderA", 0),
                        ("WORD", "OrderB", 0),
                        ("DWORD", "CTGAtleast", 0),
                        ("float", "CTGAtleast", 0),
                        ("list", "AwardItemList", 0),
                        ),
@@ -1947,7 +1947,7 @@
        self.TemplateID = 0
        self.OrderA = 0
        self.OrderB = 0
        self.CTGAtleast = 0
        self.CTGAtleast = 0.0
        self.AwardItemList = []
        return
        
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -1507,7 +1507,7 @@
                "CrossActCTGBillboardDabiao":(
                        ("DWORD", "TemplateID", 1),
                        ("DWORD", "CTGNeed", 0),
                        ("float", "CTGNeed", 0),
                        ("BYTE", "AwardIndex", 0),
                        ("list", "AwardItemList", 0),
                        ),
@@ -1516,7 +1516,7 @@
                        ("DWORD", "TemplateID", 1),
                        ("WORD", "OrderA", 0),
                        ("WORD", "OrderB", 0),
                        ("DWORD", "CTGAtleast", 0),
                        ("float", "CTGAtleast", 0),
                        ("list", "AwardItemList", 0),
                        ),
@@ -4784,7 +4784,7 @@
    
    def __init__(self):
        self.TemplateID = 0
        self.CTGNeed = 0
        self.CTGNeed = 0.0
        self.AwardIndex = 0
        self.AwardItemList = []
        return
@@ -4801,7 +4801,7 @@
        self.TemplateID = 0
        self.OrderA = 0
        self.OrderB = 0
        self.CTGAtleast = 0
        self.CTGAtleast = 0.0
        self.AwardItemList = []
        return
        
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossActCTGBillboard.py
@@ -26,6 +26,7 @@
import IPY_GameWorld
import IpyGameDataPY
import GameWorld
import CommFunc
def OnPlayerLogin(curPlayer):
    isReset = __CheckPlayerCrossActCTGBillboard(curPlayer)
@@ -109,7 +110,7 @@
    for ipyData in ipyDataList:
        ctgNeed = ipyData.GetCTGNeed()
        awardIndex = ipyData.GetAwardIndex()
        if totalRMB < ctgNeed:
        if totalRMB < CommFunc.RMBToCoin(ctgNeed):
            continue
        if awardRecord & pow(2, awardIndex):
            continue
@@ -148,7 +149,7 @@
    
    awardItemList = []
    for ipyData in ipyDataList:
        ctgNeed = ipyData.GetCTGNeed()
        ctgNeed = CommFunc.RMBToCoin(ipyData.GetCTGNeed())
        if awardIndex == ipyData.GetAwardIndex():
            if totalRMB < ctgNeed:
                GameWorld.DebugLog("充值额度未达标,无法领取! awardIndex=%s,totalRMB=%s,ctgNeed=%s"