Maintenance: Fold alias global gl_24862 g_vendingSaleAlarm (0x173824C) into its owner member CSession::m_muteSellSound (g_session 0x1

Batch #10384 by ragnarok-clanker: no function's compiled code changes; checked with 3 compiled unit(s), including every includer of Source/UI/Shop/UIMerchantItemMyShopWnd.h.
This commit is contained in:
ragnarok-clanker 2026-11-03 21:27:50 +00:00
commit decdf54a81
3 changed files with 4 additions and 8 deletions

View file

@ -1882,7 +1882,7 @@ void __stdcall sub_D08110(int field8, int itemIdWord, int quantityWord, int fiel
} else if (g_vendingOpenResultWindow != nullptr) {
g_vendingOpenResultWindow->SendMsg(nullptr, 0x17, 0, 0, 0, 0);
}
if (g_vendingOpenResultWindow != nullptr && g_vendingSaleAlarm) {
if (g_vendingOpenResultWindow != nullptr && g_session.m_muteSellSound) {
g_soundMgr->PlayWave("effect\\ef_steal.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0);
}
}
@ -1903,7 +1903,7 @@ void __declspec(noinline) __stdcall sub_D08670(int field14, int itemId, int quan
if (g_saleResultWindow != nullptr) {
g_saleResultWindow->SendMsg(nullptr, 0x77, fieldC, 0, 0, 0);
g_saleResultWindow->SendMsg(nullptr, 0x17, 0, 0, 0, 0);
if (g_vendingSaleAlarm) {
if (g_session.m_muteSellSound) {
g_soundMgr->PlayWave("effect\\ef_steal.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0);
}
if (g_session.GetList9Size() == 0) {

View file

@ -109,8 +109,6 @@
#include "UI/Rodex/UIRodexComposeWnd.h"
#include "UI/UIBartermarketWnd.h"
#include "UI/Edit/UIEditPaint.inl"
// GLOBAL: gl_24862
bool g_vendingSaleAlarm;
// GLOBAL: gl_24653
int g_skillTooltipActive;
@ -3628,7 +3626,7 @@ void UIMerchantItemMyShopWnd::OpenShop() {
this->AddChild(this->actionButton);
}
g_vendingSaleAlarm = false;
g_session.m_muteSellSound = false;
this->saleAlarm->Show(0);
const int previousHeight = this->unknown_011C;
@ -6823,7 +6821,7 @@ void UIMerchantItemMyShopWnd::Slot15(int width, int height) {
this->saleAlarm->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(this->unknown_0100 ? 2698 : 2642));
this->saleAlarm->FitToText();
this->saleAlarm->Move(12, this->unknown_0100 ? this->geometry.height - 12 : this->geometry.height - 18);
this->saleAlarm->SetChecked(g_vendingSaleAlarm);
this->saleAlarm->SetChecked(g_session.m_muteSellSound);
this->AddChild(this->saleAlarm);
const std::string prefix("유저인터페이스\\");

View file

@ -11,8 +11,6 @@ class UIBasicButton;
class UICheckBox;
class UIStaticText;
extern bool g_vendingSaleAlarm;
class UIMerchantItemMyShopWnd : public UIItemBaseWnd {
public:
UIMerchantItemMyShopWnd(int value);