Mercurial > repos > IBBoard.WarFoundry.API
diff api/Objects/UnitType.cs @ 181:8c6f55d289b0
Fixes #200: Stats names should be case-insensitive
* ToLower() all stat names/IDs so that they are case-insensitive
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 24 Oct 2009 15:18:00 +0000 |
parents | 22429737cd77 |
children | a54da5a8b5bb |
line wrap: on
line diff
--- a/api/Objects/UnitType.cs Sat Oct 24 15:16:35 2009 +0000 +++ b/api/Objects/UnitType.cs Sat Oct 24 15:18:00 2009 +0000 @@ -213,7 +213,7 @@ get { Stat[] extendedStats = new Stat[stats.StatCount+1]; - extendedStats[0] = new Stat(new StatSlot("Name"), Name); + extendedStats[0] = new Stat(new StatSlot("name"), Name); stats.StatsArray.CopyTo(extendedStats, 1); return extendedStats; } @@ -226,7 +226,7 @@ public string GetStatValue(string statName) { - return stats.GetStatValue(statName); + return stats.GetStatValue(statName.ToLower()); } internal void AddEquipmentItem(UnitEquipmentItem item)