Class ConnectionFunctions
Inheritance
System.Object
ConnectionFunctions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Asgard3.Core.dll
Syntax
public static class ConnectionFunctions
Fields
|
Improve this Doc
View Source
BattleNetGameToKeyProduct
Declaration
public static Dictionary<BattleNetGame, BattleNetGame> BattleNetGameToKeyProduct
Field Value
|
Improve this Doc
View Source
GameToFullNameConversionDictioonary
Declaration
public static Dictionary<BattleNetGame, BattleNetFullGameName> GameToFullNameConversionDictioonary
Field Value
|
Improve this Doc
View Source
Index
Declaration
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
IsCLI
Declaration
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
KeyProductValueToFullNameConversionDictionary
Declaration
public static Dictionary<BattleNetGameKeyProductValue, BattleNetFullGameName> KeyProductValueToFullNameConversionDictionary
Field Value
|
Improve this Doc
View Source
KeyProductValueToGameConversionDictionary
Declaration
public static Dictionary<BattleNetGameKeyProductValue, BattleNetGame> KeyProductValueToGameConversionDictionary
Field Value
|
Improve this Doc
View Source
Main
The main form of the project.
Declaration
Field Value
Type |
Description |
System.Windows.Forms.Form |
|
Methods
|
Improve this Doc
View Source
BNLSProductIdToInt32(BattleNetGame)
Converts enumClient to the BNLS byte for the client.
Declaration
public static int BNLSProductIdToInt32(BattleNetGame client)
Parameters
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
ByteArrayToString(Byte[])
Declaration
public static string ByteArrayToString(this byte[] b)
Parameters
Type |
Name |
Description |
System.Byte[] |
b |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ByteArrayToString(Byte[], Int32)
Turns a byte array into a string.
Declaration
public static string ByteArrayToString(this byte[] b, int upperbound)
Parameters
Type |
Name |
Description |
System.Byte[] |
b |
The byte array to be turned into a string.
|
System.Int32 |
upperbound |
How many of the bytes to turn into a string.
|
Returns
Type |
Description |
System.String |
A string of the byte array.
|
|
Improve this Doc
View Source
ConvertGameToFullName(BattleNetGame)
Declaration
public static BattleNetFullGameName ConvertGameToFullName(this BattleNetGame game)
Parameters
Returns
|
Improve this Doc
View Source
ConvertGameToFullName(BattleNetGameKeyProductValue)
Declaration
public static BattleNetFullGameName ConvertGameToFullName(this BattleNetGameKeyProductValue value)
Parameters
Returns
|
Improve this Doc
View Source
ConvertGameToProductValue(BattleNetGame)
Declaration
public static BattleNetGame ConvertGameToProductValue(this BattleNetGame game)
Parameters
Returns
|
Improve this Doc
View Source
ConvertKeyProductToGame(BattleNetGameKeyProductValue)
Declaration
public static BattleNetGame ConvertKeyProductToGame(this BattleNetGameKeyProductValue value)
Parameters
Returns
|
Improve this Doc
View Source
DwordToString(Int32)
Turns a dword into a string.
Declaration
public static string DwordToString(int dword)
Parameters
Type |
Name |
Description |
System.Int32 |
dword |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public static string FormatDirectory(this string path)
Parameters
Type |
Name |
Description |
System.String |
path |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
FromBattleNetTime(Int32)
Declaration
public static DateTime FromBattleNetTime(this int time)
Parameters
Type |
Name |
Description |
System.Int32 |
time |
|
Returns
Type |
Description |
System.DateTime |
|
|
Improve this Doc
View Source
FromUnixTime(Int32)
Declaration
public static DateTime FromUnixTime(this int timestamp)
Parameters
Type |
Name |
Description |
System.Int32 |
timestamp |
|
Returns
Type |
Description |
System.DateTime |
|
|
Improve this Doc
View Source
GetHashFiles(BattleNetCheckRevisionVersion, BattleNetGame, ref String[], ref String, ref String)
Declaration
public static bool GetHashFiles(BattleNetCheckRevisionVersion version, BattleNetGame cid, ref string[] hashFiles, ref string hashpath, ref string binfile)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GetHashFiles(BattleNetGame, ref String, ref String)
Declaration
public static string[] GetHashFiles(BattleNetGame cid, ref string hashpath, ref string binfile)
Parameters
Type |
Name |
Description |
BattleNetGame |
cid |
The Client ID.
|
System.String |
hashpath |
The path where the hashes are located.
|
System.String |
binfile |
The file path for the image file if needed.
|
Returns
Type |
Description |
System.String[] |
The hash files.
|
|
Improve this Doc
View Source
GetMPQ(String, Int64, String, String, String)
Downloads a battle.net mpq file to be used in hashing.
Declaration
public static void GetMPQ(string f, long ft, string cid, string server, string directory = "Lockdown")
Parameters
Type |
Name |
Description |
System.String |
f |
Name of the MPQ file.
|
System.Int64 |
ft |
Filetime of the MPQ File.
|
System.String |
cid |
The client id.
|
System.String |
server |
The battle.net to download from
|
System.String |
directory |
|
|
Improve this Doc
View Source
GetSystemUpTime()
Declaration
public static TimeSpan GetSystemUpTime()
Returns
Type |
Description |
System.TimeSpan |
|
|
Improve this Doc
View Source
IntFromWORD(String)
Gets the value of 2 characters.
Declaration
public static int IntFromWORD(string WORD)
Parameters
Type |
Name |
Description |
System.String |
WORD |
The 2 characters to process.
|
Returns
Type |
Description |
System.Int32 |
The integer value of the 2 characters.
|
|
Improve this Doc
View Source
IntToHex(Int32)
Turns an integer into Hex
Declaration
public static string IntToHex(int number)
Parameters
Type |
Name |
Description |
System.Int32 |
number |
The integer to be turned into hex
|
Returns
Type |
Description |
System.String |
The hex of the integer
|
|
Improve this Doc
View Source
IsAllNumbers(String)
Declaration
public static bool IsAllNumbers(this string data)
Parameters
Type |
Name |
Description |
System.String |
data |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsEveryOtherCap(String)
Declaration
public static bool IsEveryOtherCap(this string data)
Parameters
Type |
Name |
Description |
System.String |
data |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsLinux()
Declaration
public static bool IsLinux()
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsRandomized(String)
Declaration
public static bool IsRandomized(this string data)
Parameters
Type |
Name |
Description |
System.String |
data |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
RemoveRealm(String)
Declaration
public static string RemoveRealm(this string data)
Parameters
Type |
Name |
Description |
System.String |
data |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
RemoveUnderScore(String)
Removes the _ from enums for better display.
Declaration
public static string RemoveUnderScore(this string text)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ResolveIp(String)
Declaration
public static IPAddress ResolveIp(string server)
Parameters
Type |
Name |
Description |
System.String |
server |
|
Returns
Type |
Description |
System.Net.IPAddress |
|
|
Improve this Doc
View Source
ResolveIp(String, BattleNetClient)
Resolves an ip from a hostname or an ip.
Declaration
public static IPAddress ResolveIp(string server, BattleNetClient bot)
Parameters
Type |
Name |
Description |
System.String |
server |
The server to resolve.
|
BattleNetClient |
bot |
|
Returns
Type |
Description |
System.Net.IPAddress |
The IPAddress of the requested server.
|
|
Improve this Doc
View Source
ReverseString(String)
Declaration
public static string ReverseString(this string s)
Parameters
Type |
Name |
Description |
System.String |
s |
The string to be reversed.
|
Returns
Type |
Description |
System.String |
The reversed strig.
|
|
Improve this Doc
View Source
StringToByteArray(String)
Turns a string into a byte array
Declaration
public static byte[] StringToByteArray(string Data)
Parameters
Type |
Name |
Description |
System.String |
Data |
The string of data to be turned into a byte array.
|
Returns
Type |
Description |
System.Byte[] |
The byte array of the string.
|
|
Improve this Doc
View Source
ToUnixTime(DateTime)
Declaration
public static int ToUnixTime(this DateTime timestamp)
Parameters
Type |
Name |
Description |
System.DateTime |
timestamp |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
ToUnixTime(DateTime, Int32)
Declaration
public static int ToUnixTime(this DateTime timestamp, int subtract)
Parameters
Type |
Name |
Description |
System.DateTime |
timestamp |
|
System.Int32 |
subtract |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
TryValidateCDKey(String, BattleNetGame, ConnectionType, out String, out Int32, out String)
Checks if the cdkey is the proper length and contains only valid characters. It also removes spaces and dashes and returns the value.
Declaration
public static bool TryValidateCDKey(string cdkey, BattleNetGame game, ConnectionType conType, out string validatedkey, out int errorCode, out string errorMessage)
Parameters
Type |
Name |
Description |
System.String |
cdkey |
the cdkey to be checked
|
BattleNetGame |
game |
the client the cdkey is for
|
ConnectionType |
conType |
|
System.String |
validatedkey |
the return value of the cdkey
|
System.Int32 |
errorCode |
|
System.String |
errorMessage |
|
Returns
Type |
Description |
System.Boolean |
if the cdkey has passed the sanity checks or not.
|
|
Improve this Doc
View Source
UnixTimeStamp(Int64)
Declaration
public static DateTime UnixTimeStamp(long timestamp)
Parameters
Type |
Name |
Description |
System.Int64 |
timestamp |
|
Returns
Type |
Description |
System.DateTime |
|
|
Improve this Doc
View Source
WardenProductIdToInt32(BattleNetGame)
Converts enumClient to the local warden client byte.
Declaration
public static int WardenProductIdToInt32(BattleNetGame client)
Parameters
Returns
Type |
Description |
System.Int32 |
|