public bool CanEquip() { if (ItemSubType == "" || !Conditions.InGameAndConnectedAndProductStartedNotInPause || (!ItemSkillsDictionary.ContainsKey(ItemSubType) && ItemSubType != "Miscellaneous")) { return(false); } bool skillCheckOK = ItemSubType == "Miscellaneous" || WAECharacterSheet.MySkills.ContainsKey(ItemSubType) && WAECharacterSheet.MySkills[ItemSubType] > 0 || ItemSubType == "Fist Weapons" && Skill.Has(SkillLine.FistWeapons); return(ObjectManager.Me.Level >= ItemMinLevel && skillCheckOK && GetNbEquipAttempts() < _maxNbEquipAttempts); }
private static bool WeaponIsIdeal(WAEItem weapon) { if (weapon == null || !ItemSkillsDictionary.ContainsKey(weapon.ItemSubType)) { return(false); } if (ClassSpec == ClassSpec.RogueAssassination && ItemSkillsDictionary[weapon.ItemSubType] != SkillLine.Daggers) { return(false); } if ((ClassSpec == ClassSpec.WarriorArms && KnowTitansGrip) && (ItemSkillsDictionary[weapon.ItemSubType] == SkillLine.TwoHandedSwords || ItemSkillsDictionary[weapon.ItemSubType] == SkillLine.TwoHandedAxes || ItemSkillsDictionary[weapon.ItemSubType] == SkillLine.TwoHandedMaces)) { return(true); } if (AutoEquipSettings.CurrentSettings.EquipShields && ItemSkillsDictionary[weapon.ItemSubType] == SkillLine.Shield) { return(true); } if (AutoEquipSettings.CurrentSettings.EquipTwoHanders && TwoHanders.Contains(ItemSkillsDictionary[weapon.ItemSubType])) { return(true); } if (AutoEquipSettings.CurrentSettings.EquipOneHanders && ItemSkillsDictionary[weapon.ItemSubType] != SkillLine.Shield && OneHanders.Contains(ItemSkillsDictionary[weapon.ItemSubType])) { return(true); } return(false); }