internal static void InstallEvents() { SteamInventory.InstallEvents(); ValidateAuthTicketResponse_t.Install(x => OnValidateAuthTicketResponse?.Invoke(x.SteamID, x.OwnerSteamID, x.AuthSessionResponse), true); SteamServersConnected_t.Install(x => OnSteamServersConnected?.Invoke(), true); SteamServerConnectFailure_t.Install(x => OnSteamServerConnectFailure?.Invoke(x.Result, x.StillRetrying), true); SteamServersDisconnected_t.Install(x => OnSteamServersDisconnected?.Invoke(x.Result), true); }
internal static void InstallEvents() { SteamServersConnected_t.Install(x => OnSteamServersConnected?.Invoke()); SteamServerConnectFailure_t.Install(x => OnSteamServerConnectFailure?.Invoke()); SteamServersDisconnected_t.Install(x => OnSteamServersDisconnected?.Invoke()); ClientGameServerDeny_t.Install(x => OnClientGameServerDeny?.Invoke()); LicensesUpdated_t.Install(x => OnLicensesUpdated?.Invoke()); ValidateAuthTicketResponse_t.Install(x => OnValidateAuthTicketResponse?.Invoke(x.SteamID, x.OwnerSteamID, x.AuthSessionResponse)); MicroTxnAuthorizationResponse_t.Install(x => OnMicroTxnAuthorizationResponse?.Invoke(x.AppID, x.OrderID, x.Authorized != 0)); GameWebCallback_t.Install(x => OnGameWebCallback?.Invoke(x.URL)); }
internal static void InstallEvents() { SteamInventory.InstallEvents(); ValidateAuthTicketResponse_t.Install((ValidateAuthTicketResponse_t x) => { Action <SteamId, SteamId, AuthResponse> onValidateAuthTicketResponse = SteamServer.OnValidateAuthTicketResponse; if (onValidateAuthTicketResponse != null) { onValidateAuthTicketResponse(x.SteamID, x.OwnerSteamID, x.AuthSessionResponse); } else { } }, true); SteamServersConnected_t.Install((SteamServersConnected_t x) => { Action onSteamServersConnected = SteamServer.OnSteamServersConnected; if (onSteamServersConnected != null) { onSteamServersConnected(); } else { } }, true); SteamServerConnectFailure_t.Install((SteamServerConnectFailure_t x) => { Action <Result, bool> onSteamServerConnectFailure = SteamServer.OnSteamServerConnectFailure; if (onSteamServerConnectFailure != null) { onSteamServerConnectFailure(x.Result, x.StillRetrying); } else { } }, true); SteamServersDisconnected_t.Install((SteamServersDisconnected_t x) => { Action <Result> onSteamServersDisconnected = SteamServer.OnSteamServersDisconnected; if (onSteamServersDisconnected != null) { onSteamServersDisconnected(x.Result); } else { } }, true); }
void OnSteamServersConnected(SteamServersConnected_t pCallback) { Debug.Log("[" + SteamServersConnected_t.k_iCallback + " - SteamServersConnected]"); }
internal static void InstallEvents() { ValidateAuthTicketResponse_t.Install(x => OnValidateAuthTicketResponse?.Invoke(x.SteamID, x.OwnerSteamID, x.AuthSessionResponse), true); SteamServersConnected_t.Install(x => OnSteamServersConnected?.Invoke(), true); SteamServerConnectFailure_t.Install(x => OnSteamServerConnectFailure?.Invoke(), true); }
//----------------------------------------------------------------------------- // Purpose: Take any action we need to on Steam notifying us we are now logged in //----------------------------------------------------------------------------- void OnSteamServersConnected(SteamServersConnected_t pLogonSuccess) { Debug.Log("SpaceWarServer connected to Steam successfully"); m_bConnectedToSteam = true; // log on is not finished until OnPolicyResponse() is called // Tell Steam about our server details SendUpdatedServerDetailsToSteam(); }
/// <summary> /// From Spacewar: /// Take any action we need to on Steam notifying us we are now logged in /// </summary> /// <param name="callback"></param> void OnSteamServersConnected(SteamServersConnected_t callback) { Debug.Log("Connected to Steam Servers!"); _SteamConnected = true; if (UpdateServerDetails != null) UpdateServerDetails(); }
internal static void InstallEvents() { SteamServersConnected_t.Install((SteamServersConnected_t x) => { Action onSteamServersConnected = SteamUser.OnSteamServersConnected; if (onSteamServersConnected != null) { onSteamServersConnected(); } else { } }, false); SteamServerConnectFailure_t.Install((SteamServerConnectFailure_t x) => { Action onSteamServerConnectFailure = SteamUser.OnSteamServerConnectFailure; if (onSteamServerConnectFailure != null) { onSteamServerConnectFailure(); } else { } }, false); SteamServersDisconnected_t.Install((SteamServersDisconnected_t x) => { Action onSteamServersDisconnected = SteamUser.OnSteamServersDisconnected; if (onSteamServersDisconnected != null) { onSteamServersDisconnected(); } else { } }, false); ClientGameServerDeny_t.Install((ClientGameServerDeny_t x) => { Action onClientGameServerDeny = SteamUser.OnClientGameServerDeny; if (onClientGameServerDeny != null) { onClientGameServerDeny(); } else { } }, false); LicensesUpdated_t.Install((LicensesUpdated_t x) => { Action onLicensesUpdated = SteamUser.OnLicensesUpdated; if (onLicensesUpdated != null) { onLicensesUpdated(); } else { } }, false); ValidateAuthTicketResponse_t.Install((ValidateAuthTicketResponse_t x) => { Action <SteamId, SteamId, AuthResponse> onValidateAuthTicketResponse = SteamUser.OnValidateAuthTicketResponse; if (onValidateAuthTicketResponse != null) { onValidateAuthTicketResponse(x.SteamID, x.OwnerSteamID, x.AuthSessionResponse); } else { } }, false); MicroTxnAuthorizationResponse_t.Install((MicroTxnAuthorizationResponse_t x) => { Action <AppId, ulong, bool> onMicroTxnAuthorizationResponse = SteamUser.OnMicroTxnAuthorizationResponse; if (onMicroTxnAuthorizationResponse != null) { onMicroTxnAuthorizationResponse(x.AppID, x.OrderID, x.Authorized != 0); } else { } }, false); GameWebCallback_t.Install((GameWebCallback_t x) => { Action <string> onGameWebCallback = SteamUser.OnGameWebCallback; if (onGameWebCallback != null) { onGameWebCallback(x.URL); } else { } }, false); GetAuthSessionTicketResponse_t.Install((GetAuthSessionTicketResponse_t x) => { Action <GetAuthSessionTicketResponse_t> onGetAuthSessionTicketResponse = SteamUser.OnGetAuthSessionTicketResponse; if (onGetAuthSessionTicketResponse != null) { onGetAuthSessionTicketResponse(x); } else { } }, false); }