Upload from upload_mods.ps1
This commit is contained in:
36
Scripts/Requirements/IsWeaponAvailableRebirth.cs
Normal file
36
Scripts/Requirements/IsWeaponAvailableRebirth.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Xml.Linq;
|
||||
|
||||
public class IsWeaponAvailableRebirth : TargetedCompareRequirementBase
|
||||
{
|
||||
public override bool IsValid(MinEventParams _params)
|
||||
{
|
||||
if (!base.IsValid(_params))
|
||||
{
|
||||
//Log.Out("IsWeaponAvailableRebirth-IsValid 0");
|
||||
return false;
|
||||
}
|
||||
|
||||
return RebirthUtilities.IsWeaponAvailable(_params.Self, float.Parse(classID));
|
||||
}
|
||||
|
||||
public override bool ParseXAttribute(XAttribute _attribute)
|
||||
{
|
||||
bool flag = base.ParseXAttribute(_attribute);
|
||||
if (!flag)
|
||||
{
|
||||
string name = _attribute.Name.LocalName;
|
||||
if (name != null)
|
||||
{
|
||||
if (name == "classID")
|
||||
{
|
||||
this.classID = _attribute.Value;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
private string perkName;
|
||||
private string classID;
|
||||
}
|
||||
Reference in New Issue
Block a user