Esempio n. 1
0
 static SpellSlot GetItemSpellSlot(DzItem item)
 {
     foreach (var it in ObjectManager.Player.InventoryItems.Where(it => (int)it.Id == item.Id))
     {
         return(it.SpellSlot != SpellSlot.Unknown ? it.SpellSlot : SpellSlot.Unknown);
     }
     return(SpellSlot.Unknown);
 }
Esempio n. 2
0
        static void UseItem(Obj_AI_Base target, DzItem item)
        {
            if (!Items.HasItem(item.Id) || !Items.CanUseItem(item.Id))
            {
                return;
            }
            switch (item.Mode)
            {
            case ItemMode.Targeted:
                Items.UseItem(item.Id, target);
                break;

            case ItemMode.Skillshot:
                var customPred = Prediction.GetPrediction(item.CustomInput);
                if (customPred.Hitchance >= GetHitchance())
                {
                    Items.UseItem(item.Id, customPred.CastPosition);
                }
                break;
            }
        }
Esempio n. 3
0
 static SpellSlot GetItemSpellSlot(DzItem item)
 {
     foreach (var it in ObjectManager.Player.InventoryItems.Where(it => (int)it.Id == item.Id))
     {
         return it.SpellSlot != SpellSlot.Unknown ? it.SpellSlot : SpellSlot.Unknown;
     }
     return SpellSlot.Unknown;
 }
Esempio n. 4
0
 static void UseItem(Obj_AI_Base target, DzItem item)
 {
     if (!Items.HasItem(item.Id) || !Items.CanUseItem(item.Id))
     {
         return;
     }
     switch (item.Mode)
     {
         case ItemMode.Targeted:
             Items.UseItem(item.Id, target);
             break;
         case ItemMode.Skillshot:
             var customPred = Prediction.GetPrediction(item.CustomInput);
             if (customPred.Hitchance >= GetHitchance())
             {
                 Items.UseItem(item.Id, customPred.CastPosition);
             }
             break;
     }
 }