TryReadBytes() public method

public TryReadBytes ( int pLength, byte &pValue ) : bool
pLength int
pValue byte
return bool
コード例 #1
0
ファイル: Handler28.cs プロジェクト: Zepheus/Zepheus_Fiesta
        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
ファイル: Handler28.cs プロジェクト: Zepheus/Zepheus_Fiesta
        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
ファイル: Handler28.cs プロジェクト: Zepheus/Zepheus_Fiesta
        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
ファイル: Handler28.cs プロジェクト: Zepheus/Zepheus_Fiesta
        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);
        }