Fixed Newest ServUO repo

Tasanar

Moderator
ServUO Developer
Oct 16, 2014
4,482
108
32
trueuo.com
Shard Name
Heritage
Donate
Donate money to this user
Your edit to server.mobile is what does it.

The None pushes out Energy.
 

Argalep

Moderator
ServUO Developer
Aug 18, 2014
815
39
32
Istanbul, Turkey
www.quingis.com
Shard Name
Quingis UO
Code:
public enum ResistanceType
    {       
                None,
        Physical,
        Fire,
        Cold,
        Poison,
        Energy,       
    }
There is a problem with the order in the list. Add to the bottom of the list. I send to PR.
 

Dexter_Lexia

Moderator
ServUO Developer
Jul 3, 2014
3,854
165
42
Shard Name
Alexandria
Donate
Donate money to this user
There needs to be a better way to implement the sphinx buffs than editing these enums. What if ea comes out with a new resistance type? Just a bad idea.
 

Argalep

Moderator
ServUO Developer
Aug 18, 2014
815
39
32
Istanbul, Turkey
www.quingis.com
Shard Name
Quingis UO
Code:
public static int GetResistanceBonus(Mobile from, ResistanceType type)
        {
            if (Fountains.Any(x => x.Mobile == from && x.attr2 == type && x.attr1 != AosAttribute.None))
            {
                return Fountains.Where(x => x.Mobile == from && x.attr2 == type).Sum(y => y.Value);
            }

            return 0;
        }

        public static int GetAosAttributeBonus(Mobile from, AosAttribute type)
        {
            if (Fountains.Any(x => x.Mobile == from && x.attr1 == type && x.attr2 != ResistanceType.Physical))
            {
                return Fountains.Where(x => x.Mobile == from && x.attr1 == type).Sum(y => y.Value);
            }

            return 0;
        }

Non-assigned null value gets its own zero value. I do not need Enum editing when I do this.