protected void PlayerReassign(byte type, List <byte> data) { byte[] packet = data.ToArray(); UInt32 id = BitConverter.ToUInt32(packet, 2); Coordinate coords = new Coordinate(BitConverter.ToUInt16(packet, 6), BitConverter.ToUInt16(packet, 8)); UpdatePlayerPosition?.Invoke(id, coords, true); /* * Player current_player = _owner.BotGameData.GetPlayer(id); * current_player.Location = new Coordinate(BitConverter.ToUInt16(packet, 6), BitConverter.ToUInt16(packet, 8)); */ }
protected void PlayerMove(byte type, List <byte> data) { Logger.Write("A player is moving"); byte[] packet = data.ToArray(); UInt32 playerId = BitConverter.ToUInt32(packet, 2); Coordinate coords = new Coordinate(BitConverter.ToUInt16(packet, 7), BitConverter.ToUInt16(packet, 9)); UpdatePlayerPosition?.Invoke(playerId, coords, true); /* * Player current_player = _owner.BotGameData.GetPlayer(playerId); * current_player.Location = new Coordinate(BitConverter.ToUInt16(packet, 7), BitConverter.ToUInt16(packet, 9)); * current_player.DirectoryKnown = true; */ }