private void SetGameOffset() { if (pcsx2Running) { if (GameHelper.GetCurrentElfFile(m.Read <byte>(new IntPtr(GameHelper.LUI_HEAP), false)) == GameHelper.CurrentElf.ONLINE) { label1.Text = "Online"; gGameOffset = m.Read <int>(new IntPtr(GameHelper.ONLINE_PLAYER_POINTER), false) + 0x20000000; } if (GameHelper.GetCurrentElfFile(m.Read <byte>(new IntPtr(GameHelper.LUI_HEAP), false)) == GameHelper.CurrentElf.OFFLINE) { label1.Text = "Offline"; gGameOffset = m.Read <int>(new IntPtr(GameHelper.OFFLINE_PLAYER_POINTER), false) + 0x20000000; } } }
private void SetGameOffset() { if (pcsx2Running) { int luiHeap = 0; try { luiHeap = m.Read <byte>(new IntPtr(GameHelper.LUI_HEAP), false); } catch (Win32Exception e) { var removeWarning = e.Message; // :) } //Online if (GameHelper.GetCurrentElfFile(luiHeap) == GameHelper.CurrentElf.ONLINE) { gGameOffset = m.Read <int>(new IntPtr(GameHelper.ONLINE_PLAYER_POINTER), false) + 0x20000000; if (m.Read <int>(new IntPtr(GameHelper.ONLINE_LOAD_STATE), false) == 5) { loggedIn = true; } else { loggedIn = false; } } //Offline else if (GameHelper.GetCurrentElfFile(luiHeap) == GameHelper.CurrentElf.OFFLINE) { gGameOffset = m.Read <int>(new IntPtr(GameHelper.OFFLINE_PLAYER_POINTER), false) + 0x20000000; if (m.Read <int>(new IntPtr(GameHelper.OFFLINE_LOAD_STATE), false) == 5) { loggedIn = true; } else { loggedIn = false; } } else { loggedIn = false; } } }