public void SetData(Hashtable ht)
{
if(ht.ContainsKey("timefactor"))
{
this.timeFactor = float.Parse((string)ht["timefactor"]);
}
if(ht.ContainsKey("movementfactor"))
{
this.movementFactor = float.Parse((string)ht["movementfactor"]);
}
if(ht.ContainsKey("battlefactor"))
{
this.battleFactor = float.Parse((string)ht["battlefactor"]);
}
if(ht.ContainsKey("animationfactor"))
{
this.animationFactor = float.Parse((string)ht["animationfactor"]);
}
if(ht.ContainsKey(XMLHandler.NODES))
{
ArrayList s = ht[XMLHandler.NODES] as ArrayList;
foreach(Hashtable ht2 in s)
{
if(ht2[XMLHandler.NODE_NAME] as string == Difficulty.STATUSMULTIPLIER)
{
int id = int.Parse((string)ht2["id"]);
if(id < this.statusMultiplier.Length) this.statusMultiplier[id] = float.Parse((string)ht2["value"]);
}
else if(ht2[XMLHandler.NODE_NAME] as string == Difficulty.ELEMENTMULTIPLIER)
{
int id = int.Parse((string)ht2["id"]);
if(id < this.elementMultiplier.Length) this.elementMultiplier[id] = float.Parse((string)ht2["value"]);
}
else if(ht2[XMLHandler.NODE_NAME] as string == Difficulty.RACEMULTIPLIER)
{
int id = int.Parse((string)ht2["id"]);
if(id < this.raceMultiplier.Length) this.raceMultiplier[id] = float.Parse((string)ht2["value"]);
}
else if(ht2[XMLHandler.NODE_NAME] as string == Difficulty.SIZEMULTIPLIER)
{
int id = int.Parse((string)ht2["id"]);
if(id < this.sizeMultiplier.Length) this.sizeMultiplier[id] = float.Parse((string)ht2["value"]);
}
}
}
}