internal SteamID(SteamUniverse universe, SteamAccountType accountType, SteamInstance instance, uint accountID) { Universe = universe; Type = accountType; Instance = instance; AccountID = accountID; }
/// <summary> /// Constructs a Steam Id from three of the four components. Instance is defaulted to a value based on the Account Type. /// </summary> /// <param name="universe">Which Steam system this Steam Id belongs to (such as Public)</param> /// <param name="accountType">The type of account for this Steam Id (such as Individual)</param> /// <param name="accountId">The 32-bit account identifier for the Steam account</param> public SteamId(SteamUniverse universe, SteamAccountType accountType, uint accountId) { Universe = universe; AccountType = accountType; AccountId = accountId; ResolvedFrom = SteamIdResolvedFrom.IndividualComponents; }
/// <summary> /// Returns the account type identifier character based on the account type. /// </summary> /// <param name="accountType">A character identifier for the account type</param> /// <returns></returns> private char GetCharacterFromAccountType(SteamAccountType accountType) { if (accountType == SteamAccountType.Invalid) { return('I'); } else if (accountType == SteamAccountType.Individual) { return('U'); } else if (accountType == SteamAccountType.Multiseat) { return('M'); } else if (accountType == SteamAccountType.GameServer) { return('G'); } else if (accountType == SteamAccountType.AnonGameServer) { return('A'); } else if (accountType == SteamAccountType.Pending) { return('P'); } else if (accountType == SteamAccountType.ContentServer) { return('C'); } else if (accountType == SteamAccountType.Clan) { return('g'); } else if (accountType == SteamAccountType.Chat) { return('T'); } else if (accountType == SteamAccountType.Chat_Clan) { return('c'); } else if (accountType == SteamAccountType.Chat_Lobby) { return('L'); } else if (accountType == SteamAccountType.AnonUser) { return('a'); } else { return(' '); } }
/// <summary> /// Returns the account type identifier character based on the account type. /// </summary> /// <param name="accountType">A character identifier for the account type</param> /// <returns></returns> private char GetCharacterFromAccountType(SteamAccountType accountType) { if (accountType == SteamAccountType.Invalid) { return 'I'; } else if (accountType == SteamAccountType.Individual) { return 'U'; } else if (accountType == SteamAccountType.Multiseat) { return 'M'; } else if (accountType == SteamAccountType.GameServer) { return 'G'; } else if (accountType == SteamAccountType.AnonGameServer) { return 'A'; } else if (accountType == SteamAccountType.Pending) { return 'P'; } else if (accountType == SteamAccountType.ContentServer) { return 'C'; } else if (accountType == SteamAccountType.Clan) { return 'g'; } else if (accountType == SteamAccountType.Chat) { return 'T'; } else if (accountType == SteamAccountType.Chat_Clan) { return 'c'; } else if (accountType == SteamAccountType.Chat_Lobby) { return 'L'; } else if (accountType == SteamAccountType.AnonUser) { return 'a'; } else { return ' '; } }