diff --git a/Core/Gen3/ShadowLock.cpp b/Core/Gen3/ShadowLock.cpp index 95decb09a..3aa9aa1b4 100644 --- a/Core/Gen3/ShadowLock.cpp +++ b/Core/Gen3/ShadowLock.cpp @@ -172,7 +172,7 @@ bool ShadowLock::salamenceSet(u32 seed) // Build PID of non-shadow u32 pid = getPIDBackward(backward); - return team.getLock(0).compare(pid); + return currLock.compare(pid); } bool ShadowLock::salamenceShinySkip(u32 seed) @@ -195,7 +195,7 @@ bool ShadowLock::salamenceShinySkip(u32 seed) u32 pid = getPIDBackward(backward); // Backwards nature lock check - return team.getLock(0).compare(pid); + return currLock.compare(pid); } bool ShadowLock::salamenceUnset(u32 seed) @@ -206,7 +206,7 @@ bool ShadowLock::salamenceUnset(u32 seed) u32 pid = getPIDBackward(backward); // Backwards nature lock check - return team.getLock(0).compare(pid); + return currLock.compare(pid); } bool ShadowLock::singleNL(u32 seed) @@ -217,7 +217,7 @@ bool ShadowLock::singleNL(u32 seed) u32 pid = getPIDBackward(backward); // Backwards nature lock check - return team.getLock(0).compare(pid); + return currLock.compare(pid); } // Needs more research @@ -233,8 +233,10 @@ bool ShadowLock::eReader(u32 seed, u32 readerPID) XDRNGR backward(seed, 1); u32 pid; - // Backwards nature lock check loop - for (x = 1; x < backCount; x++) + x = 1; + compareBackwards(pid, backward); + + for (x = 2; x < backCount; x++) { backward.advanceFrames(3); compareBackwards(pid, backward); @@ -247,13 +249,13 @@ bool ShadowLock::eReader(u32 seed, u32 readerPID) compareForwards(pid, forward); } - // Checks if first NL PID back from target matches + // Checks if PID matches original return pid == readerPID; } void ShadowLock::switchLock(u8 lockNum, Method version) { - natureLockSetup(lockNum, version); + team = ShadowTeam::loadShadowTeams(version).at(lockNum); backCount = team.getSize(); frontCount = backCount == 1 ? 0 : backCount - 2; @@ -307,8 +309,3 @@ u16 ShadowLock::getPSVReverse(XDRNGR &rng) { return (rng.nextUShort() ^ rng.nextUShort()) >> 3; } - -void ShadowLock::natureLockSetup(u8 lockNum, Method version) -{ - team = ShadowTeam::loadShadowTeams(version).at(lockNum); -} diff --git a/Core/Gen3/ShadowLock.hpp b/Core/Gen3/ShadowLock.hpp index fdbc2921d..c3744086b 100644 --- a/Core/Gen3/ShadowLock.hpp +++ b/Core/Gen3/ShadowLock.hpp @@ -56,7 +56,6 @@ class ShadowLock u32 getPIDForward(XDRNG &rng); u32 getPIDBackward(XDRNGR &rng); u16 getPSVReverse(XDRNGR &rng); - void natureLockSetup(u8 lockNum, Method version); }; diff --git a/Forms/Gen3/GameCube.cpp b/Forms/Gen3/GameCube.cpp index 274c0d60c..abf3d94b5 100644 --- a/Forms/Gen3/GameCube.cpp +++ b/Forms/Gen3/GameCube.cpp @@ -88,7 +88,7 @@ void GameCube::updateProfiles() void GameCube::setupModels() { generatorModel = new Stationary3Model(ui->tableViewGenerator); - searcherModel = new Searcher3Model(ui->tableViewSearcher, Method::Method1); + searcherModel = new Searcher3Model(ui->tableViewSearcher, Method::XDColo); generatorMenu = new QMenu(ui->tableViewGenerator); searcherMenu = new QMenu(ui->tableViewSearcher); diff --git a/Models/Gen3/Searcher3Model.cpp b/Models/Gen3/Searcher3Model.cpp index 962926e45..c1acfa9e6 100644 --- a/Models/Gen3/Searcher3Model.cpp +++ b/Models/Gen3/Searcher3Model.cpp @@ -29,6 +29,7 @@ Searcher3Model::Searcher3Model(QObject *parent, Method method) : void Searcher3Model::setMethod(Method method) { this->method = method; + emit headerDataChanged(Qt::Horizontal, 0, columnCount()); } void Searcher3Model::sort(int column, Qt::SortOrder order)