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
This commit is contained in:
ragnarok-clanker 2026-10-29 09:48:08 +00:00
commit e4be8f4190
31 changed files with 96 additions and 107 deletions

View file

@ -40,8 +40,8 @@ namespace {
// INLINED
const char* ReadPlayerJobName(int jobId) {
const char* const* namesBegin = g_session.m_jobNamesBegin;
const char* const* namesEnd = g_session.m_jobNamesEnd;
const char* const* namesBegin = g_session.m_jobNameTable.data();
const char* const* namesEnd = namesBegin + g_session.m_jobNameTable.size();
if (!namesBegin || !namesEnd || namesBegin >= namesEnd) {
return "";

View file

@ -19,6 +19,7 @@
class CActRes;
class CRenderObject;
class LuaScript;
struct JobNameInitialization;
struct ActionFrame;
struct WindowDialogs;
@ -103,9 +104,10 @@ public:
/* 0F70 */ unsigned char unknown_0F70[0x08];
/* 0F78 */ const char* const* m_humanFemaleHeadNames;
/* 0F7C */ unsigned char unknown_0F7C[0x2C];
/* 0FA8 */ const char* const* m_jobNamesBegin;
/* 0FAC */ const char* const* m_jobNamesEnd;
/* 0FB0 */ unsigned char unknown_0FB0[0x34];
/* 0FA8 */ std::vector<const char*> m_jobNameTable;
/* 0FB4 */ std::map<unsigned, const char*> m_jobNameTableWoman;
/* 0FBC */ std::map<unsigned, const char*> m_jobNameTableMan;
/* 0FC4 */ unsigned char unknown_0FC4[0x20];
/* 0FE4 */ std::list<std::uint32_t> m_pingSamples;
/* 0FEC */ unsigned char unknown_0FEC[0x24];
/* 1010 */ std::uint32_t unknown_1010;
@ -295,6 +297,8 @@ public:
int MercSkillLevel(int skillId) const;
int HomunSkillLevel(int skillId) const;
CRenderObject* FindGameActor(std::uint32_t aid) const;
const char* GetJobName(unsigned job, int sex);
void InitJobNameTable(JobNameInitialization& context);
int SyncUnknown0E98();
void LoadXmlTables();
std::string GetAccessoryName(int id);
@ -398,8 +402,10 @@ static_assert(offsetof(CSession, m_playerX) == 0xF18);
static_assert(offsetof(CSession, m_playerY) == 0xF1C);
static_assert(offsetof(CSession, m_score1) == 0xF28);
static_assert(offsetof(CSession, m_score2) == 0xF2C);
static_assert(offsetof(CSession, m_jobNamesBegin) == 0xFA8);
static_assert(offsetof(CSession, m_jobNamesEnd) == 0xFAC);
static_assert(offsetof(CSession, m_jobNameTable) == 0xFA8);
static_assert(offsetof(CSession, m_jobNameTableWoman) == 0xFB4);
static_assert(offsetof(CSession, m_jobNameTableMan) == 0xFBC);
static_assert(offsetof(CSession, m_pingSamples) == 0xFE4);
static_assert(offsetof(CSession, m_head) == 0xED8);
static_assert(offsetof(CSession, m_headPalette) == 0xEF0);
static_assert(offsetof(CSession, m_humanMaleHeadNames) == 0xF6C);

View file

@ -20,7 +20,7 @@
// OFFSET: 0x00CA8730
// FUNCTION: fn_20991
CRenderObject::CRenderObject(ResourceMgr& resources, JobNames& names) : render(resources, names) {
CRenderObject::CRenderObject() {
}
// OFFSET: 0x00CA8F90

View file

@ -11,7 +11,7 @@ struct SpriteQuad;
class CRenderObject : public CGameObject {
public:
CRenderObject(ResourceMgr& resources, JobNames& names);
CRenderObject();
~CRenderObject() override;
bool Update() override;
void SendObjectMessage(CGameObject* sender, int message, int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k, int l, int m) override;

View file

@ -1,4 +1,4 @@
#include "Contents/Jobs/JobNames.h"
#include "Client/Session.h"
#include "Contents/Actors/RenderObjectState.h"
#include "Resource/Sprites/ActionResource.h"
#include "Resource/ResourceMgr.h"
@ -9,8 +9,8 @@
#include <timeapi.h>
// INLINED
RenderObjectState::RenderObjectState(ResourceMgr& resources, JobNames& names) : sprite(nullptr), action(nullptr) {
this->Reset(resources, names);
RenderObjectState::RenderObjectState() : sprite(nullptr), action(nullptr) {
this->Reset();
}
// INLINED
@ -26,7 +26,7 @@ RenderObjectState::~RenderObjectState() {
// OFFSET: 0x00CAF990
// FUNCTION: fn_21086
void RenderObjectState::Reset(ResourceMgr& resources, JobNames& names) {
void RenderObjectState::Reset() {
this->position.x = 0;
this->position.y = 0;
this->position.z = 0;
@ -64,14 +64,14 @@ void RenderObjectState::Reset(ResourceMgr& resources, JobNames& names) {
char spriteName[128];
char actionName[128];
std::sprintf(spriteName, "NPC\\%s.spr", names.Lookup(46, -1));
std::sprintf(actionName, "NPC\\%s.act", names.Lookup(46, -1));
std::sprintf(spriteName, "NPC\\%s.spr", g_session.GetJobName(46, -1));
std::sprintf(actionName, "NPC\\%s.act", g_session.GetJobName(46, -1));
if (this->sprite) {
this->sprite->Release();
}
this->sprite = static_cast<CSprRes*>(resources.Load(spriteName));
this->sprite = static_cast<CSprRes*>(ResourceMgr::Instance().Load(spriteName));
if (this->sprite) {
++this->sprite->references;
@ -81,7 +81,7 @@ void RenderObjectState::Reset(ResourceMgr& resources, JobNames& names) {
this->action->Release();
}
this->action = static_cast<CActRes*>(resources.Load(actionName));
this->action = static_cast<CActRes*>(ResourceMgr::Instance().Load(actionName));
if (this->action) {
++this->action->references;

View file

@ -8,15 +8,14 @@
#include <cstdint>
#include <string>
struct JobNames;
class ResourceMgr;
class CSprRes;
class CActRes;
struct RenderObjectState {
RenderObjectState(ResourceMgr& resources, JobNames& names);
RenderObjectState();
~RenderObjectState();
void Reset(ResourceMgr& resources, JobNames& names);
void Reset();
RenderObjectState(const RenderObjectState&) = delete;
RenderObjectState& operator=(const RenderObjectState&) = delete;

View file

@ -43,7 +43,7 @@ inline RagEffectState::~RagEffectState() {
// OFFSET: 0x00BF84B0
// FUNCTION: fn_20007
AttachedEffect::AttachedEffect(ResourceMgr& resources, JobNames& names) : CRenderObject(resources, names) {
AttachedEffect::AttachedEffect() {
}
AttachedEffect::~AttachedEffect() = default;

View file

@ -7,7 +7,7 @@
#include <cstddef>
struct AttachedEffect : CRenderObject {
AttachedEffect(ResourceMgr& resources, JobNames& names);
AttachedEffect();
~AttachedEffect() override;
/* 0138 */ RagEffectState state;

View file

@ -16,6 +16,6 @@ EffectAttachments EffectActorState::Attachments() {
// OFFSET: 0x00CA82E0
// FUNCTION: fn_20987
EffectActor::EffectActor(ResourceMgr& resources, JobNames& names) : CRenderObject(resources, names) {
EffectActor::EffectActor() {
this->render.unknown_0130[0] = 0;
}

View file

@ -20,7 +20,7 @@ struct EffectActorState {
};
struct EffectActor : CRenderObject {
EffectActor(ResourceMgr& resources, JobNames& names);
EffectActor();
bool EffectVisible() const;
/* 0138 */ EffectActorState state;

View file

@ -2,7 +2,7 @@
// OFFSET: 0x00E4A2B0
// FUNCTION: fn_24251
CEffectMaker::CEffectMaker(ResourceMgr& resources, JobNames& names) : EffectActor(resources, names) {
CEffectMaker::CEffectMaker() {
this->unknown_0160 = -1;
this->unknown_015C = 360;
this->unknown_0158 = 360;

View file

@ -6,7 +6,7 @@
#include <cstddef>
struct CEffectMaker : EffectActor {
CEffectMaker(ResourceMgr& resources, JobNames& names);
CEffectMaker();
/* 0158 */ int unknown_0158;
/* 015C */ int unknown_015C;

View file

@ -3,16 +3,16 @@
// OFFSET: 0x00BAD940
// FUNCTION: fn_19761
EffectParticle::EffectParticle(ResourceMgr& resources, JobNames& names) : CRenderObject(resources, names), state(this->render) {
EffectParticle::EffectParticle() : state(this->render) {
}
// OFFSET: 0x00C1DE70
// FUNCTION: fn_20076
EffectParticle* CreateEffectParticle(
AttachedEffect& master, const RenderObjectState& masterRender, int type, float x, float y, float z, ResourceMgr& resources, JobNames& names,
AttachedEffect& master, const RenderObjectState& masterRender, int type, float x, float y, float z,
std::list<CRenderObject*>& worldObjects
) {
auto* particle = new EffectParticle(resources, names);
auto* particle = new EffectParticle();
particle->state.Initialize(particle->render, master, masterRender, type, x, y, z);
master.state.related.push_back(&particle->state);

View file

@ -6,12 +6,11 @@
#include <list>
struct JobNames;
class ResourceMgr;
struct AttachedEffect;
struct EffectParticle : CRenderObject {
EffectParticle(ResourceMgr& resources, JobNames& names);
EffectParticle();
bool UpdateFireWall();
bool UpdateStoneCurse();
@ -48,12 +47,13 @@ struct EffectParticle : CRenderObject {
void FollowMasterAndTickSlots();
void FollowMasterAndTickSlots2();
void UpdateRecords();
void InitializeRecords();
/* 0138 */ EffectPrimitiveState state;
};
EffectParticle* CreateEffectParticle(
AttachedEffect& master, const RenderObjectState& masterRender, int type, float x, float y, float z, ResourceMgr& resources, JobNames& names,
AttachedEffect& master, const RenderObjectState& masterRender, int type, float x, float y, float z,
std::list<CRenderObject*>& worldObjects
);

View file

@ -1,3 +1,4 @@
#include "Contents/Effects/EffectParticle.h"
#include "Contents/Effects/EffectPrimitiveState.h"
#include "Contents/Actors/RenderObjectState.h"
@ -6,22 +7,24 @@
// OFFSET: 0x00BAE670
// FUNCTION: fn_19768
void EffectPrimitiveState::InitializeRecords(const RenderObjectState& render) {
for (int index = 0; index < this->unknown_01F4; ++index) {
EffectPrimitiveRecord& record = this->records[index];
record.position = {render.position.x, render.position.y, render.position.z};
std::memcpy(record.corners, this->corners, sizeof(record.corners));
record.unknown_003C = this->unknown_0348;
record.scale = this->scale;
record.angle = this->unknown_030C;
std::memcpy(record.matrix, this->matrix1, sizeof(record.matrix));
record.alpha = this->alpha;
record.red = this->red;
record.green = this->green;
record.blue = this->blue;
void EffectParticle::InitializeRecords() {
for (int index = 0; index < this->state.unknown_01F4; ++index) {
EffectPrimitiveRecord& record = this->state.records[index];
record.position = this->render.position;
std::memcpy(record.corners, this->state.corners, sizeof(record.corners));
record.unknown_003C = this->state.unknown_0348;
record.scale = this->state.scale;
record.angle = this->state.unknown_030C;
std::memcpy(record.matrix, this->state.matrix1, sizeof(record.matrix));
record.alpha = this->state.alpha;
record.red = this->state.red;
record.green = this->state.green;
record.blue = this->state.blue;
const int alpha = TruncateToInt(this->alpha);
record.color = static_cast<unsigned char>(this->blue) +
((static_cast<unsigned char>(this->green) + ((static_cast<unsigned char>(this->red) + (static_cast<std::uint32_t>(alpha) << 8)) << 8)) << 8);
const int alpha = TruncateToInt(this->state.alpha);
record.color = static_cast<unsigned char>(this->state.blue) +
((static_cast<unsigned char>(this->state.green) +
((static_cast<unsigned char>(this->state.red) + (static_cast<std::uint32_t>(alpha) << 8)) << 8))
<< 8);
}
}

View file

@ -58,7 +58,6 @@ struct EffectPrimitiveState {
~EffectPrimitiveState();
void Initialize(RenderObjectState& render, AttachedEffect& master, const RenderObjectState& masterRender, int type, float x, float y, float z);
void UpdateColor();
void InitializeRecords(const RenderObjectState& render);
void GetColorOverride(unsigned char* red, unsigned char* green, unsigned char* blue);
/* 0138 */ std::uint32_t unknown_0138;

View file

@ -10,7 +10,7 @@
// OFFSET: 0x00C2CF20
// FUNCTION: fn_20088
bool UpdatePartyEffect(
AttachedEffect& self, ResourceMgr& resources, JobNames& names, std::list<CRenderObject*>& worldObjects, TextureCache& textures, const TerrainHeight& ground,
AttachedEffect& self, ResourceMgr& resources, std::list<CRenderObject*>& worldObjects, TextureCache& textures, const TerrainHeight& ground,
int updateTick
) {
RagEffectState& effect = self.state;
@ -39,7 +39,7 @@ bool UpdatePartyEffect(
}
if (effect.unknown_0178 == 0) {
EffectParticle* particle = CreateEffectParticle(self, render, 15, 0, 0, 0, resources, names, worldObjects);
EffectParticle* particle = CreateEffectParticle(self, render, 15, 0, 0, 0, worldObjects);
effect.unknown_11C84 = &particle->state;
EffectPrimitiveState& state = *effect.unknown_11C84;
state.lifetime = 9999;

View file

@ -5,14 +5,13 @@
struct AttachedEffect;
struct EffectParticle;
struct JobNames;
struct TerrainHeight;
class ResourceMgr;
class TextureCache;
class CRenderObject;
bool UpdatePartyEffect(
AttachedEffect& self, ResourceMgr& resources, JobNames& names, std::list<CRenderObject*>& worldObjects, TextureCache& textures, const TerrainHeight& ground,
AttachedEffect& self, ResourceMgr& resources, std::list<CRenderObject*>& worldObjects, TextureCache& textures, const TerrainHeight& ground,
int updateTick
);

View file

@ -10,7 +10,7 @@ namespace {
// FUNCTION: fn_21069
AttachedEffect* CreatePartyEffect(EffectActor& actor, PartyEffectMode& mode) {
mode.lastEffectId = 160;
auto* effect = new AttachedEffect(mode.resources, mode.names);
auto* effect = new AttachedEffect();
bool force = false;
mode.effectScript.Call("IsForceRenderEffect", "d>b", 160, &force);
effect->state.forceRender = force;

View file

@ -6,7 +6,6 @@
struct EffectActor;
class CRenderObject;
struct JobNames;
struct ServiceOptions;
class ResourceMgr;
class LuaScript;
@ -17,7 +16,6 @@ struct PartyEffectMode {
std::list<EffectActor*>& actors;
std::list<CRenderObject*>& objects;
ResourceMgr& resources;
JobNames& names;
ServiceOptions& options;
LuaScript& effectScript;
int& lastEffectId;

View file

@ -19,7 +19,7 @@ void CSession::GetMonsterTalkText(int job, int event, int skill, char* text, std
}
char monster[256];
std::strcpy(monster, g_session.m_jobNamesBegin[job]);
std::strcpy(monster, g_session.m_jobNameTable[job]);
_strlwr(monster);
node = node->FindChild(DecodeMessageRot(monster));
if (node == nullptr) {

View file

@ -1,26 +1,27 @@
#include "Contents/Jobs/JobNames.h"
#include "Client/Session.h"
#include "Contents/Jobs/JobId.h"
#include "Script/LuaScript.h"
// OFFSET: 0x00DE67E0
// FUNCTION: fn_23495
void JobNames::Initialize(JobNameInitialization& context) {
this->names.resize(32003, "Poring");
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->names[id] = name;
this->m_jobNameTable[id] = name;
}
if (context.playerScript.Call("ReqPCJobNameMan", "d>s", id, &name) && *name != '\0') {
this->male[id] = name;
this->m_jobNameTableMan[id] = name;
}
if (context.playerScript.Call("ReqPCJobNameWoman", "d>s", id, &name) && *name != '\0') {
this->female[id] = name;
this->m_jobNameTableWoman[id] = name;
}
}
};
@ -32,7 +33,7 @@ void JobNames::Initialize(JobNameInitialization& context) {
const auto other = [&](int first, int end) {
for (int id = first; id < end; ++id) {
context.otherScript.Call("ReqJobName", "d>s", id, &this->names[id]);
context.otherScript.Call("ReqJobName", "d>s", id, &this->m_jobNameTable[id]);
}
};
@ -46,25 +47,25 @@ void JobNames::Initialize(JobNameInitialization& context) {
"LIF_H", "AMISTR_H", "FILIR_H", "VANILMIRTH_H", "LIF_H2", "AMISTR_H2", "FILIR_H2", "VANILMIRTH_H2"};
for (unsigned index = 0; index < 16; ++index) {
this->names[JT_MER_LIF + index] = homunculi[index];
this->m_jobNameTable[JT_MER_LIF + index] = homunculi[index];
}
this->names[JT_MER_EIRA] = "MER_EIRA";
this->names[JT_MER_DIETER] = "MER_DIETER";
this->names[JT_MER_BAYERI] = "MER_BAYERI";
this->names[JT_MER_ELEANOR] = "MER_ELEANOR";
this->names[JT_MER_SERA] = "MER_SERA";
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->names[id] = "여\\활용병";
this->m_jobNameTable[id] = "여\\활용병";
}
for (unsigned id = JT_MER_LANCER01; id <= JT_MER_LANCER10; ++id) {
this->names[id] = "남\\창용병";
this->m_jobNameTable[id] = "남\\창용병";
}
for (unsigned id = JT_MER_SWORDMAN01; id <= JT_MER_SWORDMAN10; ++id) {
this->names[id] = "남\\검용병";
this->m_jobNameTable[id] = "남\\검용병";
}
context.sexLabels.resize(2, "F");

View file

@ -1,4 +1,5 @@
#include "Contents/Jobs/JobNames.h"
#include "Client/Session.h"
#include "Contents/Jobs/JobId.h"
// OFFSET: 0x00E2FE80
@ -316,38 +317,34 @@ unsigned JobNames::BaseJob(unsigned job) {
// OFFSET: 0x00DDE5C0
// FUNCTION: fn_23396
const char* JobNames::Lookup(unsigned job, int sex) {
if (this->names.size() <= job) {
const char* CSession::GetJobName(unsigned job, int sex) {
if (this->m_jobNameTable.size() <= job) {
return "";
}
if (job - JT_NOVICE_H > unsigned(JT_MER_BEGIN - 1 - JT_NOVICE_H) && job > unsigned(JT_SUMMER2)) {
return this->names[job];
return this->m_jobNameTable[job];
}
const unsigned base = BaseJob(job);
const unsigned base = JobNames::BaseJob(job);
if (sex == -1) {
if (this->cachedSex != this->currentSex) {
this->cachedSex = this->currentSex;
}
sex = this->currentSex;
sex = this->SyncUnknown0E98();
}
if (sex == 0) {
const auto found = this->female.find(base);
const auto found = this->m_jobNameTableWoman.find(base);
if (found != this->female.end()) {
if (found != this->m_jobNameTableWoman.end()) {
return found->second;
}
} else if (sex == 1) {
const auto found = this->male.find(base);
const auto found = this->m_jobNameTableMan.find(base);
if (found != this->male.end()) {
if (found != this->m_jobNameTableMan.end()) {
return found->second;
}
}
return this->names[base];
return this->m_jobNameTable[base];
}

View file

@ -1,7 +1,6 @@
#ifndef RAGNAROK_SOURCE_CONTENTS_JOBS_JOBNAMES_H
#define RAGNAROK_SOURCE_CONTENTS_JOBS_JOBNAMES_H
#include <map>
#include <vector>
class LuaScript;
@ -17,15 +16,7 @@ struct JobNameInitialization {
};
struct JobNames {
std::vector<const char*>& names;
std::map<unsigned, const char*>& female;
std::map<unsigned, const char*>& male;
const int& currentSex;
int& cachedSex;
static unsigned BaseJob(unsigned job);
const char* Lookup(unsigned job, int sex);
void Initialize(JobNameInitialization& context);
};
#endif

View file

@ -7,7 +7,7 @@
// OFFSET: 0x00E09AB0
// FUNCTION: fn_23788
std::string CSession::GetMonsterActName(int job) {
std::string name = FormatOwnedString("몬스터\\%s.act", this->m_jobNamesBegin[job]);
std::string name = FormatOwnedString("몬스터\\%s.act", this->m_jobNameTable[job]);
if (!ResourceMgr::Instance().Exists(name.c_str())) {
name = "";
}
@ -17,7 +17,7 @@ std::string CSession::GetMonsterActName(int job) {
// OFFSET: 0x00E09DC0
// FUNCTION: fn_23790
std::string CSession::GetMonsterSprName(int job) {
std::string name = FormatOwnedString("몬스터\\%s.spr", this->m_jobNamesBegin[job]);
std::string name = FormatOwnedString("몬스터\\%s.spr", this->m_jobNameTable[job]);
if (!ResourceMgr::Instance().Exists(name.c_str())) {
name = "";
}

View file

@ -19,7 +19,7 @@
// OFFSET: 0x00DA1E30
// FUNCTION: fn_22363
CSoundMaker::CSoundMaker(ResourceMgr& resources, JobNames& names) : CRenderObject(resources, names) {
CSoundMaker::CSoundMaker() {
this->file.clear();
this->volume = 100.0f;
this->range = 1.0f;

View file

@ -7,7 +7,7 @@
class CSoundMaker : public CRenderObject {
public:
CSoundMaker(ResourceMgr& resources, JobNames& names);
CSoundMaker();
~CSoundMaker() override;
bool Update() override;
void SendObjectMessage(

View file

@ -1,5 +1,5 @@
#include "Client/Application/ErrorDialog.h"
#include "Contents/Jobs/JobNames.h"
#include "Client/Session.h"
#include "File/File.h"
#include "File/ResourcePath.h"
#include "Render/DeviceContext/DCSurface.h"
@ -681,7 +681,7 @@ granny_control* C3dGrannyModelRes::PlayAnimation(unsigned action, granny_model_i
}
if (action == 0) {
std::sprintf(g_modelPath, "model\\3dmob\\%s", this->m_context->jobNames.Lookup(g_animationJobs[job], -1));
std::sprintf(g_modelPath, "model\\3dmob\\%s", g_session.GetJobName(g_animationJobs[job], -1));
} else {
std::sprintf(g_modelPath, "model\\3dmob_bone\\%d_%s.gr2", job, g_animationNames[action]);
}

View file

@ -12,7 +12,6 @@
class ResourceBytes;
class TextureCache;
struct JobNames;
struct ResourceByteReader;
class C3dModelRes;
@ -96,7 +95,6 @@ struct ModelResourceContext {
ResourceBytes& file;
TextureCache& textures;
CRenderSystemBase*& renderSystem;
JobNames& jobNames;
};
class C3dModelRes : public CRes {

View file

@ -1,5 +1,5 @@
#include "Client/Mode/ModeEvents.h"
#include "Contents/Jobs/JobNames.h"
#include "Client/Session.h"
#include "Render/DeviceContext/DeviceContext.h"
#include "Render/Text/TextContext.h"
#include "Resource/Bitmap/BitmapResource.h"
@ -187,7 +187,7 @@ int UIRequestJoinPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
this->icon->SetBitmap(path, state, 0);
}
this->icon->SetTooltip(this->m_request->jobs.Lookup(static_cast<unsigned>(static_cast<int>(this->job)), -1));
this->icon->SetTooltip(g_session.GetJobName(static_cast<unsigned>(static_cast<int>(this->job)), -1));
char level[5] = {};
_snprintf_s(level, sizeof(level), _TRUNCATE, "%d", this->level);
this->levelText->SetText(level, 0);

View file

@ -10,13 +10,11 @@ class UICheckBox;
class UIStaticText;
class UIBitmapButton;
struct UITextViewerContext;
struct JobNames;
struct PartyJoinRequest;
class UIRequestJoinPartyMgr;
struct UIRequestJoinPartyContext {
UITextViewerContext& text;
JobNames& jobs;
UIRequestJoinPartyMgr& requests;
};