From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/AI/AIRuntimeAddBuff.cs | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/AI/AIRuntimeAddBuff.cs (limited to 'Client/Assets/Scripts/XMainClient/AI/AIRuntimeAddBuff.cs') diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRuntimeAddBuff.cs b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeAddBuff.cs new file mode 100644 index 00000000..011876af --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/AI/AIRuntimeAddBuff.cs @@ -0,0 +1,39 @@ +using System; +using System.Xml; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class AIRuntimeAddBuff : AIRunTimeNodeAction + { + private int BuffId; + + private int BuffId2; + + private string BuffIdName; + + private string BuffId2Name; + + private int MonsterId; + + private string MonsterIdName; + + public AIRuntimeAddBuff(XmlElement node) : base(node) + { + this.BuffId = int.Parse(node.GetAttribute("Shared_BuffIdmValue")); + this.BuffId2 = int.Parse(node.GetAttribute("Shared_BuffId2mValue")); + this.BuffIdName = node.GetAttribute("Shared_BuffIdName"); + this.BuffId2Name = node.GetAttribute("Shared_BuffId2Name"); + this.MonsterId = int.Parse(node.GetAttribute("Shared_MonsterIdmValue")); + this.MonsterIdName = node.GetAttribute("Shared_MonsterIdName"); + } + + public override bool Update(XEntity entity) + { + int intByName = entity.AI.AIData.GetIntByName(this.MonsterIdName, this.MonsterId); + int intByName2 = entity.AI.AIData.GetIntByName(this.BuffIdName, this.BuffId); + int intByName3 = entity.AI.AIData.GetIntByName(this.BuffId2Name, this.BuffId2); + return XSingleton.singleton.AddBuff(intByName, intByName2, intByName3); + } + } +} -- cgit v1.1-26-g67d0