Upload from upload_mods.ps1
This commit is contained in:
41
Scripts/Requirements/HasBuffSDX.cs
Normal file
41
Scripts/Requirements/HasBuffSDX.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Linq;
|
||||
|
||||
public class HasBuffSDX : TargetedCompareRequirementBase
|
||||
{
|
||||
public override bool IsValid(MinEventParams _params)
|
||||
{
|
||||
if (!base.ParamsValid(_params))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!this.invert)
|
||||
{
|
||||
//Log.Out("Entity Name: " + this.target.EntityName);
|
||||
return this.target.Buffs.HasBuff(this.buffName);
|
||||
}
|
||||
return !this.target.Buffs.HasBuff(this.buffName);
|
||||
}
|
||||
|
||||
public override bool ParseXAttribute(XAttribute _attribute)
|
||||
{
|
||||
bool flag = base.ParseXAttribute(_attribute);
|
||||
if (!flag)
|
||||
{
|
||||
string name = _attribute.Name.LocalName;
|
||||
if (name != null && name == "buff")
|
||||
{
|
||||
this.buffName = _attribute.Value.ToLower();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
public override void GetInfoStrings(ref List<string> list)
|
||||
{
|
||||
list.Add(string.Format("Target does {0}have buff '{1}'", this.invert ? "NOT " : "", this.buffName));
|
||||
}
|
||||
|
||||
private string buffName;
|
||||
}
|
||||
Reference in New Issue
Block a user