rodecomp/Source/Contents/Jobs/JobNameInitialization.cpp
ragnarok-clanker e4be8f4190 Decompile 18 functions in Source/Client/Application/UnhandledExceptionHandler.cpp, Source/Client/Session.h, ...
Batch #2077 by ragnarok-clanker: 0 byte-identical, 18 confirmed by peer review.

- fn_04709 TopLevelExceptionFilter: logic confirmed by peer review (already on main)
- fn_08004 C3dGrannyModelRes::PlayAnimation: logic confirmed by peer review
- fn_09315 UIRequestJoinPartyWnd::SendMsg: logic confirmed by peer review
- fn_19761 EffectParticle::EffectParticle: logic confirmed by peer review
- fn_19768 EffectParticle::InitializeRecords: logic confirmed by peer review
- fn_20007 AttachedEffect::AttachedEffect: logic confirmed by peer review
- fn_20076 CreateEffectParticle: logic confirmed by peer review
- fn_20088 UpdatePartyEffect: logic confirmed by peer review
- fn_20991 CRenderObject::CRenderObject: logic confirmed by peer review
- fn_21069 ?CreatePartyEffect@?A0xba063134@@YAPAUAttachedEffect@@AAUEffectActor@@AAUPartyEffectMode@@@Z: logic confirmed by peer review
- fn_21086 RenderObjectState::Reset: logic confirmed by peer review
- fn_23396 CSession::GetJobName: logic confirmed by peer review
- fn_23495 CSession::InitJobNameTable: logic confirmed by peer review
- fn_23788 CSession::GetMonsterActName: logic confirmed by peer review
- fn_23791 CSession::GetMonsterTalkText: logic confirmed by peer review
- fn_20987 EffectActor::EffectActor: logic confirmed by peer review
- fn_22363 CSoundMaker::CSoundMaker: logic confirmed by peer review
- fn_24251 CEffectMaker::CEffectMaker: logic confirmed by peer review

Reviewed-by: ragnarok-clanker
2026-10-29 09:48:08 +00:00

78 lines
2.6 KiB
C++

#include "Contents/Jobs/JobNames.h"
#include "Client/Session.h"
#include "Contents/Jobs/JobId.h"
#include "Script/LuaScript.h"
// OFFSET: 0x00DE67E0
// FUNCTION: fn_23495
void CSession::InitJobNameTable(JobNameInitialization& context) {
this->m_jobNameTable.resize(32003, "Poring");
const char* name = nullptr;
const auto player = [&](int first, int end) {
for (int id = first; id < end; ++id) {
if (context.playerScript.Call("ReqPCJobName", "d>s", id, &name) && *name != '\0') {
this->m_jobNameTable[id] = name;
}
if (context.playerScript.Call("ReqPCJobNameMan", "d>s", id, &name) && *name != '\0') {
this->m_jobNameTableMan[id] = name;
}
if (context.playerScript.Call("ReqPCJobNameWoman", "d>s", id, &name) && *name != '\0') {
this->m_jobNameTableWoman[id] = name;
}
}
};
player(JT_NOVICE, JT_MAX_BASIC);
player(JT_NOVICE_H, JT_UPPER_EXTENDED_JOB2_END);
player(JT_RUNE_KNIGHT_2ND, JT_SECOND_JOB_END);
player(JT_DRUID, JT_2004_JOB_LAST);
const auto other = [&](int first, int end) {
for (int id = first; id < end; ++id) {
context.otherScript.Call("ReqJobName", "d>s", id, &this->m_jobNameTable[id]);
}
};
other(JT_WARPNPC, JT_SAFETYWALL);
other(JT_NEW_NPC_START, JT_MON_BEGIN);
other(JT_SCORPION, JT_MONSTER_LAST);
other(JT_NPC_START, JT_NPC_NAME_END);
other(JT_EXTENDED_JOB_NAME_START, JT_EXTENDED_JOB_NAME_END);
const char* const homunculi[] = {"LIF", "AMISTR", "FILIR", "VANILMIRTH", "LIF2", "AMISTR2", "FILIR2", "VANILMIRTH2",
"LIF_H", "AMISTR_H", "FILIR_H", "VANILMIRTH_H", "LIF_H2", "AMISTR_H2", "FILIR_H2", "VANILMIRTH_H2"};
for (unsigned index = 0; index < 16; ++index) {
this->m_jobNameTable[JT_MER_LIF + index] = homunculi[index];
}
this->m_jobNameTable[JT_MER_EIRA] = "MER_EIRA";
this->m_jobNameTable[JT_MER_DIETER] = "MER_DIETER";
this->m_jobNameTable[JT_MER_BAYERI] = "MER_BAYERI";
this->m_jobNameTable[JT_MER_ELEANOR] = "MER_ELEANOR";
this->m_jobNameTable[JT_MER_SERA] = "MER_SERA";
for (unsigned id = JT_MER_ARCHER01; id <= JT_MER_ARCHER10; ++id) {
this->m_jobNameTable[id] = "여\\활용병";
}
for (unsigned id = JT_MER_LANCER01; id <= JT_MER_LANCER10; ++id) {
this->m_jobNameTable[id] = "남\\창용병";
}
for (unsigned id = JT_MER_SWORDMAN01; id <= JT_MER_SWORDMAN10; ++id) {
this->m_jobNameTable[id] = "남\\검용병";
}
context.sexLabels.resize(2, "F");
context.sexLabels[0] = "F";
context.sexLabels[1] = "M";
context.levels20.resize(20, 0);
context.useLevels.resize(7999, 0);
context.otherLevels.resize(258, 0);
context.homunculusLevels.resize(61, 0);
}