示例#1
0
        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));
        }
示例#2
0
 private static InventorySlot GetItemSlot(this ItemData.Item item)
 {
     return(ObjectManager.Player.InventoryItems.FirstOrDefault(i => i.Id == (ItemId)item.Id));
 }
示例#3
0
        public static bool IsReady(this ItemData.Item item)
        {
            var slot = item.GetItemSlot();

            return(slot != null && slot.IsValidSlot() && slot.SpellSlot.IsReady());
        }
示例#4
0
        public static bool HasItem(this ItemData.Item item)
        {
            var slot = item.GetItemSlot();

            return(slot != null && slot.IsValidSlot());
        }
示例#5
0
 public static bool Cast(this ItemData.Item item, Obj_AI_Base target)
 {
     return(item._cast(target));
 }
示例#6
0
 public static bool Cast(this ItemData.Item item)
 {
     return(item._cast(ObjectManager.Player));
 }
示例#7
0
 public BetaTypedItem(ItemData.Item item, IEnumerable <ItemType> types) : base(item, types)
 {
 }
示例#8
0
 internal TypedItem(ItemData.Item item, IEnumerable <ItemType> types)
 {
     Item  = item;
     Types = types;
 }
示例#9
0
 internal static MenuItem GetItemManagerSetting(ItemData.Item item, string settingKey)
 {
     return(Menu.Item(String.Format("{0}.{1}.Settings.{2}", ITEMMANAGER_ROOT, item.Name.ToCamelCase(), settingKey)));
 }