From dbbcdad11c381c39b76641f2e558308933109e84 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 24 一月 2019 17:35:34 +0800 Subject: [PATCH] 5931 【后端】【1.5.100】诛仙装备开发(传奇属性生成规则格式配置修改) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 57 insertions(+), 2 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 4a90148..ca17209 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py @@ -25,6 +25,7 @@ import PlayerTJG import OperControlManager import GameObj +import CrossPlayerData #--------------------------------------------------------------------- #--------------------------------------------------------------------- @@ -40,6 +41,13 @@ if curObj == None: # 避免配表错误导致报错 return False + + if GameWorld.GetMap().GetMapID() == ChConfig.Def_FBMapID_GatherSoul and curObj.GetGameObjType() == IPY_GameWorld.gotNPC: + if curSkill.GetSkillTypeID() != 23052: + #GameWorld.DebugLog('聚魂副本玩家不能对怪物上buff curSkill=%s,buffOwner=%s'%(curSkill.GetSkillTypeID(),buffOwner.GetID())) + return True + #GameWorld.DebugLog('聚魂副本对怪物上buff curSkill=%s,buffOwner=%s'%(curSkill.GetSkillTypeID(),buffOwner.GetID())) + if curObj.GetGameObjType() == IPY_GameWorld.gotNPC and curObj.GetIsBoss() not in ChConfig.Def_SkillAttack_NPCIsBoss \ and SkillCommon.GetSkillBattleType(curSkill) == ChConfig.Def_BattleRelationType_CommNoBoss: # 释放后 对指定BOSS无效的技能 @@ -148,6 +156,9 @@ buffRepeatTimeType = GetBuffRepeatTimeType(curSkill) #用于BUFF满的时候处理刷新逻辑 isDelRefresh = False + + # 向跨服发送数据 + CrossPlayerData.SendMergeData_Buff(curObj, curSkillID, plusValueList) # buff层级 layerMaxCnt = 0 @@ -373,7 +384,7 @@ # 通知客户端 #buffState.Sync_AddBuffEx() if isNotify: - PYSync_RefreshBuff(curObj, addBuff, SkillCommon.GetBuffType(curSkill), notifyAll=False) + PYSync_RefreshBuff(curObj, addBuff, SkillCommon.GetBuffType(curSkill), notifyAll=False, owner = buffOwner) #检查是否属于刷新BUFF #=========================================================================== @@ -722,6 +733,47 @@ if passiveEff: passiveEff.DelBuffInfo(skillData) return + + +#--------------------------------------------------------------------- +## 执行buff消失触发逻辑,不处理buff的功能逻辑,只处理需要的必须状态逻辑 +# 如不处理buff的 伤害,爆炸等,但必须处理恢复眩晕状态等 +def DoBuffDisApperEx( curObj, curBuff, tick ): + #这个函数里面不能做Buff添加和删除逻辑!!!!!不然指针会错乱 + curSkill = curBuff.GetSkill() + + skillData = GameWorld.GetGameData().GetSkillBySkillID(curSkill.GetSkillID()) + + #是否是持续性技能 + isLstSkill = curSkill.GetSkillType() in ChConfig.Def_LstBuff_List + + PassiveBuffEffMng.OnPassiveSkillTrigger(curObj, None, curSkill, ChConfig.TriggerType_BuffDisappear, tick) + + #buff消失的触发 + for effectIndex in range( 0, curSkill.GetEffectCount() ): + curEffect = curSkill.GetEffect( effectIndex ) + effectID = curEffect.GetEffectID() + + if not effectID: + continue + + if isLstSkill: + callFunc = GameWorld.GetExecFunc( GameBuffs, "BuffProcess_%d.%s"%( effectID, "OnBuffDisappearEx") ) + if not callFunc: + callFunc = GameWorld.GetExecFunc( GameBuffs, "Buff_%d.%s"%( effectID, "OnBuffDisappearEx") ) + else: + callFunc = GameWorld.GetExecFunc( GameBuffs, "Buff_%d.%s"%( effectID, "OnBuffDisappearEx") ) + + if not callFunc: + continue + + callFunc( curObj, curSkill, curBuff, curEffect, tick ) + + passiveEff = PassiveBuffEffMng.GetPassiveEffManager().GetPassiveEff(curObj) + if passiveEff: + passiveEff.DelBuffInfo(skillData) + return + #--------------------------------------------------------------------- ## buff消失 # @param curObj 当前目标 @@ -910,7 +962,7 @@ return DelBuffBySkillID(curObj, skillID, tick) -def PYSync_RefreshBuff(gameObj, curBuff, buffType, notifyAll=True): +def PYSync_RefreshBuff(gameObj, curBuff, buffType, notifyAll=True, owner = None): sendPack = ChNetSendPack.tagObjAddBuff() sendPack.ObjType = gameObj.GetGameObjType() @@ -922,6 +974,9 @@ 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: -- Gitblit v1.8.0