6459 【后端】【2.0】缥缈仙域开发单(采集物表增加是否任务采集物)
3个文件已修改
18 ■■■■■ 已修改文件
PySysDB/PySysDBPY.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -1012,6 +1012,7 @@
struct tagCollectNPC
{
    DWORD        _NPCID;    //ID
    BYTE        IsMissionCollectNPC;    //是否任务采集物
    BYTE        PrepareTime;    //采集耗时,秒
    list        LostHPPer;    //采集掉血,[每X秒,掉血百分比]
    BYTE        MaxCollectCount;    //可采集次数,0无限制
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -814,6 +814,7 @@
                "CollectNPC":(
                        ("DWORD", "NPCID", 1),
                        ("BYTE", "IsMissionCollectNPC", 0),
                        ("BYTE", "PrepareTime", 0),
                        ("list", "LostHPPer", 0),
                        ("BYTE", "MaxCollectCount", 0),
@@ -3084,6 +3085,7 @@
    
    def __init__(self):
        self.NPCID = 0
        self.IsMissionCollectNPC = 0
        self.PrepareTime = 0
        self.LostHPPer = []
        self.MaxCollectCount = 0
@@ -3096,6 +3098,7 @@
        return
        
    def GetNPCID(self): return self.NPCID # ID
    def GetIsMissionCollectNPC(self): return self.IsMissionCollectNPC # 是否任务采集物
    def GetPrepareTime(self): return self.PrepareTime # 采集耗时,秒
    def GetLostHPPer(self): return self.LostHPPer # 采集掉血,[每X秒,掉血百分比]
    def GetMaxCollectCount(self): return self.MaxCollectCount # 可采集次数,0无限制
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -5525,7 +5525,11 @@
    npcID = curNPC.GetNPCID()
    collectNPCIpyData = IpyGameDataPY.GetIpyGameData("CollectNPC", npcID)
    if not collectNPCIpyData:
        GameWorld.DebugLog("非特定采集NPC...")
        #GameWorld.DebugLog("非特定采集NPC...")
        return False
    if collectNPCIpyData.GetIsMissionCollectNPC():
        #GameWorld.DebugLog("任务采集物暂不处理")
        return False
    
    if not CheckCanCollectByNPCID(curPlayer, npcID, collectNPCIpyData):
@@ -5628,6 +5632,10 @@
        GameWorld.DebugLog("    非特定采集NPC...npcID=%s" % npcID)
        return
    
    if collectNPCIpyData.GetIsMissionCollectNPC():
        #GameWorld.DebugLog("任务采集物暂不处理")
        return
    PlayerState.DoCollectingLostHP(curPlayer, collectNPCIpyData, tick, True)
    
    if GameWorld.IsCrossServer():
@@ -5675,6 +5683,10 @@
    GameWorld.DebugLog("给采集奖励: npcID=%s,collectCnt=%s" % (npcID, collectCnt))
    if collectCnt <= 0:
        return
    if collectNPCIpyData.GetIsMissionCollectNPC():
        #GameWorld.DebugLog("任务采集物暂不处理")
        return
    
    isMaxTime = False # 是否达到了采集最大次数
    limitMaxTime = collectNPCIpyData.GetMaxCollectCount()