Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208 00209 00210 00211 00212 00213 00214 00215 00216 00217 00218 00219 00220 00221 00222 00223 00224 00225 00226 00227 00228 00229 00230 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 00241 00242 00243 00244 00245 00246 00247 00248 00249 00250 00251 00252 00253 00254 00255 00256 00257 00258 00259 00260 00261 00262 00263 00264 00265 00266 00267 00268 00269 00270 00271 |
class GameSpyManager extends Core.Object native; enum EGameSpyResult { GSR_VALID_PROFILE, GSR_USER_CONNECTED, GSR_REGISTERED_UNIQUE_NICK, GSR_UNIQUE_NICK_TAKEN, GSR_BAD_EMAIL, GSR_BAD_PASSWORD, GSR_BAD_NICK, GSR_TIMED_OUT, GSR_GENERAL_FAILURE }; enum ETeamAffiliationResult { TAR_PLAYER_AFFILIATED, TAR_TEAM_ID_MISMATCH, TAR_OLD_JOIN_TIME }; var GameEngine Engine; var const bool bAvailable; var const bool bFailedAvailabilityCheck; var const bool bInitAsServer; var const bool bInitAsClient; var const bool bInitialised; var const bool bFailedInitialisation; var const bool bTrackingStats; // If true try to initialise the stat tracker var const bool bStatsInitalised; var const bool bUsingPresence; // If true try to initialise the presence sdk var const bool bPresenceInitalised; var const bool bServerUpdateFinished; // Used during GetNextServer var const int currentServerIndex; // Used during GetNextServer var Array<byte> ServerKeyIds; var Array<String> ServerKeyNames; var Array<byte> PlayerKeyIds; var Array<String> PlayerKeyNames; var Array<byte> TeamKeyIds; var Array<String> TeamKeyNames; var Array<byte> CustomServerKeyIds; var Array<String> CustomServerKeyNames; var Array<byte> CustomPlayerKeyIds; var Array<String> CustomPlayerKeyNames; var Array<byte> CustomTeamKeyIds; var Array<String> CustomTeamKeyNames; // The key ids for the values that will be initially retrieved during a server update var Array<byte> InitialKeyIds; var private globalconfig string ProductVersionID; // for auto-patching, build number is used if this is empty var private globalconfig localized string ProductRegionID; // for auto-patching var globalconfig string BaseFilePlanetPatchURL; // This function initialises GameSpy as a client // Note: This function only tells GameSpy to initialise it may take longer and wont be initialised after returning from this function // The GameSpyInitialised event will be called once GameSpy has finished initalising. // There is no need for a script side function to init as a server as this is done automatically in native code when a server starts final native function InitGameSpyClient(); // This event is called once GameSpy as initialised event GameSpyInitialised(); event OnLevelChange() { SendGameSpyGameModeChange(); } event InitGameSpyData(); final native function LevelInfo GetLevelInfo(); final native function Player GetPlayerObject(); final native function SendGameSpyGameModeChange(); // This function starts an update of the server list final native function UpdateServerList(optional String filter); // This function starts an update of the server list for the LAN final native function LANUpdateServerList(); // This function clears the internal server list final native function ClearServerList(); // This function updates a server based on ip and port final native function UpdateServerByIP(String ipAddress, int serverGamePort); // This function starts an update for a specific server in the list to update server specific data (player/team data) // serverId is the server id received in UpdatedServerData during a server list update // if refresh is true then the update will be done even if the server data is already available final native function UpdateServer(int serverId, bool Refresh); // This function will cancel a previously started update of the server list final native function CancelUpdate(); // This function returns the ip address for the given serverId final native function String GetServerIpAddress(int serverId); // This function returns the port for the given serverId final native function String GetServerPort(int serverId); // This function returns the number of servers, including servers that haven't been updated yet final native function int GetNumPotentialServers(); // This function can be used to iterate over all the servers currently in the list // Returns true if there is still more data, but the data may not have arrived yet // If the data has not arrived yet serverId will be zero final native function bool GetNextServer(out int serverId, out String ipAddress, out Array<String> serverData); // Call this function when a new game starts to tell the stat tracking server final native function StatsNewGameStarted(); // Call this function to verify that a connected player has a profile id and stat response string final native function bool StatsHasPIDAndResponse(PlayerController pc); // Call this function to get the profile id for the given player controller final native function String StatsGetPID(PlayerController pc); // Call this function to get the stat response string for the given player controller final native function String StatsGetStatResponse(PlayerController pc); // Call this function to add a new player to the stat tracking server final native function StatsNewPlayer(int playerId, string playerName); // Call this function to add a new team to the stat tracking server final native function StatsNewTeam(int TeamID, string TeamName); // Call this function to remove a player from the stat tracking server final native function StatsRemovePlayer(int playerId); // Call this function to remove a team from the stat tracking server final native function StatsRemoveTeam(int TeamID); // Set the value of a server related stat final native function SetServerStat(coerce string statName, coerce string statValue); // Set the value of a player specific stat final native function SetPlayerStat(coerce string statName, coerce string statValue, int playerId); // Set the value of a team specific stat final native function SetTeamStat(coerce string statName, coerce string statValue, int TeamID); // Call this function to send a snapshot of the game stats to the stat server. Set finalSnapshot to true if the game has ended (default false) final native function SendStatSnapshot(optional bool finalSnapshot); // Call this function to create a new user account final native function CreateUserAccount(string Nick, string Email, string Password); // Call this function to check with GameSpy that the given account details are valid final native function CheckUserAccount(string Nick, string Email, string Password); // Call this function to connect to the GameSpy server with the given account details final native function ConnectUserAccount(string Nick, string Email, string Password); event UserConnectionResult(EGameSpyResult result, int profileId, string UniqueNick); // Call this function to disconnect the currently connected user account final native function DisconnectUserAccount(); // Call this function to register a unique nick for the currently connected profile final native function RegisterUniqueNick(string UniqueNick); event UniqueNickRegistrationResult(EGameSpyResult result); // Call this function to authenticate a profile before trying to write private data final native function AuthenticateProfile(int profileId, string Password); event AuthenticatedProfileResult(int profileId, int authenticated, string error); // Call this function to get the teamId for a teamTag final native function FindTeam(string teamTag); event FindTeamResult(int teamId); // Call this function to set private read/write data for a profile final native function SetDataPrivateRW(int profileId, string PrivateData); event SetDataPrivateRWResult(int success); // Call this function to send a get request to the given URL final native function HTTPGetRequest(String URL, bool bBlock); event HTTPGetRequestResult(bool succeeded, String ResponseData); final native function SetTeamAffiliation(int profileId, int teamId, PlayerReplicationInfo pri); event SetTeamAffiliationResult(ETeamAffiliationResult result, String TeamTag, PlayerReplicationInfo pri); // This function is called each time a servers data is updated event UpdatedServerData(int serverId, String ipAddress, int Ping, bool bLAN, Array<String> serverData, Array<String> playerData, Array<String> teamData); // This function is called after an update of the server list completes event UpdateComplete(bool bLAN); // This function is called on the server to get the data for a particular server key event string GetValueForKey(int key); // This function is called on the server to get the data for a particular player key event string GetValueForPlayerKey(int key, int index); // This function is called on the server to get the data for a particular team key event string GetValueForTeamKey(int key, int index); event int GetNumTeams() { return 0; } // Client side function to get the user's GameSpy profile id event String GetGameSpyProfileId(); event String GetGameSpyPassword(); event EmailAlreadyTaken(); event ProfileCreateResult(EGameSpyResult result, int profileId); event ProfileCheckResult(EGameSpyResult result, int profileId); private event string GetProductVersionID() { if (ProductVersionID == "") return GetBuildNumber(); else return ProductVersionID; } private event string GetProductRegionID() { return ProductRegionID; } private event string GetPatchDownloadURL(int FilePlanetID) { return BaseFilePlanetPatchURL $ string(FilePlanetID); } // Check if a patch is required. Calls OnQueryPatchResult with the result of the query. native function QueryPatch(); private event QueryPatchCompleted(bool bNeeded, bool bMandatory, string versionName, int fileplanetID, string URL) { if (fileplanetID > 0) { OnQueryPatchResult(bNeeded, bMandatory, versionName, GetPatchDownloadURL(fileplanetID)); } else { OnQueryPatchResult(bNeeded, bMandatory, versionName, URL); } } delegate OnQueryPatchResult(bool bNeeded, bool bMandatory, string versionName, string URL); defaultproperties { BaseFilePlanetPatchURL="http://www.fileplanet.com/index.asp?file=" } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |