TryReadBytes() 공개 메소드

public TryReadBytes ( int pLength, byte &pValue ) : bool
pLength int
pValue byte
리턴 bool
예제 #1
0
        public static void SaveQuickBarStateRequest(WorldClient client, Packet packet)
        {
            byte[] data;
            if (!packet.TryReadBytes(24, out data))
            {
                Log.WriteLine(LogLevel.Warn, "Unable to read 24 bytes from stream for save");
                return;
            }

            // Save it.
            client.Character.SetQuickBarStateData(data);
        }
예제 #2
0
        public static void SaveClientSettingsRequest(WorldClient client, Packet packet)
        {
            byte[] data;
            if (!packet.TryReadBytes(392, out data))
            {
                Log.WriteLine(LogLevel.Warn, "Unable to read 392 bytes from stream for save");
                return;
            }

            // Save it.
            client.Character.SetClientSettingsData(data);
        }
예제 #3
0
        public static void SaveQuickBarRequest(WorldClient client, Packet packet)
        {
            // Load up 1 KB of data (well, try to)
            byte[] data;
            if (!packet.TryReadBytes(1024, out data))
            {
                Log.WriteLine(LogLevel.Warn, "Unable to read 1024 bytes from stream for save");
                return;
            }

            // Save it.
            client.Character.SetQuickBarData(data);
        }
예제 #4
0
        public static void SaveGameSettingsRequest(WorldClient client, Packet packet)
        {
            // Load up 64 B of data (well, try to)
            byte[] data;
            if (!packet.TryReadBytes(64, out data))
            {
                Log.WriteLine(LogLevel.Warn, "Unable to read 64 bytes from stream for save");
                return;
            }

            // Save it.
            client.Character.SetGameSettingsData(data);
        }