public override void UpdateLogic(int _delta) { if (!this.bExistBuff) { base.UpdateLogic(_delta); if (base.deltaTime <= 0) { base.Trigger(); base.Reset(); this.bExistBuff = true; base.deltaTime = 0; } } for (int i = 0; i < base.conditions.Count; i++) { PassiveCondition condition = base.conditions[i]; if (condition.Fit() && this.bExistBuff) { base.Reset(); this.bExistBuff = false; base.deltaTime = base.cfgData.iCoolDown; this.SpawnSkillEffect(base.localParams[0]); return; } } }
protected void Reset() { for (int i = 0; i < this.conditions.get_Count(); i++) { PassiveCondition passiveCondition = this.conditions.get_Item(i); passiveCondition.Reset(); } }
public virtual void UnInit() { for (int i = 0; i < this.conditions.get_Count(); i++) { PassiveCondition passiveCondition = this.conditions.get_Item(i); passiveCondition.UnInit(); } }
protected void Reset() { for (int i = 0; i < this.conditions.Count; i++) { PassiveCondition passiveCondition = this.conditions[i]; passiveCondition.Reset(); } }
public virtual void UnInit() { for (int i = 0; i < this.conditions.Count; i++) { PassiveCondition passiveCondition = this.conditions[i]; passiveCondition.UnInit(); } }
public virtual void Init(PoolObjHandle <ActorRoot> _actor, PassiveSkill _skill) { this.sourceActor = _actor; this.triggerActor.Release(); this.passiveSkill = _skill; this.cfgData = _skill.cfgData; this.deltaTime = 0; for (int i = 0; i < this.conditions.get_Count(); i++) { PassiveCondition passiveCondition = this.conditions.get_Item(i); passiveCondition.Init(this.sourceActor, this, ref this.cfgData.astPassiveConditon[i]); } this.SetEventParam(); }
protected bool Fit() { if (this.conditions.get_Count() == 0 && this.deltaTime <= 0) { return(true); } for (int i = 0; i < this.conditions.get_Count(); i++) { PassiveCondition passiveCondition = this.conditions.get_Item(i); if (passiveCondition.Fit() && this.deltaTime <= 0) { return(true); } } return(false); }
protected bool Fit() { if ((this.conditions.Count == 0) && (this.deltaTime <= 0)) { return(true); } for (int i = 0; i < this.conditions.Count; i++) { PassiveCondition condition = this.conditions[i]; if (condition.Fit() && (this.deltaTime <= 0)) { return(true); } } return(false); }
public void Init() { this.SlotType = SkillSlotType.SLOT_SKILL_VALID; base.ActionName = StringHelper.UTF8BytesToString(ref this.cfgData.szActionName); this.passiveEvent = Singleton <PassiveCreater <PassiveEvent, PassiveEventAttribute> > .GetInstance().Create((int)this.cfgData.dwPassiveEventType); if (this.passiveEvent != null) { PassiveCondition condition = null; for (int i = 0; i < 2; i++) { int dwConditionType = (int)this.cfgData.astPassiveConditon[i].dwConditionType; condition = Singleton <PassiveCreater <PassiveCondition, PassiveConditionAttribute> > .GetInstance().Create(dwConditionType); if (condition != null) { this.passiveEvent.AddCondition(condition); } } this.passiveEvent.Init(this.sourceActor, this); } }
protected bool Fit() { if (this.conditions.Count == 0 && this.deltaTime <= 0) { return(true); } if (this.cfgData != null) { if (this.cfgData.bPassiveConditonMode == 0) { for (int i = 0; i < this.conditions.Count; i++) { PassiveCondition passiveCondition = this.conditions[i]; if (passiveCondition.Fit() && this.deltaTime <= 0) { return(true); } } } else { int num = 0; for (int j = 0; j < this.conditions.Count; j++) { PassiveCondition passiveCondition2 = this.conditions[j]; if (passiveCondition2.Fit() && this.deltaTime <= 0) { num++; } } if (num == this.conditions.Count) { return(true); } } } return(false); }
public void AddCondition(PassiveCondition _condition) { this.conditions.Add(_condition); }