Advertisement
Guest User

Untitled

a guest
May 30th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.01 KB | None | 0 0
  1.         public int GetMaximumParamValue(BaseParam baseParam) {
  2.             // Base value for the param based on the item's level
  3.             var maxBase = ItemLevel.GetMaximum(baseParam);
  4.             // Factor, in percent, for the param when applied to the item's equip slot
  5.             var slotFactor = baseParam.GetMaximum(EquipSlotCategory);
  6.             // Factor, in percent, for the param when used for the item's role
  7.             var roleModifier = baseParam.GetModifier(BaseParamModifier);
  8.  
  9.             // TODO: Not confirmed to use Round, could be Ceiling or Floor; or applied at different points
  10.             // Rounding appears to use AwayFromZero.  Tested with:
  11.             // Velveteen Work Gloves (#3601) for gathering (34.5 -> 35)
  12.             // Gryphonskin Ring (#4526) for wind resistance (4.5 -> 5)
  13.             // Fingerless Goatskin Gloves of Gathering (#3578) for GP (2.5 -> 3)
  14.             return (int)Math.Round(maxBase * slotFactor * roleModifier / 10000.0, MidpointRounding.AwayFromZero);
  15.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement