From 1bbfde2640d6bf420100f84c04286b6d507c46bd Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 16 五月 2019 14:49:27 +0800
Subject: [PATCH] 6805 【后端】【2.0】副本前端化(增加进入自定义场景回包)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_4012.py | 40 +++++++++++++++++++++++++++++++++++++++-
1 files changed, 39 insertions(+), 1 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_4012.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_4012.py
index 9f93f20..81fe579 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_4012.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_4012.py
@@ -47,7 +47,45 @@
def OnBuffDisappear(curObj, curSkill, curBuff, curEffect, tick):
stateType = curEffect.GetEffectValue(0)
- GameObj.SetPyPlayerState(curObj, stateType, 0)
+ if CanDelStateEffect(curObj, ChConfig.Def_Skill_Effect_BuffState, stateType):
+ GameObj.SetPyPlayerState(curObj, stateType, 0)
+ GameWorld.DebugLog("取消影响玩家状态效果---%s - %s"%(curObj.GetID(), stateType))
return
+def OnBuffDisappearEx(curObj, curSkill, curBuff, curEffect, tick):
+
+ stateType = curEffect.GetEffectValue(0)
+ if CanDelStateEffect(curObj, ChConfig.Def_Skill_Effect_BuffState, stateType):
+ GameObj.SetPyPlayerState(curObj, stateType, 0)
+ GameWorld.DebugLog("取消影响玩家状态效果---%s - %s"%(curObj.GetID(), stateType))
+ return
+
+
+# 大于等于2个状态 则不清理状态
+def CanDelStateEffect(curObj, effectID, stateType):
+ cnt = 0
+ for buffType in xrange(IPY_GameWorld.bfBuff, IPY_GameWorld.btBufMax):
+ if buffType in ChConfig.Def_BuffType_OnlyPlayer:
+ continue
+
+ buffTuple = SkillCommon.GetBuffManagerByBuffType(curObj, buffType)
+ #通过类型获取目标的buff管理器为空,则跳出
+ if buffTuple == ():
+ continue
+
+ buffManager = buffTuple[0]
+
+ for i in range(buffManager.GetEffectCount()):
+ effect = buffManager.GetEffect(i)
+ if not effect:
+ continue
+ if effect.GetEffectID() != effectID:
+ continue
+
+ if effect.GetEffectValue(0) == stateType:
+ cnt += 1
+ if cnt >= 2:
+ return False
+
+ return True
--
Gitblit v1.8.0