From 2ee379b4bfc25630f1a2b2d182a6ca6a2edaec36 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 03 十二月 2018 20:35:00 +0800
Subject: [PATCH] 5180 【后端】【1.3】【1.3.100】直购商品需要触发充值累计活动
---
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