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).
This commit is contained in:
ragnarok-clanker 2026-11-12 17:11:36 +00:00
commit 4f668027bb
5 changed files with 30 additions and 25 deletions

View file

@ -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<std::map<int, GuildPositionEntry>&>(g_guildInfo.pendingPositionChanges);
auto& positions = g_guildInfo.pendingPositionChanges;
const std::int16_t length = static_cast<std::int16_t>(4U + 40U * positions.size());
if (length > 0x800) {
return 0;

View file

@ -8,6 +8,25 @@
#include <string>
#include <vector>
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<Member> m_members;
/* 00E4 */ std::list<RelatedGuild> relatedGuilds;
/* 00EC */ std::list<Unknown00ECEntry> bannedMembers;
/* 00F4 */ std::list<int> guildList;
/* 00F4 */ std::list<GuildTotalInfoEntry> guildList;
/* 00FC */ std::map<int, std::string> m_positions;
/* 0104 */ std::map<int, GuildMemberManageEntry> pendingMemberPositions;
/* 010C */ std::map<int, int> pendingPositionChanges;
/* 010C */ std::map<int, GuildPositionEntry> pendingPositionChanges;
/* 0114 */ std::vector<int> agitIds;
GuildInfo();

View file

@ -13,6 +13,11 @@ struct PetEvolutionRecipe {
/* 0004 */ std::vector<std::pair<int, int>> 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<int, std::vector<PetEvolutionRecipe>> m_recipes;
/* 0010 */ std::map<int, std::string> padding_0010;
/* 0010 */ std::map<int, PetEvolutionNote> padding_0010;
/* 0018 */ std::vector<int> m_autoFeeding;
};

View file

@ -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 = "<NAMELESS>";
@ -1646,7 +1637,7 @@ void UIGuildTotalInfoWnd::Paint() {
x += widths[column] + 1;
}
const auto& entries = *reinterpret_cast<const std::list<GuildTotalInfoEntry>*>(&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<std::map<int, GuildPositionEntry>&>(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);

View file

@ -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();