/// <summary> /// Returns the armor + clothing for a body part /// </summary> public List <WorldObject> GetArmorClothing(Creature creature, BodyPart bodyPart) { var bodyLocation = BodyParts.GetFlags(BodyParts.GetEquipMask(bodyPart)); var equipped = creature.EquippedObjects.Values.Where(e => e is Clothing && BodyParts.HasAny(e.CurrentWieldedLocation, bodyLocation)).ToList(); return(equipped); }
/// <summary> /// Returns the creature armor for a body part /// </summary> public List <WorldObject> GetArmor(BodyPart bodyPart) { var target = AttackTarget as Creature; //Console.WriteLine("BodyPart: " + bodyPart); //Console.WriteLine("==="); var bodyLocation = BodyParts.GetFlags(BodyParts.GetEquipMask(bodyPart)); var equipped = target.EquippedObjects.Values.Where(e => e is Clothing && BodyParts.HasAny(e.CurrentWieldedLocation, bodyLocation)).ToList(); return(equipped); }