Decompile fn_23848 (CSession::LoadXmlTables)
Batch #1684 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_23848 CSession::LoadXmlTables: logic confirmed by peer review Reviewed-by: ragnarok-clanker Adds to the build: Source/Contents/ClientXmlTables.cpp
This commit is contained in:
parent
429f04c98d
commit
7a88edb84c
4 changed files with 41 additions and 1 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include "Contents/Items/ItemInfo.h"
|
||||
#include "Contents/Skills/PlayerSkillBundle.h"
|
||||
#include "Contents/UserData/NormalItemSlots.h"
|
||||
#include "Resource/XmlNode.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
|
@ -81,7 +82,11 @@ public:
|
|||
/* 0FE4 */ std::list<std::uint32_t> m_pingSamples;
|
||||
/* 0FEC */ unsigned char unknown_0FEC[0x6C];
|
||||
/* 1058 */ int m_petActionTable[5][5][7];
|
||||
/* 1314 */ unsigned char unknown_1314[0x2F8];
|
||||
/* 1314 */ unsigned char unknown_1314[0x258];
|
||||
/* 156C */ XmlDocument m_petTalkTable;
|
||||
/* 159C */ XmlDocument m_monsterSkillInfo;
|
||||
/* 15CC */ XmlDocument m_monsterTalkTable;
|
||||
/* 15FC */ unsigned char unknown_15FC[0x10];
|
||||
/* 160C */ char m_navigationPlayerMap[0x1C];
|
||||
/* 1628 */ int m_job;
|
||||
/* 162C */ unsigned char unknown_162C[0x24];
|
||||
|
|
@ -215,6 +220,7 @@ public:
|
|||
int MercSkillLevel(int skillId) const;
|
||||
int HomunSkillLevel(int skillId) const;
|
||||
int SyncUnknown0E98();
|
||||
void LoadXmlTables();
|
||||
std::string GetAccessoryName(int id);
|
||||
void CollectCardItems();
|
||||
int GetRobeAlpha(int robeId);
|
||||
|
|
@ -244,6 +250,8 @@ static_assert(offsetof(CSession, m_serverTimeOffset) == 0x794);
|
|||
static_assert(offsetof(CSession, m_serverTimeAdjustCount) == 0x798);
|
||||
static_assert(offsetof(CSession, m_averagePing) == 0x7A0);
|
||||
static_assert(offsetof(CSession, m_pingSamples) == 0xFE4);
|
||||
static_assert(offsetof(CSession, m_petTalkTable) == 0x156C);
|
||||
static_assert(offsetof(CSession, m_monsterTalkTable) == 0x15CC);
|
||||
static_assert(offsetof(CSession, m_navigationPlayerMap) == 0x160C);
|
||||
static_assert(offsetof(CSession, unknown_1738) == 0x1738);
|
||||
static_assert(offsetof(CSession, unknown_1740) == 0x1740);
|
||||
|
|
|
|||
28
Source/Contents/ClientXmlTables.cpp
Normal file
28
Source/Contents/ClientXmlTables.cpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#include "Client/Input/InputCharset.h"
|
||||
#include "Client/Session.h"
|
||||
#include "File/File.h"
|
||||
#include "Resource/XmlNode.h"
|
||||
|
||||
// OFFSET: 0x00E1A2B0
|
||||
// FUNCTION: fn_23848
|
||||
void CSession::LoadXmlTables() {
|
||||
CFile petTalkFile;
|
||||
petTalkFile.Open(g_serverLanguage->ServiceName("PetTalkTable.xml"), 0, true, false);
|
||||
const char* petTalk = static_cast<const char*>(petTalkFile.GetData());
|
||||
this->m_petTalkTable.Parse(petTalk, petTalk + petTalkFile.GetSize());
|
||||
petTalkFile.Close();
|
||||
|
||||
CFile skillFile;
|
||||
if (skillFile.Open("MonsterSkillInfo.xml", 0, true, false)) {
|
||||
const char* skillInfo = static_cast<const char*>(skillFile.GetData());
|
||||
this->m_monsterSkillInfo.Parse(skillInfo, skillInfo + skillFile.GetSize());
|
||||
skillFile.Close();
|
||||
}
|
||||
|
||||
CFile talkFile;
|
||||
if (talkFile.Open("MonsterTalkTable.xml", 0, true, false)) {
|
||||
const char* monsterTalk = static_cast<const char*>(talkFile.GetData());
|
||||
this->m_monsterTalkTable.Parse(monsterTalk, monsterTalk + talkFile.GetSize());
|
||||
talkFile.Close();
|
||||
}
|
||||
}
|
||||
|
|
@ -23,6 +23,9 @@ struct XmlNode {
|
|||
};
|
||||
|
||||
struct XmlDocument : XmlNode {
|
||||
// INLINED
|
||||
XmlDocument() : XmlNode("XMLDocument"), buffer(nullptr) {
|
||||
}
|
||||
void Reset();
|
||||
char* TerminateName(char* begin, char* end);
|
||||
char* ParseElements(XmlNode* parent, char* cursor, char* end);
|
||||
|
|
|
|||
|
|
@ -291,6 +291,7 @@
|
|||
"Source/Contents/ClientItemLists.cpp": 4,
|
||||
"Source/Contents/ClientState.cpp": 4,
|
||||
"Source/Contents/ClientTiming.cpp": 4,
|
||||
"Source/Contents/ClientXmlTables.cpp": 4,
|
||||
"Source/Contents/Configuration/OptionWriter.cpp": 4,
|
||||
"Source/Contents/Configuration/ScriptOptions.cpp": 4,
|
||||
"Source/Contents/Configuration/ServiceConfiguration.cpp": 4,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue