4255 【后端】【1.3】小助手(扫荡支持,等级开启功能表增加VIP等级条件)
9个文件已修改
57 ■■■■ 已修改文件
PySysDB/PySysDBPY.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -61,6 +61,7 @@
    DWORD        LimitMagicWeapon;    //需要解锁法宝ID
    WORD        LimiRealmLV;    //需要境界等级
    DWORD        LimitMissionID;    //需要完成的任务ID
    BYTE        LimitVIPLV;    //需要VIP等级
};
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -7219,8 +7219,9 @@
                  ("MapID", c_int),    
                  ("LineID", c_ushort),    
                  ("Cnt", c_ubyte),    # 扫荡次数
                  ("IsFinish", c_ubyte),    # 是否立即完成
                  ("IsFinish", c_ubyte),    # 是否立即完成; 0-否;1-花钱立即完成;2-客户端自行倒计时间到后发送2代表领取扫荡完成奖励
                  ("DataEx", c_int),    #附带信息
                  ("IsLittleHelper", c_ubyte),    # 是否小助手扫荡
                  ]
    def __init__(self):
@@ -7242,6 +7243,7 @@
        self.Cnt = 0
        self.IsFinish = 0
        self.DataEx = 0
        self.IsLittleHelper = 0
        return
    def GetLength(self):
@@ -7258,7 +7260,8 @@
                                LineID:%d,
                                Cnt:%d,
                                IsFinish:%d,
                                DataEx:%d
                                DataEx:%d,
                                IsLittleHelper:%d
                                '''\
                                %(
                                self.Cmd,
@@ -7267,7 +7270,8 @@
                                self.LineID,
                                self.Cnt,
                                self.IsFinish,
                                self.DataEx
                                self.DataEx,
                                self.IsLittleHelper
                                )
        return DumpString
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -853,6 +853,7 @@
GameFuncID_OSSail = 132         # 开服特惠
GameFuncID_HorsePetRobBoss = 139# 骑宠争夺
GameFuncID_AddPoint = 145       # 加点功能
GameFuncID_LittleHelper = 146   # 小助手
# 以下为暂时无用的
GameFuncID_Truck = 33           # 运镖
GameFuncID_RunDaily = 34        # 日常跑环
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -7219,8 +7219,9 @@
                  ("MapID", c_int),    
                  ("LineID", c_ushort),    
                  ("Cnt", c_ubyte),    # 扫荡次数
                  ("IsFinish", c_ubyte),    # 是否立即完成
                  ("IsFinish", c_ubyte),    # 是否立即完成; 0-否;1-花钱立即完成;2-客户端自行倒计时间到后发送2代表领取扫荡完成奖励
                  ("DataEx", c_int),    #附带信息
                  ("IsLittleHelper", c_ubyte),    # 是否小助手扫荡
                  ]
    def __init__(self):
@@ -7242,6 +7243,7 @@
        self.Cnt = 0
        self.IsFinish = 0
        self.DataEx = 0
        self.IsLittleHelper = 0
        return
    def GetLength(self):
@@ -7258,7 +7260,8 @@
                                LineID:%d,
                                Cnt:%d,
                                IsFinish:%d,
                                DataEx:%d
                                DataEx:%d,
                                IsLittleHelper:%d
                                '''\
                                %(
                                self.Cmd,
@@ -7267,7 +7270,8 @@
                                self.LineID,
                                self.Cnt,
                                self.IsFinish,
                                self.DataEx
                                self.DataEx,
                                self.IsLittleHelper
                                )
        return DumpString
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -80,6 +80,7 @@
                        ("DWORD", "LimitMagicWeapon", 0),
                        ("WORD", "LimiRealmLV", 0),
                        ("DWORD", "LimitMissionID", 0),
                        ("BYTE", "LimitVIPLV", 0),
                        ),
                "ItemCompound":(
@@ -1153,6 +1154,7 @@
        self.LimitMagicWeapon = 0
        self.LimiRealmLV = 0
        self.LimitMissionID = 0
        self.LimitVIPLV = 0
        return
        
    def GetFuncId(self): return self.FuncId # 功能标识
@@ -1160,6 +1162,7 @@
    def GetLimitMagicWeapon(self): return self.LimitMagicWeapon # 需要解锁法宝ID
    def GetLimiRealmLV(self): return self.LimiRealmLV # 需要境界等级
    def GetLimitMissionID(self): return self.LimitMissionID # 需要完成的任务ID
    def GetLimitVIPLV(self): return self.LimitVIPLV # 需要VIP等级
# 合成表
class IPY_ItemCompound():
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py
@@ -122,6 +122,10 @@
        if limitMissionID and not curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_MissionFinish % limitMissionID):
            continue
        
        limitVIPLV = ipyData.GetLimitVIPLV()
        if limitVIPLV and curPlayer.GetVIPLv() < limitVIPLV:
            continue
        # 先更新值再处理开启逻辑,不能可能导致在功能开启逻辑中再开启功能引发的递归死循环
        befValue, updValue = GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_GameFuncFirstTouch, funcID, 1)
        if befValue == updValue:
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py
@@ -35,6 +35,7 @@
import ItemCommon
import IpyGameDataPY
import ShareDefine
import GameFuncComm
import time
import math
@@ -236,12 +237,8 @@
#    BYTE        Cnt;    // 扫荡次数
#    BYTE        IsFinish;    // 是否立即完成; 0-否;1-花钱立即完成;2-客户端自行倒计时间到后发送2代表领取扫荡完成奖励
#    DWORD        DataEx;    //附带信息
#    BYTE        IsLittleHelper;    // 是否小助手扫荡
#};
## 玩家副本扫荡
#  @param playerIndex 玩家索引
#  @param clientData 客户端封包
#  @param tick 时间
#  @return None
def OnPlayerFBWipeOut(playerIndex, clientData, tick):
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(playerIndex)
    
@@ -255,6 +252,15 @@
    #isFinish = clientData.IsFinish
    isFinish = 1 # 暂时默认1,之后有需要扫荡等待的再说
    dataEx = clientData.DataEx
    isLittleHelper = clientData.IsLittleHelper
    if isLittleHelper:
        if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_LittleHelper):
            GameWorld.DebugLog("玩家没有小助手功能权限!", curPlayer.GetPlayerID())
            return
    if cnt <= 0:
        return
    fbIpyData = FBCommon.GetFBIpyData(mapID)
    if FBCommon.GetRecordMapID(GameWorld.GetMap().GetMapID()) == FBCommon.GetRecordMapID(mapID):
        if fbIpyData and fbIpyData.GetDayTimes():#没有限制进入次数的不限制在目标地图扫荡
@@ -263,6 +269,10 @@
    
    
    fbLineIpyData = FBCommon.GetFBLineIpyData(mapID, lineID)
    if not fbLineIpyData:
        GameWorld.DebugLog("找不到该副本线路,无法扫荡!mapID=%s, lineID=%s" % (mapID, lineID))
        return
    if FBCommon.CheckCanEnterFBComm(curPlayer, mapID, lineID, fbIpyData, fbLineIpyData, cnt) != ShareDefine.EntFBAskRet_OK:
        return
    costMoneyList = []
@@ -278,9 +288,9 @@
                               % (mapID, lineID, curPlayer.GetLV(), sweepLVLimit), curPlayer.GetPlayerID())
            return
        
        #扫荡道具判断
        #扫荡道具判断,小助手不消耗扫荡道具
        sweepItemID = fbLineIpyData.GetSweepItemID()
        if sweepItemID:
        if sweepItemID and not isLittleHelper:
            sweepItemCnt = fbLineIpyData.GetSweepCostCnt()
            sweepCostCnt = sweepItemCnt * cnt
            #isEnough, sweepCostindexList = ItemCommon.GetItem_FromPack_ByID(sweepItemID, itemPack, sweepCostCnt)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py
@@ -34,6 +34,7 @@
import EventShell
import PassiveBuffEffMng
import PlayerFamilyRedPacket
import GameFuncComm
import time
#---------------------------------------------------------------------
@@ -294,6 +295,8 @@
    redPacketID = IpyGameDataPY.GetFuncEvalCfg('VIPRedPackAward', 1, {}).get(vipLV, 0)
    if redPacketID:
        PlayerFamilyRedPacket.CreatRedPacketByID(curPlayer, redPacketID)
    GameFuncComm.DoFuncOpenLogic(curPlayer)
    return
#通知玩家购买礼包纪录
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -853,6 +853,7 @@
GameFuncID_OSSail = 132         # 开服特惠
GameFuncID_HorsePetRobBoss = 139# 骑宠争夺
GameFuncID_AddPoint = 145       # 加点功能
GameFuncID_LittleHelper = 146   # 小助手
# 以下为暂时无用的
GameFuncID_Truck = 33           # 运镖
GameFuncID_RunDaily = 34        # 日常跑环