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 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) 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