Mercurial > repos > IBDev-IBBoard.WarFoundry.API
comparison api/Objects/Unit.cs @ 125:c60fd5664698
Re #53: Create WarFoundry save class to store army as file
* Fix exceptions thrown by official .Net XML parsing of namespace names
Also:
* Remove unnecessary notification of name change
no-open-ticket
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 24 Aug 2009 21:12:18 +0000 |
parents | 52e8c3cdde10 |
children | 57f7b80757ea |
comparison
equal
deleted
inserted
replaced
124:d59aa4e46761 | 125:c60fd5664698 |
---|---|
98 } | 98 } |
99 } | 99 } |
100 | 100 |
101 private void CalcCost() | 101 private void CalcCost() |
102 { | 102 { |
103 String oldName = HasDefaultName() ? Name : null; | |
104 double oldpoints = points; | 103 double oldpoints = points; |
105 points = type.CostPerTrooper * AdditionalTroopers + type.BaseUnitCost; | 104 points = type.CostPerTrooper * AdditionalTroopers + type.BaseUnitCost; |
106 | 105 |
107 foreach (AbstractUnitEquipmentItemSelection equipSelection in equipment.Values) | 106 foreach (AbstractUnitEquipmentItemSelection equipSelection in equipment.Values) |
108 { | 107 { |
110 } | 109 } |
111 | 110 |
112 if (oldpoints!=points) | 111 if (oldpoints!=points) |
113 { | 112 { |
114 OnPointsValueChanged(oldpoints, points); | 113 OnPointsValueChanged(oldpoints, points); |
115 } | |
116 | |
117 if (oldName!=null) | |
118 { | |
119 OnNameChanged(oldName, Name); | |
120 } | 114 } |
121 } | 115 } |
122 | 116 |
123 public int AdditionalTroopers | 117 public int AdditionalTroopers |
124 { | 118 { |