Exemplo n.º 1
0
        public List <WorldObject> GetArmorLayers(CombatBodyPart bodyPart)
        {
            var coverageMask = BodyParts.GetCoverageMask(bodyPart);

            var equipped = Creature.EquippedObjects.Values.Where(e => e is Clothing && (e.ClothingPriority & coverageMask) != 0).ToList();

            return(equipped);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returns the armor + clothing for a body part
        /// </summary>
        public List<WorldObject> GetArmorClothing(Creature creature, BodyPart bodyPart)
        {
            var bodyLocation = BodyParts.GetFlags(BodyParts.GetCoverageMask(bodyPart));

            var equipped = creature.EquippedObjects.Values.Where(e => e is Clothing && BodyParts.HasAny(e.ClothingPriority, bodyLocation)).ToList();

            return equipped;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Returns the creature armor for a body part
        /// </summary>
        public List <WorldObject> GetArmorLayers(Player target, BodyPart bodyPart)
        {
            //Console.WriteLine("BodyPart: " + bodyPart);
            //Console.WriteLine("===");

            var coverageMask = BodyParts.GetCoverageMask(bodyPart);

            var equipped = target.EquippedObjects.Values.Where(e => e is Clothing && (e.ClothingPriority & coverageMask) != 0).ToList();

            return(equipped);
        }