| | |
| | | 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 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:
|
| | |
| | | # 通知客户端
|
| | | #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
|
| | | #===========================================================================
|
| | |
| | |
|
| | | 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()
|
| | |
| | | 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:
|