protected override void OnAfterAction(RoutineAction action) { // Remove Totems if (!Helper.InCombat) { if (TotemHelper.RecallTotems()) Sleep(600); } }
public void Direct3D_EndScene() { if (!IsRunning) { return; } if (!Manager.ObjectManager.IsInGame) { return; } if (Manager.LocalPlayer.IsDead) { return; } if (SleepTime >= DateTime.Now) { return; } SelectTargets(); RoutineAction action = Actions .Where(a => a.IsWanted && a.IsReady) .OrderByDescending(a => a.Priority) .FirstOrDefault(); try { OnBeforeAction(action); if (action != null) { action.Execute(); } OnAfterAction(action); } catch (SleepException ex) { SleepTime = DateTime.Now + ex.Time; } catch (Exception ex) { Log.WriteLine("Exception in Brain: {0}", ex.ToLongString()); } }
protected override void OnBeforeAction(RoutineAction action) { if (!_totemsSet) { SetTotems(); _totemsSet = true; } if (Helper.InCombat && Manager.LocalPlayer.Totems.Count() == 0) { if (TotemHelper.CallTotems()) Sleep(600); } // TODO: fix //var ft = Manager.Spellbook["Flametongue Weapon"]; //if (ft != null && ft.IsValid && ft.IsReady) // 5 appears to be flametongue weapon //{ // var mainhand = Manager.LocalPlayer.GetEquippedItem(EquipSlot.MainHand); // if (mainhand.IsValid && mainhand.Enchants.Count(x => x.Id == (uint)WeaponEnchantments.Flametongue) == 0) // { // Log.WriteLine("Applying Flametongue Weapon to Main Hand weapon"); // ft.Cast(); // Sleep(600); // } //} // Instant Lava Burst if (action is HarmfulSpellRoutine) { var haction = action as HarmfulSpellRoutine; if (haction.SpellName == "Lava Burst") { WoWSpell cd = Manager.Spellbook["Elemental Mastery"]; if (cd != null && cd.IsValid && cd.IsReady) { Log.WriteLine("Popping Elemental Mastery for instant Lava Burst"); cd.Cast(); Sleep(600); } } } }
protected abstract void OnBeforeAction(RoutineAction action);
protected abstract void OnAfterAction(RoutineAction action);
protected void AddAction(RoutineAction action) { Actions.Add(action); }
protected override void OnBeforeAction(RoutineAction action) { CheckForAndApplyBuff(Manager.LocalPlayer, "Arcane Intellect"); CheckForAndApplyBuff(Manager.LocalPlayer, "Frost Armor"); }
protected override void OnAfterAction(RoutineAction action) { }