public PetManager(WowInterface wowInterface, TimeSpan healPetCooldown, Func <bool> castMendPetFunction, Func <bool> castCallPetFunction, Func <bool> castRevivePetFunction) { WowInterface = wowInterface; HealPetCooldown = healPetCooldown; CastMendPet = castMendPetFunction; CastCallPet = castCallPetFunction; CastRevivePet = castRevivePetFunction; CallPetEvent = new(TimeSpan.FromSeconds(8)); }
public UseUnitQuestObjective(WowInterface wowInterface, int objectDisplayId, bool questgiversOnly, UseUnitQuestObjectiveCondition condition) { WowInterface = wowInterface; ObjectDisplayIds = new List <int>() { objectDisplayId }; Condition = condition; QuestgiversOnly = questgiversOnly; }
public ShamanRestoration(WowInterface wowInterface, AmeisenBotFsm stateMachine) : base(wowInterface, stateMachine) { MyAuraManager.Jobs.Add(new KeepActiveAuraJob(waterShieldSpell, () => TryCastSpell(waterShieldSpell, 0, true))); SpellUsageHealDict = new Dictionary <int, string>() { { 0, riptideSpell }, { 5000, healingWaveSpell }, }; }
public TwilightPortalTactic(WowInterface wowInterface) { WowInterface = wowInterface; PortalClickEvent = new(TimeSpan.FromSeconds(1)); Configureables = new() { { "isOffTank", false }, }; }
public JobEngine(WowInterface wowInterface) { AmeisenLogger.Instance.Log("JobEngine", $"Initializing", LogLevel.Verbose); WowInterface = wowInterface; MailboxItemQueue = new Queue <string>(); Reset(); }
public RogueAssassination(WowInterface wowInterface, AmeisenBotFsm stateMachine) : base(wowInterface, stateMachine) { MyAuraManager.Jobs.Add(new KeepActiveAuraJob(sliceAndDiceSpell, () => TryCastSpellRogue(sliceAndDiceSpell, 0, true, true, 1))); MyAuraManager.Jobs.Add(new KeepActiveAuraJob(coldBloodSpell, () => TryCastSpellRogue(coldBloodSpell, 0, true))); InterruptManager.InterruptSpells = new() { { 0, (x) => TryCastSpellRogue(kickSpell, x.Guid, true) } }; }
public TwilightPortalTactic(WowInterface wowInterface) { WowInterface = wowInterface; PortalClickEvent = new TimegatedEvent(TimeSpan.FromSeconds(1)); Configureables = new Dictionary <string, dynamic>() { { "isOffTank", false }, }; }
public TalkToUnitQuestObjective(WowInterface wowInterface, List <int> displayIds, List <int> gossipIds, bool questgiversOnly, TalkToUnitQuestObjectiveCondition condition) { WowInterface = wowInterface; DisplayIds = displayIds; GossipIds = gossipIds; Condition = condition; QuestgiversOnly = questgiversOnly; TalkEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(500)); }
public CollectQuestObjective(WowInterface wowInterface, int itemId, int itemAmount, int objectDisplayId, List <AreaNode> area) { WowInterface = wowInterface; ItemId = itemId; WantedItemAmount = itemAmount; ObjectDisplayId = objectDisplayId; Area = area; RightClickEvent = new TimegatedEvent(TimeSpan.FromSeconds(1)); }
public DungeonEngine(WowInterface wowInterface, AmeisenBotStateMachine stateMachine) { WowInterface = wowInterface; StateMachine = stateMachine; CurrentNodes = new Queue <DungeonNode>(); CompletedNodes = new List <DungeonNode>(); Reset(); }
public override unsafe void Update(WowInterface wowInterface) { base.Update(wowInterface); if (wowInterface.XMemory.ReadStruct(DescriptorAddress + RawWowObject.EndOffset, out RawWowCorpse objPtr)) { DisplayId = objPtr.DisplayId; Owner = objPtr.Owner; Party = objPtr.Party; } }
public DungeonEngine(WowInterface wowInterface) { WowInterface = wowInterface; CurrentNodes = new Queue <DungeonNode>(); ExitDungeonEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(1000)); RootSelector = new Selector <DungeonBlackboard> ( "HasFinishedDungeon", (b) => Progress == 100.0, new Leaf <DungeonBlackboard>("LeaveDungeon", (b) => ExitDungeon()), new Selector <DungeonBlackboard> ( "IDied", (b) => IDied, new Sequence <DungeonBlackboard> ( new Leaf <DungeonBlackboard>("RecoverDeathPosition", (b) => MoveToPosition(DeathPosition)), new Leaf <DungeonBlackboard>("SetIDiedToFalse", (b) => { IDied = false; return(BehaviorTreeStatus.Success); }) ), new Selector <DungeonBlackboard> ( "AmITheLeader", (b) => WowInterface.ObjectManager.PartyleaderGuid == WowInterface.ObjectManager.PlayerGuid || !WowInterface.ObjectManager.PartymemberGuids.Any(), new Selector <DungeonBlackboard> ( "AreAllPlayersPresent", (b) => AreAllPlayersPresent(48.0), new Leaf <DungeonBlackboard>("FollowNodePath", (b) => FollowNodePath()), new Leaf <DungeonBlackboard>("WaitForPlayersToArrive", (b) => { return(BehaviorTreeStatus.Success); }) ), new Selector <DungeonBlackboard> ( "IsDungeonLeaderInRange", (b) => WowInterface.ObjectManager.Partyleader != null, new Leaf <DungeonBlackboard>("FollowLeader", (b) => MoveToPosition(WowInterface.ObjectManager.Partyleader.Position, 0f, MovementAction.Following)), new Leaf <DungeonBlackboard>("WaitForLeaderToArrive", (b) => { return(BehaviorTreeStatus.Success); }) ) ) ) ); BehaviorTree = new AmeisenBotBehaviorTree <DungeonBlackboard> ( "DungeonBehaviorTree", RootSelector, DungeonBlackboard ); }
public EventHook(WowInterface wowInterface) { WowInterface = wowInterface; Setup(); JsonSerializerSettings = new() { Error = (sender, errorArgs) => errorArgs.ErrorContext.Handled = true }; }
public CharacterManager(AmeisenBotConfig config, WowInterface wowInterface) { WowInterface = wowInterface; Config = config; Inventory = new CharacterInventory(WowInterface); Equipment = new CharacterEquipment(WowInterface); SpellBook = new SpellBook(WowInterface); ItemComparator = new ItemLevelComparator(); Skills = new List <string>(); }
public WarriorProtection(WowInterface wowInterface, AmeisenBotFsm stateMachine) : base(wowInterface, stateMachine) { MyAuraManager.Jobs.Add(new KeepActiveAuraJob(commandingShoutSpell, () => TryCastSpell(commandingShoutSpell, 0, true))); TargetAuraManager.Jobs.Add(new KeepActiveAuraJob(demoralizingShoutSpell, () => TryCastSpell(demoralizingShoutSpell, WowInterface.TargetGuid, true))); InterruptManager.InterruptSpells = new() { { 0, (x) => (TryCastSpellWarrior(shieldBashSpell, defensiveStanceSpell, x.Guid, true)) }, { 1, (x) => TryCastSpell(concussionBlowSpell, x.Guid, true) } };
public UseObjectQuestObjective(WowInterface wowInterface, int objectDisplayId, UseObjectQuestObjectiveCondition condition) { WowInterface = wowInterface; ObjectDisplayIds = new List <int>() { objectDisplayId }; Condition = condition; UseEvent = new TimegatedEvent(TimeSpan.FromSeconds(1)); }
public void Interact(WowInterface wowInterface, WowGameobject gameobject, float minRange = 3.0f) { if (IsInRange(gameobject, minRange)) { wowInterface.HookManager.WowObjectRightClick(gameobject); } else { wowInterface.MovementEngine.SetMovementAction(MovementAction.Move, gameobject.Position); } }
public SpellBook(WowInterface wowInterface) { WowInterface = wowInterface; Spells = new List <Spell>(); JsonSerializerSettings = new JsonSerializerSettings() { Error = (sender, errorArgs) => errorArgs.ErrorContext.Handled = true }; }
public ShamanEnhancement(WowInterface wowInterface, AmeisenBotFsm stateMachine) : base(wowInterface, stateMachine) { MyAuraManager.Jobs.Add(new KeepActiveAuraJob(lightningShieldSpell, () => WowInterface.Player.ManaPercentage > 60.0 && TryCastSpell(lightningShieldSpell, 0, true))); MyAuraManager.Jobs.Add(new KeepActiveAuraJob(waterShieldSpell, () => WowInterface.Player.ManaPercentage < 20.0 && TryCastSpell(waterShieldSpell, 0, true))); TargetAuraManager.Jobs.Add(new KeepActiveAuraJob(flameShockSpell, () => TryCastSpell(flameShockSpell, WowInterface.TargetGuid, true))); InterruptManager.InterruptSpells = new() { { 0, (x) => TryCastSpell(windShearSpell, x.Guid, true) }, { 1, (x) => TryCastSpell(hexSpell, x.Guid, true) } };
public WarriorArms(WowInterface wowInterface, AmeisenBotFsm stateMachine) : base(wowInterface, stateMachine) { MyAuraManager.Jobs.Add(new KeepActiveAuraJob(battleShoutSpell, () => TryCastSpell(battleShoutSpell, 0, true))); TargetAuraManager.Jobs.Add(new KeepActiveAuraJob(hamstringSpell, () => WowInterface.Target?.Type == WowObjectType.Player && TryCastSpell(hamstringSpell, WowInterface.TargetGuid, true))); TargetAuraManager.Jobs.Add(new KeepActiveAuraJob(rendSpell, () => WowInterface.Target?.Type == WowObjectType.Player && WowInterface.Player.Rage > 75 && TryCastSpell(rendSpell, WowInterface.TargetGuid, true))); InterruptManager.InterruptSpells = new() { { 0, (x) => TryCastSpellWarrior(intimidatingShoutSpell, berserkerStanceSpell, x.Guid, true) }, { 1, (x) => TryCastSpellWarrior(intimidatingShoutSpell, battleStanceSpell, x.Guid, true) } };
public TalkToUnitQuestObjective(WowInterface wowInterface, int displayId, List <int> gossipIds, TalkToUnitQuestObjectiveCondition condition) { WowInterface = wowInterface; DisplayIds = new List <int>() { displayId }; GossipIds = gossipIds; Condition = condition; TalkEvent = new(TimeSpan.FromMilliseconds(500)); }
public DungeonEngine(WowInterface wowInterface, AmeisenBotStateMachine stateMachine) { WowInterface = wowInterface; StateMachine = stateMachine; CurrentNodes = new ConcurrentQueue <DungeonNode>(); CompletedNodes = new List <DungeonNode>(); ExitDungeonEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(1000)); Reset(); }
public static bool Run(WowInterface wowInterface, WowUnit selectedUnit) { if (wowInterface == null || selectedUnit == null) { return(false); } if (wowInterface.ObjectManager.TargetGuid != selectedUnit.Guid) { wowInterface.HookManager.WowTargetGuid(selectedUnit.Guid); return(false); } if (wowInterface.HookManager.WowIsClickToMoveActive()) { wowInterface.MovementEngine.StopMovement(); } if (!BotMath.IsFacing(wowInterface.ObjectManager.Player.Position, wowInterface.ObjectManager.Player.Rotation, selectedUnit.Position)) { wowInterface.HookManager.WowFacePosition(wowInterface.ObjectManager.Player, selectedUnit.Position); } if (!wowInterface.HookManager.LuaUiIsVisible("GossipFrame", "MerchantFrame")) { wowInterface.HookManager.WowUnitRightClick(selectedUnit); return(false); } if (selectedUnit.IsGossip) { if (wowInterface.HookManager.LuaUiIsVisible("GossipFrame")) { string[] gossipTypes = wowInterface.HookManager.LuaGetGossipTypes(); for (int i = 0; i < gossipTypes.Length; ++i) { if (gossipTypes[i].Equals("vendor", StringComparison.OrdinalIgnoreCase) || gossipTypes[i].Equals("repair", StringComparison.OrdinalIgnoreCase)) { wowInterface.HookManager.LuaSelectGossipOption(i + 1); } } } if (!wowInterface.HookManager.LuaUiIsVisible("MerchantFrame")) { return(false); } } return(true); }
public CharacterManager(AmeisenBotConfig config, WowInterface wowInterface) { WowInterface = wowInterface; Config = config; Inventory = new CharacterInventory(WowInterface); Equipment = new CharacterEquipment(WowInterface); SpellBook = new SpellBook(WowInterface); TalentManager = new TalentManager(WowInterface); ItemComparator = new ItemLevelComparator(); Skills = new Dictionary <string, (int, int)>(); }
public ShamanRestoration(WowInterface wowInterface) : base(wowInterface) { MyAuraManager.BuffsToKeepActive = new Dictionary <string, CastFunction>() { { waterShieldSpell, () => CastSpellIfPossible(waterShieldSpell, 0, true) } }; SpellUsageHealDict = new Dictionary <int, string>() { { 0, riptideSpell }, { 5000, healingWaveSpell }, }; }
public JobEngine(WowInterface wowInterface, AmeisenBotConfig config) { AmeisenLogger.I.Log("JobEngine", $"Initializing", LogLevel.Verbose); WowInterface = wowInterface; Config = config; MiningEvent = new TimegatedEvent(TimeSpan.FromSeconds(1)); BlacklistEvent = new TimegatedEvent(TimeSpan.FromSeconds(1)); MailSentEvent = new TimegatedEvent(TimeSpan.FromSeconds(3)); NodeBlacklist = new List <ulong>(); }
public DeathknightUnholy(WowInterface wowInterface, AmeisenBotFsm stateMachine) : base(wowInterface, stateMachine) { MyAuraManager.Jobs.Add(new KeepActiveAuraJob(unholyPresenceSpell, () => TryCastSpellDk(unholyPresenceSpell, 0))); MyAuraManager.Jobs.Add(new KeepActiveAuraJob(hornOfWinterSpell, () => TryCastSpellDk(hornOfWinterSpell, 0, true))); TargetAuraManager.Jobs.Add(new KeepActiveAuraJob(frostFeverSpell, () => TryCastSpellDk(icyTouchSpell, WowInterface.TargetGuid, false, false, false, true))); TargetAuraManager.Jobs.Add(new KeepActiveAuraJob(bloodPlagueSpell, () => TryCastSpellDk(plagueStrikeSpell, WowInterface.TargetGuid, false, false, false, true))); InterruptManager.InterruptSpells = new() { { 0, (x) => TryCastSpellDk(mindFreezeSpell, x.Guid, true) }, { 1, (x) => TryCastSpellDk(strangulateSpell, x.Guid, false, true) } };
public SmartMovementEngine(WowInterface wowInterface, MovementSettings movementSettings) { WowInterface = wowInterface; MovementSettings = movementSettings; Rnd = new Random(); CurrentPath = new Queue <Vector3>(); State = MovementEngineState.None; TryCount = 0; PlayerVehicle = new BasicVehicle(wowInterface, movementSettings.MaxSteering, movementSettings.MaxVelocity, movementSettings.MaxAcceleration); }
public MageFrost(WowInterface wowInterface, AmeisenBotFsm stateMachine) : base(wowInterface, stateMachine) { MyAuraManager.Jobs.Add(new KeepActiveAuraJob(arcaneIntellectSpell, () => TryCastSpell(arcaneIntellectSpell, 0, true))); MyAuraManager.Jobs.Add(new KeepActiveAuraJob(frostArmorSpell, () => TryCastSpell(frostArmorSpell, 0, true))); MyAuraManager.Jobs.Add(new KeepActiveAuraJob(iceArmorSpell, () => TryCastSpell(iceArmorSpell, 0, true))); MyAuraManager.Jobs.Add(new KeepActiveAuraJob(manaShieldSpell, () => TryCastSpell(manaShieldSpell, 0, true))); MyAuraManager.Jobs.Add(new KeepActiveAuraJob(iceBarrierSpell, () => TryCastSpell(iceBarrierSpell, 0, true))); InterruptManager.InterruptSpells = new() { { 0, (x) => TryCastSpell(counterspellSpell, x.Guid, true) } }; }
public KillAndLootQuestObjective(WowInterface wowInterface, List <int> npcIds, int collectOrKillAmount, int questItemId, List <List <Vector3> > areas) { WowInterface = wowInterface; NpcIds = npcIds; CollectOrKillAmount = collectOrKillAmount; QuestItemId = questItemId; SearchAreas = new SearchAreaEnsamble(areas); if (!CollectQuestItem) { wowInterface.Db.GetCombatLogSubject().Register(this); } }