From 5c2c00d470909bd537e57f1da2963a587c2571d6 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 23 四月 2019 11:52:57 +0800
Subject: [PATCH] 6588 【2.0】【后端】人族法宝界面优化

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py |   22 +++++++++++++++++++---
 1 files changed, 19 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 ae1f2f7..302ea95 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
@@ -300,7 +300,8 @@
     if isActive:
         GameWorld.DebugLog('    该法宝已开启! mwID=%s' % mwID)
         return
-
+    ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('XBXZ', {'MWID':mwID}, True, False)
+            
     #消耗物品判断
     ipyData = GetWMIpyData(mwID)
     needItemDict = ipyData.GetNeedItem()
@@ -316,14 +317,16 @@
         
         #扣消耗
         ItemCommon.DelCostItem(curPlayer, itemPack, delInfoDict, ChConfig.ItemDel_MagicWeapon)
-    else:
+    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
-    
+    elif mwID != 101: #定海神针特殊 可直接获得
+        return
+        
     DoActiveMW(curPlayer, mwID)
     return
 
@@ -572,3 +575,16 @@
     GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_MagicWeaponIsWear, mwID, state, True)
     return
 
+#// A5 12 感应法宝 #tagCMThinkMagicWeapon
+#
+#struct    tagCMThinkMagicWeapon
+#{
+#    tagHead        Head;
+#    DWORD        MWID;
+#};
+def OnThinkMagicWeapon(index, clientData, tick):
+    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+    mwID = clientData.MWID
+    #只触发任务接口
+    EventShell.EventRespons_ThinkMagicWeapon(curPlayer)
+    return
\ No newline at end of file

--
Gitblit v1.8.0