private static void OnMoveRejected(int client, PacketReader reader) { int sequence21 = reader.ReadByte(); int x21 = reader.ReadInt16(); int y21 = reader.ReadInt16(); int direction21 = reader.ReadByte(); int z21 = reader.ReadSByte(); IncomingPackets.OnMoveRejected(client, sequence21, x21, y21, z21, direction21); }
private static void OnMobileMoving(int client, PacketReader reader) { int serial77 = reader.ReadInt32(); int id77 = reader.ReadInt16(); int x77 = reader.ReadInt16(); int y77 = reader.ReadInt16(); int z77 = reader.ReadSByte(); int direction77 = reader.ReadByte() & 0x07; int hue77 = reader.ReadInt16(); int status77 = reader.ReadByte(); int noto77 = reader.ReadByte(); IncomingPackets.OnMobileMoving(client, serial77, id77, x77, y77, z77, direction77, hue77, status77, noto77); }
private static void OnDropItemRequested(int client, PacketReader reader) { const int oldLen08 = 0x0E; const int newLen08 = 0x0F; if (reader.Size != oldLen08 && reader.Size != newLen08) return; int serial8 = reader.ReadInt32(); int x8 = reader.ReadInt16(); int y8 = reader.ReadInt16(); int z8 = reader.ReadSByte(); int container8; if (reader.Size == newLen08) reader.ReadByte(); // Grid location container8 = reader.ReadInt32(); OutgoingPackets.OnDropItemRequested(client, serial8, x8, y8, z8, container8); }
private static void OnMobileUpdated(int client, PacketReader reader) { int serial = reader.ReadInt32(); int id = reader.ReadInt16(); reader.ReadByte(); // BYTE 0x00; int hue = reader.ReadInt16(); int status = reader.ReadByte(); int x = reader.ReadInt16(); int y = reader.ReadInt16(); reader.ReadInt16(); // WORD 0x00; int direction = reader.ReadByte() & 0x07; int z = reader.ReadSByte(); IncomingPackets.OnMobileUpdated(client, serial, id, hue, status, x, y, z, direction); }
private static void OnMobileIncoming(int client, PacketReader reader) { int serial78 = reader.ReadInt32(); ItemCollection container78 = new ItemCollection(serial78, 125); Mobile mob78 = new Mobile(serial78, client); mob78.myID = reader.ReadInt16(); mob78.myX = reader.ReadInt16(); mob78.myY = reader.ReadInt16(); mob78.myZ = reader.ReadSByte(); mob78.myDirection = reader.ReadByte() & 0x07; mob78.myHue = reader.ReadInt16(); mob78.myStatus = reader.ReadByte(); mob78.myNotoriety = reader.ReadByte(); Item item; for (; ;) { int itemSerial = reader.ReadInt32(); if (itemSerial == 0) { break; } item = new Item(itemSerial); item.Owner = serial78; item.ID = reader.ReadInt16(); item.Layer = (Layer)reader.ReadByte(); ClientInfo ci; ClientInfoCollection.GetClient(client, out ci); if (ci.UseNewMobileIncoming) { item.myHue = reader.ReadInt16(); } else { if ((item.myID & 0x8000) != 0) { item.myID ^= 0x8000; item.myHue = reader.ReadInt16(); } } container78.Add(item); } IncomingPackets.OnEquippedMobAdded(client, mob78, container78); }
private static void OnSAWorldItem(int client, PacketReader reader) { reader.ReadInt16(); // WORD 0x01 byte type = reader.ReadByte(); // Data Type (0x00 = use TileData, 0x01 = use BodyData, 0x02 = use MultiData) int serialf3 = reader.ReadInt32(); Item itemf3 = new Item(serialf3); itemf3.ArtDataID = type; itemf3.ID = reader.ReadInt16(); itemf3.Direction = reader.ReadByte(); itemf3.Count = reader.ReadInt16(); reader.ReadInt16(); // Second Amount? itemf3.X = reader.ReadInt16(); itemf3.Y = reader.ReadInt16(); itemf3.Z = reader.ReadSByte(); itemf3.Light = reader.ReadByte(); itemf3.Hue = reader.ReadInt16(); itemf3.Flags = reader.ReadByte(); IncomingPackets.OnWorldItemAdded(client, itemf3); }
private static void OnDropItemRequested(int client, PacketReader reader) { const int oldLen08 = 0x0E; const int newLen08 = 0x0F; if (reader.Size != oldLen08 && reader.Size != newLen08) { return; } int serial8 = reader.ReadInt32(); int x8 = reader.ReadInt16(); int y8 = reader.ReadInt16(); int z8 = reader.ReadSByte(); int container8; if (reader.Size == newLen08) { reader.ReadByte(); // Grid location } container8 = reader.ReadInt32(); OutgoingPackets.OnDropItemRequested(client, serial8, x8, y8, z8, container8); }
private static void OnMobileIncoming(int client, PacketReader reader) { int serial78 = reader.ReadInt32(); ItemCollection container78 = new ItemCollection(serial78, 125); Mobile mob78 = new Mobile(serial78, client); mob78.myID = reader.ReadInt16(); mob78.myX = reader.ReadInt16(); mob78.myY = reader.ReadInt16(); mob78.myZ = reader.ReadSByte(); mob78.myDirection = reader.ReadByte() & 0x07; mob78.myHue = reader.ReadInt16(); mob78.myStatus = reader.ReadByte(); mob78.myNotoriety = reader.ReadByte(); Item item; for (; ; ) { int itemSerial = reader.ReadInt32(); if (itemSerial == 0) break; item = new Item(itemSerial); item.Owner = serial78; item.ID = reader.ReadInt16(); item.Layer = (Layer)reader.ReadByte(); ClientInfo ci; ClientInfoCollection.GetClient(client, out ci); if (ci.UseNewMobileIncoming) { item.myHue = reader.ReadInt16(); } else { if ((item.myID & 0x8000) != 0) { item.myID ^= 0x8000; item.myHue = reader.ReadInt16(); } } container78.Add( item ); } IncomingPackets.OnEquippedMobAdded(client, mob78, container78); }