Decompile 2 functions in Source/Contents/ClientState.cpp, Source/Client/Session.h, ...
Batch #6512 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_24217 CSession::ReadReplayQuests: logic confirmed by peer review - fn_05465 CRenewQuestMgr::ReadOngoingQuests: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, gordaoprogramas, willerthal Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
d18970040b
commit
fcad6e032a
4 changed files with 52 additions and 2 deletions
|
|
@ -673,6 +673,7 @@ public:
|
|||
std::uint32_t ReadReplayCharacter(const std::vector<unsigned char>& data);
|
||||
std::uint32_t ReadReplayStats(const std::vector<unsigned char>& data);
|
||||
std::uint32_t ReadReplayCompanions(const std::vector<unsigned char>& data);
|
||||
std::uint32_t ReadReplayQuests(const std::vector<unsigned char>& data);
|
||||
std::uint32_t ReadReplayMessenger(const std::vector<unsigned char>& data);
|
||||
std::uint32_t ReadReplayItems(const std::vector<unsigned char>& data);
|
||||
std::uint32_t ReadReplayShops(const std::vector<unsigned char>& data);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include "Contents/Actors/Pc.h"
|
||||
#include "Contents/EntryQueueMgr.h"
|
||||
#include "Contents/MessageTable.h"
|
||||
#include "Contents/RenewQuestMgr.h"
|
||||
#include "Contents/World/World.h"
|
||||
#include "UI/EntryQueue/UIEntryQueueWnd.h"
|
||||
#include "UI/Window/UIWindow.h"
|
||||
|
|
@ -863,6 +864,54 @@ std::uint32_t CSession::ReadReplayCompanions(const std::vector<unsigned char>& d
|
|||
return offset;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00E48100
|
||||
// FUNCTION: fn_24217
|
||||
std::uint32_t CSession::ReadReplayQuests(const std::vector<unsigned char>& data) {
|
||||
if (data.begin() == data.end()) {
|
||||
return 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
std::uint32_t offset = 6;
|
||||
ReplayBlockHeader header{};
|
||||
std::memcpy(&header, data.data(), sizeof(header));
|
||||
if (header.id != 3500) {
|
||||
return 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
g_renewQuestMgr->m_ongoingQuests.clear();
|
||||
g_renewQuestMgr->SetParameter(3502, 0x18);
|
||||
while (offset < data.size()) {
|
||||
header = {};
|
||||
std::memcpy(&header, data.data() + offset, sizeof(header));
|
||||
offset += 6;
|
||||
switch (header.id) {
|
||||
case 3501:
|
||||
return offset;
|
||||
case 3502: {
|
||||
int parameter;
|
||||
std::memcpy(¶meter, data.data() + offset, header.bytes);
|
||||
offset += header.bytes;
|
||||
g_renewQuestMgr->SetParameter(3502, parameter);
|
||||
break;
|
||||
}
|
||||
case 3510: {
|
||||
const std::uint32_t bytes = header.bytes;
|
||||
char* buffer = new char[bytes];
|
||||
std::memcpy(buffer, data.data() + offset, bytes);
|
||||
offset += bytes;
|
||||
g_renewQuestMgr->ReadOngoingQuests(buffer, bytes);
|
||||
delete buffer;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
offset += header.bytes;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00E488C0
|
||||
// FUNCTION: fn_24221
|
||||
void CSession::UpdateBodyStyle(int job, int style, int renderJob) {
|
||||
|
|
|
|||
|
|
@ -726,7 +726,7 @@ bool CRenewQuestMgr::SetOngoingSimpleView(unsigned int id, bool simpleView) {
|
|||
|
||||
// OFFSET: 0x0067B8F0
|
||||
// FUNCTION: fn_05465
|
||||
void CRenewQuestMgr::ReadOngoingQuests(const char* buffer) {
|
||||
void CRenewQuestMgr::ReadOngoingQuests(const char* buffer, unsigned int) {
|
||||
int offset = 4;
|
||||
const unsigned int count = *reinterpret_cast<const unsigned int*>(buffer);
|
||||
for (unsigned int index = 0; index < count; ++index) {
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ public:
|
|||
bool Clear();
|
||||
void LoadQuestInfo();
|
||||
void AddOngoingQuest(unsigned int id, RenewQuestOngoingInfo& info);
|
||||
void ReadOngoingQuests(const char* buffer);
|
||||
void ReadOngoingQuests(const char* buffer, unsigned int size);
|
||||
void RemoveStatusRequest(unsigned int id);
|
||||
void AddStatusRequest(unsigned int id);
|
||||
void AddIconTooltip(std::string_view icon, std::string_view tooltip);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue