/// <summary> /// Dispatch the event (in a script context). /// </summary> /// <param name="Script">Supplies the script object.</param> /// <param name="Database">Supplies the database connection.</param> public void DispatchEvent(ACR_ServerCommunicator Script, ALFA.Database Database) { PlayerState State = Script.TryGetPlayerState(PlayerObject); string RequestURL; // // If the player is logged off, then there's nothing to do. // if (State == null || State.IsDM) return; if (String.IsNullOrEmpty(AccountAssociationSecret)) return; RequestURL = AccountAssociator.GenerateAssociationURL(Script.GetPCPlayerName(PlayerObject), AccountAssociationSecret, AccountAssociationURL); Script.DisplayGuiScreen(PlayerObject, "acr_account_association", CLRScriptBase.FALSE, "acr_account_association.XML", CLRScriptBase.FALSE); Script.SetLocalGUIVariable(PlayerObject, "acr_account_association", 0, RequestURL); }
/// <summary> /// Dispatch the event (in a script context). /// </summary> /// <param name="Script">Supplies the script object.</param> /// <param name="Database">Supplies the database connection.</param> public void DispatchEvent(ACR_ServerCommunicator Script, ALFA.Database Database) { PlayerState State = Script.TryGetPlayerState(PlayerObject); string RequestURL; // // If the player is logged off, then there's nothing to do. // if (State == null || State.IsDM) { return; } if (String.IsNullOrEmpty(AccountAssociationSecret)) { return; } RequestURL = AccountAssociator.GenerateAssociationURL(Script.GetPCPlayerName(PlayerObject), AccountAssociationSecret, AccountAssociationURL); Script.DisplayGuiScreen(PlayerObject, "acr_account_association", CLRScriptBase.FALSE, "acr_account_association.XML", CLRScriptBase.FALSE); Script.SetLocalGUIVariable(PlayerObject, "acr_account_association", 0, RequestURL); }