From 776cf3759b9801f3795ee975cd77078f505b90d6 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 06 一月 2024 14:49:08 +0800
Subject: [PATCH] 10071 【后端】灵宠改版

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 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 9d5fe12..16e4852 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -624,11 +624,11 @@
     if skillTag != ChConfig.Def_UseSkillTag_PetMaster:
         return False
 
-    if not PetControl.IsPet(curNPC):
+    if not PetControl.IsPetNPC(curNPC):
         GameWorld.ErrLog("NPCID %s AI %s 非宠物,无法获得主人释放技能"%(curNPC.GetNPCID(), curNPC.GetAIType()))
         return False
     
-    petOwner = PetControl.GetPetOwner(curNPC)
+    petOwner = PetControl.GetPetNPCOwner(curNPC)
     
     if petOwner == None:
         GameWorld.ErrLog("宠物(%s)对主人释放技能,找不到主人"%curNPC.GetRolePet().PetID)
@@ -1757,11 +1757,11 @@
                   
         # 宠物对主人释放技能
         elif skillAffectTag == ChConfig.Def_UseSkillTag_PetMaster:
-            if not PetControl.IsPet(attacker):
+            if not PetControl.IsPetNPC(attacker):
                 GameWorld.ErrLog("该NPC非宠物,无法获得主人释放技能")
                 return False
             
-            petOwner = PetControl.GetPetOwner(attacker)
+            petOwner = PetControl.GetPetNPCOwner(attacker)
             
             if petOwner == None:
                 GameWorld.ErrLog("宠物(%s)对主人释放技能,找不到主人"%attacker.GetRolePet().PetID)
@@ -3844,10 +3844,10 @@
     
     else:
         if affectTag == ChConfig.Def_UseSkillTag_PetMaster:
-            if not PetControl.IsPet(attacker):
+            if not PetControl.IsPetNPC(attacker):
                 return False
             
-            petOwner = PetControl.GetPetOwner(attacker)
+            petOwner = PetControl.GetPetNPCOwner(attacker)
             if petOwner == None:
                 return False
             
@@ -3898,15 +3898,19 @@
 ## 获取技能总等级
 #  @param curPlayer
 #  @return allSkillLV:总技能等级
-def GetAllSkillLV(curPlayer, funcType):
-    allSkillLV = 0
+def GetAllSkillInfo(curPlayer, funcTypeList):
+    # @return: {funcType:{skillID:skillLV, ...}, ...}
+    skillDict = {}
     skillManager = curPlayer.GetSkillManager()
     for i in xrange(skillManager.GetSkillCount()):
         curPlayerSkill = skillManager.GetSkillByIndex(i)
         if curPlayerSkill == None:
             continue
-        if curPlayerSkill.GetFuncType() != funcType:
+        funcType = curPlayerSkill.GetFuncType()
+        if funcType not in funcTypeList:
             continue
-        skillLV = curPlayerSkill.GetSkillLV()
-        allSkillLV += skillLV
-    return allSkillLV
+        if funcType not in skillDict:
+            skillDict[funcType] = {}
+        skillLVDict = skillDict[funcType]
+        skillLVDict[curPlayerSkill.GetSkillID()] = curPlayerSkill.GetSkillLV()
+    return skillDict

--
Gitblit v1.8.0