/// <summary> /// 删除触发器 /// </summary> /// <param name="timing"></param> /// <param name="ownerId">默认所有的删除</param> public void RemoveTrigger(E_SkillTiming timing, E_SkillTrigger trigger, int ownerId = -1) { SkillInstance ins; int cnt = mSkillIns.Count; for (int i = 0; i < cnt; i++) { ins = mSkillIns[i]; if (ownerId != -1) { ins.RemoveTrigger(timing, trigger, ownerId); } else if (ownerId == ins.OwnerId) { ins.RemoveTrigger(timing, trigger, ownerId); } } }
/// <summary> /// 删除触发器 /// </summary> /// <param name="timing">时机</param> /// <param name="trigger">触发器</param> /// <param name="ownerId">技能拥有者</param> public void RemoveTrigger(E_SkillTiming timing, E_SkillTrigger trigger, int ownerId = 0) { List <ISkillTrigger> list; ISkillTrigger itm; if (mTriggeres.TryGetValue(timing, out list)) { int cnt = list.Count; for (int i = 0; i < cnt; i++) { itm = list[i]; if (itm.GetOwnerID() == ownerId && itm.GetTrigger() == trigger) { itm.Exit(this); } else if (ownerId > 0) { itm.Exit(this); } } } }
virtual public void SetTrigger(E_SkillTrigger trigger) { }