Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #19 from idietmoran/dev
Browse files Browse the repository at this point in the history
updated for patch 4.15
  • Loading branch information
Stateford authored Nov 22, 2017
2 parents 7d0cec2 + 0f37c74 commit 3046296
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 46 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog
All notable changes to this project will be documented in this file.
## [1.0.4]
### Fixed
- Patched for FFXIV patch 4.15

## [1.0.3]
### Added
Expand Down
26 changes: 13 additions & 13 deletions src/arch/x64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ x64::x64(Process* proc)
// get window name
exe_ = new Module("ffxiv_dx11.exe");
// memory offests for dx11 number of party members
numberOfPartyMembers_ = new Offset({ 0x1807FB8, 0x38, 0x10, 0x208, 0x20 });
numberOfPartyMembers_ = new Offset({ 0x0180A038, 0x38, 0x18, 0x20, 0x20, 0x10 });

// if dx11 (64-bit) set static x64 true
if (exe_->getModule(proc))
Expand All @@ -36,20 +36,20 @@ x64::~x64()
void x64::createAllies(Process* proc)
{
// dx11 64-bit offsets
allies_.push_back(new YOU(0x1828AE1));
allies_.push_back(new Ally(0x184A170));
allies_.push_back(new Ally(0x1849F50));
allies_.push_back(new Ally(0x184AC10));
allies_.push_back(new Ally(0x184A5B0));
allies_.push_back(new Ally(0x184A9F0));
allies_.push_back(new Ally(0x184A7D0));
allies_.push_back(new Ally(0x184A390));
allies_.push_back(new Ally(0x184AE30));

allies_.push_back(new YOU(0x182AB51));
allies_.push_back(new Ally(0x184BFD0));
allies_.push_back(new Ally(0x184C1F0));
allies_.push_back(new Ally(0X184C410));
allies_.push_back(new Ally(0x184C630));
allies_.push_back(new Ally(0x184C850));
allies_.push_back(new Ally(0x184CA70));
allies_.push_back(new Ally(0x184CC90));
allies_.push_back(new Ally(0X184CEB0));
// create crossworld allies
alliesCW_.push_back(allies_[0]); // YOU
DWORD64 address = exe_->getAddress();
address += 0x017E6620;
address += 0x017E86A0;

ReadProcessMemory(proc->getHandle(), (void*)address, &address, sizeof(DWORD64), 0);
address += 0x2E8;
Expand All @@ -71,5 +71,5 @@ void x64::updateNumberOfPartyMembers(Process* proc, int &partyMembers)
// check if currently crossworld party
void x64::checkCrossWorldParty(Process* proc)
{
ReadProcessMemory(proc->getHandle(), (void*)(exe_->getAddress() + 0x1848F0C), &inCrossWorldParty_, 1, 0);
ReadProcessMemory(proc->getHandle(), (void*)(exe_->getAddress() + 0x184AF8C), &inCrossWorldParty_, 1, 0);
}
24 changes: 12 additions & 12 deletions src/arch/x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
x86::x86(Process* proc)
{
// handle error when getting invalid module
numberOfPartyMembers_ = new Offset({ 0x11404DC, 0x1C, 0x10, 0x104, 0x1C });
numberOfPartyMembers_ = new Offset({ 0x114151C, 0x1C, 0x10, 0x10, 0x1C, 0x10 });
exe_ = new Module("ffxiv.exe");
if (!exe_->getModule32bit(proc))
{
Expand Down Expand Up @@ -38,21 +38,21 @@ x86::~x86()
void x86::createAllies(Process* proc)
{
// dx9 32-bit offsets
allies_.push_back(new YOU(0x115E431));
allies_.push_back(new Ally(0x117AA30));
allies_.push_back(new Ally(0x117AC50));
allies_.push_back(new Ally(0x117AE70));
allies_.push_back(new Ally(0x117B090));
allies_.push_back(new Ally(0x117B2B0));
allies_.push_back(new Ally(0x117B4D0));
allies_.push_back(new Ally(0x117B6F0));
allies_.push_back(new Ally(0x117B910));
allies_.push_back(new YOU(0x115F441));
allies_.push_back(new Ally(0x117BA40));
allies_.push_back(new Ally(0x117BC60));
allies_.push_back(new Ally(0x117BE80));
allies_.push_back(new Ally(0x117C0A0));
allies_.push_back(new Ally(0x117C2C0));
allies_.push_back(new Ally(0x117C4E0));
allies_.push_back(new Ally(0x117C700));
allies_.push_back(new Ally(0x117C920));

// create crossworld allies
alliesCW_.push_back(allies_[0]); // YOU

DWORD address = exe_->getAddress();
address += 0x010287A4;
address += 0x10297A4;

ReadProcessMemory(proc->getHandle(), (void*)address, &address, sizeof(DWORD64), 0);
address += 0x2E0;
Expand All @@ -75,5 +75,5 @@ void x86::updateNumberOfPartyMembers(Process *proc, int &partyMembers)
void x86::checkCrossWorldParty(Process* proc)
{
// do nothing for the time being
ReadProcessMemory(proc->getHandle(), (void*)(exe_->getAddress() + 0x1179BE4), &inCrossWorldParty_, 1, 0);
ReadProcessMemory(proc->getHandle(), (void*)(exe_->getAddress() + 0x117ABF4), &inCrossWorldParty_, 1, 0);
}
36 changes: 18 additions & 18 deletions src/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,24 +153,25 @@ void Menu::alliesMenu(DWORD &mode, INPUT_RECORD &event, HANDLE &hstdin)

if(GetAsyncKeyState(VK_RETURN) & 0x1 && isConsoleWindowFocussed)
{

if(currentMenuSelection_ == fflogs_->partyMembers_)
{
// TODO: code here for ALL
fflogs_->arch_->openAll(fflogs_->partyMembers_);
}

else if(fflogs_->arch_->getCrossWorldStatus())
{
fflogs_->arch_->getFilteredAlliesCW()[currentMenuSelection_]->openBrowser();
}
else
{
fflogs_->arch_->getFilteredAllies()[currentMenuSelection_]->openBrowser();
}
std::thread t3([=] {
if (currentMenuSelection_ == fflogs_->partyMembers_)
{
fflogs_->arch_->openAll(fflogs_->partyMembers_);
}

else if (fflogs_->arch_->getCrossWorldStatus())
{
fflogs_->arch_->getFilteredAlliesCW()[currentMenuSelection_]->openBrowser();
}
else
{
fflogs_->arch_->getFilteredAllies()[currentMenuSelection_]->openBrowser();
}
});
t3.join();
}
mu_.unlock(); // unlock the thread
std::this_thread::sleep_for(std::chrono::nanoseconds(2));
std::this_thread::sleep_for(std::chrono::nanoseconds(1));
}
}

Expand All @@ -184,7 +185,6 @@ void Menu::start()
GetConsoleMode(hstdin, &mode);
SetConsoleMode(hstdin, 0);


// thread to update the menu
std::thread t1([=, &mode, &event, &hstdin]{ alliesMenu(mode, event, hstdin); });
// thread to get names
Expand All @@ -196,7 +196,7 @@ void Menu::start()
fflogs_->arch_->updateNames(fflogs_->ffxiv_, fflogs_->partyMembers_);
mu_.unlock(); // unlock the thread
// sleep the thread
std::this_thread::sleep_for(std::chrono::nanoseconds(2));
std::this_thread::sleep_for(std::chrono::nanoseconds(1));
}
});

Expand Down
7 changes: 5 additions & 2 deletions src/process/offset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,25 @@ DWORD64 Offset::getMemoryAddress(Process* proc, Module* module)
{
// get offset from the module
DWORD64 address = module->getAddress();
for(int i = 0; i < offsets_.size(); i++)
for(int i = 0; i < offsets_.size() - 1; i++)
{
address += offsets_[i];
ReadProcessMemory(proc->getHandle(), (void*)(address), &address, sizeof(DWORD), 0);
}
address += offsets_[offsets_.size() - 1];
return address;
}

DWORD64 Offset::getMemoryAddress64(Process* proc, Module* module)
{
// get offset from the module
DWORD64 address = module->getAddress();
for (int i = 0; i < offsets_.size(); i++)
for (int i = 0; i < offsets_.size() - 1; i++)
{
address += offsets_[i];
ReadProcessMemory(proc->getHandle(), (void*)(address), &address, sizeof(DWORD64), 0);
}
address += offsets_[offsets_.size() - 1];

return address;
}
2 changes: 1 addition & 1 deletion src/updater/updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Updater::Updater()
{
currentVersion_ = L"1.0.3";
currentVersion_ = L"1.0.4";
apiUrl_ = L"http://idietmoran.com/ffxiv/party-logs/latest";
currentMenu_ = CHECKING;
}
Expand Down

0 comments on commit 3046296

Please sign in to comment.