Beispiel #1
0
 public VMRuntimeHeadline(VMRuntimeHeadlineMarshal input, VMContext context)
 {
     Operand = input.Operand;
     Target = context.VM.GetObjectById(input.Target);
     IconTarget = context.VM.GetObjectById(input.IconTarget);
     Index = input.Index;
     Duration = input.Duration;
     Anim = input.Anim;
 }
Beispiel #2
0
 public VMRuntimeHeadlineMarshal Save()
 {
     var result = new VMRuntimeHeadlineMarshal();
     result.Operand = Operand;
     result.Target = (Target == null) ? (short)0 : Target.ObjectID;
     result.IconTarget = (IconTarget == null) ? (short)0 : IconTarget.ObjectID;
     result.Index = Index;
     result.Duration = Duration;
     result.Anim = Anim;
     return result;
 }
Beispiel #3
0
        public virtual void Deserialize(BinaryReader reader)
        {
            ObjectID = reader.ReadInt16();
            PersistID = reader.ReadUInt32();

            if (this is VMGameObjectMarshal) PlatformState = new VMTSOObjectState();
            else PlatformState = new VMTSOAvatarState();

            PlatformState.Deserialize(reader);

            var datas = reader.ReadInt32();
            ObjectData = new short[datas];
            for (int i = 0; i < datas; i++) ObjectData[i] = reader.ReadInt16();

            var listLen = reader.ReadInt32();
            MyList = new short[listLen];
            for (int i = 0; i < listLen; i++) MyList[i] = reader.ReadInt16();

            if (reader.ReadBoolean())
            {
                Headline = new VMRuntimeHeadlineMarshal();
                Headline.Deserialize(reader);
            }

            GUID = reader.ReadUInt32();
            MasterGUID = reader.ReadUInt32();

            MainParam = reader.ReadInt16();
            MainStackOBJ = reader.ReadInt16();

            var contN = reader.ReadInt32();
            Contained = new short[contN];
            for (int i = 0; i < contN; i++) Contained[i] = reader.ReadInt16();
            Container = reader.ReadInt16();
            ContainerSlot = reader.ReadInt16();

            var attrN = reader.ReadInt32();
            Attributes = new short[attrN];
            for (int i = 0; i < attrN; i++) Attributes[i] = reader.ReadInt16();

            var relN = reader.ReadInt32();
            MeToObject = new VMEntityRelationshipMarshal[relN];
            for (int i = 0; i < relN; i++) {
                MeToObject[i] = new VMEntityRelationshipMarshal();
                MeToObject[i].Deserialize(reader);
            }

            DynamicSpriteFlags = reader.ReadUInt64();
            if (Version > 2) DynamicSpriteFlags2 = reader.ReadUInt64();
            Position = new LotTilePos();
            Position.Deserialize(reader);
        }
Beispiel #4
0
        public virtual void Deserialize(BinaryReader reader)
        {
            ObjectID  = reader.ReadInt16();
            PersistID = reader.ReadUInt32();

            if (this is VMGameObjectMarshal)
            {
                PlatformState = new VMTSOObjectState(Version);
            }
            else
            {
                PlatformState = new VMTSOAvatarState(Version);
            }

            PlatformState.Deserialize(reader);

            var datas = reader.ReadInt32();

            ObjectData = new short[datas];
            for (int i = 0; i < datas; i++)
            {
                ObjectData[i] = reader.ReadInt16();
            }

            var listLen = reader.ReadInt32();

            MyList = new short[listLen];
            for (int i = 0; i < listLen; i++)
            {
                MyList[i] = reader.ReadInt16();
            }

            if (reader.ReadBoolean())
            {
                Headline = new VMRuntimeHeadlineMarshal();
                Headline.Deserialize(reader);
            }

            GUID       = reader.ReadUInt32();
            MasterGUID = reader.ReadUInt32();

            MainParam    = reader.ReadInt16();
            MainStackOBJ = reader.ReadInt16();

            var contN = reader.ReadInt32();

            Contained = new short[contN];
            for (int i = 0; i < contN; i++)
            {
                Contained[i] = reader.ReadInt16();
            }
            Container     = reader.ReadInt16();
            ContainerSlot = reader.ReadInt16();

            var attrN = reader.ReadInt32();

            Attributes = new short[attrN];
            for (int i = 0; i < attrN; i++)
            {
                Attributes[i] = reader.ReadInt16();
            }

            var relN = reader.ReadInt32();

            MeToObject = new VMEntityRelationshipMarshal[relN];
            for (int i = 0; i < relN; i++)
            {
                MeToObject[i] = new VMEntityRelationshipMarshal();
                MeToObject[i].Deserialize(reader);
            }

            if (Version > 7)
            {
                var prelN = reader.ReadInt32();
                MeToPersist = new VMEntityPersistRelationshipMarshal[prelN];
                for (int i = 0; i < prelN; i++)
                {
                    MeToPersist[i] = new VMEntityPersistRelationshipMarshal();
                    MeToPersist[i].Deserialize(reader);
                }
            }
            else
            {
                MeToPersist = new VMEntityPersistRelationshipMarshal[0];
            }

            DynamicSpriteFlags = reader.ReadUInt64();
            if (Version > 2)
            {
                DynamicSpriteFlags2 = reader.ReadUInt64();
            }
            Position = new LotTilePos();
            Position.Deserialize(reader);

            if (Version > 16)
            {
                TimestampLockoutCount = reader.ReadUInt32();
            }

            if (Version > 19)
            {
                LightColor = new Color(reader.ReadUInt32());
            }
        }
Beispiel #5
0
        public virtual void Deserialize(BinaryReader reader)
        {
            ObjectID  = reader.ReadInt16();
            PersistID = reader.ReadUInt32();

            var datas = reader.ReadInt32();

            ObjectData = new short[datas];
            for (int i = 0; i < datas; i++)
            {
                ObjectData[i] = reader.ReadInt16();
            }

            var listLen = reader.ReadInt32();

            MyList = new short[listLen];
            for (int i = 0; i < listLen; i++)
            {
                MyList[i] = reader.ReadInt16();
            }

            if (reader.ReadBoolean())
            {
                Headline = new VMRuntimeHeadlineMarshal();
                Headline.Deserialize(reader);
            }

            GUID       = reader.ReadUInt32();
            MasterGUID = reader.ReadUInt32();

            MainParam    = reader.ReadInt16();
            MainStackOBJ = reader.ReadInt16();

            var contN = reader.ReadInt32();

            Contained = new short[contN];
            for (int i = 0; i < contN; i++)
            {
                Contained[i] = reader.ReadInt16();
            }
            Container     = reader.ReadInt16();
            ContainerSlot = reader.ReadInt16();

            var attrN = reader.ReadInt32();

            Attributes = new short[attrN];
            for (int i = 0; i < attrN; i++)
            {
                Attributes[i] = reader.ReadInt16();
            }

            var relN = reader.ReadInt32();

            MeToObject = new VMEntityRelationshipMarshal[relN];
            for (int i = 0; i < relN; i++)
            {
                MeToObject[i] = new VMEntityRelationshipMarshal();
                MeToObject[i].Deserialize(reader);
            }

            DynamicSpriteFlags = reader.ReadUInt32();
            Position           = new LotTilePos();
            Position.Deserialize(reader);
        }