context: #region License
  
  /*
   Copyright 2014 - 2015 Nikita Bernthaler
   ItemManager.cs is part of SFXChallenger.
  
   SFXChallenger is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.
  
   SFXChallenger is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   GNU General Public License for more details.
  
   You should have received a copy of the GNU General Public License
   along with SFXChallenger. If not, see <http://www.gnu.org/licenses/>.
  */
  
  #endregion License
  
  #region
  
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using LeagueSharp;
  using LeagueSharp.Common;
  using SFXChallenger.Enumerations;
  using SFXChallenger.Library;
  using SFXChallenger.Library.Logger;
  using SFXChallenger.SFXTargetSelector.Others;
  using ItemData = LeagueSharp.Common.Data.ItemData;
  
  using Utils = SFXChallenger.Helpers.Utils;
  
  #endregion
  
  using EloBuddy; namespace SFXChallenger.Managers
  {
      public class CustomItem
      {
          public string Name { get; set; }
          public string DisplayName { get; set; }
          public Items.Item Item { get; set; }
          public ItemFlags Flags { get; set; }
          public CombatFlags CombatFlags { get; set; }
          public CastType CastType { get; set; }
          public EffectFlags EffectFlags { get; set; }
          public Damage.DamageItems Damage { get; set; }
          public float Range { get; set; }
          public float Delay { get; set; }
          public float Radius { get; set; }
          public float Speed { get; set; }
      }
  
      public class ItemManager
      {
          private static Menu _menu;
          private static ItemFlags _itemFlags;
          public static CustomItem Youmuu;
          public static CustomItem Hydra;
          public static CustomItem BilgewaterCutlass;
          public static CustomItem BladeRuinedKing;
          public static CustomItem HextechGunblade;
          public static CustomItem MikaelsCrucible;
          public static CustomItem LocketIronSolari;
          public static CustomItem FrostQueensClaim;
          public static CustomItem TalismanOfAscension;
          public static CustomItem FaceOfTheMountain;
          public static CustomItem Sightstone;
          public static CustomItem RubySightstone;
          public static CustomItem EyeOfTheWatchers;
          public static CustomItem EyeOfTheEquinox;
          public static CustomItem EyeOfTheOasis;
          public static CustomItem TrackersKnife;
          public static List<CustomItem> Items;
  
          static ItemManager()
          {
              try
              {
                  // Speed + Atk Speed
                  Youmuu = new CustomItem
                  {
                      Name = "youmuus-ghostblade",
                      DisplayName = "Youmuu's Ghostblade",
                      Item = ItemData.Youmuus_Ghostblade.GetItem(),
                      Flags = ItemFlags.Offensive | ItemFlags.Flee,
                      CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                      EffectFlags = EffectFlags.AttackSpeed | EffectFlags.MovementSpeed,
                      CastType = CastType.None,
                      Range =
                          ObjectManager.Player.IsMelee
                              ? ObjectManager.Player.AttackRange * 3
                              : Orbwalking.GetRealAutoAttackRange(ObjectManager.Player)
                  };
  
                  // AOE damage, only melee
                  Hydra = new CustomItem
                  {
                      Name = "hydra",
                      DisplayName = "Hydra",
                      Item = ItemData.Ravenous_Hydra_Melee_Only.GetItem(),
                      Flags = ItemFlags.Offensive,
                      CombatFlags = CombatFlags.Melee,
                      EffectFlags = EffectFlags.Damage,
                      CastType = CastType.None,
                      Damage = Damage.DamageItems.Hydra,
                      Range = ItemData.Ravenous_Hydra_Melee_Only.GetItem().Range
                  };
  
                  // Slow + Damage
                  BilgewaterCutlass = new CustomItem
                  {
                      Name = "bilgewater-cutlass",
                      DisplayName = "Bilgewater Cutlass",
                      Item = ItemData.Bilgewater_Cutlass.GetItem(),
                      Flags = ItemFlags.Offensive | ItemFlags.Flee,
                      CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                      EffectFlags = EffectFlags.Damage | EffectFlags.MovementSlow,
                      CastType = CastType.Target,
                      Damage = Damage.DamageItems.Bilgewater,
                      Range = ItemData.Bilgewater_Cutlass.GetItem().Range
                  };
  
                  // Slow + Damage
                  BladeRuinedKing = new CustomItem
                  {
                      Name = "blade-ruined-king",
                      DisplayName = "Blade of the Ruined King",
                      Item = ItemData.Blade_of_the_Ruined_King.GetItem(),
                      Flags = ItemFlags.Offensive | ItemFlags.Flee,
                      CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                      EffectFlags = EffectFlags.Damage | EffectFlags.MovementSlow,
                      CastType = CastType.Target,
                      Damage = Damage.DamageItems.Botrk,
                      Range = ItemData.Blade_of_the_Ruined_King.GetItem().Range
                  };
  
                  // Damage + Slow
                  HextechGunblade = new CustomItem
                  {
                      Name = "hextech-gunblade",
                      DisplayName = "Hextech Gunblade",
                      Item = ItemData.Hextech_Gunblade.GetItem(),
                      Flags = ItemFlags.Offensive | ItemFlags.Flee,
                      CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                      EffectFlags = EffectFlags.Damage | EffectFlags.MovementSlow,
                      CastType = CastType.Target,
                      Damage = Damage.DamageItems.Hexgun,
                      Range = ItemData.Hextech_Gunblade.GetItem().Range
                  };
  
                  // AOE Shield
                  LocketIronSolari = new CustomItem
                  {
                      Name = "locket-iron-solari",
                      DisplayName = "Locket of the Iron Solari",
                      Item = ItemData.Locket_of_the_Iron_Solari.GetItem(),
                      Flags = ItemFlags.Supportive | ItemFlags.Defensive,
                      CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                      EffectFlags = EffectFlags.Shield,
                      CastType = CastType.None,
                      Range = ItemData.Locket_of_the_Iron_Solari.GetItem().Range
                  };
  
                  // Remove stun + heal
                  MikaelsCrucible = new CustomItem
                  {
                      Name = "mikaels-crucible",
                      DisplayName = "Mikael's Crucible",
                      Item = ItemData.Mikaels_Crucible.GetItem(),
                      Flags = ItemFlags.Supportive,
                      CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                      EffectFlags = EffectFlags.RemoveStun | EffectFlags.Heal,
                      CastType = CastType.Target,
                      Range = ItemData.Mikaels_Crucible.GetItem().Range
                  };
  
  
                  // Slow
                  FrostQueensClaim = new CustomItem
                  {
                      Name = "frost-queens-claim",
                      DisplayName = "Frost Queen's Claim",
                      Item = ItemData.Frost_Queens_Claim.GetItem(),
                      Flags = ItemFlags.Supportive | ItemFlags.Flee,
                      CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                      EffectFlags = EffectFlags.MovementSlow,
                      CastType = CastType.None,
                      Range = ItemData.Frost_Queens_Claim.GetItem().Range
                  };
  
                  // Speed
                  TalismanOfAscension = new CustomItem
                  {
                      Name = "talisman-of-ascension",
                      DisplayName = "Talisman of Ascension",
                      Item = ItemData.Talisman_of_Ascension.GetItem(),
                      Flags = ItemFlags.Supportive | ItemFlags.Flee,
                      CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                      EffectFlags = EffectFlags.MovementSpeed,
                      CastType = CastType.None,
                      Range = ItemData.Talisman_of_Ascension.GetItem().Range
                  };
  
                  // Shield
                  FaceOfTheMountain = new CustomItem
                  {
                      Name = "face-of-the-mountain",
                      DisplayName = "Face of the Mountain",
                      Item = ItemData.Face_of_the_Mountain.GetItem(),
                      Flags = ItemFlags.Supportive | ItemFlags.Flee | ItemFlags.Defensive,
                      CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                      EffectFlags = EffectFlags.Shield,
                      CastType = CastType.Self,
                      Range = ItemData.Face_of_the_Mountain.GetItem().Range
                  };
  
                  // Place wards
                  Sightstone = new CustomItem
                  {
                      Name = "sightstone",
                      DisplayName = "Sightstone",
                      Item = ItemData.Sightstone.GetItem(),
                      Flags = ItemFlags.Supportive,
                      CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                      CastType = CastType.Position,
                      Range = ItemData.Sightstone.GetItem().Range
                  };
  
                  // Place wards
                  RubySightstone = new CustomItem
                  {
                      Name = "ruby-sightstone",
                      DisplayName = "Ruby Sightstone",
                      Item = ItemData.Ruby_Sightstone.GetItem(),
                      Flags = ItemFlags.Supportive,
                      CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                      CastType = CastType.Position,
                      Range = ItemData.Ruby_Sightstone.GetItem().Range
                  };
  
                  // Place wards
                  EyeOfTheWatchers = new CustomItem
                  {
                      Name = "eye-of-the-watchers",
                      DisplayName = "Eye of the Watchers",
                      Item = ItemData.Eye_of_the_Watchers.GetItem(),
                      Flags = ItemFlags.Supportive,
                      CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                      CastType = CastType.Position,
                      Range = ItemData.Eye_of_the_Watchers.GetItem().Range
                  };
  
                  // Place wards
                  EyeOfTheEquinox = new CustomItem
                  {
                      Name = "eye-of-the-equinox",
                      DisplayName = "Eye of the Equinox",
                      Item = ItemData.Eye_of_the_Equinox.GetItem(),
                      Flags = ItemFlags.Supportive,
                      CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                      CastType = CastType.Position,
                      Range = ItemData.Eye_of_the_Equinox.GetItem().Range
                  };
  
                  // Place wards
                  EyeOfTheOasis = new CustomItem
                  {
                      Name = "eye-of-the-oasis",
                      DisplayName = "Eye of the Oasis",
  
gt:                     Item = ItemData.Eye_of_the_Oasis.GetItem(),