1
0
forked from metin2/client

Used shared pointers and string streams to read data from the CEterPackManager

This commit is contained in:
2024-12-24 06:54:43 +02:00
parent 603f2207ef
commit c21c99393d
50 changed files with 363 additions and 3668 deletions

View File

@ -89,13 +89,13 @@ void string_replace_word(const char* base, int base_len, const char* src, int sr
bool CPythonSkill::RegisterSkillTable(const char * c_szFileName)
{
const VOID* pvData;
CMappedFile kFile;
if (!CEterPackManager::Instance().Get(kFile, c_szFileName, &pvData))
CEterPackManager::TPackDataPtr data;
CMemoryTextFileLoader textFileLoader;
if (!CEterPackManager::Instance().Get(c_szFileName, data))
return false;
CMemoryTextFileLoader textFileLoader;
textFileLoader.Bind(kFile.Size(), pvData);
textFileLoader.Bind(data->size(), data->data());
// OVERWRITE_SKILLPROTO_POLY
std::string src_poly_rand;
@ -279,13 +279,13 @@ void CPythonSkill::__RegisterNormalIconImage(TSkillData & rData, const char * c_
extern const DWORD c_iSkillIndex_Riding;
bool CPythonSkill::RegisterSkillDesc(const char * c_szFileName)
{
const VOID* pvData;
CMappedFile kFile;
if (!CEterPackManager::Instance().Get(kFile, c_szFileName, &pvData))
CEterPackManager::TPackDataPtr data;
CMemoryTextFileLoader textFileLoader;
if (!CEterPackManager::Instance().Get(c_szFileName, data))
return false;
CMemoryTextFileLoader textFileLoader;
textFileLoader.Bind(kFile.Size(), pvData);
textFileLoader.Bind(data->size(), data->data());
CTokenVector TokenVector;
for (DWORD i = 0; i < textFileLoader.GetLineCount(); ++i)