public DotaActionCollection GetOrCreateCollection(DotaEvent Event) { var dac = GetActionCollection(Event); if (dac == null) { dac = new DotaActionCollection(Event.ClassName); Ability.KeyValue.AddChild(dac.KeyValue); } return(dac); }
public DotaActionCollection this[string Key] { get { DotaEvent ev = DotaData.Events.FirstOrDefault(x => x.EventAppliesTo.HasFlag(DotaEvent.EventAppliesToFlags.ABILITY)); if (ev == null) { return(null); } return(GetActionCollection(ev)); } }
public EventNode(DotaEvent Event, DotaActionCollection BackingCollection) : base(Event.ClassName) { this.Event = Event; this.ActionCollection = BackingCollection; this.HeaderColor = System.Drawing.Brushes.Brown; AddExecPin(); AddTargetNodes(); AddSpecialPins(); }
public DotaActionCollection GetActionCollection(DotaEvent Event) { if (!Event.EventAppliesTo.HasFlag(DotaEvent.EventAppliesToFlags.ABILITY)) { return(null); } KeyValue actionCollection = Ability.KeyValue[Event.ClassName]; if (actionCollection == null) //No action collection at that key { return(null); } return(new DotaActionCollection(actionCollection)); }