From 57a7f963e83329c191e135c8102b0614dea6d5b4 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期三, 19 十二月 2018 14:09:36 +0800 Subject: [PATCH] 5368 【后端】【1.4】聚魂功能开发 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 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 004abbd..4a90148 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py @@ -310,7 +310,8 @@ #是否需要通知客户端 isNotify = True if curSkill.GetClientEffectType() != 0 else False - addBuff = buffState.AddBuffEx(skillID, tick, isNotify) + # 增加第四个参数是否立即广播 + addBuff = buffState.AddBuff(skillID, tick, isNotify, False) buffIndex = buffState.GetBuffCount() # buff在管理器中的索引 if updProcessInterval > 0: # 继承上一个buff的循环记录 @@ -370,7 +371,9 @@ DoAddBuffOver(curObj, curSkill, addBuff, buffOwner, tick) # 通知客户端 - buffState.Sync_AddBuffEx() + #buffState.Sync_AddBuffEx() + if isNotify: + PYSync_RefreshBuff(curObj, addBuff, SkillCommon.GetBuffType(curSkill), notifyAll=False) #检查是否属于刷新BUFF #=========================================================================== @@ -907,9 +910,8 @@ return DelBuffBySkillID(curObj, skillID, tick) -def PYSync_RefreshBuff(gameObj, curBuff, buffType): +def PYSync_RefreshBuff(gameObj, curBuff, buffType, notifyAll=True): sendPack = ChNetSendPack.tagObjAddBuff() - sendPack sendPack.ObjType = gameObj.GetGameObjType() sendPack.ObjID = gameObj.GetID(); @@ -920,7 +922,9 @@ sendPack.Value1 = curBuff.GetValue1(); sendPack.Value2 = curBuff.GetValue2(); sendPack.Layer = curBuff.GetLayer(); - gameObj.NotifyAll(sendPack.GetBuffer(), sendPack.GetLength()); - + if notifyAll or gameObj.GetGameObjType() != IPY_GameWorld.gotPlayer: + gameObj.NotifyAll(sendPack.GetBuffer(), sendPack.GetLength()); + else: + PlayerControl.PyNotifyAll(gameObj, sendPack, notifySelf=True, notifyCnt=-1) \ No newline at end of file -- Gitblit v1.8.0