From fff4bf318a2c10d360da6e850228ada4fb800547 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 09 五月 2019 15:15:07 +0800
Subject: [PATCH] 6705 【后端】【2.0】天星塔功能

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetFabao.py |   27 +++++++++------------------
 1 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetFabao.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetFabao.py
index 75c5f9d..fad57cf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetFabao.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetFabao.py
@@ -30,31 +30,21 @@
 #  @remarks 函数详细说明.
 def OnExec(curPlayer, paramList):
     if len(paramList) == 0:
-        GameWorld.DebugAnswer(curPlayer, "SetFabao 法宝ID 星数(选填) 经验(选填)")
+        GameWorld.DebugAnswer(curPlayer, "SetFabao 法宝ID 等级(选填) 经验(选填)")
         GameWorld.DebugAnswer(curPlayer, "法宝ID: 0-重置所有, 1-激活所有")
         return
     mwID = paramList[0]
-    mwLV = paramList[1] if len(paramList) > 1 else 0
+    mwLV = paramList[1] if len(paramList) > 1 else 1
     exp = paramList[2] if len(paramList) > 2 else 0
     
     if mwID == 0:
-        playerSkillManager = curPlayer.GetSkillManager()
         ipyDataMgr = IpyGameDataPY.IPY_Data()
         for i in xrange(ipyDataMgr.GetTreasureCount()):
             ipyData = ipyDataMgr.GetTreasureByIndex(i)
             mwID = ipyData.GetID()
-            PlayerMagicWeapon.SetMagicWeaponActiveState(curPlayer, mwID, False)
-            PlayerMagicWeapon.SetMagicWeaponClickState(curPlayer, mwID, False)
-            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MagicWeaponExp % mwID, 0)
             PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MagicWeaponLV % mwID, 0)
             PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MagicWeaponUpExp % mwID, 0)
-#            skillIDList = ipyData.GetUnLockSkill()
-#            for skillID in skillIDList:
-#                playerSkillManager.DeleteSkillBySkillTypeID(skillID)
-            skillIDList = ipyData.GetPotentials()
-            for skillID in skillIDList:
-                playerSkillManager.DeleteSkillBySkillTypeID(skillID)
-        PlayerMagicWeapon.NotifyMagicWeapon(curPlayer, True)
+
         PlayerMagicWeapon.Sycn_MagicWeaponLV(curPlayer)
         PlayerMagicWeapon.CalcMagicWeaponAttr(curPlayer)
         PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
@@ -64,8 +54,10 @@
         for i in xrange(ipyDataMgr.GetTreasureCount()):
             ipyData = ipyDataMgr.GetTreasureByIndex(i)
             mwID = ipyData.GetID()
+            if PlayerMagicWeapon.GetIsActiveMagicWeapon(curPlayer, mwID):
+                continue
             PlayerMagicWeapon.DoActiveMW(curPlayer, mwID)
-        PlayerMagicWeapon.Sycn_MagicWeaponLV(curPlayer)
+
     else:
         ipyData = PlayerMagicWeapon.GetWMIpyData(mwID)
         if not ipyData:
@@ -77,11 +69,10 @@
             if not nextIpyData:
                 GameWorld.DebugAnswer(curPlayer, "法宝等级不存在!")
                 return
-        for lv in xrange(mwLV+1):
+        for lv in xrange(1, mwLV+1):
             PlayerMagicWeapon.DoActiveMW(curPlayer, mwID, lv)
-        PlayerMagicWeapon.Sycn_MagicWeaponLV(curPlayer, mwID)
-        
-    PlayerMagicWeapon.NotifyMagicWeapon(curPlayer)
+
+
     return
 
 

--
Gitblit v1.8.0