using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
namespace PBServer.Network.Game.Packets.ServerPackets
{
public class SM_CUPON : SendBaseGamePacket
{
private string hex = "";
public SM_CUPON()
{
base.makeme();
}
public static byte[] ConvertHexStringToByteArray(string hexString)
{
if (hexString.Length % 2 != 0)
{
}
byte[] numArray = new byte[hexString.Length / 2];
for (int i = 0; i < (int)numArray.Length; i++)
{
string str = hexString.Substring(i * 2, 2);
numArray[i] = byte.Parse(str, NumberStyles.HexNumber, CultureInfo.InvariantCulture);
}
return numArray;
}
protected internal override void write()
{
base.writeD(525);
base.writeB(SM_CUPON.ConvertHexStringToByteArray(this.hex));
}
}
Добавлено через 11 минут
Should I Use the Code To Decipher The HEX as Well ? I Am New In Programming
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
namespace PBServer.Network.Game.Packets.ServerPackets
{
public class SM_CUPON : SendBaseGamePacket
{
private string hex = "";
public SM_CUPON()
{
base.makeme();
}
public static byte[] ConvertHexStringToByteArray(string hexString)
{
if (hexString.Length % 2 != 0)
{
}
byte[] numArray = new byte[hexString.Length / 2];
for (int i = 0; i < (int)numArray.Length; i++)
{
string str = hexString.Substring(i * 2, 2);
numArray[i] = byte.Parse(str, NumberStyles.HexNumber, CultureInfo.InvariantCulture);
}
return numArray;
}
protected internal override void write()
{
base.writeD(525);
base.writeB(SM_CUPON.ConvertHexStringToByteArray(this.hex));
}
}
Добавлено через 11 минут
Should I Use the Code To Decipher The HEX as Well ? I Am New In Programming