From 69a763fb7cdb30bd5f7a860e4fd4a9270adb23b9 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 09 五月 2019 20:41:56 +0800
Subject: [PATCH] 6628 查看玩家 技能总等级信息

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py           |   18 ++++++++++++++++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py |    4 +++-
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py
index db3034b..670cf76 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py
@@ -33,6 +33,7 @@
 import ItemCommon
 import PyGameData
 import PlayerTJG
+import SkillShell
 
 import time
 import json
@@ -219,7 +220,8 @@
     curPlayerPlusDict["TotalPlusEvolveLV"] = ChEquip.GetTotalPlusEvolveLV(curPlayer)
     curPlayerPlusDict["TotalStoneLV"] = Operate_EquipStone.GetTotalStoneLV(curPlayer)
     curPlayerPlusDict["TotalEquipWashLV"] = Operate_EquipWash.GetTotalEquipWashLV(curPlayer)
-    
+    #主动技能总等级
+    curPlayerPlusDict["TotalSkillLV"] = SkillShell.GetAllSkillLV(curPlayer, ChConfig.Def_SkillFuncType_FbSkill)
     #灵宠数据
     curPlayerPlusDict["Pet"] = __GetPetInfo(curPlayer)
     
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
index de1bdf3..e06a6b6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -3775,7 +3775,7 @@
 
 ## 获取某类型技能达到X等级的个数
 #  @param curPlayer
-#  @return allSkillLV:总技能等级
+#  @return
 def GetSkillCntByFunc(curPlayer, funcType, skilllv=0):
     allSkillCnt = 0
     skillManager = curPlayer.GetSkillManager()
@@ -3790,4 +3790,18 @@
         
     return allSkillCnt
 
-
+## 获取技能总等级
+#  @param curPlayer
+#  @return allSkillLV:总技能等级
+def GetAllSkillLV(curPlayer, funcType):
+    allSkillLV = 0
+    skillManager = curPlayer.GetSkillManager()
+    for i in xrange(skillManager.GetSkillCount()):
+        curPlayerSkill = skillManager.GetSkillByIndex(i)
+        if curPlayerSkill == None:
+            continue
+        if curPlayerSkill.GetFuncType() != funcType:
+            continue
+        skillLV = curPlayerSkill.GetSkillLV()
+        allSkillLV += skillLV
+    return allSkillLV

--
Gitblit v1.8.0