From a8583435b1c4b2e4ace92c34de284b1cd228d807 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 25 三月 2021 14:20:00 +0800
Subject: [PATCH] 5002 【主干】【BT】【BT2】【BTZF】吸血超过20e报错(吸血超20E防范;添加buff异常防范)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py |   57 ++++++++++++++++++++++++++++++---------------------------
 1 files changed, 30 insertions(+), 27 deletions(-)

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 857fc27..4be5e07 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
@@ -1000,32 +1000,35 @@
     return DelBuffBySkillID(curObj, skillID, tick)
 
 def PYSync_RefreshBuff(gameObj, curBuff, buffType, notifyAll=True, owner = None):
-    sendPack = ChNetSendPack.tagObjAddBuff()
-    if not curBuff:
-        return
-    if not hasattr(curBuff, "GetSkill"):
-        return
-    curSkill = curBuff.GetSkill()
-    if not curSkill or not hasattr(curSkill, "GetSkillID"):
-        return
-    skillID = curSkill.GetSkillID()
-    if GameObj.GetHP(gameObj) <= 0 or AttackCommon.GetIsDead(gameObj):
-        return
-    sendPack.ObjType = gameObj.GetGameObjType()
-    sendPack.ObjID = gameObj.GetID();
-    sendPack.SkillID = skillID;
-    sendPack.LastTime = curBuff.GetRemainTime();
-    sendPack.BuffType = buffType;
-    sendPack.Value = curBuff.GetValue();
-    sendPack.Value1 = curBuff.GetValue1();
-    sendPack.Value2 = curBuff.GetValue2();
-    sendPack.Layer = curBuff.GetLayer();
-    if owner:
-        sendPack.OwnerID = owner.GetID()
-        sendPack.OwnerType = owner.GetGameObjType()
-    if notifyAll or gameObj.GetGameObjType() != IPY_GameWorld.gotPlayer:
-        gameObj.NotifyAll(sendPack.GetBuffer(), sendPack.GetLength());
-    else:
-        PlayerControl.PyNotifyAll(gameObj, sendPack, notifySelf=True, notifyCnt=-1)
+    try:
+        sendPack = ChNetSendPack.tagObjAddBuff()
+        if not curBuff:
+            return
+        if not hasattr(curBuff, "GetSkill"):
+            return
+        curSkill = curBuff.GetSkill()
+        if not curSkill or not hasattr(curSkill, "GetSkillID"):
+            return
+        skillID = curSkill.GetSkillID()
+        if GameObj.GetHP(gameObj) <= 0 or AttackCommon.GetIsDead(gameObj):
+            return
+        sendPack.ObjType = gameObj.GetGameObjType()
+        sendPack.ObjID = gameObj.GetID();
+        sendPack.SkillID = skillID;
+        sendPack.LastTime = curBuff.GetRemainTime();
+        sendPack.BuffType = buffType;
+        sendPack.Value = curBuff.GetValue();
+        sendPack.Value1 = curBuff.GetValue1();
+        sendPack.Value2 = curBuff.GetValue2();
+        sendPack.Layer = curBuff.GetLayer();
+        if owner:
+            sendPack.OwnerID = owner.GetID()
+            sendPack.OwnerType = owner.GetGameObjType()
+        if notifyAll or gameObj.GetGameObjType() != IPY_GameWorld.gotPlayer:
+            gameObj.NotifyAll(sendPack.GetBuffer(), sendPack.GetLength());
+        else:
+            PlayerControl.PyNotifyAll(gameObj, sendPack, notifySelf=True, notifyCnt=-1)
+    except:
+        pass
     
     
\ No newline at end of file

--
Gitblit v1.8.0