Esempio n. 1
0
        public static Value MyGear()
        {
            Dictionary <String, int> dic = new Dictionary <string, int>(StringComparer.InvariantCultureIgnoreCase);

            GItem[] items = GObjectList.GetEquippedItems();

            foreach (GItem item in items)
            {
                dic.Add(item.Name, 1);
            }
            return(new Value(dic));
        }
Esempio n. 2
0
        public static Value MyDurability()
        {
            float worst = 1.0f;

            GItem[] items = GObjectList.GetEquippedItems();

            foreach (GItem item in items)
            {
                if (item.DurabilityMax > 0)
                {
                    float dur = (float)item.Durability;
                    if (dur < worst)
                    {
                        worst = dur;
                    }
                }
            }

            return(new Value(worst));
        }