From 3fb8648cbfb3da4af00b25ee0097f22f03b3b217 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 05:23:24 +0000 Subject: [PATCH] Decompile 10 functions in Source/Contents/Items/RuneSystem.cpp, Source/UI/RuneSystem/UIRuneSystemWnd.cpp, ... Batch #13115 by KWDev: 10 byte-identical, 0 confirmed by peer review. - fn_08116 RuneSetData::FindLastReward: byte-identical - fn_08125 CRuneSystemMgr::GetDecomItem: byte-identical - fn_08126 CRuneSystemMgr::GetOwnedDecomItem: byte-identical - fn_10198 UIRuneSetList::Slot25: byte-identical - fn_10201 UIRuneSystem_tagListWnd::Slot25: byte-identical - fn_16003 GameSettingsUI::CUIGroupEmblem::OnSelect: byte-identical - fn_16005 GameSettingsUI::CUIGroupLogInOut::OnSelect: byte-identical - fn_22066 CGameMode::ReceiveLapineUpgradeResult: byte-identical - fn_22117 CGameMode::ReceiveUnknown7FBC: byte-identical - fn_02114 CRendererDX7::SetLighting: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/Client/Mode/GameModeNotices.cpp | 4 ++-- Source/Contents/Items/RuneSystem.cpp | 8 ++++---- Source/Render/DX7/RendererDX7Operations.cpp | 2 +- Source/UI/GameSettings/GameSettingsUI.cpp | 4 ++-- Source/UI/RuneSystem/UIRuneSystemWnd.cpp | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Source/Client/Mode/GameModeNotices.cpp b/Source/Client/Mode/GameModeNotices.cpp index d3aa1b85..f247de49 100644 --- a/Source/Client/Mode/GameModeNotices.cpp +++ b/Source/Client/Mode/GameModeNotices.cpp @@ -1031,7 +1031,7 @@ void CGameMode::ResizeWindow16(int width, int height) { void CGameMode::ReceiveUnknown7FBC(const unsigned char* data) { const auto* packet = reinterpret_cast(data); - if (packet->value <= 100) { + if (100 >= packet->value) { g_session.unknown_7FBC = packet->value; if (g_windowMgr.unknown_01D4) { reinterpret_cast(g_windowMgr.unknown_01D4)->SendMsg(nullptr, 23, 0, 0, 0, 0); @@ -1623,7 +1623,7 @@ void CGameMode::ReceiveCharacterRenameResult(const unsigned char* packet) { // OFFSET: 0x00D6B010 // FUNCTION: fn_22066 void CGameMode::ReceiveLapineUpgradeResult(std::int16_t result) { - if (result != 0) { + if (0 != result) { UIWindow* window = g_windowMgr.LookupWindow(290); if (window) { static_cast(window)->SetWaiting(0); diff --git a/Source/Contents/Items/RuneSystem.cpp b/Source/Contents/Items/RuneSystem.cpp index c45794c3..95249b94 100644 --- a/Source/Contents/Items/RuneSystem.cpp +++ b/Source/Contents/Items/RuneSystem.cpp @@ -164,9 +164,9 @@ void CRuneSystemMgr::Destroy() { // OFFSET: 0x00766A30 // FUNCTION: fn_08116 int RuneSetData::FindLastReward(int count) const { - if (count < 8) { + if (count <= 7) { for (int step = count - 1; step > 0; --step) { - if (this->m_reward.values[step] != 0) { + if (0 != this->m_reward.values[step]) { return step; } } @@ -256,7 +256,7 @@ const char* RuneData::GetName() const { // OFFSET: 0x00766CB0 // FUNCTION: fn_08125 int CRuneSystemMgr::GetDecomItem(unsigned int index) const { - if (index >= this->m_decomItems.size()) { + if (this->m_decomItems.size() <= index) { return 0; } @@ -266,7 +266,7 @@ int CRuneSystemMgr::GetDecomItem(unsigned int index) const { // OFFSET: 0x00766CE0 // FUNCTION: fn_08126 int CRuneSystemMgr::GetOwnedDecomItem(unsigned int index) const { - if (index >= this->m_ownedDecomItems.size()) { + if (this->m_ownedDecomItems.size() <= index) { return 0; } diff --git a/Source/Render/DX7/RendererDX7Operations.cpp b/Source/Render/DX7/RendererDX7Operations.cpp index 25367665..c59ccb87 100644 --- a/Source/Render/DX7/RendererDX7Operations.cpp +++ b/Source/Render/DX7/RendererDX7Operations.cpp @@ -29,8 +29,8 @@ void CRendererDX7::SetLighting(const float* direction, const float* diffuse, con light.dcvDiffuse.a = 255.0f; light.dcvAmbient.r = ambient[0]; light.dcvAmbient.g = ambient[1]; - light.dcvAmbient.b = ambient[2]; light.dcvAmbient.a = 255.0f; + light.dcvAmbient.b = ambient[2]; this->device->SetLight(0, &light); this->device->LightEnable(0, TRUE); } diff --git a/Source/UI/GameSettings/GameSettingsUI.cpp b/Source/UI/GameSettings/GameSettingsUI.cpp index 34c18fa5..9fc3941d 100644 --- a/Source/UI/GameSettings/GameSettingsUI.cpp +++ b/Source/UI/GameSettings/GameSettingsUI.cpp @@ -1661,13 +1661,13 @@ void CUIListPage::Slot54(CUIOptionItem* item, const TALKTYPE& type) { // OFFSET: 0x00A41E30 // FUNCTION: fn_16003 void CUIGroupEmblem::OnSelect(CUIRadioButton* button) { - this->SetEnabled(button == this->m_onButton); + this->SetEnabled(this->m_onButton == button); } // OFFSET: 0x00A41E90 // FUNCTION: fn_16005 void CUIGroupLogInOut::OnSelect(CUIRadioButton* button) { - this->SetEnabled(button == this->m_onButton); + this->SetEnabled(this->m_onButton == button); } // OFFSET: 0x00A41EB0 diff --git a/Source/UI/RuneSystem/UIRuneSystemWnd.cpp b/Source/UI/RuneSystem/UIRuneSystemWnd.cpp index 54df169c..31686ba9 100644 --- a/Source/UI/RuneSystem/UIRuneSystemWnd.cpp +++ b/Source/UI/RuneSystem/UIRuneSystemWnd.cpp @@ -238,7 +238,7 @@ void UIRuneSetList::Slot25(int x, int y) { return; } - if (x < this->geometry.width - 7 && y < this->visible * this->m_itemHeight) { + if (this->geometry.width - 7 > x && this->visible * this->m_itemHeight > y) { this->m_selected = y / this->m_itemHeight + this->position; this->parent->SendMsg(this, 0xAB, 0xC2, this->m_selected, 0, 0); this->Invalidate(); @@ -275,12 +275,12 @@ void UIRuneSystemWnd::Slot25(int, int) { // OFFSET: 0x0081C0F0 // FUNCTION: fn_10201 void UIRuneSystem_tagListWnd::Slot25(int x, int) { - if (x < 20 || x > this->geometry.width - 23) { + if (x < 20 || this->geometry.width - 23 < x) { return; } const int index = (x - 20) / 27; - if (index > -1 && index < g_runeSystemMgr->GetTagCount()) { + if (index > -1 && g_runeSystemMgr->GetTagCount() > index) { CTagData* tag = g_runeSystemMgr->GetTagByIndex(index); if (tag) { g_runeSystemMgr->SetSelectTag(tag->m_id);