예제 #1
0
 static Constants()
 {
     Pots = loadResource <Potion[]>(Resources.pots).ToDictionary(r => r.Id, r => r);
     foreach (var pot in Pots)
     {
         PotionIds.Add(pot.Key);
         pot.Value.Setup();
     }
 }
예제 #2
0
파일: Item.cs 프로젝트: galio094/Shinra
        public static async Task <bool> UsePotion(PotionIds itemId)
        {
            var item = InventoryManager.FilledSlots.FirstOrDefault(s => s.RawItemId == (uint)itemId);

            if (item == null || !item.CanUse())
            {
                return(false);
            }

            item.UseItem();
            await Coroutine.Wait(1000, () => !item.CanUse());

            Logging.Write(Colors.Yellow, $@"[Shinra] Using >>> {item.Name}");
            return(true);
        }
예제 #3
0
        static Constants()
        {
            Maps = new Dictionary <uint, uint>
            {
                //mapid - wall file
                { 561, 1 },
                { 562, 2 },
                { 563, 3 },
                { 564, 4 },
                { 565, 4 },
                { 593, 5 },
                { 594, 5 },
                { 595, 5 },
                { 596, 6 },
                { 597, 6 },
                { 598, 6 },
                { 599, 8 },
                { 600, 8 },
                { 601, 9 },
                { 602, 9 },
                { 603, 7 },
                { 604, 7 },
                { 605, 7 },
                { 606, 7 },
                { 607, 7 }
            };

            DeepDungeonRawIds = Maps.Keys.ToArray();



            Pots = loadResource <Potion[]>(Resources.pots).ToDictionary(r => r.Id, r => r);
            foreach (var pot in Pots)
            {
                PotionIds.Add(pot.Key);
                pot.Value.Setup();
            }
        }