From d6e4fc9d6c90c5b583b46d292d016a4a3f7e2463 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 20 四月 2019 16:52:09 +0800
Subject: [PATCH] 6459 【后端】【2.0】缥缈仙域开发单(采集物表增加是否任务采集物)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 3 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 14 +++++++++++++-
PySysDB/PySysDBPY.h | 1 +
3 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index d0e7868..ba06839 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -1012,6 +1012,7 @@
struct tagCollectNPC
{
DWORD _NPCID; //ID
+ BYTE IsMissionCollectNPC; //是否任务采集物
BYTE PrepareTime; //采集耗时,秒
list LostHPPer; //采集掉血,[每X秒,掉血百分比]
BYTE MaxCollectCount; //可采集次数,0无限制
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index c6d30cb..3dc6c80 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/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无限制
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 486179a..18ade5c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/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()
--
Gitblit v1.8.0