| | |
| | | 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无效的技能
|
| | |
| | |
|
| | | #是否需要通知客户端
|
| | | isNotify = True if curSkill.GetClientEffectType() != 0 else False
|
| | | addBuff = buffState.AddBuffEx(skillID, tick, isNotify)
|
| | | # 增加第四个参数是否立即广播
|
| | | addBuff = buffState.AddBuff(skillID, tick, isNotify, False)
|
| | | buffIndex = buffState.GetBuffCount() # buff在管理器中的索引
|
| | | if updProcessInterval > 0:
|
| | | # 继承上一个buff的循环记录
|
| | |
| | | DoAddBuffOver(curObj, curSkill, addBuff, buffOwner, tick)
|
| | |
|
| | | # 通知客户端
|
| | | buffState.Sync_AddBuffEx()
|
| | | #buffState.Sync_AddBuffEx()
|
| | | if isNotify:
|
| | | PYSync_RefreshBuff(curObj, addBuff, SkillCommon.GetBuffType(curSkill), notifyAll=False, owner = buffOwner)
|
| | |
|
| | | #检查是否属于刷新BUFF
|
| | | #===========================================================================
|
| | |
| | |
|
| | | return DelBuffBySkillID(curObj, skillID, tick)
|
| | |
|
| | | def PYSync_RefreshBuff(gameObj, curBuff, buffType):
|
| | | def PYSync_RefreshBuff(gameObj, curBuff, buffType, notifyAll=True, owner = None):
|
| | | sendPack = ChNetSendPack.tagObjAddBuff()
|
| | | sendPack
|
| | |
|
| | | sendPack.ObjType = gameObj.GetGameObjType()
|
| | | sendPack.ObjID = gameObj.GetID();
|
| | |
| | | sendPack.Value1 = curBuff.GetValue1();
|
| | | sendPack.Value2 = curBuff.GetValue2();
|
| | | sendPack.Layer = curBuff.GetLayer();
|
| | | gameObj.NotifyAll(sendPack.GetBuffer(), sendPack.GetLength());
|
| | | |
| | | 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:
|
| | | PlayerControl.PyNotifyAll(gameObj, sendPack, notifySelf=True, notifyCnt=-1)
|
| | |
|
| | | |