From 469a1fd9bb55f55195fe3f7f30553e61145cc4e4 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 22 四月 2019 14:27:34 +0800
Subject: [PATCH] 6459 【后端】【2.0】缥缈仙域开发单(采集物可配置攻击是否打断采集)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 7 +++++--
PySysDB/PySysDBPY.h | 1 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 12 ++++++++----
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index cd78254..bae0253 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -1022,6 +1022,7 @@
dict CollectAppointAward; //采集次数定制产出 {次数:[物品ID,个数,是否拍品], ...}
BYTE AlchemyDiffLV; //过滤炼丹等级差,0-不过滤,>0过滤大于自身炼丹等级X级的物品
BYTE NotifyCollectResult; //是否通知采集结果
+ BYTE CanBreakCollect; //被攻击是否打断采集
};
//宝箱怪表
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 08b3bd9..567b7ec 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -824,6 +824,7 @@
("dict", "CollectAppointAward", 0),
("BYTE", "AlchemyDiffLV", 0),
("BYTE", "NotifyCollectResult", 0),
+ ("BYTE", "CanBreakCollect", 0),
),
"TreasureNPC":(
@@ -3100,7 +3101,8 @@
self.CollectAward = []
self.CollectAppointAward = {}
self.AlchemyDiffLV = 0
- self.NotifyCollectResult = 0
+ self.NotifyCollectResult = 0
+ self.CanBreakCollect = 0
return
def GetNPCID(self): return self.NPCID # ID
@@ -3113,7 +3115,8 @@
def GetCollectAward(self): return self.CollectAward # 采集奖励物品,权重列表 [[权重, [物品ID,个数,是否拍品]], ...]
def GetCollectAppointAward(self): return self.CollectAppointAward # 采集次数定制产出 {次数:[物品ID,个数,是否拍品], ...}
def GetAlchemyDiffLV(self): return self.AlchemyDiffLV # 过滤炼丹等级差,0-不过滤,>0过滤大于自身炼丹等级X级的物品
- def GetNotifyCollectResult(self): return self.NotifyCollectResult # 是否通知采集结果
+ def GetNotifyCollectResult(self): return self.NotifyCollectResult # 是否通知采集结果
+ def GetCanBreakCollect(self): return self.CanBreakCollect # 被攻击是否打断采集
# 宝箱怪表
class IPY_TreasureNPC():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 88d8d75..e1a2d29 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -778,8 +778,8 @@
return
#副本中不打断
- if GameWorld.GetMap().GetMapFBType() != IPY_GameWorld.fbtNull:
- return
+ #if GameWorld.GetMap().GetMapFBType() != IPY_GameWorld.fbtNull:
+ # return
tagObj = curPlayer.GetActionObj()
@@ -799,10 +799,14 @@
#GameWorld.Log("BreakPlayerCollect ->没有这个NPC", curPlayer.GetPlayerID())
return
- if curNPC.GetNPCID() not in ReadChConfig.GetEvalChConfig('BreakPlayerCollectNPCIDList'):
+ npcID = curNPC.GetNPCID()
+ collectNPCIpyData = IpyGameDataPY.GetIpyGameDataNotLog("CollectNPC", npcID)
+ if not collectNPCIpyData:
return
- GameWorld.DebugLog(' 采集被打断 采集物NPCID=%s' % curNPC.GetNPCID())
+ if not collectNPCIpyData.GetCanBreakCollect():
+ return
+
#取消采集状态
ChangePlayerAction(curPlayer, IPY_GameWorld.paNull)
--
Gitblit v1.8.0