private static bool _cast(this ItemData.Item item, GameObject target) { var slot = item.GetItemSlot(); return(slot != null && slot.SpellSlot != SpellSlot.Unknown && slot.SpellSlot.IsReady() && ObjectManager.Player.Spellbook.CastSpell(slot.SpellSlot, target)); }
private static InventorySlot GetItemSlot(this ItemData.Item item) { return(ObjectManager.Player.InventoryItems.FirstOrDefault(i => i.Id == (ItemId)item.Id)); }
public static bool IsReady(this ItemData.Item item) { var slot = item.GetItemSlot(); return(slot != null && slot.IsValidSlot() && slot.SpellSlot.IsReady()); }
public static bool HasItem(this ItemData.Item item) { var slot = item.GetItemSlot(); return(slot != null && slot.IsValidSlot()); }
public static bool Cast(this ItemData.Item item, Obj_AI_Base target) { return(item._cast(target)); }
public static bool Cast(this ItemData.Item item) { return(item._cast(ObjectManager.Player)); }
public BetaTypedItem(ItemData.Item item, IEnumerable <ItemType> types) : base(item, types) { }
internal TypedItem(ItemData.Item item, IEnumerable <ItemType> types) { Item = item; Types = types; }
internal static MenuItem GetItemManagerSetting(ItemData.Item item, string settingKey) { return(Menu.Item(String.Format("{0}.{1}.Settings.{2}", ITEMMANAGER_ROOT, item.Name.ToCamelCase(), settingKey))); }