private double GetHeroLevelDiff(GameObjectTeam team) { int maxAllies = 0; int maxEnemies = 0; int sumLevelAllies = 0; int sumLevelEnemies = 0; foreach (Obj_AI_Hero hero in heroes) { if (team == hero.Team) { maxAllies++; sumLevelAllies += hero.Level; } else { maxEnemies++; sumLevelEnemies += hero.Level; } } double leveldiff = (maxAllies > 0 ? sumLevelAllies / maxAllies : 0) - (maxEnemies > 0 ? sumLevelEnemies / maxEnemies : 0); return(Math.Min(Math.Max(leveldiff, -3), 3)); }
public Ward(AIHeroClient caster, Obj_AI_Base handle, Vector3 position, IWard wardInfo, int duration, GameObjectTeam team) { // Initialize properties Caster = caster; Handle = handle; FakePosition = position; Team = team; WardInfo = wardInfo; Duration = duration * 1000; CreationTime = Core.GameTickCount; // Initialize rendering MinimapSprite = new Sprite(() => MinimapIconTexture); TextHandle = new Text(string.Empty, new Font(FontFamily.GenericSansSerif, 8, FontStyle.Regular)); // Notify player about placement if (!MasterMind.IsSpectatorMode && Team.IsEnemy() && (Player.Instance.IsInRange(Position, NotifyRange.CurrentValue) || Player.Instance.IsInRange(position, NotifyRange.CurrentValue))) { if (NotifyPlace.CurrentValue) { Notifications.Show(new SimpleNotification("A ward has been placed!", string.Format("{0} has placed a {1}", caster != null ? caster.ChampionName : "Unknown", WardInfo.FriendlyName))); } if (NotifyPlacePing.CurrentValue) { TacticalMap.ShowPing(PingCategory.Normal, Position, true); } } }
public static IEnumerable <Obj_AI_Base> GetMobGroup(this LeagueSharp.Common.Spell spell, FarmMode farmMode, GameObjectTeam minionTeam, MinionType minionType = MinionType.All, MinionGroup minionGroup = MinionGroup.Alone, int minionCount = 1) { IEnumerable <Obj_AI_Base> list = ObjectManager.Get <Obj_AI_Minion>() .Where(m => m.LSIsValidTarget(spell.Range) && m.Team == GameObjectTeam.Neutral); if (minionType == MinionType.BigMobs) { IEnumerable <Obj_AI_Base> oMob = (from fMobs in list from fBigBoys in new[] { "SRU_Blue", "SRU_Gromp", "SRU_Murkwolf", "SRU_Razorbeak", "SRU_Red", "SRU_Krug", "SRU_Dragon", "SRU_Baron", "Sru_Crab" } where fBigBoys == fMobs.BaseSkinName select fMobs).AsEnumerable(); list = oMob; } return(list); }
IEnumerable <Obj_AI_Base> IValue <IEnumerable <Obj_AI_Base> > .GetValue(LeagueSharp.Common.Spell spell, FarmMode farmMode, GameObjectTeam minionTeam, MinionType minionType) { IEnumerable <Obj_AI_Base> list = ObjectManager.Get <Obj_AI_Minion>().Where(m => m.LSIsValidTarget(spell.Range)); IEnumerable <Obj_AI_Base> mobs; if (farmMode == FarmMode.JungleClear) { mobs = list.Where(w => w.Team == minionTeam); if (minionType == MinionType.BigMobs) { IEnumerable <Obj_AI_Base> oMob = (from fMobs in mobs from fBigBoys in new[] { "SRU_Blue", "SRU_Gromp", "SRU_Murkwolf", "SRU_Razorbeak", "SRU_Red", "SRU_Krug", "SRU_Dragon", "SRU_Baron", "Sru_Crab" } where fBigBoys == fMobs.BaseSkinName select fMobs).AsEnumerable(); mobs = oMob; } } else { mobs = list; } return(mobs); }
public Camp(string name, float spawnTime, int respawnTimer, Vector3 position, List <Mob> mobs, Utility.Map.MapType mapType, GameObjectTeam team, Color colour, Timers timer, bool isRanged = false, int state = 0, int respawnTime = 0, int lastChangeOnState = 0) { Name = name; SpawnTime = spawnTime; RespawnTimer = respawnTimer; Position = position; MinimapPosition = Drawing.WorldToMinimap(Position); Mobs = mobs; MapType = mapType; Team = team; Colour = colour; IsRanged = isRanged; State = state; RespawnTime = respawnTime; LastChangeOnState = lastChangeOnState; Timer = timer; }
public void InitializeComponent() { // Initialize texture references MasterMind.TextureLoader.Load(Resources.CooldownTracker, out _overlayRef); // Initialize menu Menu = MasterMind.Menu.AddSubMenu("Cooldown Tracker", longTitle: "Spell Cooldown Tracker"); Menu.AddGroupLabel("Information"); Menu.AddLabel("A spell cooldown tracker helps you in various ways ingame."); Menu.AddLabel("It lets you visually see the remaining time the spells are on cooldown."); Menu.AddLabel(string.Format("You can enable cooldown tracking for both, {0} and {1}.", MasterMind.IsSpectatorMode ? "blue" : "allies", MasterMind.IsSpectatorMode ? "red team" : "enemies")); Menu.AddSeparator(); TrackAllies = Menu.Add("allies", new CheckBox(string.Format("Track {0}", MasterMind.IsSpectatorMode ? "blue team" : "allies"))); TrackEnemies = Menu.Add("enemies", new CheckBox(string.Format("Track {0}", MasterMind.IsSpectatorMode ? "red team" : "enemies"))); DrawText = Menu.Add("cooldownText", new CheckBox("Draw cooldown time below spell indicator")); // Initialize properties OverlaySprite = new EloBuddy.SDK.Rendering.Sprite(() => OverlayTextre); SpellCooldownText = new Text(string.Empty, new System.Drawing.Font(FontFamily.GenericSansSerif, 8, FontStyle.Regular)) { Color = Color.GhostWhite }; AlliedTeam = GameObjectTeam.Order; if (!MasterMind.IsSpectatorMode) { AlliedTeam = Player.Instance.Team; } // Listen to required events Drawing.OnEndScene += OnDraw; }
//abstract stuff protected Camp(byte campID,Vector3 pos, GameObjectTeam team) { campId = campID; campPosition = pos; side = team; State = JungleCampState.Unknown; }
/// <summary> /// Returns a polygon containing the lane itself. /// </summary> /// <param name="team">The team.</param> /// <param name="lane">The lane.</param> /// <returns>A polygon containing the lane itself.</returns> public static Geometry.Polygon GetLanePolygon(GameObjectTeam team, Lane lane) { switch (team) { case GameObjectTeam.Order: { return(_teamOrderLaneZones.FirstOrDefault(entry => entry.Key == lane).Value); } case GameObjectTeam.Chaos: { return(_teamChaosLaneZones.FirstOrDefault(entry => entry.Key == lane).Value); } case GameObjectTeam.Neutral: { return(_teamNeutralLaneZones.FirstOrDefault(entry => entry.Key == lane).Value); } default: { return(null); } } }
//abstract stuff protected Camp(byte campID, Vector3 pos, GameObjectTeam team) { campId = campID; campPosition = pos; side = team; State = JungleCampState.Unknown; }
public static string GetTurretName(GameObjectTeam team, Lane?lane = null, int?number = null) { var result = TurretBaseName; result += team == GameObjectTeam.Order ? "_T1" : "_T2"; result += GetTurretLaneNaming(lane); result += number != null ? "_" + number : ""; return(result); }
public PostBasicAttackArgs(Obj_AI_Base sender, GameObject target, Vector3 startPosition, Vector3 endPosition, int networkId, GameObjectTeam team) { Sender = sender; Target = target; StartPosition = startPosition; EndPosition = endPosition; NetworkId = networkId; Team = team; }
public Ward(int snid, Vector3 pos, string wt, GameObjectTeam st, float e, int hp, int duration) { this.SenderNetworkID = snid; this.TimeExpires = e; this.Position = pos; this.WardType = wt; this.SenderTeam = st; this.Health = hp; this.Duration = duration; }
public static bool IsInFountain(Vector3 position, GameObjectTeam team) { float fountainRange = 1050; if (Game.MapId == GameMapId.SummonersRift) { Vector3 vec3 = (team == GameObjectTeam.Order) ? new Vector3(363, 426, 182) : new Vector3(14340, 14390, 172); return(position.IsInRange(vec3, fountainRange)); } return(false); }
public static bool IsInFountain(Vector3 position, GameObjectTeam team) { float fountainRange = 1050; if (Game.MapId == GameMapId.SummonersRift) { Vector3 vec3 = (team == GameObjectTeam.Order) ? new Vector3(363, 426, 182) : new Vector3(14340, 14390, 172); return position.IsInRange(vec3, fountainRange); } return false; }
public JungleCamp(Vector3 position, uint respawnTime, string[] names, GameObjectTeam team = GameObjectTeam.Neutral, bool childrenMobs = true) { this.Position = position; this.RespawnTime = respawnTime; this.Names = names; this.Team = team; this.ChildrenMobs = childrenMobs; this.ObjectsAlive = new List <string>(); this.ObjectsDead = new List <string>(); }
public JungleCamp(int respawnTime, Vector3 position, string[] mobNames, GameMapId mapID, GameObjectTeam team) { RespawnTime = respawnTime; Position = position; MobNames = mobNames; MapID = mapID; Team = team; ObjectsDead = new List <string>(); ObjectsAlive = new List <string>(); }
public Camp(float spawnTime, float respawnTime, Vector3 position, List <Data.Jungle.Mob> mobs, bool isBig, LeagueSharp.Common.Utility.Map.MapType mapType, GameObjectTeam team, bool dead = false) : base(spawnTime, respawnTime, position, mobs, isBig, mapType, team) { Dead = dead; Mobs = mobs.Select(mob => new Mob(mob.Name)).ToList(); }
public JungleCamp(String name, GameObjectTeam team, int campId, int spawnTime, int respawnTime, Utility.Map.MapType mapType, Vector3 mapPosition, Vector3 minimapPosition, JungleMob[] creeps) { Name = name; Team = team; CampId = campId; SpawnTime = spawnTime; RespawnTime = respawnTime; MapType = mapType; MapPosition = mapPosition; MinimapPosition = minimapPosition; Creeps = creeps; NextRespawnTime = 0; Called = false; Dead = false; Visible = false; TextMinimap = new Render.Text(0, 0, "", Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue <Slider>().Value, new ColorBGRA(Color4.White)); Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").ValueChanged += JungleCamp_ValueChanged; TextMinimap.TextUpdate = delegate { return((NextRespawnTime - (int)Game.ClockTime).ToString()); }; TextMinimap.PositionUpdate = delegate { Vector2 sPos = Drawing.WorldToMinimap(MinimapPosition); return(new Vector2(sPos.X, sPos.Y)); }; TextMinimap.VisibleCondition = sender => { return(Timer.Timers.GetActive() && JungleTimer.GetActive() && NextRespawnTime > 0 && MapType == GMap.Type); }; TextMinimap.OutLined = true; TextMinimap.Centered = true; TextMinimap.Add(); TextMap = new Render.Text(0, 0, "", (int)(Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue <Slider>().Value * 3.5), new ColorBGRA(Color4.White)); TextMap.TextUpdate = delegate { return((NextRespawnTime - (int)Game.ClockTime).ToString()); }; TextMap.PositionUpdate = delegate { Vector2 sPos = Drawing.WorldToScreen(MapPosition); return(new Vector2(sPos.X, sPos.Y)); }; TextMap.VisibleCondition = sender => { return(Timer.Timers.GetActive() && JungleTimer.GetActive() && NextRespawnTime > 0 && MapType == GMap.Type); }; TextMap.OutLined = true; TextMap.Centered = true; TextMap.Add(); }
public JungleCamps(String name, GameObjectTeam team, int campID, int spawnTime, int respawnTime, int mapID, Vector3 mapPosition, Vector3 minimapPosition, JungleMobs[] creeps) { this.name = name; this.team = team; this.campID = campID; this.spawnTime = spawnTime; this.respawnTime = respawnTime; this.mapID = mapID; this.mapPosition = mapPosition; this.minimapPosition = minimapPosition; this.creeps = creeps; nextRespawnTime = 0; }
public RelicObject(string name, String objectName, GameObjectTeam team, Obj_AI_Minion obj, int spawnTime, int respawnTime, Vector3 mapPosition, Vector3 minimapPosition) { Name = name; ObjectName = objectName; Team = team; Obj = obj; SpawnTime = spawnTime; RespawnTime = respawnTime; Locked = false; MapPosition = mapPosition; MinimapPosition = minimapPosition; MapType = Utility.Map.MapType.CrystalScar; NextRespawnTime = 0; Called = false; TextMinimap = new Render.Text(0, 0, "", Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue <Slider>().Value, new ColorBGRA(Color4.White)); Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").ValueChanged += RelicObject_ValueChanged; TextMinimap.TextUpdate = delegate { return((NextRespawnTime - (int)Game.ClockTime).ToString()); }; TextMinimap.PositionUpdate = delegate { Vector2 sPos = Drawing.WorldToMinimap(MinimapPosition); return(new Vector2(sPos.X, sPos.Y)); }; TextMinimap.VisibleCondition = sender => { return(Timer.Timers.GetActive() && RelicTimer.GetActive() && NextRespawnTime > 0 && MapType == GMap.Type); }; TextMinimap.OutLined = true; TextMinimap.Centered = true; TextMinimap.Add(); TextMap = new Render.Text(0, 0, "", (int)(Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue <Slider>().Value * 3.5), new ColorBGRA(Color4.White)); TextMap.TextUpdate = delegate { return((NextRespawnTime - (int)Game.ClockTime).ToString()); }; TextMap.PositionUpdate = delegate { Vector2 sPos = Drawing.WorldToScreen(MapPosition); return(new Vector2(sPos.X, sPos.Y)); }; TextMap.VisibleCondition = sender => { return(Timer.Timers.GetActive() && RelicTimer.GetActive() && NextRespawnTime > 0 && MapType == GMap.Type); }; TextMap.OutLined = true; TextMap.Centered = true; TextMap.Add(); }
#pragma warning restore 649 #pragma warning restore 169 #endregion #region Constructors and Destructors /// <summary> /// Initializes static members of the <see cref="ObjectCache" /> class /// </summary> static ObjectCache() { GameObjectList = ObjectManager.Get <GameObject>().ToList(); Obj_AI_MinionList = GameObjectList.OfType <Obj_AI_Minion>().ToList(); FieldData = new Dictionary <string, FieldInfo>(10) { { "GameObjectList", GetField("GameObjectList") }, { "Obj_AI_MinionList", GetField("Obj_AI_MinionList") } }; Minions = Obj_AI_MinionList.FindAll(minion => { var type = minion.GetMinionType(); return(type.HasFlag(MinionTypes.Melee) || type.HasFlag(MinionTypes.Ranged)); }); Pets = Obj_AI_MinionList.FindAll(minion => minion.IsPet()); Wards = Obj_AI_MinionList.FindAll(minion => minion.GetMinionType().HasFlag(MinionTypes.Ward)); JungleMinions = Obj_AI_MinionList.FindAll(minion => minion.GetJungleType() != JungleType.Unknown); OtherMinions = Obj_AI_MinionList.FindAll(o => o.GetMinionType().HasFlag(MinionTypes.Unknown) && o.GetJungleType() == JungleType.Unknown && !o.IsPet()); Player = (Obj_AI_Hero)GameObjectList.Single(o => o.IsMe); AlliedTeam = Player.Team; TeamDictionary = new Dictionary <ObjectTeam, GameObjectTeam>(4) { { ObjectTeam.Ally, AlliedTeam }, { ObjectTeam.Enemy, AlliedTeam == GameObjectTeam.Order ? GameObjectTeam.Chaos : GameObjectTeam.Order }, { ObjectTeam.Neutral, GameObjectTeam.Neutral }, { ObjectTeam.Unknown, GameObjectTeam.Unknown } }; // I don't find OnDelete too reliable when it comes to keeping the lists tidy so I'll additionally go for OnUpdate Game.OnUpdate += delegate { int index; while ((index = GameObjectList.FindIndex(o => o == null || !o.IsValid)) >= 0) { Process(GameObjectList[index], false); } }; GameObject.OnCreate += (sender, args) => Process(sender, true); GameObject.OnDelete += (sender, args) => Process(sender, false); }
public Camp(float spawnTime, float respawnTime, Vector3 position, List <Data.Jungle.Mob> mobs, bool isBig, MapType mapType, GameObjectTeam team, string name, bool dead = false, bool noticed = false) : base(spawnTime, respawnTime, position, mobs, isBig, mapType, team, name) { Dead = dead; Noticed = noticed; Mobs = mobs.Select(mob => new Mob(mob.Name)).ToList(); }
public Mobs( int respawnTime, Vector3 position, string[] mobNames, GameMapId MapID, GameObjectTeam team) { this.RespawnTime = respawnTime; this.Position = position; this.MobNames = mobNames; this.MapID = MapID; this.Team = team; this.ObjectsDead = new List <string>(); this.ObjectsAlive = new List <string>(); }
private static Vector3 GetHomePos(GameObjectTeam team) { if (team == GameObjectTeam.Order) // Blue Team { return(new Vector3(396f, 462f, 182.1325f)); } else if (team == GameObjectTeam.Chaos) // Red Team { return(new Vector3(14340f, 14390f, 171.9777f)); } else { Game.PrintChat("Unknown Team : " + team.ToString()); return(new Vector3()); } }
public Gromp(byte campID, Vector3 pos, GameObjectTeam team) : base(campID, pos, team) { campId = campID; side = team; Minions = new List<JungleMinion> { get_SRU_Gromp(1) }; SpawnTime = TimeSpan.FromSeconds(115); RespawnTimer = TimeSpan.FromSeconds(100); bonusPrioLowLvl = -50; bonusPrio = -20; onRespawn(); worthSmiting = true; }
public Gromp(byte campID, Vector3 pos, GameObjectTeam team) : base(campID, pos, team) { campId = campID; side = team; Minions = new List <JungleMinion> { get_SRU_Gromp(1) }; SpawnTime = TimeSpan.FromSeconds(115); RespawnTimer = TimeSpan.FromSeconds(100); bonusPrioLowLvl = 4; bonusPrio = 3; onRespawn(); worthSmiting = true; }
public Senitels(byte campID, Vector3 pos, GameObjectTeam team) : base(campID, pos, team) { campId = campID; side = team; Minions = new List <JungleMinion> { get_SRU_Blue(1), get_SRU_BlueMini(2), get_SRU_BlueMini(3, true), }; SpawnTime = TimeSpan.FromSeconds(115); RespawnTimer = TimeSpan.FromSeconds(300); useOverTime = false; onRespawn(); }
/// <summary> /// Initializes a new instance of the <see cref="JungleCamp" /> class. /// </summary> /// <param name="respawnTime">The respawn time.</param> /// <param name="position">The position.</param> /// <param name="mobNames">The mob names.</param> /// <param name="mapType">Type of the map.</param> /// <param name="team">The team.</param> public JungleCamp( int respawnTime, Vector3 position, string[] mobNames, LeagueSharp.Common.Utility.Map.MapType mapType, GameObjectTeam team) { this.RespawnTime = respawnTime; this.Position = position; this.MobNames = mobNames; this.MapType = mapType; this.Team = team; this.ObjectsDead = new List <string>(); this.ObjectsAlive = new List <string>(); }
public Senitels(byte campID, Vector3 pos, GameObjectTeam team) : base(campID, pos, team) { campId = campID; side = team; Minions = new List<JungleMinion> { get_SRU_Blue(1), get_SRU_BlueMini(2), get_SRU_BlueMini(3,true), }; SpawnTime = TimeSpan.FromSeconds(115); RespawnTimer = TimeSpan.FromSeconds(300); useOverTime = false; onRespawn(); }
public static int CountEnemies(Vector3 from, float Range, GameObjectTeam team) { int Counter = 0; List<Obj_AI_Hero> Enemies = null; Enemies = ObjectHandler.Get<Obj_AI_Hero>().Where(t => t.IsEnemy && !t.IsDead).ToList(); foreach (Obj_AI_Hero hero in Enemies) { if (from.Distance(hero.Position) < Range) { Counter++; } } return Counter; }
public Mobs( int respawnTime, Vector3 position, string[] mobNames, GameMapId MapID, GameObjectTeam team) { this.RespawnTime = respawnTime; this.Position = position; this.MobNames = mobNames; this.MapID = MapID; this.Team = team; this.ObjectsDead = new List<string>(); this.ObjectsAlive = new List<string>(); }
public Camp(float spawnTime, float respawnTime, Vector3 position, List <Mob> mobs, bool isBig, Utility.Map.MapType mapType, GameObjectTeam team) { SpawnTime = spawnTime; RespawnTime = respawnTime; Position = position; MinimapPosition = Drawing.WorldToMinimap(Position); Mobs = mobs; IsBig = isBig; MapType = mapType; Team = team; }
public Raptors(byte campID, Vector3 pos, GameObjectTeam team) : base(campID, pos, team) { campId = campID; side = team; Minions = new List <JungleMinion> { get_SRU_Razorbeak(1), get_SRU_RazorbeakMini(2), get_SRU_RazorbeakMini(3), get_SRU_RazorbeakMini(4) }; SpawnTime = TimeSpan.FromSeconds(115); RespawnTimer = TimeSpan.FromSeconds(100); bonusPrioLowLvl = -5; onRespawn(); worthSmiting = false; }
public static int CountMinions(Vector3 from, float Range, GameObjectTeam team) { int Counter = 0; List<Obj_AI_Minion> Minions = null; Minions = GetMinions(ENEMY_TEAM); foreach (Obj_AI_Minion minion in Minions) { if (from.Distance(minion.Position) < Range && !minion.IsDead) { Counter++; } } return Counter; }
public RedBrambleback(byte campID, Vector3 pos, GameObjectTeam team) : base(campID, pos, team) { campId = campID; side = team; Minions = new List <JungleMinion> { get_SRU_Red(1), get_SRU_RedMini(2), get_SRU_RedMini(3), }; SpawnTime = TimeSpan.FromSeconds(115); RespawnTimer = TimeSpan.FromSeconds(300); useOverTime = false; bonusPrioLowLvl = -1; onRespawn(); }
public bool IsValidTeam(GameObjectTeam team) { if (team == GameObjectTeam.Unknown) return true; switch (TeamDetect) { case DetectionTeam.AllyTeam: return team == Utils.PlayerTeam(); case DetectionTeam.EnemyTeam: return team != Utils.PlayerTeam(); case DetectionTeam.AnyTeam: return true; } return false; }
public Camp(float spawnTime, float respawnTime, Vector3 position, List <Mob> mobs, bool isBig, GameObjectTeam team, bool dead = false) { SpawnTime = spawnTime; RespawnTime = respawnTime; Position = position; MinimapPosition = position.ToMiniMapPosition(); Mobs = mobs; IsBig = isBig; Team = team; Dead = dead; }
public Dragon(byte campID, Vector3 pos, GameObjectTeam team) : base(campID, pos, team) { campId = campID; side = team; Minions = new List <JungleMinion> { get_SRU_Dragon(1) }; SpawnTime = TimeSpan.FromSeconds(150); RespawnTimer = TimeSpan.FromSeconds(360); bonusPrioLowLvl = -5; bonusPrio += 5; onRespawn(); worthSmiting = false; isDrag = true; }
/// <summary> /// Initializes a new instance of the <see cref="JungleCamp" /> class. /// </summary> /// <param name="respawnTime">The respawn time.</param> /// <param name="position">The position.</param> /// <param name="mobNames">The mob names.</param> /// <param name="mapType">Type of the map.</param> /// <param name="team">The team.</param> /// <param name="mobsAreChildren">if set to <c>true</c> the mob names need to be dead to respawn.</param> public JungleCamp( int respawnTime, Vector3 position, string[] mobNames, Utility.Map.MapType mapType, GameObjectTeam team, bool mobsAreChildren = true) { this.RespawnTime = respawnTime; this.Position = position; this.MobNames = mobNames; this.MapType = mapType; this.Team = team; this.MobsAreChildren = mobsAreChildren; this.ObjectsDead = new List <string>(); this.ObjectsAlive = new List <string>(); }
public Dragon(byte campID, Vector3 pos, GameObjectTeam team) : base(campID, pos, team) { campId = campID; side = team; Minions = new List<JungleMinion> { get_SRU_Dragon(1) }; SpawnTime = TimeSpan.FromSeconds(150); RespawnTimer = TimeSpan.FromSeconds(360); bonusPrioLowLvl = -5; bonusPrio += 5; onRespawn(); worthSmiting = false; isDrag = true; }
public RedBrambleback(byte campID, Vector3 pos, GameObjectTeam team) : base(campID, pos, team) { campId = campID; side = team; Minions = new List<JungleMinion> { get_SRU_Red(1), get_SRU_RedMini(2), get_SRU_RedMini(3), }; SpawnTime = TimeSpan.FromSeconds(115); RespawnTimer = TimeSpan.FromSeconds(300); useOverTime = false; bonusPrioLowLvl = -1; onRespawn(); }
public Raptors(byte campID, Vector3 pos, GameObjectTeam team) : base(campID, pos, team) { campId = campID; side = team; Minions = new List<JungleMinion> { get_SRU_Razorbeak(1), get_SRU_RazorbeakMini(2), get_SRU_RazorbeakMini(3), get_SRU_RazorbeakMini(4) }; SpawnTime = TimeSpan.FromSeconds(115); RespawnTimer = TimeSpan.FromSeconds(100); bonusPrioLowLvl = -5; onRespawn(); worthSmiting = false; }
public MurkWolfs(byte campID, Vector3 pos, GameObjectTeam team) : base(campID, pos, team) { campId = campID; side = team; Minions = new List<JungleMinion> { get_SRU_Murkwofl(1), get_SRU_MurkwoflMini(2), get_SRU_MurkwoflMini(3), }; SpawnTime = TimeSpan.FromSeconds(115); RespawnTimer = TimeSpan.FromSeconds(100); bonusPrioLowLvl = 3; onRespawn(); worthSmiting = false; useOverTime = true; }
public Camp(string name, float spawnTime, int respawnTimer, Vector3 position, List<Mob> mobs, Utility.Map.MapType mapType, GameObjectTeam team, Color colour, Timers timer, bool isRanged = false, bool isDead = false, int state = 0, int respawnTime = 0, int lastChangeOnState = 0, bool shouldping = true, int lastPing = 0) { Name = name; IsDead = isDead; SpawnTime = spawnTime; RespawnTimer = respawnTimer; Position = position; ScreenPosition = Drawing.WorldToScreen(Position); MinimapPosition = Drawing.WorldToMinimap(Position); Mobs = mobs; MapType = mapType; Team = team; Colour = colour; IsRanged = isRanged; State = state; RespawnTime = respawnTime; LastChangeOnState = lastChangeOnState; Timer = timer; ShouldPing = shouldping; LastPing = lastPing; }
public Camp(float spawnTime, float respawnTime, Vector3 position, List<Mob> mobs, bool isBig, Utility.Map.MapType mapType, GameObjectTeam team) { SpawnTime = spawnTime; RespawnTime = respawnTime; Position = position; MinimapPosition = Drawing.WorldToMinimap(Position); Mobs = mobs; IsBig = isBig; MapType = mapType; Team = team; }
private static Obj_AI_Turret GetCloseTower(Obj_AI_Hero target, GameObjectTeam team) { List<Obj_AI_Turret> towerList = GetTowers(myHero.Team); Obj_AI_Turret[] towers = towerList.ToArray<Obj_AI_Turret>(); if (towers != null) { Obj_AI_Turret candidate = towerList[1]; int count = towers.Length; for (var i = 2; i < count; i++) { if (towers[i].Health / towers[i].MaxHealth > 0.1 && myHero.Distance(candidate) > myHero.Distance(towers[i])) { candidate = towers[i]; } } return candidate; } return null; }
public JungleCamp(String name, GameObjectTeam team, int campId, int spawnTime, int respawnTime, Utility.Map.MapType mapType, Vector3 mapPosition, Vector3 minimapPosition, JungleMob[] creeps) { Name = name; Team = team; CampId = campId; SpawnTime = spawnTime; RespawnTime = respawnTime; MapType = mapType; MapPosition = mapPosition; MinimapPosition = minimapPosition; Creeps = creeps; NextRespawnTime = 0; Called = false; Dead = false; Visible = false; TextMinimap = new Render.Text(0, 0, "", Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue<Slider>().Value, new ColorBGRA(Color4.White)); Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").ValueChanged += JungleCamp_ValueChanged; TextMinimap.TextUpdate = delegate { return (NextRespawnTime - (int)Game.ClockTime).ToString(); }; TextMinimap.PositionUpdate = delegate { Vector2 sPos = Drawing.WorldToMinimap(MinimapPosition); return new Vector2(sPos.X, sPos.Y); }; TextMinimap.VisibleCondition = sender => { return IsActive() && NextRespawnTime > 0 && MapType == GMap.Type; }; TextMinimap.OutLined = true; TextMinimap.Centered = true; TextMinimap.Add(); TextMap = new Render.Text(0, 0, "", (int)(Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue<Slider>().Value * 3.5), new ColorBGRA(Color4.White)); TextMap.TextUpdate = delegate { return (NextRespawnTime - (int)Game.ClockTime).ToString(); }; TextMap.PositionUpdate = delegate { Vector2 sPos = Drawing.WorldToScreen(MapPosition); return new Vector2(sPos.X, sPos.Y); }; TextMap.VisibleCondition = sender => { return IsActive() && NextRespawnTime > 0 && MapType == GMap.Type; }; TextMap.OutLined = true; TextMap.Centered = true; TextMap.Add(); }
public static Geometry.Polygon GetLastTurretInLanePolygon(GameObjectTeam team, Lane lane) { var turret = Turrets.GetTurretsPosition(team, lane); return new Geometry.Circle(turret.LastOrDefault(), 850).ToPolygon(); }
public static IEnumerable<Obj_AI_Turret> GetTurrets(GameObjectTeam team, Lane lane) { switch (team) { case GameObjectTeam.Order: { switch (lane) { case Lane.Base: { return GameObjects.Turrets.Where( turret => orderBase.Any( orderBaseTurretPosition => orderBaseTurretPosition.Distance(turret.Position) < 250)); } case Lane.Bot: { return GameObjects.Turrets.Where( turret => orderBot.Any( orderBotTurretPosition => orderBotTurretPosition.Distance(turret.Position) < 250)); } case Lane.Mid: { return GameObjects.Turrets.Where( turret => orderMid.Any( orderMidPosition => orderMidPosition.Distance(turret.Position) < 250)); } case Lane.Top: { return GameObjects.Turrets.Where( turret => orderTop.Any( orderTopTurretPosition => orderTopTurretPosition.Distance(turret.Position) < 250)); } } break; } case GameObjectTeam.Chaos: { switch (lane) { case Lane.Base: { return GameObjects.Turrets.Where( turret => chaosBase.Any( chaosBaseTurretPosition => chaosBaseTurretPosition.Distance(turret.Position) < 250)); } case Lane.Bot: { return GameObjects.Turrets.Where( turret => chaosBot.Any( chaosBotTurretPosition => chaosBotTurretPosition.Distance(turret.Position) < 250)); } case Lane.Mid: { return GameObjects.Turrets.Where( turret => chaosMid.Any( chaosMidPosition => chaosMidPosition.Distance(turret.Position) < 250)); } case Lane.Top: { return GameObjects.Turrets.Where( turret => chaosTop.Any( chaosTopTurretPosition => chaosTopTurretPosition.Distance(turret.Position) < 250)); } } break; } default: return GameObjects.AllyTurrets; } return GameObjects.AllyTurrets; }
public static IEnumerable<Obj_AI_Minion> GetMinionsInLane(GameObjectTeam team, Lane lane) { return from entry in _minionsInLanes where entry.Value.Team == team && entry.Value.Lane == lane select entry.Value.MinionPtr; }
/// <summary> /// Gives you the ability to extract Vector2's from each turret in game (doesn't account for dead ones) /// </summary> /// <param name="team">The team of the turrets</param> /// <param name="lane">The lane of the turrets</param> /// <returns>A List of Vector2's representing positions of turrets in that specific lane.</returns> public static List<Vector2> GetTurretsPosition(GameObjectTeam team, Lane lane) { switch (team) { case GameObjectTeam.Order: { switch (lane) { case Lane.Base: { return orderBase; } case Lane.Bot: { return orderBot; } case Lane.Mid: { return orderMid; } case Lane.Top: { return orderTop; } } break; } case GameObjectTeam.Chaos: { switch (lane) { case Lane.Base: { return chaosBase; } case Lane.Bot: { return chaosBot; } case Lane.Mid: { return chaosMid; } case Lane.Top: { return chaosTop; } } break; } case GameObjectTeam.Neutral: { switch (lane) { case Lane.Top: { return new List<Vector2> {new Vector2(2232, 12730)}; } case Lane.Mid: { return new List<Vector2> {new Vector2(7464, 7464)}; } case Lane.Bot: { return new List<Vector2> {new Vector2(12642, 2517)}; } } break; } default: return ObjectManager.Player.Team == GameObjectTeam.Order ? orderMid : chaosMid; } return ObjectManager.Player.Team == GameObjectTeam.Order ? orderMid : chaosMid; }
public static Obj_AI_Minion GetMostDamagedMinion(GameObjectTeam team, Lane lane) { return GetMinionsInLane(team, lane).OrderBy(m => m.Health).FirstOrDefault(minion => minion.Health > 0); }
public Relic(string name, String objectName, GameObjectTeam team, Obj_AI_Minion obj, int spawnTime, int respawnTime, Vector3 mapPosition, Vector3 minimapPosition) { Name = name; ObjectName = objectName; Team = team; Obj = obj; SpawnTime = spawnTime; RespawnTime = respawnTime; Locked = false; MapPosition = mapPosition; MinimapPosition = minimapPosition; MapType = Utility.Map.MapType.CrystalScar; NextRespawnTime = 0; Called = false; }
public JungleCamp(String name, GameObjectTeam team, int campId, int spawnTime, int respawnTime, Utility.Map.MapType mapType, Vector3 mapPosition, Vector3 minimapPosition, JungleMob[] creeps) { Name = name; Team = team; CampId = campId; SpawnTime = spawnTime; RespawnTime = respawnTime; MapType = mapType; MapPosition = mapPosition; MinimapPosition = minimapPosition; Creeps = creeps; NextRespawnTime = 0; Called = false; }
/// <summary> /// Initializes a new instance of the <see cref="JungleCamp" /> class. /// </summary> /// <param name="respawnTime">The respawn time.</param> /// <param name="position">The position.</param> /// <param name="mobNames">The mob names.</param> /// <param name="mapType">Type of the map.</param> /// <param name="team">The team.</param> public JungleCamp( int respawnTime, Vector3 position, string[] mobNames, LeagueSharp.Common.Utility.Map.MapType mapType, GameObjectTeam team, bool mobsAreChildren = true) { this.RespawnTime = respawnTime; this.Position = position; this.MobNames = mobNames; this.MapType = mapType; this.Team = team; this.MobsAreChildren = mobsAreChildren; this.ObjectsDead = new List<string>(); this.ObjectsAlive = new List<string>(); }
public Camp(string name, float spawnTime, int respawnTimer, Vector3 position, List<Mob> mobs, Utility.Map.MapType mapType, GameObjectTeam team, Color colour, Timers timer, bool isRanged = false, int state = 0, int respawnTime = 0, int lastChangeOnState = 0, bool shouldping = true, int lastPing = 0) { Name = name; SpawnTime = spawnTime; RespawnTimer = respawnTimer; Position = position; MapPosition = Drawing.WorldToScreen(Position); MinimapPosition = Drawing.WorldToMinimap(Position); Mobs = mobs; MapType = mapType; Team = team; Colour = colour; IsRanged = isRanged; State = state; RespawnTime = respawnTime; LastChangeOnState = lastChangeOnState; Timer = timer; ShouldPing = shouldping; LastPing = lastPing; #region Load Text TextMinimap = new Render.Text(0, 0, "", Program._menu.Item("timerfontminimap").GetValue<Slider>().Value, Program.White) { VisibleCondition = sender => Program.Timeronminimap && RespawnTime > Environment.TickCount && State == 7, PositionUpdate = delegate { Vector2 v2 = Timer.MinimapPosition; return v2; }, TextUpdate = () => Timer.TextOnMinimap, OutLined = false, Centered = true }; TextMinimap.Add(); TextMap = new Render.Text(0, 0, "", Program._menu.Item("timerfontmap").GetValue<Slider>().Value, Program.White) { VisibleCondition = sender => Program.Timeronmap && RespawnTime > Environment.TickCount && State == 7 && Position.IsOnScreen(), PositionUpdate = delegate { Vector2 v2 = Timer.Position; return v2; }, TextUpdate = () => Timer.TextOnMap, OutLined = false, Centered = true }; TextMap.Add(); #endregion //Drawing.OnEndScene += Drawing_OnEndScene; }
private static void GetAllies(GameObjectTeam team) { List<Obj_AI_Hero> temp = new List<Obj_AI_Hero>(); foreach (Obj_AI_Hero hero in ObjectManager.Get<Obj_AI_Hero>()) { temp.Add(hero); } AllAllies = temp.ToArray<Obj_AI_Hero>(); }
/// <summary> /// Returns a polygon containing the lane itself. /// </summary> /// <param name="team">The team.</param> /// <param name="lane">The lane.</param> /// <returns>A polygon containing the lane itself.</returns> public static Geometry.Polygon GetLanePolygon(GameObjectTeam team, Lane lane) { switch (team) { case GameObjectTeam.Order: { return _teamOrderLaneZones.FirstOrDefault(entry => entry.Key == lane).Value; } case GameObjectTeam.Chaos: { return _teamChaosLaneZones.FirstOrDefault(entry => entry.Key == lane).Value; } case GameObjectTeam.Neutral: { return _teamNeutralLaneZones.FirstOrDefault(entry => entry.Key == lane).Value; } default: { return null; } } }
private static List<Obj_AI_Turret> GetTowers(GameObjectTeam team) { List<Obj_AI_Turret> towersList = new List<Obj_AI_Turret>(); foreach( Obj_AI_Turret turret in ObjectManager.Get<Obj_AI_Turret>().Where(tur => tur.IsAlly && tur.Health > 0)) { towersList.Add(turret); } return towersList; }
public static Geometry.Polygon GetLanePolygonExtendedToFarthestMinion(GameObjectTeam laneZoneTeam, Lane lane, GameObjectTeam minionTeam, int maxFieldDistance = 1000) { var farthestTurret = Turrets.GetTurretsPosition(laneZoneTeam, lane).Last(); var mostdamaged = Minions.GetMostDamagedMinion(minionTeam, lane); var farthestMinion = mostdamaged != null ? mostdamaged : Minions.GetMinionsInLane(minionTeam, lane) .OrderBy(m => m.Distance(farthestTurret)) .FirstOrDefault(); if (farthestMinion != null) { return new Geometry.Rectangle(farthestMinion.Position.ToVector2(), farthestMinion.Position.ToVector2().Extend(farthestTurret, maxFieldDistance), 700).ToPolygon(); } return GetLanePolygon(laneZoneTeam, lane); }