From c781de652a5b0a3356bdc2bbd6351411495d2a2f Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 31 五月 2019 19:21:55 +0800
Subject: [PATCH] 6501 仙宝寻主任务接口

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

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
index 734ea0d..55e0e60 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
@@ -332,9 +332,6 @@
         #扣消耗
         ItemCommon.DelCostItem(curPlayer, itemPack, delInfoDict, ChConfig.ItemDel_MagicWeapon)
     elif ipyDataList:
-        ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('XBXZ', {'MWID':mwID}, True, False)
-        if not ipyDataList:
-            return
         for ipyData in ipyDataList:
             if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_XBXZAwardRecord, ipyData.GetID()):
                 return
@@ -346,6 +343,15 @@
     DoActiveMW(curPlayer, mwID)
     return
 
+def GetXBXZAwardProgress(curPlayer, mwID):
+    # 获取仙宝寻主进度
+    ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('XBXZ', {'MWID': mwID}, True, False)
+    cnt = 0
+    if ipyDataList:
+        for ipyData in ipyDataList:
+            if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_XBXZAwardRecord, ipyData.GetID()):
+                cnt += 1
+    return cnt
 #-------------------------------------------------------------------------------
 
 
@@ -408,6 +414,7 @@
     SyncXBXZAwardRecord(curPlayer, [index])
     #成就
     PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_XBXZ, 1, [ipyData.GetMWID()])
+    EventShell.EventRespons_XBXZ(curPlayer, ipyData.GetMWID())
     GameWorld.DebugLog('    仙宝寻主领奖OK, ID=%s, cnt=%s' % (index, cnt))
     return
 

--
Gitblit v1.8.0