void HookProxy_OutgoingPacket(byte[] data) { NetworkMessage msg = new NetworkMessage(client, data); if (OutgoingPacket != null) { OutgoingPacket.Invoke(data); } byte Type = msg.GetByte(); switch (Type) { case 0x82: Location loc = msg.GetLocation(); uint itemId = msg.GetUInt16(); byte stackPos = msg.GetByte(); byte Index = msg.GetByte(); if (ItemUsePacket != null) { ItemUsePacket.Invoke(loc, stackPos, (int)itemId, Index); } break; case 0x96: byte type = msg.GetByte(); string message = msg.PeekString(); msg.AddString(message); break; case 101: case 102: case 103: case 104: case 106: case 107: case 108: case 109: client.Map.PlayerHavedMoved = true; // client.StatusBar = "moved " + Type.ToString("X"); break; } }