Ejemplo n.º 1
0
        private void BuildCreature(Creature creature)
        {
            CreatureProfile = new CreatureProfile(creature, Success);

            // only creatures?
            ResistHighlight = ResistMaskHelper.GetHighlightMask(creature);
            ResistColor     = ResistMaskHelper.GetColorMask(creature);

            if (Success && (creature is Player || !creature.Attackable))
            {
                ArmorLevels = new ArmorLevel(creature);
            }

            AddRatings(creature);

            if (NPCLooksLikeObject)
            {
                var weenie = creature.Weenie ?? DatabaseManager.World.GetCachedWeenie(creature.WeenieClassId);

                if (!weenie.GetProperty(PropertyInt.EncumbranceVal).HasValue)
                {
                    PropertiesInt.Remove(PropertyInt.EncumbranceVal);
                }
            }
            else
            {
                PropertiesInt.Remove(PropertyInt.EncumbranceVal);
            }

            // see notes in CombatPet.Init()
            if (creature is CombatPet && PropertiesInt.ContainsKey(PropertyInt.Faction1Bits))
            {
                PropertiesInt.Remove(PropertyInt.Faction1Bits);
            }
        }
Ejemplo n.º 2
0
        private void BuildCreature(Creature creature)
        {
            CreatureProfile = new CreatureProfile(creature, Success);

            // only creatures?
            ResistHighlight = ResistMaskHelper.GetHighlightMask(creature);
            ResistColor     = ResistMaskHelper.GetColorMask(creature);

            if (Success && (creature is Player || !creature.Attackable))
            {
                ArmorLevels = new ArmorLevel(creature);
            }

            AddRatings(creature);

            if (PropertiesInt.ContainsKey(PropertyInt.EncumbranceVal))
            {
                PropertiesInt.Remove(PropertyInt.EncumbranceVal);
            }

            // see notes in CombatPet.Init()
            if (creature is CombatPet && PropertiesInt.ContainsKey(PropertyInt.Faction1Bits))
            {
                PropertiesInt.Remove(PropertyInt.Faction1Bits);
            }
        }
Ejemplo n.º 3
0
        private void BuildCreature(Creature creature)
        {
            CreatureProfile = new CreatureProfile(creature);

            // only creatures?
            ResistHighlight = ResistMaskHelper.GetHighlightMask(creature);
            ResistColor     = ResistMaskHelper.GetColorMask(creature);

            ArmorLevels = new ArmorLevel(creature);
        }
Ejemplo n.º 4
0
 public static void Write(this BinaryWriter writer, ArmorLevel armorLevel)
 {
     writer.Write(armorLevel.Head);
     writer.Write(armorLevel.Chest);
     writer.Write(armorLevel.Abdomen);
     writer.Write(armorLevel.UpperArm);
     writer.Write(armorLevel.LowerArm);
     writer.Write(armorLevel.Hand);
     writer.Write(armorLevel.UpperLeg);
     writer.Write(armorLevel.LowerLeg);
     writer.Write(armorLevel.Foot);
 }
Ejemplo n.º 5
0
        private void BuildCreature(Creature creature)
        {
            CreatureProfile = new CreatureProfile(creature, Success);

            // only creatures?
            ResistHighlight = ResistMaskHelper.GetHighlightMask(creature);
            ResistColor     = ResistMaskHelper.GetColorMask(creature);

            ArmorLevels = new ArmorLevel(creature);

            AddRatings(creature);

            if (PropertiesInt.ContainsKey(PropertyInt.EncumbranceVal))
            {
                PropertiesInt.Remove(PropertyInt.EncumbranceVal);
            }
        }