Пример #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        public Ngbh(Interfaces.IProviderRegistry provider) : base()
        {
            this.provider = provider;


            this.id = new byte []
            {
                (byte)'H',
                (byte)'B',
                (byte)'G',
                (byte)'N'
            };

            this.Version = NgbhVersion.University;

            this.header = new byte []
            {
                0, 0, 0, 0,
                0x80, 0x00, 0x00, 0x00,
                0x80, 0x00, 0x00, 0x00
            };
            zonename = Helper.ToBytes("temperate", 9);
            zero     = new byte[0x10];
            preitems = new NgbhSlotList[0x02];
            for (int i = 0; i < preitems.Length; i++)
            {
                preitems[i] = new NgbhSlotList(this);
            }

            slota = new Collections.NgbhSlots(this, Data.NeighborhoodSlots.Lots);
            slotb = new Collections.NgbhSlots(this, Data.NeighborhoodSlots.Families);
            slotc = new Collections.NgbhSlots(this, Data.NeighborhoodSlots.Sims);
        }
Пример #2
0
        public NgbhItem Clone(Ngbh parent, NgbhSlotList parentslot)
        {
            NgbhItem ret = new NgbhItem(parentslot);

            ret.guid   = this.guid;
            ret.data   = this.data.Clone() as ushort[];
            ret.flags  = this.flags;
            ret.flags2 = this.flags2;
            ret.parent = parent;
            ret.invnr  = this.invnr;
            return(ret);
        }
Пример #3
0
        internal NgbhItem(NgbhSlotList parentslot, SimMemoryType type)
        {
            this.parentslot = parentslot;
            this.parent     = parentslot.Parent;
            data            = new ushort[0];
            flags           = new NgbhItemFlags();
            objd            = null;

            if (type == SimMemoryType.Aspiration || type == SimMemoryType.Skill || type == SimMemoryType.ValueToken || type == SimMemoryType.Badge)
            {
                Flags.IsVisible   = false;
                Flags.IsControler = true;
                data = new ushort[2];
            }
            else if (type == SimMemoryType.Token)
            {
                Flags.IsVisible   = false;
                Flags.IsControler = true;
            }
            else if (type == SimMemoryType.Object)
            {
                Flags.IsVisible   = false;
                Flags.IsControler = true;
                data = new ushort[3];
            }
            else if (type == SimMemoryType.Gossip || type == SimMemoryType.Memory)
            {
                PutValue(0x01, 0x07CD);
                PutValue(0x02, 0x0006);
                PutValue(0x0B, 0);
                Flags.IsVisible   = true;
                Flags.IsControler = false;
                if (type == SimMemoryType.Gossip)
                {
                    this.SimInstance = 1;
                }
            }
            else if (type == SimMemoryType.GossipInventory || type == SimMemoryType.Inventory)
            {
                Flags.IsVisible   = true;
                Flags.IsControler = true;

                if (type == SimMemoryType.GossipInventory)
                {
                    data = new ushort[8];
                    PutValue(0x01, 0x0);
                }

                this.InventoryNumber = this.ParentSlot.GetNextInventoryNumber();
            }

            //SetGuidForType(type);
        }
Пример #4
0
 public NgbhItem Clone(NgbhSlotList parentslot)
 {
     return(Clone(this.parent, parentslot));
 }
Пример #5
0
 internal NgbhItem(NgbhSlotList parentslot) : this(parentslot, SimMemoryType.Memory)
 {
 }