1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Newest ServUO repo

Discussion in 'Archived Bug Reports' started by Tasanar, Mar 27, 2018.

  1. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,446
    Likes Received:
    96
    @argalep

    umm.PNG

    Getting a lot of reports that players energy resists are at 0 after applying newest repo?
     
  2. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,446
    Likes Received:
    96
    Your edit to server.mobile is what does it.

    The None pushes out Energy.
     
  3. argalep
    Offline

    ServUO Developer

    Joined:
    Aug 18, 2014
    Messages:
    813
    Likes Received:
    37
    Code (C#):
    1. public enum ResistanceType
    2.     {      
    3.                 None,
    4.         Physical,
    5.         Fire,
    6.         Cold,
    7.         Poison,
    8.         Energy,      
    9.     }
    There is a problem with the order in the list. Add to the bottom of the list. I send to PR.
     
  4. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,446
    Likes Received:
    96
    Yeah that makes more sense.

    The problem now is there are conflicts since @Dexter_Lexia reverted the last two PRs.
     
  5. Dexter_Lexia
    Offline

    Moderator ServUO Developer

    Joined:
    Jul 3, 2014
    Messages:
    3,795
    Likes Received:
    146
    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.
     
  6. argalep
    Offline

    ServUO Developer

    Joined:
    Aug 18, 2014
    Messages:
    813
    Likes Received:
    37
    Code (C#):
    1. public static int GetResistanceBonus(Mobile from, ResistanceType type)
    2.         {
    3.             if (Fountains.Any(x => x.Mobile == from && x.attr2 == type && x.attr1 != AosAttribute.None))
    4.             {
    5.                 return Fountains.Where(x => x.Mobile == from && x.attr2 == type).Sum(y => y.Value);
    6.             }
    7.  
    8.             return 0;
    9.         }
    10.  
    11.         public static int GetAosAttributeBonus(Mobile from, AosAttribute type)
    12.         {
    13.             if (Fountains.Any(x => x.Mobile == from && x.attr1 == type && x.attr2 != ResistanceType.Physical))
    14.             {
    15.                 return Fountains.Where(x => x.Mobile == from && x.attr1 == type).Sum(y => y.Value);
    16.             }
    17.  
    18.             return 0;
    19.         }

    Non-assigned null value gets its own zero value. I do not need Enum editing when I do this.
     
Similar Threads: Newest ServUO
Forum Title Date
Archived Bug Reports Newest ServUO Crash 8/31/2018 Aug 31, 2018
ServUO Discussion delta-recursion |What is it and why? Newest ServUO SVN Feb 4, 2018
Custom Releases Graverobbing (updated for newest ServUO) Nov 6, 2017
Archived Bug Reports ServUO newest SVN crash - this may have been around for a little - 23 DEC 2016 Dec 23, 2016
ServUO Discussion Newest Classic Client- tons of enhancements Oct 30, 2018
Archived Bug Reports Big error somewhere with newest code Oct 6, 2018
Archived Bug Reports Newest repo slightly broke CC runebooks Sep 30, 2018