public virtual bool HasRequirements(MultipleActionItemType.ActionMode act) { if (Owner != null && act.Requirements != null) { foreach (string s in act.Requirements) { //search player stats for the lavel and value string[] command = s.Split('$'); //check if its a property first PropertyInfo isproperty = GetType().GetProperty(command[0]); if (isproperty != null) { return(isproperty.GetValue(this, null).ToString() == command[1]); } else { if (Owner.GetCharStat(command[0]) < Convert.ToInt32(command[1])) { return(false); } } } } return(true); }
public override bool HasRequirements(MultipleActionItemType.ActionMode act) { if (act.Command == "reload" && Juice == Type.MaxJuice) { return(false); } return(base.HasRequirements(act)); }