rodecomp/Source/UI/Items/UIMakeTargetProcessWnd.cpp
ragnarok-clanker ad9731c795 Decompile 2 functions in Source/UI/Items/UIItemRepairWnd.cpp, Source/UI/Items/UIItemRepairWnd.h, ...
Batch #5677 by Yommy: 0 byte-identical, 2 confirmed by peer review.

- fn_13614 UIMakeTargetProcessWnd::Slot25: logic confirmed by peer review
- fn_13615 UIItemRepairWnd::SendMsg: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, Romain, Snow
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-30 14:30:16 +00:00

56 lines
1.2 KiB
C++

#include "UI/Items/UIMakeTargetProcessWnd.h"
#include "Client/Mode/ModeMgr.h"
#include "Client/ReplayPacketRecorder.h"
#include "Client/Session.h"
#include "UI/Window/UIWindowMgr.h"
#include "UI/Window/WindowManagerWindows.h"
#include <cstdint>
#include <cstring>
struct ClientItemLists {
bool AddItem1710(const ITEM_INFO& item, unsigned char refresh);
};
// OFFSET: 0x009A09E0
// FUNCTION: fn_13603
ITEM_INFO UIMakeTargetProcessWnd::GetItemAt(int x, int y) {
switch (this->makeType) {
case 994:
case 995:
case 996:
case 997:
case 998:
case 999:
case 1000:
return ITEM_INFO(0);
}
if (y > this->geometry.height - 56 && y < this->geometry.height - 32) {
if (x >= 4 && x <= 34) {
return this->materials[0];
}
if (x >= 36 && x <= 66) {
return this->materials[1];
}
if (x >= 68 && x <= 98) {
return this->materials[2];
}
}
return ITEM_INFO(0);
}
// OFFSET: 0x009A3D10
// FUNCTION: fn_13614
void UIMakeTargetProcessWnd::Slot25(int x, int y) {
ITEM_INFO item = this->GetItemAt(x, y);
if (item.unknown_0000[1] != 0) {
g_modeMgr.gameMode->SendMsg(134, reinterpret_cast<int>(item.itemId.c_str()), 0, 0, 0);
} else {
this->UIFrameWnd::Slot25(x, y);
}
}
// OFFSET: 0x009A48C0