private Composite SubBehaviorPS_InitializeVehicleAbilities()
        {
            return
                (new Decorator(context => (Weapon_DevourHuman == null) ||
                               (Weapon_FrozenDeathbolt == null),
                               // Give the WoWclient a few seconds to produce the vehicle action bar...
                               // NB: If we try to use the weapon too quickly after entering vehicle,
                               // then it will cause the WoWclient to d/c.
                               new WaitContinue(TimeSpan.FromSeconds(10),
                                                context => Query.IsVehicleActionBarShowing(),
                                                new Action(context =>
            {
                var weaponArticulation = new WeaponArticulation(WeaponAzimuthMin, WeaponAzimuthMax);

                // (slot 1): http://www.wowhead.com/spell=53114
                Weapon_FrozenDeathbolt =
                    new VehicleWeapon(ActionBarIndex_Attack, weaponArticulation, WeaponMuzzleVelocity)
                {
                    LogAbilityUse = true,
                    LogWeaponFiringDetails = false
                };

                // (slot 3): http://www.wowhead.com/spell=53110
                Weapon_DevourHuman =
                    new VehicleAbility(ActionBarIndex_Heal)
                {
                    LogAbilityUse = true
                };

                WoWMovement.Move(WoWMovement.MovementDirection.JumpAscend, TimeSpan.FromMilliseconds(1500));
            })
                                                )));
        }
Beispiel #2
0
        private async Task SubCoroutine_InitializeVehicleAbilities()
        {
            if ((WeaponLifeRocket == null) ||
                (WeaponPirateDestroyingBomb == null) ||
                (WeaponEmergencyRocketPack == null))
            {
                // Give the WoWclient a few seconds to produce the vehicle action bar...
                // NB: If we try to use the weapon too quickly after entering vehicle,
                // then it will cause the WoWclient to d/c.
                if (await Coroutine.Wait(10000, Query.IsVehicleActionBarShowing))
                {
                    var weaponArticulation = new WeaponArticulation(WeaponAzimuthMin, WeaponAzimuthMax);

                    // (slot 1): http://wowhead.com/spell=75560
                    WeaponLifeRocket =
                        new VehicleWeapon(1, weaponArticulation, WeaponLifeRocket_MuzzleVelocity)
                    {
                        LogAbilityUse          = true,
                        LogWeaponFiringDetails = false
                    };

                    // (slot 2): http://wowhead.com/spell=73257
                    WeaponPirateDestroyingBomb =
                        new VehicleWeapon(2, weaponArticulation, WeaponPirateDestroyingBomb_MuzzleVelocity)
                    {
                        LogAbilityUse          = true,
                        LogWeaponFiringDetails = false
                    };

                    // (slot 6): http://wowhead.com/spell=40603
                    WeaponEmergencyRocketPack =
                        new VehicleAbility(6)
                    {
                        LogAbilityUse = true
                    };
                }
            }
        }