Mercurial > repos > snowblizz-super-API-ideas
diff api/Objects/Unit.cs @ 204:3ef067225dc3
Fixes #208: equipmentslot limit issues
* Construct units properly by using the UnitEquipmentUtil methods to get the actual minimum amount based on the slot limits as well
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 08 Nov 2009 20:45:45 +0000 |
parents | 4d7ff70bb109 |
children | c0edb72a10ba |
line wrap: on
line diff
--- a/api/Objects/Unit.cs Fri Nov 06 20:48:07 2009 +0000 +++ b/api/Objects/Unit.cs Sun Nov 08 20:45:45 2009 +0000 @@ -92,11 +92,11 @@ if (minLimit is IPercentageLimit) { - SetEquipmentRatio(unitEquip, ((IPercentageLimit)minLimit).Percentage); + SetEquipmentRatio(unitEquip, UnitEquipmentUtil.GetMinEquipmentPercentage(this, unitEquip)); } else { - SetEquipmentAmount(unitEquip, minLimit.GetLimit(this.Size)); + SetEquipmentAmount(unitEquip, UnitEquipmentUtil.GetMinEquipmentCount(this, unitEquip)); } } }