blob: 2796d033da377f86d1916c60e9b50c48f3fd8183 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
using System;
using System.Xml;
namespace XMainClient
{
internal class AIRunTimeSetInt : AIRunTimeNodeAction
{
private string _value_name;
private int _value;
private string _store_name;
public AIRunTimeSetInt(XmlElement node) : base(node)
{
this._value_name = node.GetAttribute("Shared_ValueName");
this._value = int.Parse(node.GetAttribute("value"));
this._store_name = node.GetAttribute("Shared_StoredResultName");
}
public override bool Update(XEntity entity)
{
int intByName = entity.AI.AIData.GetIntByName(this._value_name, this._value);
entity.AI.AIData.SetIntByName(this._store_name, intByName);
return true;
}
}
}
|