Created
October 1, 2015 01:11
-
-
Save KennethanCeyer/5e9e980661e053ef08d3 to your computer and use it in GitHub Desktop.
It uses for the game client packet. If you treat the variable to DWORD or not, it makes you wish.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void setBnetByte(String strData, bool isVariable = false) | |
{ | |
String hexData = bnetHelper.Acsii2Hex(strData); | |
if (isVariable) | |
{ | |
byte[] bData = bnetHelper.Hex2Byte(hexData); | |
this.setBnetByte(bData); | |
} | |
else { | |
UInt32 intData = UInt32.Parse(hexData, System.Globalization.NumberStyles.AllowHexSpecifier); | |
this.setBnetByte(intData, isVariable); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment