From 82a645387c1282e74963a2a4a1003fcafe50e15f Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 27 Oct 2026 21:09:14 +0000 Subject: [PATCH] Decompile 3 functions in Source/Contents/Items/ItemInfo.cpp, Source/Contents/Items/ItemInfo.h Batch #1209 by ragnarok-clanker: 0 byte-identical, 3 confirmed by peer review. - fn_06571 ItemInfo::operator<: logic confirmed by peer review - fn_06609 ItemInfo::SetName: logic confirmed by peer review - fn_06610 ItemInfo::SetItemId: logic confirmed by peer review Peer-reviewed-by: Kisuka, eAthena Reviewed-by: ragnarok-clanker --- Source/Contents/Items/ItemInfo.cpp | 37 ++++++++++++++++++++++++++++++ Source/Contents/Items/ItemInfo.h | 5 +++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/Source/Contents/Items/ItemInfo.cpp b/Source/Contents/Items/ItemInfo.cpp index b18050ec..0dced91e 100644 --- a/Source/Contents/Items/ItemInfo.cpp +++ b/Source/Contents/Items/ItemInfo.cpp @@ -159,3 +159,40 @@ ItemInfo LookupClientItemByIdentity(const std::list& values, std::uint return ItemInfo(0); } + +// OFFSET: 0x006D5450 + +// OFFSET: 0x006D54C0 +// FUNCTION: fn_06571 +bool ItemInfo::operator<(const ItemInfo& other) const { + return this->unknown_0044 < other.unknown_0044; +} + +// OFFSET: 0x006D8B60 + +// OFFSET: 0x006D8E60 + +// OFFSET: 0x006D8FE0 +// FUNCTION: fn_06609 +bool ItemInfo::SetName(const char* name) { + this->unknown_0044 = name; + return this->unknown_0044.empty(); +} + +// OFFSET: 0x006D9010 +// FUNCTION: fn_06610 +void ItemInfo::SetItemId(int value) { + char buffer[16]; + _itoa(value, buffer, 10); + this->itemId = buffer; +} + +// OFFSET: 0x00DFB9D0 + +// OFFSET: 0x00DFBD90 + +// OFFSET: 0x00DFBDE0 + +// OFFSET: 0x00DFBE40 + +// OFFSET: 0x00DFBF70 diff --git a/Source/Contents/Items/ItemInfo.h b/Source/Contents/Items/ItemInfo.h index adb88fc3..29db9c5d 100644 --- a/Source/Contents/Items/ItemInfo.h +++ b/Source/Contents/Items/ItemInfo.h @@ -42,7 +42,10 @@ struct alignas(8) ItemInfo { ItemInfo& operator=(const ItemInfo& other); void Reset(); std::uint32_t Assign(const RawItemData& item); - + ItemInfo& AssignBasic(const RawItemData& item); + bool operator<(const ItemInfo& other) const; + bool SetName(const char* name); + void SetItemId(int value); /* 0000 */ std::uint32_t unknown_0000[4]; /* 0010 */ std::int32_t quantity; /* 0014 */ std::uint32_t unknown_0014[2];