hch
2018-12-03 fcb20c084df8e7f61e01c5b9920875d669aa87ce
5186 【测试】【1.3.100起】减少战斗广播量
4个文件已修改
18 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
@@ -2600,7 +2600,7 @@
        
    sendPack.HurtCount = len(sendPack.HurtList)
    PlayerControl.PyNotifyAll(curPlayer, sendPack, notifySelf=True, notifyCnt=0)
    PlayerControl.PyNotifyAll(curPlayer, sendPack, notifySelf=True, notifyCnt=-1)
# py重现View_UseSkillPos效果,对地通知,只用于玩家
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -5652,7 +5652,7 @@
    sendPack.Speed = curPlayer.GetSpeed()
    sendPack.MoveType = moveType
    # NotifyAll 做过滤或者数量处理
    PlayerControl.PyNotifyAll(curPlayer, sendPack, False, -1)
    PlayerControl.PyNotifyAll(curPlayer, sendPack, False, 0)
    return
def GetDownloadAward(curPlayer, dataEx):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -162,7 +162,7 @@
# notifyCnt 代表广播周围玩家的数量,0为全部广播 -1为指定列表随机, 其他数字为指定指
def PyNotifyAll(curPlayer, sendPack, notifySelf=True, notifyCnt=0):
    if notifyCnt == -1:
        notifyCnt = random.choice((10, 10, 15, 15, 20, 25, 30, 50))
        notifyCnt = random.choice((6, 6, 10, 10, 20))
    #GameWorld.DebugLog("PyNotifyAll %s"%notifyCnt)
    curPlayer.NotifyAll(sendPack.GetBuffer(), sendPack.GetLength(), notifySelf, notifyCnt)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
@@ -310,7 +310,7 @@
    #是否需要通知客户端
    isNotify = True if curSkill.GetClientEffectType() != 0 else False
    addBuff = buffState.AddBuffEx(skillID, tick, isNotify)
    addBuff = buffState.AddBuff(skillID, tick, False)
    buffIndex = buffState.GetBuffCount()    # buff在管理器中的索引
    if updProcessInterval > 0:
        # 继承上一个buff的循环记录
@@ -370,7 +370,8 @@
    DoAddBuffOver(curObj, curSkill, addBuff, buffOwner, tick)
        
    # 通知客户端
    buffState.Sync_AddBuffEx()
    #buffState.Sync_AddBuffEx()
    PYSync_RefreshBuff(curObj, addBuff, SkillCommon.GetBuffType(curSkill), notifyAll=False)
    #检查是否属于刷新BUFF
    #===========================================================================
@@ -907,9 +908,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 +920,9 @@
    sendPack.Value1 = curBuff.GetValue1();
    sendPack.Value2 = curBuff.GetValue2();
    sendPack.Layer = curBuff.GetLayer();
    if notifyAll or gameObj.GetGameObjType() != IPY_GameWorld.gotPlayer:
    gameObj.NotifyAll(sendPack.GetBuffer(), sendPack.GetLength());
    else:
        PlayerControl.PyNotifyAll(gameObj, sendPack, notifySelf=True, notifyCnt=-1)