From 9aec2993fb9c257870afaa7f8fb4e8020b2c2ca2 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 18 十二月 2020 11:14:57 +0800
Subject: [PATCH] 1111 【主干】【BT】 curBuff.GetSkill()、curEquip.GetAddSkill(0) 获取错误防范;

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py    |    3 +++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_HPMP.py |    3 +++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py            |    2 +-
 3 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_HPMP.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_HPMP.py
index 09c8f67..1ac456e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_HPMP.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_Add_HPMP.py
@@ -277,6 +277,9 @@
     if curPlayer.GetLV() < curRoleItem.GetUseLV():
         return False
     
+    if curRoleItem.GetAddSkillCount() <= 0:
+        return False
+    
     addSkillID = curRoleItem.GetAddSkill(0)
     
     if not addSkillID:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
index 53f44f8..d038edc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
@@ -1004,7 +1004,7 @@
     sendPack = ChNetSendPack.tagObjAddBuff()
     if not curBuff:
         return
-    if not curBuff.GetSkill():
+    if not hasattr(curBuff, "GetSkill") or not curBuff.GetSkill():
         return
     sendPack.ObjType = gameObj.GetGameObjType()
     sendPack.ObjID = gameObj.GetID();
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
index 59a371e..39f15c0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
@@ -1706,6 +1706,9 @@
         if not curEquip or curEquip.IsEmpty():
             continue
         
+        if curEquip.GetAddSkillCount() <= 0:
+            continue
+        
         if curEquip.GetAddSkill(0) == 0:
             #无技能
             continue

--
Gitblit v1.8.0