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