private async Task <bool[]> CanExecuteFunction() { if (PS3.GetAttached()) { IsAttached = true; if (PS3.Extension.ReadBool(Addresses.IsInGame_a)) { bool isHost = ImHost(); if (isHost) { return new bool[] { true, true } } ; else if (!isHost && PS3.Extension.ReadByte(0xDE810) != 0xF8) { return new bool[] { true, false } } ; else { await Dialog.ShowMessageAsync(this, Resources["functionsFailed"].ToString(), Resources["installRCE"].ToString()); } } else { await Dialog.ShowMessageAsync(this, Resources["functionsFailed"].ToString(), Resources["mustBeInGame"].ToString()); } } IsAttached = false; Players?.Clear(); SelectedPlayer = null; return(new bool[] { false, false }); }
private bool GetAttached() { if (PS3.GetAttached()) { return(true); } IsAttached = false; Stats = null; SelectedClass = null; StatsEnabled = false; UnlockAll = false; GodmodeBool = false; StatsTypeEnabled = false; Status = !PS3.GetConnected() ? "Connected to any ps3!" : "Attached to any process!"; return(false); }