From f8cbb085900ff5959d302879b8073e5cf79aa322 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 27 十二月 2018 22:28:49 +0800 Subject: [PATCH] 5424 【后端】【1.4】跨服竞技场开发(修复无法领奖bug) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py | 17 +++++++++++------ 1 files changed, 11 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 8eef816..c035c9f 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py @@ -40,10 +40,12 @@ if curObj == None: # 避免配表错误导致报错 return False - if GameWorld.GetMap().GetMapID() == ChConfig.Def_FBMapID_GatherSoul and buffOwner \ - and buffOwner.GetGameObjType() == IPY_GameWorld.gotPlayer and curObj.GetGameObjType() == IPY_GameWorld.gotNPC: - #GameWorld.DebugLog('聚魂副本玩家不能对怪物上buff') - return True + + if GameWorld.GetMap().GetMapID() == ChConfig.Def_FBMapID_GatherSoul and buffOwner and curObj.GetGameObjType() == IPY_GameWorld.gotNPC: + if buffOwner.GetGameObjType() == IPY_GameWorld.gotPlayer or (buffOwner.GetGameObjType() == IPY_GameWorld.gotNPC and NPCCommon.GetNpcObjOwnerIsPlayer(buffOwner)): + #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: @@ -378,7 +380,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 #=========================================================================== @@ -915,7 +917,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() @@ -927,6 +929,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