EventActor.SetData C# (CSharp) Method

SetData() public method

public SetData ( Hashtable ht ) : void
ht Hashtable
return void
    public void SetData(Hashtable ht)
    {
        if(ht.ContainsKey("player")) this.isPlayer = true;
        if(ht.ContainsKey("showname")) this.showName = true;

        this.dialogName = new string[DataHolder.Languages().GetDataCount()];
        for(int i=0; i<this.dialogName.Length; i++)
        {
            this.dialogName[i] = "";
        }

        if(ht.ContainsKey(XMLHandler.NODES))
        {
            if(this.isPlayer) this.overrideName = true;
            ArrayList subs2 = ht[XMLHandler.NODES] as ArrayList;
            foreach(Hashtable ht2 in subs2)
            {
                if(ht2[XMLHandler.NODE_NAME] as string == "name")
                {
                    int id = int.Parse((string)ht2["id"]);
                    if(id < this.dialogName.Length) this.dialogName[id] = ht2[XMLHandler.CONTENT] as string;
                }
            }
        }
    }