Mercurial > repos > snowblizz-super-API-ideas
changeset 91:571d8ddc7d9a
Fixes #111: "Replace Weapon" button doesn't always enable
* Change default ID to use name plus timestamp rather than fixed string plus timestamp - should hopefully be more unique
Also:
* Code cleanup (line endings) in XML race factory
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Fri, 07 Aug 2009 19:22:08 +0000 |
parents | bd2aaa9a61df |
children | 729d9e54162c |
files | api/Factories/Xml/WarFoundryXmlRaceFactory.cs api/Objects/WarFoundryObject.cs |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/api/Factories/Xml/WarFoundryXmlRaceFactory.cs Sat Aug 01 21:40:53 2009 +0000 +++ b/api/Factories/Xml/WarFoundryXmlRaceFactory.cs Fri Aug 07 19:22:08 2009 +0000 @@ -171,7 +171,7 @@ } try - { + { unitEquipItem.MinNumber = int.Parse(equip.GetAttribute("minNum")); } catch (FormatException e) @@ -180,7 +180,7 @@ } try - { + { unitEquipItem.MaxNumber = int.Parse(equip.GetAttribute("maxNum")); } catch (FormatException e) @@ -189,7 +189,7 @@ } try - { + { unitEquipItem.MinPercentage = double.Parse(equip.GetAttribute("minPercentage")); } catch (FormatException e) @@ -198,7 +198,7 @@ } try - { + { unitEquipItem.MaxPercentage = double.Parse(equip.GetAttribute("maxPercentage")); } catch (FormatException e) @@ -207,7 +207,7 @@ } try - { + { unitEquipItem.CostMultiplier = double.Parse(equip.GetAttribute("costMultiplier")); } catch (FormatException e)
--- a/api/Objects/WarFoundryObject.cs Sat Aug 01 21:40:53 2009 +0000 +++ b/api/Objects/WarFoundryObject.cs Fri Aug 07 19:22:08 2009 +0000 @@ -90,7 +90,7 @@ protected string GenerateID() { - return "ID" + UnixTimestamp.GetTimestamp(DateTime.Now) + "." + DateTime.Now.Millisecond; + return Name + UnixTimestamp.GetTimestamp(DateTime.Now) + "." + DateTime.Now.Millisecond; } } }