From 0f72b04799a51e37b8d4780ce22ba0dad3fc14b2 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sun, 1 Nov 2026 06:19:00 +0000 Subject: [PATCH] Decompile fn_17172 (CGameActor::HasUnknown030CEntry) Batch #9302 by secret: 1 byte-identical, 0 confirmed by peer review. - fn_17172 CGameActor::HasUnknown030CEntry: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/Client/Mode/CGameMode.h | 1 + Source/Client/Mode/GameMode.cpp | 19 +++++++++++++++++++ Source/Client/Session.h | 2 ++ Source/Contents/Actors/GameActor.h | 1 + Source/Contents/Sound/SoundMaker.h | 8 ++++++++ Source/UI/Shortcuts/ShortcutCooldowns.cpp | 9 +++++---- Source/UI/Window/UIWindowMgr.h | 1 - Source/UI/Window/WindowMgrState.cpp | 6 +++--- 8 files changed, 39 insertions(+), 8 deletions(-) diff --git a/Source/Client/Mode/CGameMode.h b/Source/Client/Mode/CGameMode.h index a3ec7f86..706f1050 100644 --- a/Source/Client/Mode/CGameMode.h +++ b/Source/Client/Mode/CGameMode.h @@ -334,6 +334,7 @@ public: void SpawnGrannyCorpse(float x, float y, float z, float angle, const char* name); void SpawnMandraAttack(std::uint32_t aid, int target, char flag); void OpenActorMenu(const ActorPickInfo* pick, int handled); + int HandleActorPick(ActorPickInfo* pick, int result); std::uint32_t FindUnknown01AC(std::uint32_t key); std::string ActorName(std::uint32_t id); std::uint32_t ActorNameColor(int job, std::uint32_t aid); diff --git a/Source/Client/Mode/GameMode.cpp b/Source/Client/Mode/GameMode.cpp index a1538778..1f9430b4 100644 --- a/Source/Client/Mode/GameMode.cpp +++ b/Source/Client/Mode/GameMode.cpp @@ -3811,3 +3811,22 @@ void CGameMode::ProcessMouseWheel(int requireControl) { this->camera->camera.desiredDistance = g_cameraDistance; } + +struct AiMessage { + /* 0000 */ int type; + /* 0004 */ int x; + /* 0008 */ int y; + /* 000C */ int level; + /* 0010 */ int skill; + /* 0014 */ int target; +}; + +#pragma pack(push, 1) +struct ContactNpcPacket { + /* 0000 */ std::int16_t packetType; + /* 0002 */ std::uint32_t npcId; + /* 0006 */ unsigned char type; +}; +#pragma pack(pop) + +// OFFSET: 0x00CE2880 diff --git a/Source/Client/Session.h b/Source/Client/Session.h index 21e2fd98..bf6c2ee9 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -653,6 +653,8 @@ public: int IsLocalPlayerAid(std::uint32_t aid) const; bool IsHomunAid(std::uint32_t aid) const; bool IsMercenaryAid(std::uint32_t aid) const; + int IsHomunculusSkill(unsigned id) const; + int IsMercenarySkill(unsigned id) const; int IsCompanionAid(std::uint32_t aid) const; bool IsPetAid(std::uint32_t aid) const; bool IsEquipItemType(int type) const; diff --git a/Source/Contents/Actors/GameActor.h b/Source/Contents/Actors/GameActor.h index b45668a6..2515f4d3 100644 --- a/Source/Contents/Actors/GameActor.h +++ b/Source/Contents/Actors/GameActor.h @@ -229,6 +229,7 @@ public: void SetUnknown03B8(int value, int slot); void SetTetraBall(int index, int on, int value); bool IsSkillWithoutAction(int skillId); + bool HasUnknown030CEntry(); bool HasUnknown0310Entry(); void SetCharm(int type, int count); int ActionBase(int state); diff --git a/Source/Contents/Sound/SoundMaker.h b/Source/Contents/Sound/SoundMaker.h index 49f6e6c9..dc5ad3a2 100644 --- a/Source/Contents/Sound/SoundMaker.h +++ b/Source/Contents/Sound/SoundMaker.h @@ -39,5 +39,13 @@ static_assert(sizeof(CSoundMaker) == 0x170); extern std::uint32_t g_groundMarkAltEnabled; extern int g_groundMarkEnabled; +extern std::uint32_t g_groundMarkAid; +extern int g_groundMarkA; +extern int g_groundMarkB; +extern int g_groundMarkSet; +extern std::uint32_t g_groundMarkAltAid; +extern int g_groundMarkAltA; +extern int g_groundMarkAltB; +extern int g_groundMarkAltSet; #endif diff --git a/Source/UI/Shortcuts/ShortcutCooldowns.cpp b/Source/UI/Shortcuts/ShortcutCooldowns.cpp index 5401fa9d..960133c2 100644 --- a/Source/UI/Shortcuts/ShortcutCooldowns.cpp +++ b/Source/UI/Shortcuts/ShortcutCooldowns.cpp @@ -52,19 +52,19 @@ #include #include -namespace { - // OFFSET: 0x00E1DCA0 +// OFFSET: 0x00E1DCA0 // FUNCTION: fn_23875 bool IsFirstRange(unsigned id) { return id - 8000u <= 60; } - // OFFSET: 0x00E1DD20 +// OFFSET: 0x00E1DD20 // FUNCTION: fn_23878 bool IsOtherRange(unsigned id) { return id - 8200u <= 41 || id - 8400u <= 57; } +namespace { struct SearchStoreEntry { /* 0000 */ unsigned char unknown_0000[8]; /* 0008 */ char storeName[80]; @@ -245,7 +245,8 @@ void ShortcutCooldowns::Paint( std::list& states = (*entry).*values; for (const ShortcutCooldownIcon& icon : icons) { - if (entry->id == icon.id || (entry->id == 577 && !IsFirstRange(icon.id)) || (entry->id == 9999 && (IsFirstRange(icon.id) || IsOtherRange(icon.id)))) { + if (entry->id == icon.id || (entry->id == 577 && !g_session.IsHomunculusSkill(icon.id)) || + (entry->id == 9999 && (g_session.IsHomunculusSkill(icon.id) || g_session.IsMercenarySkill(icon.id)))) { const auto previous = std::find_if(states.begin(), states.end(), [&](const CooldownState& state) { return state.slot == icon.slot; }); if (previous == states.end()) { states.emplace_back(icon.slot, icon.x, icon.y, entry->duration, entry->end - entry->duration, 0, 0); diff --git a/Source/UI/Window/UIWindowMgr.h b/Source/UI/Window/UIWindowMgr.h index 2228b200..0a5d37e8 100644 --- a/Source/UI/Window/UIWindowMgr.h +++ b/Source/UI/Window/UIWindowMgr.h @@ -527,7 +527,6 @@ public: void AddWhisperName(const char* name); int ShowWhisperFrom(const char* name, const char* text, int color, std::uint32_t accountId); void RefreshFrameSkins(); - bool HasUnknown030C(); bool IsDropDownChild(const UIWindow* window); bool HasMiniPartyMember(std::uint32_t accountId); bool IsHoverParentVisible(); diff --git a/Source/UI/Window/WindowMgrState.cpp b/Source/UI/Window/WindowMgrState.cpp index bd59553f..7f463a2e 100644 --- a/Source/UI/Window/WindowMgrState.cpp +++ b/Source/UI/Window/WindowMgrState.cpp @@ -117,9 +117,9 @@ void UIWindowMgr::HideWindow01C8() { // OFFSET: 0x00A91D90 // FUNCTION: fn_17172 -bool UIWindowMgr::HasUnknown030C() { - const std::uint32_t* unknown = reinterpret_cast(this->unknown_030C); - return unknown != nullptr && unknown[1] != 0; +bool CGameActor::HasUnknown030CEntry() { + const int* entry = reinterpret_cast(this->unknown_030C); + return entry && entry[1] != 0; } // OFFSET: 0x00A91F60