예제 #1
0
        public static void SetValue(Mobile m, ExtendedWeaponAttribute att, int value, string title)
        {
            if (!EnhancementList.ContainsKey(m))
            {
                AddMobile(m);
            }

            EnhancementAttributes match = EnhancementList[m].FirstOrDefault(attrs => attrs.Title == title);

            if (match != null)
            {
                match.ExtendedWeaponAttributes[att] = value;
            }
            else
            {
                match = new EnhancementAttributes(title);
                match.ExtendedWeaponAttributes[att] = value;

                EnhancementList[m].Add(match);
            }

            m.CheckStatTimers();
            m.UpdateResistances();
            m.Delta(MobileDelta.Stat | MobileDelta.WeaponDamage | MobileDelta.Hits | MobileDelta.Stam | MobileDelta.Mana);
        }
예제 #2
0
파일: Imbuing.cs 프로젝트: Jascen/VeritasUO
        public static int[] GetPropRange(Item item, ExtendedWeaponAttribute attr)
        {
            switch (attr)
            {
            default:
            case ExtendedWeaponAttribute.Bane:
            case ExtendedWeaponAttribute.BoneBreaker: return(new int[] { 1, 1 });

            case ExtendedWeaponAttribute.HitSparks:
            case ExtendedWeaponAttribute.HitSwarm: return(new int[] { 1, 20 });
            }
        }
예제 #3
0
        public static int GetValue(Mobile m, ExtendedWeaponAttribute att)
        {
            if (m == null)
            {
                return(0);
            }

            if (EnhancementList.ContainsKey(m))
            {
                int value = 0;
                EnhancementList[m].ForEach(attrs => value += attrs.ExtendedWeaponAttributes[att]);
                return(value);
            }

            return(0);
        }
예제 #4
0
        public static int GetValue(Mobile m, ExtendedWeaponAttribute att)
        {
            if (m == null)
            {
                return(0);
            }

            if (EnhancementList.ContainsKey(m))
            {
                int value = 0;

                for (var index = 0; index < EnhancementList[m].Count; index++)
                {
                    var attrs = EnhancementList[m][index];

                    value += attrs.ExtendedWeaponAttributes[att];
                }

                return(value);
            }

            return(0);
        }
예제 #5
0
        public static void SetValue(Mobile m, ExtendedWeaponAttribute att, int value, string title)
        {
            if (!EnhancementList.ContainsKey(m))
            {
                AddMobile(m);
            }

            EnhancementAttributes match = null;

            for (var index = 0; index < EnhancementList[m].Count; index++)
            {
                var attrs = EnhancementList[m][index];

                if (attrs.Title == title)
                {
                    match = attrs;
                    break;
                }
            }

            if (match != null)
            {
                match.ExtendedWeaponAttributes[att] = value;
            }
            else
            {
                match = new EnhancementAttributes(title);
                match.ExtendedWeaponAttributes[att] = value;

                EnhancementList[m].Add(match);
            }

            m.CheckStatTimers();
            m.UpdateResistances();
            m.Delta(MobileDelta.Stat | MobileDelta.WeaponDamage | MobileDelta.Hits | MobileDelta.Stam | MobileDelta.Mana);
        }