Beispiel #1
0
 public override void Parse(GameBitBuffer buffer)
 {
     ActorID = buffer.ReadUInt(32);
     ActorSNOId = buffer.ReadInt(32);
     Field2 = buffer.ReadInt(6);
     Field3 = buffer.ReadInt(2) + (-1);
     if (buffer.ReadBool())
     {
         WorldLocation = new WorldLocationMessageData();
         WorldLocation.Parse(buffer);
     }
     if (buffer.ReadBool())
     {
         InventoryLocation = new InventoryLocationMessageData();
         InventoryLocation.Parse(buffer);
     }
     GBHandle = new GBHandle();
     GBHandle.Parse(buffer);
     Field7 = buffer.ReadInt(32);
     NameSNOId = buffer.ReadInt(32);
     Quality = buffer.ReadInt(4) + (-1);
     Field10 = (byte)buffer.ReadInt(8);
     if (buffer.ReadBool())
     {
         Field11 = buffer.ReadInt(32);
     }
     if (buffer.ReadBool())
     {
         MarkerSetSNO = buffer.ReadInt(32);
     }
     if (buffer.ReadBool())
     {
         MarkerSetIndex = buffer.ReadInt(32);
     }
 }
Beispiel #2
0
 public override void Parse(GameBitBuffer buffer)
 {
     ActorID = buffer.ReadUInt(32);
     ActorSNO = buffer.ReadInt(32);
     Field2 = buffer.ReadInt(5);
     Field3 = buffer.ReadInt(2) + (-1);
     if (buffer.ReadBool())
     {
         WorldLocation = new WorldLocationMessageData();
         WorldLocation.Parse(buffer);
     }
     if (buffer.ReadBool())
     {
         InventoryLocation = new InventoryLocationMessageData();
         InventoryLocation.Parse(buffer);
     }
     GBHandle = new GBHandle();
     GBHandle.Parse(buffer);
     Field7 = buffer.ReadInt(32);
     Field8 = buffer.ReadInt(32);
     Field9 = buffer.ReadInt(4) + (-1);
     Field10 = (byte)buffer.ReadInt(8);
     if (buffer.ReadBool())
     {
         Field11 = buffer.ReadInt(32);
     }
     if (buffer.ReadBool())
     {
         Field12 = buffer.ReadInt(32);
     }
     if (buffer.ReadBool())
     {
         Field13 = buffer.ReadInt(32);
     }
 }
Beispiel #3
0
 public override void Parse(GameBitBuffer buffer)
 {
     Field0 = buffer.ReadInt(32);
     Field1 = buffer.ReadInt(32);
     Field2 = buffer.ReadInt(5);
     Field3 = buffer.ReadInt(2) + (-1);
     if (buffer.ReadBool())
     {
         Field4 = new WorldLocationMessageData();
         Field4.Parse(buffer);
     }
     if (buffer.ReadBool())
     {
         Field5 = new InventoryLocationMessageData();
         Field5.Parse(buffer);
     }
     Field6 = new GBHandle();
     Field6.Parse(buffer);
     Field7 = buffer.ReadInt(32);
     Field8 = buffer.ReadInt(32);
     Field9 = buffer.ReadInt(4) + (-1);
     Field10 = (byte)buffer.ReadInt(8);
     if (buffer.ReadBool())
     {
         Field11 = buffer.ReadInt(32);
     }
     if (buffer.ReadBool())
     {
         Field12 = buffer.ReadInt(32);
     }
     if (buffer.ReadBool())
     {
         Field13 = buffer.ReadInt(32);
     }
 }
Beispiel #4
0
        public bool ParseFrom(int worldId, string line)
        {
            var data = line.Split(' ');

            if (int.Parse(data[2]) == 0) return false; //skip inventory using items as their use is unknown

            this.WorldId = worldId;

            this.DynamicId = int.Parse(data[4]);
            this.SnoId = int.Parse(data[5]);
            this.Field2 = int.Parse(data[6]);
            this.Field3 = int.Parse(data[7]);

            if (int.Parse(data[2]) > 0)
            {
                this.Scale = float.Parse(data[8], System.Globalization.CultureInfo.InvariantCulture);
                this.RotationAmount = float.Parse(data[12], System.Globalization.CultureInfo.InvariantCulture);
                this.RotationAxis = new Vector3D()
                                        {
                                            X = float.Parse(data[9], System.Globalization.CultureInfo.InvariantCulture),
                                            Y = float.Parse(data[10], System.Globalization.CultureInfo.InvariantCulture),
                                            Z = float.Parse(data[11], System.Globalization.CultureInfo.InvariantCulture),
                                        };

                this.Position = new Vector3D()
                                    {
                                        X = float.Parse(data[13], System.Globalization.CultureInfo.InvariantCulture),
                                        Y = float.Parse(data[14], System.Globalization.CultureInfo.InvariantCulture),
                                        Z = float.Parse(data[15], System.Globalization.CultureInfo.InvariantCulture),
                                    };
            }

            // data[14] = world_id

            if (int.Parse(data[3]) > 0)
            {
                this.InventoryLocationData = new InventoryLocationMessageData()
                {
                    Field0 = int.Parse(data[17]),
                    Field1 = int.Parse(data[18]),
                    Field2 = new IVector2D()
                    {
                        Field0 = int.Parse(data[19]),
                        Field1 = int.Parse(data[20]),
                    }
                };
            }

            this.GBHandle = new GBHandle()
            {
                Field0 = int.Parse(data[21]),
                Field1 = int.Parse(data[22]),
            };

            this.Field7 = int.Parse(data[23]);
            this.Field8 = int.Parse(data[24]);
            this.Field9 = int.Parse(data[25]);
            this.Field10 = byte.Parse(data[26]);

            return true;
        }
 public override void Parse(GameBitBuffer buffer)
 {
     Field0 = buffer.ReadInt(32);
     Field1 = new GBHandle();
     Field1.Parse(buffer);
 }