protected override void TickTasks() { if (!OutsideCombatOrActive()) { return; } switch (CurrentTask.Type) { case Task.Types.Attack: case Task.Types.BreakableAttack: //enter combat if i am attacking someone if (!CombatManager.IsEnabled) { CombatManager.StartCombat(this); } break; case Task.Types.Heal: //apply the healing thing DoNextTask(); break; } base.TickTasks(); }
public override void ItemClick() { switch (GetCurActionMode().Command) { case "reload": TryReload(); break; case "attack": (Owner.Intellect as RTSUnitAI).DoTask(new RTSUnitAI.Task(RTSUnitAI.Task.Types.PreUse), false); CombatManager.StartCombat(Owner.Intellect as VBUnitAI); break; default: base.ItemClick(); break; } }
public override void ItemClick() { (Owner.Intellect as RTSUnitAI).DoTask(new RTSUnitAI.Task(RTSUnitAI.Task.Types.PreUse), false); CombatManager.StartCombat(Owner.Intellect as VBUnitAI); }