コード例 #1
0
        public override void Initialise(EntityModel model)
        {
            base.Initialise(model);

            SetStat(Stat.StandState, StandState.State0);  // Closed on spawn
            SetProperty(Property.BaseHealth, 101f, 101f); // Sniffs showed all doors had 101hp for me.
        }
コード例 #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
ファイル: EntityCache.cs プロジェクト: zeaf/NexusForever
        /// <summary>
        /// Add <see cref="EntityModel"/> to be spawned when parent <see cref="MapGrid"/> is activated.
        /// </summary>
        public void AddEntity(EntityModel model)
        {
            var vector = new Vector3(model.X, model.Y, model.Z);

            (uint gridX, uint gridZ) = MapGrid.GetGridCoord(vector);

            ushort hash = GetGridHash(gridX, gridZ);

            if (!entities.ContainsKey(hash))
            {
                entities.Add(hash, new HashSet <EntityModel>());
            }

            entities[hash].Add(model);
        }
コード例 #4
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));
        }
コード例 #5
0
ファイル: Simple.cs プロジェクト: zadialtex/NexusForever
 public void Initialise(EntityModel model)
 {
     CreatureId = model.Creature;
     Rotation   = new Vector3(model.Rx, model.Ry, model.Rz);
 }
コード例 #6
0
 public override void Initialise(EntityModel model)
 {
     base.Initialise(model);
     CreatureId        = model.Creature;
     QuestChecklistIdx = model.QuestChecklistIdx;
 }
コード例 #7
0
ファイル: Mailbox.cs プロジェクト: zeaf/NexusForever
 public override void Initialise(EntityModel model)
 {
     base.Initialise(model);
     CreatureId = model.Creature;
 }