From 1d877dc6c7523fbc38bafa29d27d9c0c73f72eff Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 13 三月 2019 10:24:15 +0800
Subject: [PATCH] 3049 【主干】【1.6】合服许愿池第一天奖励不能领取

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py |   49 +++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 47 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 c035c9f..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
 #---------------------------------------------------------------------
 
 #---------------------------------------------------------------------
@@ -41,8 +42,8 @@
         # 避免配表错误导致报错
         return False
 
-    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)):
+    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()))
@@ -155,6 +156,9 @@
     buffRepeatTimeType = GetBuffRepeatTimeType(curSkill) 
     #用于BUFF满的时候处理刷新逻辑
     isDelRefresh = False
+    
+    # 向跨服发送数据
+    CrossPlayerData.SendMergeData_Buff(curObj, curSkillID, plusValueList)
     
     # buff层级
     layerMaxCnt = 0
@@ -729,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 当前目标

--
Gitblit v1.8.0