From 6a4df1975beb435a9c712c508035eeecc9cc293d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 14 五月 2021 10:49:51 +0800
Subject: [PATCH] 8921 【主干】【BT2】【后端】H.活动-节日活动-垃圾分类(同步主干冲突 提交)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

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 68e2cd1..dc86d02 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -53,6 +53,7 @@
 import PlayerActCollectWords
 import PlayerNewFairyCeremony
 import GameLogic_CrossGrassland
+import PlayerActGarbageSorting
 import CrossPlayerData
 import PlayerFeastWish
 import PlayerFeastTravel
@@ -2424,6 +2425,9 @@
     if mapID == ChConfig.Def_FBMapID_CrossPenglai:
         #跨服蓬莱仙境
         PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_CrossPenglai)
+        PlayerActGarbageSorting.AddActGarbageTaskProgress(curPlayer, ChConfig.Def_GarbageTask_CrossBoss)
+    else:
+        PlayerActGarbageSorting.AddActGarbageTaskProgress(curPlayer, ChConfig.Def_GarbageTask_KillBoss)
         
     # 个人首杀记录
     ipyData = IpyGameDataPY.GetIpyGameDataNotLog("BOSSFirstKill", npcID)
@@ -5035,6 +5039,7 @@
         else:
             if curNPC.GetLV()>=curPlayer.GetLV() - IpyGameDataPY.GetFuncCfg('DailyQuestKillMonster'):
                 PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_KillNPC)
+                PlayerActGarbageSorting.AddActGarbageTaskProgress(curPlayer, ChConfig.Def_GarbageTask_KillNPC)
             PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FeastRedPack_KillSpecificNPC, 1, [npcID])
             
         if ChConfig.IsGameBoss(curNPC):
@@ -5765,7 +5770,7 @@
     npcID = msgData["NPCID"]
     collectNPCIpyData = IpyGameDataPY.GetIpyGameData("CollectNPC", npcID)
     if collectNPCIpyData:
-        DoGiveCollectNPCAward(curPlayer, npcID, collectNPCIpyData)
+        DoGiveCollectNPCAward(curPlayer, npcID, collectNPCIpyData, crossCollectOK=True)
     return
 
 #// A2 34 自定义场景中获取采集奖励 #tagCMGetCustomSceneCollectAward
@@ -5798,8 +5803,8 @@
         DoGiveCollectNPCAward(curPlayer, npcID, collectNPCIpyData)
     return
 
-def DoGiveCollectNPCAward(curPlayer, npcID, collectNPCIpyData, collectCnt=1):
-    GameWorld.DebugLog("给采集奖励: npcID=%s,collectCnt=%s" % (npcID, collectCnt))
+def DoGiveCollectNPCAward(curPlayer, npcID, collectNPCIpyData, collectCnt=1, crossCollectOK=False):
+    GameWorld.DebugLog("给采集奖励: npcID=%s,collectCnt=%s,crossCollectOK=%s" % (npcID, collectCnt, crossCollectOK))
     if collectCnt <= 0:
         return
 
@@ -5872,6 +5877,8 @@
         
     #采集成就
     PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_Collect, collectCnt, [npcID])
+    if crossCollectOK:
+        PlayerActGarbageSorting.AddActGarbageTaskProgress(curPlayer, ChConfig.Def_GarbageTask_CrossCollect)
     #SyncCollectionItemInfo(curPlayer, addExp, addMoney, addZhenQi, giveItemInfoList, npcID)
     
     GameLogic_CrossGrassland.DecCustomSceneNPCCount(curPlayer, npcID)

--
Gitblit v1.8.0