public void AddBuff(BuffSkill inBuff) { this.SpawnedBuffList.Add(inBuff); this.protectRule.AddBuff(inBuff); BuffChangeEventParam param = new BuffChangeEventParam(true, base.actorPtr, inBuff); Singleton <GameSkillEventSys> .GetInstance().SendEvent <BuffChangeEventParam>(GameSkillEventDef.Event_BuffChange, base.actorPtr, ref param, GameSkillEventChannel.Channel_HostCtrlActor); }
public void ActionRemoveBuff(BuffSkill inBuff) { if (this.SpawnedBuffList.Remove(inBuff)) { PoolObjHandle <BuffSkill> poolObjHandle = new PoolObjHandle <BuffSkill>(inBuff); this.protectRule.RemoveBuff(ref poolObjHandle); this.logicEffect.RemoveBuff(ref poolObjHandle); BuffChangeEventParam buffChangeEventParam = new BuffChangeEventParam(false, this.actorPtr, inBuff); Singleton <GameSkillEventSys> .GetInstance().SendEvent <BuffChangeEventParam>(GameSkillEventDef.AllEvent_BuffChange, this.actorPtr, ref buffChangeEventParam, GameSkillEventChannel.Channel_AllActor); inBuff.Release(); } }
private void OnPlayerBuffChange(ref BuffChangeEventParam prm) { if (((prm.target == base.sourceActor) && (prm.stBuffSkill != 0)) && ((prm.stBuffSkill.handle.cfgData != null) && (prm.stBuffSkill.handle.cfgData.iCfgID == base.localParams[0]))) { if (prm.bIsAdd) { this.bTrigger = false; } else { this.bTrigger = true; } } }
private void OnActorBuffSkillChange(ref BuffChangeEventParam prm) { if (((((!prm.bIsAdd && ((prm.stBuffSkill != 0) && (prm.stBuffSkill.handle.skillContext != null))) && ((prm.stBuffSkill.handle.skillContext.Originator != 0) && (prm.stBuffSkill.handle.skillContext.TargetActor != 0))) && ((prm.stBuffSkill.handle.skillContext.SlotType >= SkillSlotType.SLOT_SKILL_1) && (prm.stBuffSkill.handle.skillContext.SlotType < SkillSlotType.SLOT_SKILL_COUNT))) && (prm.stBuffSkill.handle.cfgData.dwEffectType == 2)) && ((((prm.stBuffSkill.handle.cfgData.dwShowType == 1) || (prm.stBuffSkill.handle.cfgData.dwShowType == 3)) || ((prm.stBuffSkill.handle.cfgData.dwShowType == 4) || (prm.stBuffSkill.handle.cfgData.dwShowType == 5))) || (prm.stBuffSkill.handle.cfgData.dwShowType == 6))) { ulong num = Singleton <FrameSynchr> .GetInstance().LogicFrameTick - prm.stBuffSkill.handle.ulStartTime; if (prm.stBuffSkill.handle.skillContext.Originator.handle.SkillControl != null) { prm.stBuffSkill.handle.skillContext.Originator.handle.SkillControl.stSkillStat.m_uiStunTime += (uint)num; } if (prm.stBuffSkill.handle.skillContext.TargetActor.handle.SkillControl != null) { prm.stBuffSkill.handle.skillContext.TargetActor.handle.SkillControl.stSkillStat.m_uiBeStunnedTime += (uint)num; } } }
public void ActionRemoveBuff(BuffSkill inBuff) { if (this.SpawnedBuffList.Remove(inBuff)) { PoolObjHandle <BuffSkill> handle = new PoolObjHandle <BuffSkill>(inBuff); this.protectRule.RemoveBuff(ref handle); BuffChangeEventParam param = new BuffChangeEventParam(false, base.actorPtr, inBuff); Singleton <GameSkillEventSys> .GetInstance().SendEvent <BuffChangeEventParam>(GameSkillEventDef.Event_BuffChange, base.actorPtr, ref param, GameSkillEventChannel.Channel_HostCtrlActor); if (((inBuff.cfgData.dwEffectType == 2) && (inBuff.cfgData.dwShowType != 2)) && (base.actorPtr != 0)) { LimitMoveEventParam param2 = new LimitMoveEventParam(0, inBuff.SkillID, base.actorPtr); Singleton <GameSkillEventSys> .GetInstance().SendEvent <LimitMoveEventParam>(GameSkillEventDef.Event_CancelLimitMove, base.actorPtr, ref param2, GameSkillEventChannel.Channel_AllActor); } inBuff.Release(); } }
public void RemoveBuff(BuffSkill inBuff) { if (this.SpawnedBuffList.Count != 0) { this.delBuffList = this.SpawnedBuffList; for (int i = 0; i < this.delBuffList.Count; i++) { BuffSkill skill = this.delBuffList[i]; if (skill == inBuff) { BuffChangeEventParam param = new BuffChangeEventParam(false, base.actorPtr, inBuff); Singleton <GameSkillEventSys> .GetInstance().SendEvent <BuffChangeEventParam>(GameSkillEventDef.Event_BuffChange, base.actorPtr, ref param, GameSkillEventChannel.Channel_HostCtrlActor); skill.Stop(); } } } }
private void OnPlayerBuffChange(ref BuffChangeEventParam prm) { if (prm.target != this.sourceActor || !prm.stBuffSkill) { return; } if (prm.stBuffSkill.handle.cfgData != null && prm.stBuffSkill.handle.cfgData.iCfgID == this.localParams[0]) { if (prm.bIsAdd) { this.bTrigger = false; } else { this.bTrigger = true; } } }
public void AddBuff(BuffSkill inBuff) { this.SpawnedBuffList.Add(inBuff); this.protectRule.AddBuff(inBuff); this.logicEffect.AddBuff(inBuff); BuffChangeEventParam buffChangeEventParam = new BuffChangeEventParam(true, this.actorPtr, inBuff); Singleton <GameSkillEventSys> .GetInstance().SendEvent <BuffChangeEventParam>(GameSkillEventDef.AllEvent_BuffChange, this.actorPtr, ref buffChangeEventParam, GameSkillEventChannel.Channel_HostCtrlActor); if (inBuff.cfgData != null && inBuff.cfgData.bIsAssistEffect == 1 && inBuff.skillContext.Originator && this.actor.ValueComponent.actorHp > 0) { if (this.actor.TheActorMeta.ActorCamp == inBuff.skillContext.Originator.get_handle().TheActorMeta.ActorCamp) { this.actor.ActorControl.AddHelpSelfActor(inBuff.skillContext.Originator); } else { this.actor.ActorControl.AddHurtSelfActor(inBuff.skillContext.Originator); } } }
public void RemoveBuff(BuffSkill inBuff) { if (this.SpawnedBuffList.Count != 0) { this.delBuffList = this.SpawnedBuffList; for (int i = 0; i < this.delBuffList.Count; i++) { BuffSkill skill = this.delBuffList[i]; if (skill == inBuff) { BuffChangeEventParam param = new BuffChangeEventParam(false, base.actorPtr, inBuff); Singleton <GameSkillEventSys> .GetInstance().SendEvent <BuffChangeEventParam>(GameSkillEventDef.AllEvent_BuffChange, base.actorPtr, ref param, GameSkillEventChannel.Channel_HostCtrlActor); skill.Stop(); if (((inBuff.cfgData.dwEffectType == 2) && (inBuff.cfgData.dwShowType != 2)) && (base.actorPtr != 0)) { LimitMoveEventParam param2 = new LimitMoveEventParam(0, inBuff.SkillID, base.actorPtr); Singleton <GameSkillEventSys> .GetInstance().SendEvent <LimitMoveEventParam>(GameSkillEventDef.AllEvent_CancelLimitMove, base.actorPtr, ref param2, GameSkillEventChannel.Channel_AllActor); } } } } }
private void OnActorBuffSkillChange(ref BuffChangeEventParam prm) { if (prm.bIsAdd) { return; } if (!prm.stBuffSkill || prm.stBuffSkill.get_handle().skillContext == null) { return; } if (!prm.stBuffSkill.get_handle().skillContext.Originator || !prm.stBuffSkill.get_handle().skillContext.TargetActor) { return; } if (prm.stBuffSkill.get_handle().skillContext.SlotType < SkillSlotType.SLOT_SKILL_1 || prm.stBuffSkill.get_handle().skillContext.SlotType >= SkillSlotType.SLOT_SKILL_COUNT) { return; } if (prm.stBuffSkill.get_handle().cfgData.bEffectType != 2) { return; } if (prm.stBuffSkill.get_handle().cfgData.bShowType != 1 && prm.stBuffSkill.get_handle().cfgData.bShowType != 3 && prm.stBuffSkill.get_handle().cfgData.bShowType != 4 && prm.stBuffSkill.get_handle().cfgData.bShowType != 5 && prm.stBuffSkill.get_handle().cfgData.bShowType != 6) { return; } ulong num = Singleton <FrameSynchr> .GetInstance().LogicFrameTick - prm.stBuffSkill.get_handle().ulStartTime; if (prm.stBuffSkill.get_handle().skillContext.Originator.get_handle().SkillControl != null) { prm.stBuffSkill.get_handle().skillContext.Originator.get_handle().SkillControl.stSkillStat.m_uiStunTime += (uint)num; } if (prm.stBuffSkill.get_handle().skillContext.TargetActor.get_handle().SkillControl != null) { prm.stBuffSkill.get_handle().skillContext.TargetActor.get_handle().SkillControl.stSkillStat.m_uiBeStunnedTime += (uint)num; } }
public void RemoveBuff(BuffSkill inBuff) { if (this.SpawnedBuffList.get_Count() == 0) { return; } this.delBuffList = this.SpawnedBuffList; for (int i = 0; i < this.delBuffList.get_Count(); i++) { BuffSkill buffSkill = this.delBuffList.get_Item(i); if (buffSkill == inBuff) { BuffChangeEventParam buffChangeEventParam = new BuffChangeEventParam(false, this.actorPtr, inBuff); Singleton <GameSkillEventSys> .GetInstance().SendEvent <BuffChangeEventParam>(GameSkillEventDef.AllEvent_BuffChange, this.actorPtr, ref buffChangeEventParam, GameSkillEventChannel.Channel_HostCtrlActor); buffSkill.Stop(); if (inBuff.cfgData.bEffectType == 2 && inBuff.cfgData.bShowType != 2 && this.actorPtr) { LimitMoveEventParam limitMoveEventParam = new LimitMoveEventParam(0, inBuff.SkillID, this.actorPtr); Singleton <GameSkillEventSys> .GetInstance().SendEvent <LimitMoveEventParam>(GameSkillEventDef.AllEvent_CancelLimitMove, this.actorPtr, ref limitMoveEventParam, GameSkillEventChannel.Channel_AllActor); } } } }