Exemplo n.º 1
0
        public void Initialize(IClassRotation specialization)
        {
            settings = ShamanSettings.Current;
            if (settings.PartyDrinkName != "")
            {
                ToolBox.AddToDoNotSellList(settings.PartyDrinkName);
            }
            cast          = new Cast(LightningBolt, null, settings);
            _totemManager = new TotemManager(cast);

            this.specialization          = specialization as Shaman;
            (RotationType, RotationRole) = ToolBox.GetRotationType(specialization);
            TalentsManager.InitTalents(settings);

            ToolBox.AddToDoNotSellList("Air Totem");
            ToolBox.AddToDoNotSellList("Earth Totem");
            ToolBox.AddToDoNotSellList("Water Totem");
            ToolBox.AddToDoNotSellList("Fire Totem");

            RangeManager.SetRange(_pullRange);

            FightEvents.OnFightEnd   += FightEndHandler;
            FightEvents.OnFightStart += FightStartHandler;
            FightEvents.OnFightLoop  += FightLoopHandler;

            Rotation();
        }
        public void Initialize(IClassRotation specialization)
        {
            settings = RogueSettings.Current;
            if (settings.PartyDrinkName != "")
            {
                ToolBox.AddToDoNotSellList(settings.PartyDrinkName);
            }
            cast = new Cast(SinisterStrike, null, settings);

            this.specialization          = specialization as Rogue;
            (RotationType, RotationRole) = ToolBox.GetRotationType(specialization);
            TalentsManager.InitTalents(settings);

            RangeManager.SetRangeToMelee();
            AddPoisonsToNoSellList();

            FightEvents.OnFightEnd                      += FightEndHandler;
            FightEvents.OnFightStart                    += FightStartHandler;
            MovementEvents.OnMoveToPulse                += MoveToPulseHandler;
            FightEvents.OnFightLoop                     += FightLoopHandler;
            OthersEvents.OnAddBlackListGuid             += BlackListHandler;
            EventsLuaWithArgs.OnEventsLuaStringWithArgs += EventsWithArgsHandler;

            Rotation();
        }
        public void Initialize(IClassRotation specialization)
        {
            settings = HunterSettings.Current;
            if (settings.PartyDrinkName != "")
            {
                ToolBox.AddToDoNotSellList(settings.PartyDrinkName);
            }

            AIOSpell baseSpell = SerpentSting.KnownSpell ? SerpentSting : RaptorStrike;

            cast = new Cast(baseSpell, null, settings);

            this.specialization          = specialization as Hunter;
            (RotationType, RotationRole) = ToolBox.GetRotationType(specialization);
            TalentsManager.InitTalents(settings);

            _petPulseThread.DoWork += PetThread;
            _petPulseThread.RunWorkerAsync();

            FightEvents.OnFightStart       += FightStartHandler;
            FightEvents.OnFightEnd         += FightEndHandler;
            FightEvents.OnFightLoop        += FightLoopHandler;
            MovementEvents.OnMovementPulse += MovementEventsOnMovementPulse;

            Rotation();
        }
        public void Initialize(IClassRotation specialization)
        {
            settings = WarlockSettings.Current;
            if (settings.PartyDrinkName != "")
            {
                ToolBox.AddToDoNotSellList(settings.PartyDrinkName);
            }
            cast = new Cast(ShadowBolt, UseWand, settings);

            this.specialization          = specialization as Warlock;
            (RotationType, RotationRole) = ToolBox.GetRotationType(specialization);
            TalentsManager.InitTalents(settings);

            WarlockPetAndConsumables.Setup();

            _petPulseThread.DoWork += PetThread;
            _petPulseThread.RunWorkerAsync();

            RangeManager.SetRange(ShadowBolt.MaxRange);

            // Set pet mode
            if (settings.PetInPassiveWhenOOC)
            {
                Lua.LuaDoString("PetPassiveMode();");
            }
            else
            {
                Lua.LuaDoString("PetDefensiveMode();");
            }

            FightEvents.OnFightEnd   += FightEndHandler;
            FightEvents.OnFightStart += FightStartHandler;

            Rotation();
        }
        public void Initialize(IClassRotation specialization)
        {
            settings = PaladinSettings.Current;
            if (settings.PartyDrinkName != "")
            {
                ToolBox.AddToDoNotSellList(settings.PartyDrinkName);
            }
            cast = new Cast(HolyLight, null, settings);

            this.specialization          = specialization as Paladin;
            (RotationType, RotationRole) = ToolBox.GetRotationType(specialization);
            TalentsManager.InitTalents(settings);

            if (specialization.RotationType == Enums.RotationType.Party && settings.PartyDetectSpecs)
            {
                AIOParty.ActivateSpecRecord = true;
            }

            _manaSavePercent = System.Math.Max(20, settings.ManaSaveLimitPercent);

            FightEvents.OnFightEnd   += FightEndHandler;
            FightEvents.OnFightStart += FightStartHandler;
            FightEvents.OnFightLoop  += FightLoopHandler;

            Rotation();
        }
Exemplo n.º 6
0
        public IActionResult Delete([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var talent = new TalentsManager(context).DeleteTalent(id);

            return(Ok(new { success = talent.Success, message = talent.Message, data = talent.Data }));
        }
Exemplo n.º 7
0
        public IActionResult Post([FromBody] TalentModel talentModel)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var talent = new TalentsManager(context).AddTalent(talentModel.Name);

            return(Ok(new { success = talent.Success, message = talent.Message, data = talent.Data }));
        }
Exemplo n.º 8
0
        public IActionResult Get()
        {
            var talents = new TalentsManager(context).GetAllTalents();

            if (talents == null)
            {
                return(NoContent());
            }
            return(Ok(new { success = true, message = "", Data = talents }));
        }
Exemplo n.º 9
0
        public IActionResult Put([FromRoute] int id, TalentModel talent)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            if (id != talent.Id)
            {
                return(BadRequest(ModelState));
            }
            var updateTalent = new TalentsManager(context).UpdateTalent(talent);

            return(Ok(new { success = updateTalent.Result.Success, message = updateTalent.Result.Message, data = updateTalent.Result.Data }));
        }
Exemplo n.º 10
0
        public IActionResult Get([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var talent = new TalentsManager(context).GetTalentById(id);

            if (talent == null)
            {
                return(NotFound());
            }
            return(Ok(new { success = true, message = "", data = talent }));
        }
        public void Initialize(IClassRotation specialization)
        {
            settings = WarriorSettings.Current;
            if (settings.PartyDrinkName != "")
            {
                ToolBox.AddToDoNotSellList(settings.PartyDrinkName);
            }
            cast = new Cast(BattleShout, null, settings);

            this.specialization          = specialization as Warrior;
            (RotationType, RotationRole) = ToolBox.GetRotationType(specialization);
            TalentsManager.InitTalents(settings);

            FightEvents.OnFightEnd  += FightEndHandler;
            FightEvents.OnFightLoop += FightLoopHandler;

            cast.OnTarget(BattleStance);

            Rotation();
        }
        public void Initialize(IClassRotation specialization)
        {
            settings = PriestSettings.Current;
            if (settings.PartyDrinkName != "")
            {
                ToolBox.AddToDoNotSellList(settings.PartyDrinkName);
            }
            cast = new Cast(Smite, UseWand, settings);

            this.specialization          = specialization as Priest;
            (RotationType, RotationRole) = ToolBox.GetRotationType(specialization);
            TalentsManager.InitTalents(settings);

            _wandThreshold = settings.WandThreshold > 100 ? 50 : settings.WandThreshold;
            RangeManager.SetRange(28f);

            FightEvents.OnFightEnd   += FightEndHandler;
            FightEvents.OnFightStart += FightStartHandler;

            Rotation();
        }
Exemplo n.º 13
0
        public void Initialize(IClassRotation specialization)
        {
            settings = MageSettings.Current;
            if (settings.PartyDrinkName != "")
            {
                ToolBox.AddToDoNotSellList(settings.PartyDrinkName);
            }
            cast         = new Cast(Fireball, UseWand, settings);
            _foodManager = new MageFoodManager(cast);

            this.specialization          = specialization as Mage;
            (RotationType, RotationRole) = ToolBox.GetRotationType(specialization);
            TalentsManager.InitTalents(settings);

            RangeManager.SetRange(30);

            FightEvents.OnFightEnd   += FightEndHandler;
            FightEvents.OnFightStart += FightStartHandler;
            FightEvents.OnFightLoop  += FightLoopHandler;

            Rotation();
        }
        public void Initialize(IClassRotation specialization)
        {
            RangeManager.SetRange(28);
            settings = DruidSettings.Current;
            if (settings.PartyDrinkName != "")
            {
                ToolBox.AddToDoNotSellList(settings.PartyDrinkName);
            }
            cast = new Cast(Wrath, null, settings);

            this.specialization          = specialization as Druid;
            (RotationType, RotationRole) = ToolBox.GetRotationType(specialization);
            TalentsManager.InitTalents(settings);

            FightEvents.OnFightEnd          += FightEndHandler;
            FightEvents.OnFightStart        += FightStartHandler;
            FightEvents.OnFightLoop         += FightLoopHandler;
            MovementEvents.OnMoveToPulse    += MoveToPulseHandler;
            OthersEvents.OnAddBlackListGuid += BlackListHandler;

            Rotation();
        }