示例#1
0
        public NonPlayer(Database.World.Model.Entity entity)
            : base(EntityType.NonPlayer)
        {
            CreatureId  = entity.Creature;
            DisplayInfo = entity.DisplayInfo;
            OutfitInfo  = entity.OutfitInfo;
            Faction1    = (Faction)entity.Faction1;
            Faction2    = (Faction)entity.Faction2;
            Rotation    = new Vector3(entity.Rx, entity.Ry, entity.Rz);

            if (EntityManager.VendorInfo.TryGetValue(entity.Id, out VendorInfo vendorInfo))
            {
                VendorInfo = vendorInfo;
            }

            CalculateProperties();

            // temp shit
            Stats.Add(Stat.Health, new StatValue(Stat.Health, 800));
            Stats.Add(Stat.Level, new StatValue(Stat.Level, 1));
            Stats.Add((Stat)15, new StatValue((Stat)15, 1));
            Stats.Add((Stat)20, new StatValue((Stat)20, 1));
            Stats.Add((Stat)21, new StatValue((Stat)21, 1));
            Stats.Add((Stat)22, new StatValue((Stat)22, 1));
        }
示例#2
0
        public override void Initialise(EntityModel model)
        {
            base.Initialise(model);

            if (model.EntityVendor != null)
            {
                CreateFlags |= EntityCreateFlag.Vendor;
                VendorInfo   = new VendorInfo(model);
            }

            CalculateProperties();
        }
示例#3
0
        public void Initialise(EntityModel model)
        {
            CreatureId  = model.Creature;
            DisplayInfo = model.DisplayInfo;
            OutfitInfo  = model.OutfitInfo;
            Faction1    = (Faction)model.Faction1;
            Faction2    = (Faction)model.Faction2;
            Rotation    = new Vector3(model.Rx, model.Ry, model.Rz);

            if (EntityManager.VendorInfo.TryGetValue(model.Id, out VendorInfo vendorInfo))
            {
                VendorInfo = vendorInfo;
            }

            CalculateProperties();

            // temp shit
            Stats.Add(Stat.Health, new StatValue(Stat.Health, 800));
            Stats.Add(Stat.Level, new StatValue(Stat.Level, 1));
            Stats.Add((Stat)15, new StatValue((Stat)15, 1));
            Stats.Add((Stat)20, new StatValue((Stat)20, 1));
            Stats.Add((Stat)21, new StatValue((Stat)21, 1));
            Stats.Add((Stat)22, new StatValue((Stat)22, 1));
        }