From 4f668027bb831990d6035c46d3b2ef5f9e64bbb1 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 17:11:36 +0000 Subject: [PATCH] Confirm 3 functions in Source/Client/Mode/GameMode.cpp, Source/Contents/Guild/GuildInfo.h, ... Batch #18636 by ragnarok-clanker: 2 byte-identical, 1 confirmed by peer review. - fn_18026 GuildInfo::GuildInfo: byte-identical (already on main) - fn_18039 GuildInfo::Init: logic confirmed by peer review (already on main) - fn_05367 CPetEvolutionMgr::Create: byte-identical (already on main) Peer-reviewed-by: eAthena, cremane, bibinir Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Mode/GameMode.cpp | 2 +- Source/Contents/Guild/GuildInfo.h | 23 +++++++++++++++++++++-- Source/Contents/Pet/PetEvolutionMgr.h | 7 ++++++- Source/UI/Guild/UIGuildWnd.cpp | 13 ++----------- Source/UI/Guild/UIGuildWnd.h | 10 ---------- 5 files changed, 30 insertions(+), 25 deletions(-) diff --git a/Source/Client/Mode/GameMode.cpp b/Source/Client/Mode/GameMode.cpp index 30c286af0..6d5ffccbb 100644 --- a/Source/Client/Mode/GameMode.cpp +++ b/Source/Client/Mode/GameMode.cpp @@ -2161,7 +2161,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i if (g_guildInfo.isMaster == 0) { return 0; } - auto& positions = reinterpret_cast&>(g_guildInfo.pendingPositionChanges); + auto& positions = g_guildInfo.pendingPositionChanges; const std::int16_t length = static_cast(4U + 40U * positions.size()); if (length > 0x800) { return 0; diff --git a/Source/Contents/Guild/GuildInfo.h b/Source/Contents/Guild/GuildInfo.h index 739f4df83..ee15ac89e 100644 --- a/Source/Contents/Guild/GuildInfo.h +++ b/Source/Contents/Guild/GuildInfo.h @@ -8,6 +8,25 @@ #include #include +struct GuildTotalInfoEntry { + /* 0000 */ int padding_0000; + /* 0004 */ std::string name; + /* 001C */ int level; + /* 0020 */ int memberCount; + /* 0024 */ int maxMembers; + /* 0028 */ int ranking; +}; + +struct GuildPositionEntry { + /* 0000 */ int id; + /* 0004 */ int positionId; + /* 0008 */ std::string name; + /* 0020 */ int canInvite; + /* 0024 */ int canExpel; + /* 0028 */ int tax; + /* 002C */ int canStorage; +}; + struct GuildMemberManageEntry { /* 0000 */ int accountId; /* 0004 */ int characterId; @@ -89,10 +108,10 @@ public: /* 00DC */ std::list m_members; /* 00E4 */ std::list relatedGuilds; /* 00EC */ std::list bannedMembers; - /* 00F4 */ std::list guildList; + /* 00F4 */ std::list guildList; /* 00FC */ std::map m_positions; /* 0104 */ std::map pendingMemberPositions; - /* 010C */ std::map pendingPositionChanges; + /* 010C */ std::map pendingPositionChanges; /* 0114 */ std::vector agitIds; GuildInfo(); diff --git a/Source/Contents/Pet/PetEvolutionMgr.h b/Source/Contents/Pet/PetEvolutionMgr.h index 8e6c20f65..830c605da 100644 --- a/Source/Contents/Pet/PetEvolutionMgr.h +++ b/Source/Contents/Pet/PetEvolutionMgr.h @@ -13,6 +13,11 @@ struct PetEvolutionRecipe { /* 0004 */ std::vector> materials; }; +struct PetEvolutionNote { + /* 0000 */ int value; + /* 0004 */ std::string text; +}; + // VTABLE: vt_00355 class CPetEvolutionMgr { public: @@ -41,7 +46,7 @@ public: /* 0004 */ bool m_isValid; /* 0008 */ std::map> m_recipes; - /* 0010 */ std::map padding_0010; + /* 0010 */ std::map padding_0010; /* 0018 */ std::vector m_autoFeeding; }; diff --git a/Source/UI/Guild/UIGuildWnd.cpp b/Source/UI/Guild/UIGuildWnd.cpp index 3300dd494..7a0802f22 100644 --- a/Source/UI/Guild/UIGuildWnd.cpp +++ b/Source/UI/Guild/UIGuildWnd.cpp @@ -59,15 +59,6 @@ int g_guildTotalInfoRowHeight = 19; // GLOBAL: gl_24990 int g_guildTotalInfoColumnWidths[4] = {151, 82, 70, 70}; -struct GuildTotalInfoEntry { - /* 0000 */ int padding_0000; - /* 0004 */ std::string name; - /* 001C */ int level; - /* 0020 */ int memberCount; - /* 0024 */ int maxMembers; - /* 0028 */ int ranking; -}; - // GLOBAL: gl_24994 std::string g_guildNamelessTag = ""; @@ -1646,7 +1637,7 @@ void UIGuildTotalInfoWnd::Paint() { x += widths[column] + 1; } - const auto& entries = *reinterpret_cast*>(&g_guildInfo.guildList); + const auto& entries = g_guildInfo.guildList; int drawn = 0; int index = 0; for (auto entry = entries.begin(); entry != entries.end(); ++entry, ++index) { @@ -2365,7 +2356,7 @@ int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr switch (a1) { case ID_OK: if (this->m_positionMap.size() != 0) { - reinterpret_cast&>(g_guildInfo.pendingPositionChanges) = this->m_positionMap; + g_guildInfo.pendingPositionChanges = this->m_positionMap; g_modeMgr.gameMode->SendMsg(MM_REQ_CHANGE_GUILD_POSITIONINFO, 0, 0, 0, 0); this->m_positionMap.clear(); this->m_button->Move(-200, -200); diff --git a/Source/UI/Guild/UIGuildWnd.h b/Source/UI/Guild/UIGuildWnd.h index ea71ec0ef..e1a906768 100644 --- a/Source/UI/Guild/UIGuildWnd.h +++ b/Source/UI/Guild/UIGuildWnd.h @@ -46,16 +46,6 @@ class ForbiddenWords; bool CompareWideText(const char* left, const char* right); -struct GuildPositionEntry { - /* 0000 */ int id; - /* 0004 */ int positionId; - /* 0008 */ std::string name; - /* 0020 */ int canInvite; - /* 0024 */ int canExpel; - /* 0028 */ int tax; - /* 002C */ int canStorage; -}; - class UIGuildWnd : public UIFrameWnd { public: UIGuildWnd();