Decompile 4 functions in Source/Contents/Jobs/JobInheritance.cpp, Source/Client/Session.h, ...
Batch #1842 by ragnarok-clanker: 0 byte-identical, 4 confirmed by peer review. - fn_23837 CSession::GetWeaponActName: logic confirmed by peer review - fn_23838 CSession::GetWeaponEffectActName: logic confirmed by peer review - fn_23839 CSession::GetWeaponEffectSprName: logic confirmed by peer review - fn_23840 CSession::GetWeaponSprName: logic confirmed by peer review 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
f05827650a
commit
ef21913c3f
3 changed files with 116 additions and 3 deletions
|
|
@ -139,7 +139,10 @@ public:
|
||||||
/* 5254 */ std::map<int, float> m_npcLocationRadius;
|
/* 5254 */ std::map<int, float> m_npcLocationRadius;
|
||||||
/* 525C */ unsigned char unknown_525C[0x44];
|
/* 525C */ unsigned char unknown_525C[0x44];
|
||||||
/* 52A0 */ const char* const* m_sexNames;
|
/* 52A0 */ const char* const* m_sexNames;
|
||||||
/* 52A4 */ unsigned char unknown_52A4[0x14];
|
/* 52A4 */ unsigned char unknown_52A4[0x08];
|
||||||
|
/* 52AC */ const char* const* m_weaponNamesBegin;
|
||||||
|
/* 52B0 */ const char* const* m_weaponNamesEnd;
|
||||||
|
/* 52B4 */ unsigned char unknown_52B4[0x04];
|
||||||
/* 52B8 */ std::vector<const char*> m_accessoryNames;
|
/* 52B8 */ std::vector<const char*> m_accessoryNames;
|
||||||
/* 52C4 */ unsigned char unknown_52C4[0x294];
|
/* 52C4 */ unsigned char unknown_52C4[0x294];
|
||||||
/* 5558 */ int unknown_5558;
|
/* 5558 */ int unknown_5558;
|
||||||
|
|
@ -184,7 +187,8 @@ public:
|
||||||
/* 7FA8 */ CInstantVar m_options;
|
/* 7FA8 */ CInstantVar m_options;
|
||||||
/* 7FB4 */ unsigned char unknown_7FB4[0xC0];
|
/* 7FB4 */ unsigned char unknown_7FB4[0xC0];
|
||||||
/* 8074 */ int unknown_8074;
|
/* 8074 */ int unknown_8074;
|
||||||
/* 8078 */ unsigned char unknown_8078[0x3C];
|
/* 8078 */ const char* const* m_jobSpriteNames;
|
||||||
|
/* 807C */ unsigned char unknown_807C[0x38];
|
||||||
/* 80B4 */ std::map<std::string, int> m_nameToId;
|
/* 80B4 */ std::map<std::string, int> m_nameToId;
|
||||||
/* 80BC */ std::map<int, SessionShop> m_shops;
|
/* 80BC */ std::map<int, SessionShop> m_shops;
|
||||||
/* 80C4 */ unsigned char unknown_80C4[0x58];
|
/* 80C4 */ unsigned char unknown_80C4[0x58];
|
||||||
|
|
@ -272,6 +276,12 @@ public:
|
||||||
int SyncUnknown0E98();
|
int SyncUnknown0E98();
|
||||||
void LoadXmlTables();
|
void LoadXmlTables();
|
||||||
std::string GetAccessoryName(int id);
|
std::string GetAccessoryName(int id);
|
||||||
|
std::string GetWeaponName(int weapon);
|
||||||
|
const char* GetWeaponClassName(int item);
|
||||||
|
std::string GetWeaponActName(int job, int sex, int weapon, int weaponItem, int costume);
|
||||||
|
std::string GetWeaponSprName(int job, int sex, int weapon, int weaponItem, int costume);
|
||||||
|
std::string GetWeaponEffectActName(int job, int sex, int weapon, int weaponItem, int effect, int costume);
|
||||||
|
std::string GetWeaponEffectSprName(int job, int sex, int weapon, int weaponItem, int effect, int costume);
|
||||||
void CollectCardItems();
|
void CollectCardItems();
|
||||||
void SetHomunculusAutoFeed(bool enabled);
|
void SetHomunculusAutoFeed(bool enabled);
|
||||||
void SetPetAutoFeed(bool enabled);
|
void SetPetAutoFeed(bool enabled);
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ public:
|
||||||
std::string GetRobeSprName(int robe, int);
|
std::string GetRobeSprName(int robe, int);
|
||||||
std::string GetHeadName(int type, int job, int sex, int* head);
|
std::string GetHeadName(int type, int job, int sex, int* head);
|
||||||
std::string GetHeadPalName(int head, int job, int sex, int palette);
|
std::string GetHeadPalName(int head, int job, int sex, int palette);
|
||||||
|
std::string GetWeaponResourceName(int type, int job, int sex, int weapon, int weaponItem, int costume);
|
||||||
|
std::string GetWeaponEffectResourceName(int type, int job, int sex, int weapon, int weaponItem, int effect, int costume);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern EquipmentResourceMgr* g_equipmentResourceMgr;
|
extern EquipmentResourceMgr* g_equipmentResourceMgr;
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,15 @@
|
||||||
#include "Contents/Items/ItemDescription.h"
|
#include "Contents/Items/ItemDescription.h"
|
||||||
#include "Contents/Skills/SkillInfo.h"
|
#include "Contents/Skills/SkillInfo.h"
|
||||||
#include "Client/Session.h"
|
#include "Client/Session.h"
|
||||||
|
#include "Contents/EquipmentResourceMgr.h"
|
||||||
#include "Contents/Jobs/JobInheritance.h"
|
#include "Contents/Jobs/JobInheritance.h"
|
||||||
#include "Contents/Jobs/JobId.h"
|
#include "Contents/Jobs/JobId.h"
|
||||||
#include "Contents/Skills/PlayerSkillBundle.h"
|
#include "Contents/Skills/PlayerSkillBundle.h"
|
||||||
#include "Script/LuaScript.h"
|
#include "Script/LuaScript.h"
|
||||||
|
#include "Utility/Text/FormatString.h"
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
// GLOBAL: gl_24496
|
// GLOBAL: gl_24496
|
||||||
int g_screenShakeDuration;
|
int g_screenShakeDuration;
|
||||||
|
|
@ -413,6 +415,105 @@ bool __stdcall IsJobWeaponAllowed(int job, int slot, std::int64_t weapon) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// OFFSET: 0x00E0AB60
|
||||||
|
// FUNCTION: fn_23803
|
||||||
|
std::string CSession::GetWeaponName(int weapon) {
|
||||||
|
const unsigned index = GetRealWeaponId(weapon);
|
||||||
|
if (index < static_cast<unsigned>(this->m_weaponNamesEnd - this->m_weaponNamesBegin)) {
|
||||||
|
return this->m_weaponNamesBegin[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
return this->m_weaponNamesBegin[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00DE3800
|
||||||
|
// FUNCTION: fn_23482
|
||||||
|
const char* CSession::GetWeaponClassName(int item) {
|
||||||
|
const char* name = nullptr;
|
||||||
|
if (g_session.m_hotkeyScript->Call("ReqWeaponNameByClassNum", "d>s", FindItemDescription(item).unknown_0040, &name)) {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00BAD420
|
||||||
|
// FUNCTION: fn_19759
|
||||||
|
std::string EquipmentResourceMgr::GetWeaponResourceName(int type, int job, int sex, int weapon, int weaponItem, int costume) {
|
||||||
|
std::string result;
|
||||||
|
std::string jobName;
|
||||||
|
std::string sexName;
|
||||||
|
std::string weaponName;
|
||||||
|
|
||||||
|
const int spriteJob = g_session.GetSpriteJob(job <= 31 ? job : job + 3950, costume, true);
|
||||||
|
jobName = g_session.m_jobSpriteNames[spriteJob];
|
||||||
|
sexName = g_session.GetSexName(sex);
|
||||||
|
|
||||||
|
if (weaponItem == -1) {
|
||||||
|
weaponName = g_session.GetWeaponName(weapon);
|
||||||
|
result = this->GetBodyRacePrefix(spriteJob) +
|
||||||
|
FormatOwnedString("\\%s_%s%s.%s", jobName.c_str(), sexName.c_str(), weaponName.c_str(), g_equipmentResourceExtensions[type]);
|
||||||
|
} else {
|
||||||
|
result = this->GetBodyRacePrefix(spriteJob + 3950) +
|
||||||
|
FormatOwnedString("\\%s_%s%s.%s", jobName.c_str(), sexName.c_str(), g_session.GetWeaponClassName(weaponItem), g_equipmentResourceExtensions[type]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00BACEE0
|
||||||
|
// FUNCTION: fn_19758
|
||||||
|
std::string EquipmentResourceMgr::GetWeaponEffectResourceName(int type, int job, int sex, int weapon, int weaponItem, int effect, int costume) {
|
||||||
|
std::string result;
|
||||||
|
std::string jobName;
|
||||||
|
std::string sexName;
|
||||||
|
std::string weaponName;
|
||||||
|
const char* const effects[] = {"_검광", "_발광"};
|
||||||
|
|
||||||
|
const int spriteJob = g_session.GetSpriteJob(job <= 31 ? job : job + 3950, costume, true);
|
||||||
|
jobName = g_session.m_jobSpriteNames[spriteJob];
|
||||||
|
sexName = g_session.GetSexName(sex);
|
||||||
|
weaponName = g_session.GetWeaponName(weapon);
|
||||||
|
|
||||||
|
const char* const suffix = effects[effect];
|
||||||
|
if (weaponItem == -1) {
|
||||||
|
result = this->GetBodyRacePrefix(spriteJob) +
|
||||||
|
FormatOwnedString("\\%s_%s%s%s.%s", jobName.c_str(), sexName.c_str(), weaponName.c_str(), suffix, g_equipmentResourceExtensions[type]);
|
||||||
|
} else {
|
||||||
|
result = this->GetBodyRacePrefix(spriteJob) +
|
||||||
|
FormatOwnedString("\\%s_%s%s%s.%s", jobName.c_str(), sexName.c_str(), g_session.GetWeaponClassName(weaponItem), suffix, g_equipmentResourceExtensions[type]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00E19370
|
||||||
|
// FUNCTION: fn_23837
|
||||||
|
std::string CSession::GetWeaponActName(int job, int sex, int weapon, int weaponItem, int costume) {
|
||||||
|
return g_equipmentResourceMgr->GetWeaponResourceName(0, job, sex, weapon, weaponItem, costume);
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00E193E0
|
||||||
|
// FUNCTION: fn_23838
|
||||||
|
std::string CSession::GetWeaponEffectActName(int job, int sex, int weapon, int weaponItem, int effect, int costume) {
|
||||||
|
return std::string(g_equipmentResourceMgr->GetWeaponEffectResourceName(0, job, sex, weapon, weaponItem, effect, costume));
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00E19450
|
||||||
|
// FUNCTION: fn_23839
|
||||||
|
std::string CSession::GetWeaponEffectSprName(int job, int sex, int weapon, int weaponItem, int effect, int costume) {
|
||||||
|
std::string name = g_equipmentResourceMgr->GetWeaponEffectResourceName(1, job, sex, weapon, weaponItem, effect, costume);
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00E194C0
|
||||||
|
// FUNCTION: fn_23840
|
||||||
|
std::string CSession::GetWeaponSprName(int job, int sex, int weapon, int weaponItem, int costume) {
|
||||||
|
std::string name = g_equipmentResourceMgr->GetWeaponResourceName(1, job, sex, weapon, weaponItem, costume);
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: 0x00DFBE10
|
// OFFSET: 0x00DFBE10
|
||||||
// FUNCTION: fn_23590
|
// FUNCTION: fn_23590
|
||||||
bool __stdcall IsVisibleJob(int job) {
|
bool __stdcall IsVisibleJob(int job) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue