Decompile fn_13274 (UIItemStoreWnd::Slot10)
Batch #8310 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_13274 UIItemStoreWnd::Slot10: logic confirmed by peer review Peer-reviewed-by: Yommy, gordaoprogramas, dori Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
64729558ce
commit
896f11fd97
3 changed files with 49 additions and 0 deletions
|
|
@ -649,5 +649,8 @@ static_assert(sizeof(CGameMode) == 0x670);
|
|||
extern char g_pendingWhisperCount;
|
||||
extern int g_whisperRecord;
|
||||
extern unsigned char g_gameModePacketBuffer[0x10000];
|
||||
extern int g_unknown_01738268;
|
||||
extern int g_unknown_0173826C;
|
||||
extern int g_unknown_01738270;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1074,6 +1074,51 @@ void UIItemStoreSubWnd::Slot10(int x, int y, std::intptr_t value) {
|
|||
g_windowMgr.window_01EC->SendMsg(nullptr, 13, 7, 0, 0, 0);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00972630
|
||||
// FUNCTION: fn_13274
|
||||
void UIItemStoreWnd::Slot10(int x, int y, std::intptr_t value) {
|
||||
char text[256];
|
||||
if (g_unknown_01738268) {
|
||||
if (g_unknown_01738270 == 1) {
|
||||
std::memset(text, 0, 250);
|
||||
std::sprintf(text, LookupMessage(0x9C2));
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(text), 0xFF, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!g_unknown_0173826C && !g_unknown_01738270) {
|
||||
std::memset(text, 0, 250);
|
||||
std::sprintf(text, LookupMessage(0x9C5));
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(text), 0xFF, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (g_windowMgr.LookupWindow(10011)) {
|
||||
UIWindow::Slot10(x, y, value);
|
||||
return;
|
||||
}
|
||||
|
||||
CMode* mode = g_modeMgr.GetGameMode();
|
||||
const ModeDragState* drag = reinterpret_cast<const ModeDragState*>(value);
|
||||
if (drag->source != 1 && drag->source != 9) {
|
||||
mode->SendMsg(18, 0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (static_cast<CGameMode*>(mode)->ConfirmDraggedItemUse()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (drag->quantity == 1) {
|
||||
this->SendMsg(nullptr, 38, 0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
reinterpret_cast<WindowVisibility&>(g_windowMgr).Show(15, 1);
|
||||
g_windowMgr.window_01EC->SendMsg(nullptr, 13, 7, 0, 0, 0);
|
||||
}
|
||||
|
||||
// OFFSET: 0x009727F0
|
||||
// FUNCTION: fn_13275
|
||||
void UIItemWnd::Slot10(int x, int y, std::intptr_t value) {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ class UIStaticText;
|
|||
|
||||
class UIItemStoreWnd : public UIItemBaseWnd {
|
||||
public:
|
||||
void Slot10(int x, int y, std::intptr_t value) override;
|
||||
void Slot28(int x, int y) override;
|
||||
void Slot32(int x, int y) override;
|
||||
void Slot11() override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue