Mercurial > repos > IBBoard.WarFoundry.API
comparison API/Commands/AbstractSetUnitEquipmentAmountCommand.cs @ 431:c8002429ab45
Re #366: Rewrite equipment handling and limits
* Remove code added for #356 and work without limiting
* Move "Calculate number taken" method to util class
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 12 Nov 2011 20:35:15 +0000 |
parents | 3c4a6403a88c |
children |
comparison
equal
deleted
inserted
replaced
430:7e95b880f9cc | 431:c8002429ab45 |
---|---|
63 /// <returns> | 63 /// <returns> |
64 /// the string representation for the old amount of the equipment item to take | 64 /// the string representation for the old amount of the equipment item to take |
65 /// </returns> | 65 /// </returns> |
66 protected string GetOldAmountString() | 66 protected string GetOldAmountString() |
67 { | 67 { |
68 return oldAmountWasRatio ? GetRatioAmountString(oldAmount, UnitEquipmentRatioSelection.CalculateNumberTaken(Unit, EquipItem, oldAmount)) : GetNumberAmountString((int)oldAmount); | 68 return oldAmountWasRatio ? GetRatioAmountString(oldAmount, UnitEquipmentUtil.CalculateEquipmentAmountTakenFromRatio(Unit, EquipItem, oldAmount)) : GetNumberAmountString((int)oldAmount); |
69 } | 69 } |
70 | 70 |
71 protected string GetNumberAmountString(int number) | 71 protected string GetNumberAmountString(int number) |
72 { | 72 { |
73 return Translation.GetTranslation("equipmentAmountNumber", "{0}", number); | 73 return Translation.GetTranslation("equipmentAmountNumber", "{0}", number); |