From ee8463d3e723446c652324e398582252f955a8db Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 14 一月 2019 19:21:13 +0800
Subject: [PATCH] 5805 【后端】【1.5】新增增加跨服匹配次数的道具

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMissionCollect.py |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMissionCollect.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMissionCollect.py
index acc0153..c7ef269 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMissionCollect.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMissionCollect.py
@@ -18,7 +18,7 @@
 # @change: "2010-11-22 12:15" Alee 采集限制
 # @change: "2014-04-14 12:00" hxp 增加自定义采集NPC
 #---------------------------------------------------------------------
-"""Version = 2014-04-14 12:00"""
+#"""Version = 2014-04-14 12:00"""
 #---------------------------------------------------------------------
 #导入
 import GameWorld
@@ -29,8 +29,10 @@
 import PlayerControl
 import OperControlManager
 import NPCCommon
-import PlayerPrestigeSys
+import FBLogic
 import AttackCommon
+import ReadChConfig
+import PlayerState
 import GameObj
 #---------------------------------------------------------------------
 '''Version = 2010-09-16 09:55'''
@@ -49,18 +51,18 @@
     tagObj = curPlayer.GetActionObj()
     if tagObj == None:
         #没有目标
-        GameWorld.Log("FuncCall -> 没有目标" , curPlayer.GetPlayerID())
+        GameWorld.Log("GetActionNPCbyType -> 没有目标" , curPlayer.GetPlayerID())
         return
     
     if tagObj.GetGameObjType() != IPY_GameWorld.gotNPC:
         #谈话对象不对
-        GameWorld.Log("FuncCall -> 谈话对象不对" , curPlayer.GetPlayerID())
+        GameWorld.Log("GetActionNPCbyType -> 谈话对象不对" , curPlayer.GetPlayerID())
         return
     
     curNPC = GameWorld.GetNPCManager().GetNPCByIndex(tagObj.GetIndex())
     if curNPC == None:
         #没有这个NPC
-        GameWorld.Log("FuncCall ->没有这个NPC" , curPlayer.GetPlayerID())
+        GameWorld.Log("GetActionNPCbyType ->没有这个NPC" , curPlayer.GetPlayerID())
         return
     
     if curNPC.GetType() != npcType:
@@ -94,6 +96,8 @@
     
     #先设置对象,任务可采集得到对象NPC
     curPlayer.SetActionObj(curNPC)
+    if curNPC.GetNPCID() in ReadChConfig.GetEvalChConfig("CollectNPCLostHP"):
+        curPlayer.SetDict(ChConfig.Def_PlayerKey_CollectLostHPTick, tick)
     
     # 自定义的采集NPC
     if NPCCommon.DoCollectNPCBegin(curPlayer, curNPC):
@@ -130,7 +134,7 @@
 #  @param curPlayer
 #  @return None
 #  @remarks 函数详细说明.
-def EndMissionCollect(curPlayer):
+def EndMissionCollect(curPlayer, tick):
     #任务采集类NPC
     curNPC = GetActionNPCbyType(curPlayer, IPY_GameWorld.ntMissionCollect)
     if not curNPC:
@@ -142,10 +146,12 @@
     if not ChNPC.OnCollectEnd(curPlayer, curNPC):
         return
     
+    PlayerState.DoCollectingLostHP(curPlayer, npcID, tick, True)
+    
     # 自定义的采集NPC
     if NPCCommon.DoCollectNPCOK(curPlayer, npcID):
         EventShell.EventRespons_MisCollectSuccess(curPlayer, curNPC) # 先直接写这边触发一下,自定义采集的不再处理后面的代码
-        
+        FBLogic.OnCollectOK(curPlayer, npcID, GameWorld.GetGameWorld().GetTick())
         return
     
     EventShell.EventRespons_MisCollectSuccess(curPlayer, curNPC)

--
Gitblit v1.8.0