public NavMeshHelper(InvokerCrappahilationPaid main) { MainUnit = main.Me; EntityManager <Unit> .EntityAdded += (sender, unit) => { AddUnitToSystem(unit); }; UpdateManager.BeginInvoke(() => { foreach (var unit in EntityManager <Unit> .Entities) { AddUnitToSystem(unit); } }, 1000); }
public NotificationHelper(InvokerCrappahilationPaid main) { _main = main; Renderer = main.Context.RenderManager; var startPosition = HUDInfo.GetCustomTopPanelPosition(0, Team.Radiant) + new Vector2(0, HUDInfo.TopPanelSizeY); Notifications = new List <Notification>(); var sizeX = HUDInfo.TopPanelSizeX; var sizeY = HUDInfo.TopPanelSizeY; Renderer.Draw += renderer => { foreach (var notification in Notifications) { if (notification.IsActive) { var rect = new RectangleF(notification.StartPosition.X, notification.StartPosition.Y, sizeX, notification.CurrentPosition.Y - notification.StartPosition.Y); renderer.DrawFilledRectangle(rect, Color.FromArgb(155, 50, 50, 50), Color.FromArgb(255, 0, 0, 0)); if (notification.State == Notification.StateType.Staying) { var r = new RectangleF(rect.X, rect.Y + rect.Height - sizeX, sizeX, sizeX); renderer.DrawTexture(notification.TextureId, r); } } } }; UpdateManager.Subscribe(() => { foreach (var notification in Notifications) { if (notification.IsActive) { notification.Move(); } } Notifications.RemoveAll(x => !x.IsActive); }, 25); /*_main.Context.Input.RegisterHotkey("Toster", Key.S, args => * { * Notificate(_main.Me, AbilityId.invoker_sun_strike); * });*/ }
public AbilitiesInCombo(InvokerCrappahilationPaid main) { _main = main; main.Context.Inventory.Attach(this); SunStrike = new InvokerSunStrike(LoadAbility(AbilityId.invoker_sun_strike)); Alacrity = new InvokerAlacrity(LoadAbility(AbilityId.invoker_alacrity)); Meteor = new InvokerChaosMeteor(LoadAbility(AbilityId.invoker_chaos_meteor)); ColdSnap = new InvokerColdSnap(LoadAbility(AbilityId.invoker_cold_snap)); Blast = new InvokerDeafeningBlast(LoadAbility(AbilityId.invoker_deafening_blast)); Emp = new InvokerEmp(LoadAbility(AbilityId.invoker_emp)); ForgeSpirit = new InvokerForgeSpirit(LoadAbility(AbilityId.invoker_forge_spirit)); GhostWalk = new InvokerGhostWalk(LoadAbility(AbilityId.invoker_ghost_walk)); IceWall = new InvokerIceWall(LoadAbility(AbilityId.invoker_ice_wall)); Invoke = new InvokerInvoke(LoadAbility(AbilityId.invoker_invoke)); Tornado = new InvokerTornado(LoadAbility(AbilityId.invoker_tornado)); Quas = new InvokerQuas(LoadAbility(AbilityId.invoker_quas)); Wex = new InvokerWex(LoadAbility(AbilityId.invoker_wex)); Exort = new InvokerExort(LoadAbility(AbilityId.invoker_exort)); AllAbilities = new List <ActiveAbility> { SunStrike, Alacrity, Meteor, ColdSnap, Blast, Emp, ForgeSpirit, IceWall, Tornado, GhostWalk }; LoadAbilitiesFromDota(AbilityId.item_sheepstick, AbilityId.item_refresher, AbilityId.item_orchid, AbilityId.item_bloodthorn, AbilityId.item_blink, AbilityId.item_cyclone, AbilityId.item_black_king_bar, AbilityId.item_shivas_guard, AbilityId.item_refresher_shard); LoadAbilitiesFromDota(AbilityId.invoker_quas, AbilityId.invoker_wex, AbilityId.invoker_exort); }
public Config(InvokerCrappahilationPaid main) { Main = main; Factory = MenuFactory.Create("Invoker"); ComboKey = Factory.Item("Combo key", new KeyBind('0')); RefresherBehavior = Factory.Item("Refresher Behavior", new StringList("After Meteor+Blast", "When 95% of abilities are on cd", "In both cases")); PrepareKey = Factory.Item("Prepare key", new KeyBind('0')); UseForges = Factory.Item("Use forges in Combo", true); UseNecros = Factory.Item("Use necros (and archer's purge) in Combo", true); AutoPurge = Factory.Item("Use necros's purge not in Combo", false); UseEul = Factory.Item("Use eul in Dynamic Combo", true); UseIceWall = Factory.Item("Use IceWall in Dynamic Combo", true); BackToDynamicCombo = Factory.Item("Back to dynamic combo after custom combo", true); UseCataclysm = Factory.Item("Min targets in eul/tornado for cataclysm", new Slider(1, 0, 5)); //ComboType = new ComboType(this); AbilityPanel = new AbilityPanel(this); AutoSunStrike = new AutoSunStrike(this); SmartSphere = new SmartSphere(this); AutoGhostWalk = new AutoGhostWalk(this); FastInvoke = new InvokeHelper(this); ComboPanel = new ComboPanel(this); Prepare = new Prepare(Main); }
public Updater(InvokerCrappahilationPaid main) { _main = main; Units = new List <UnitUnderControl>(); EntityManager <Unit> .EntityAdded += (sender, unit) => { if (unit.Name == "npc_dota_invoker_forged_spirit" && _main.Config.UseForges) { if (Units.Find(x => x.Unit.Handle == unit.Handle) == null) { UpdateManager.BeginInvoke(() => { Units.Add(new UnitUnderControl(unit)); }, 500); } } else if (unit.Name.Contains("npc_dota_necronomicon") && unit != _main.Me && unit.IsControllable && _main.Config.UseNecros) { if (Units.Find(x => x.Unit.Handle == unit.Handle) == null) { UpdateManager.BeginInvoke(() => { Units.Add(new UnitUnderControl(unit)); }, 500); if (_main.Config.AutoPurge) { AutoPurge(unit); } } } }; EntityManager <Unit> .EntityRemoved += (sender, unit) => { //if (unit.Name == "npc_dota_invoker_forged_spirit") //{ var find = Units.Find(x => x.Unit.Handle == unit.Handle); if (find != null) { Units.Remove(find); } //} }; foreach (var unit in EntityManager <Unit> .Entities) { if (unit.Name == "npc_dota_invoker_forged_spirit") { if (Units.Find(x => x.Unit.Handle == unit.Handle) == null) { Units.Add(new UnitUnderControl(unit)); } } else if (unit.Name.Contains("npc_dota_necronomicon") && unit != _main.Me && unit.IsControllable && _main.Config.UseNecros) { if (Units.Find(x => x.Unit.Handle == unit.Handle) == null) { UpdateManager.BeginInvoke(() => { Units.Add(new UnitUnderControl(unit)); }, 500); } if (_main.Config.AutoPurge) { AutoPurge(unit); } } } Entity.OnParticleEffectAdded += (sender, args) => { if (args.Name == "particles/units/heroes/hero_invoker/invoker_emp.vpcf") { UpdateManager.BeginInvoke(() => { var time = Game.RawGameTime; EmpPositions.Add(time, args.ParticleEffect.GetControlPoint(0)); UpdateManager.BeginInvoke(() => { if (EmpPositions.ContainsKey(time)) { EmpPositions.Remove(time); } }, 2900); }, 10); } }; }