Mercurial > repos > snowblizz-super-API-ideas
changeset 188:354d51cc002b
Re #198: Add equipment slots
* Pass tests
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 27 Oct 2009 20:58:10 +0000 |
parents | 104a683b5ef8 |
children | 0b413f41e6e3 |
files | api/Util/UnitEquipmentUtil.cs |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/api/Util/UnitEquipmentUtil.cs Tue Oct 27 20:53:27 2009 +0000 +++ b/api/Util/UnitEquipmentUtil.cs Tue Oct 27 20:58:10 2009 +0000 @@ -142,6 +142,11 @@ { limit = Math.Max(((IPercentageLimit)equip.MinLimit).Percentage, ((IPercentageLimit)equip.MaxLimit).Percentage); } + else + { + int unitSize = unit.Size; + limit = (equip.MaxLimit.GetLimit(unitSize) / (double)unitSize) * 100.0; + } return limit; }