From f8d3e8622d0fb1a3fc22a29fa30df603b60e84b8 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 16:30:12 +0000 Subject: [PATCH] Maintenance: Rename placeholder sub_XXXXXX functions to evidence-based names (Lua registration strings, log/error strings, packet ids Batch #13412 by ragnarok-clanker: no function's compiled code changes; checked with 592 compiled unit(s), including every includer of Source/Client/Mode/CGameMode.h, Source/Client/Session.h, Source/Contents/Actors/GameActor.h, Source/Contents/CashEmotionMgr.h, Source/Contents/ClientItemLists.h, Source/Contents/ClientState.h, Source/Contents/Configuration/GameSettingsMgr.h, Source/Contents/Items/ItemInfo.h, Source/Contents/NavigationManager.h, Source/Contents/RenewQuestMgr.h, Source/Contents/ReputeMgr.h, Source/Contents/Schedule/TimeScheduler.h, Source/Contents/WorldView/WorldViewData.h, Source/UI/Buttons/UIDescriptRace.h, Source/UI/CashEmotion/UICashEmotionListWnd.h, Source/UI/Dialogs/UIPasswordWnd.h, Source/UI/Edit/UIEditCtrl.h, Source/UI/Edit/UIItemTagCtrl.h, Source/UI/GameSettings/GameSettingsUI.h, Source/UI/Item/UIItemStoreSubWnd.h, Source/UI/Items/UISwapEquipmentWnd.h, Source/UI/Lists/UIChatHisBox.h, Source/UI/Lists/UITagListBox.h, Source/UI/Quest/UIOngoingQuestInfo.h, Source/UI/Quest/UIRenewQuestUI.h, Source/UI/Rodex/UIRodexComposeWnd.h, Source/UI/Text/UIAchWnd.h, Source/UI/UIGradeEnchantWnd.h, Source/UI/UIIngredientInfoWnd.h, Source/UI/UIMacroUserInfoWnd.h, Source/UI/Window/UINewSkillListWnd.h, Source/UI/Window/UIRegisterMgr.h, Source/UI/Window/UIWindow.h, Source/UI/Window/UIWindowMgr.h, Source/Utility/JsonCppLoader.h. --- .../Client/Application/ApplicationWindow.cpp | 2 +- Source/Client/Application/Launcher.cpp | 24 +- Source/Client/Mode/CGameMode.h | 60 +-- Source/Client/Mode/GameMode.cpp | 76 +-- Source/Client/Mode/GameModeActorEffects.cpp | 4 +- Source/Client/Mode/GameModeHandlers.cpp | 28 +- Source/Client/Mode/GameModeMiniMap.cpp | 2 +- Source/Client/Mode/GameModeNotices.cpp | 68 +-- Source/Client/Mode/GameModePackets.cpp | 192 ++++---- Source/Client/Session.cpp | 6 +- Source/Client/Session.h | 7 +- Source/Client/Stove/StoveMgr.cpp | 5 +- Source/Contents/Actors/GameActor.h | 4 +- Source/Contents/Actors/Player.cpp | 2 +- Source/Contents/Actors/RenderObject.cpp | 14 +- Source/Contents/CashEmotionMgr.cpp | 28 +- Source/Contents/CashEmotionMgr.h | 8 +- Source/Contents/ClientItemLists.cpp | 6 +- Source/Contents/ClientItemLists.h | 6 +- Source/Contents/ClientState.cpp | 4 +- Source/Contents/ClientState.h | 2 +- .../Contents/Configuration/GameSettingsMgr.h | 2 +- .../Contents/Configuration/ServiceOptions.cpp | 14 +- Source/Contents/EffectResourceSwitcher.cpp | 4 +- Source/Contents/Items/ItemDescription.cpp | 2 +- Source/Contents/Items/ItemInfo.h | 2 +- Source/Contents/Messenger/ClientMessenger.cpp | 432 +++++++++--------- Source/Contents/Messenger/MessengerMember.cpp | 2 +- Source/Contents/NavigationManager.h | 4 +- Source/Contents/NavigationRoute.cpp | 4 +- Source/Contents/RenewQuestMgr.cpp | 18 +- Source/Contents/RenewQuestMgr.h | 8 +- Source/Contents/ReputeMgr.cpp | 20 +- Source/Contents/ReputeMgr.h | 6 +- Source/Contents/Schedule/EmotionSchedule.cpp | 14 +- Source/Contents/Schedule/TimeScheduler.cpp | 2 +- Source/Contents/Schedule/TimeScheduler.h | 2 +- Source/Contents/SignBoard/SignBoard.cpp | 2 +- Source/Contents/Skills/ClientSkills.cpp | 2 +- Source/Contents/Skills/SkillActionAlitea.cpp | 62 +-- Source/Contents/Skills/SkillActionDruid.cpp | 6 +- Source/Contents/Skills/SkillActionKarnos.cpp | 12 +- Source/Contents/Sound/SoundConfiguration.cpp | 2 +- Source/Contents/WorldView/WorldViewData.cpp | 2 +- Source/Contents/WorldView/WorldViewData.h | 2 +- Source/File/FileCreation.cpp | 2 +- Source/UI/Acceptance/UIChooseSellBuyWnd.cpp | 164 +++---- Source/UI/AdventureGuide/UIAdventureGuide.cpp | 8 +- Source/UI/Buttons/UIDescriptRace.h | 2 +- Source/UI/Buttons/UITextButton.cpp | 8 +- Source/UI/CashEmotion/UICashEmotionListWnd.h | 2 +- Source/UI/CashShop/UICashShopWnd.cpp | 4 +- Source/UI/Chat/UINewChatWnd.cpp | 4 +- Source/UI/Dialogs/UIEditctrlWnd.cpp | 4 +- Source/UI/Dialogs/UIPasswordWnd.cpp | 4 +- Source/UI/Dialogs/UIPasswordWnd.h | 8 +- Source/UI/Edit/ItemTagRetirement.cpp | 4 +- Source/UI/Edit/UIEditBoxEx.cpp | 2 +- Source/UI/Edit/UIEditCtrl.cpp | 54 +-- Source/UI/Edit/UIEditCtrl.h | 4 +- Source/UI/Edit/UIEditLinks.cpp | 2 +- Source/UI/Edit/UIEditVariants.cpp | 4 +- Source/UI/Edit/UIItemTagCtrl.h | 6 +- Source/UI/GameSettings/GameSettingsUI.cpp | 86 ++-- Source/UI/GameSettings/GameSettingsUI.h | 22 +- Source/UI/Item/UIItemStoreSubWnd.h | 6 +- Source/UI/Items/UISwapEquipmentWnd.cpp | 6 +- Source/UI/Items/UISwapEquipmentWnd.h | 2 +- Source/UI/Lists/UIChatHisBox.cpp | 4 +- Source/UI/Lists/UIChatHisBox.h | 6 +- Source/UI/Lists/UIComboBoxDefWnd.cpp | 2 +- Source/UI/Lists/UIListBox.cpp | 10 +- Source/UI/Lists/UIScrollBar.cpp | 12 +- Source/UI/Lists/UITagListBox.cpp | 22 +- Source/UI/Lists/UITagListBox.h | 8 +- Source/UI/Party/UIMiniPartyWnd.cpp | 2 +- Source/UI/Quest/UIOngoingQuestInfo.cpp | 2 +- Source/UI/Quest/UIOngoingQuestInfo.h | 2 +- Source/UI/Quest/UIQuestDisplay.cpp | 2 +- Source/UI/Quest/UIRenewQuestUI.cpp | 18 +- Source/UI/Quest/UIRenewQuestUI.h | 4 +- Source/UI/Quest/UIRenewQuestWnd.cpp | 2 +- Source/UI/Rodex/UIRodexComposeWnd.cpp | 10 +- Source/UI/Rodex/UIRodexComposeWnd.h | 4 +- Source/UI/Rodex/UIRodexInboxWnd.cpp | 2 +- Source/UI/RuneSystem/UIRuneSystemWnd.cpp | 2 +- Source/UI/Shortcuts/UIShortCutWnd.cpp | 4 +- Source/UI/Text/NavigationLink.cpp | 8 +- Source/UI/Text/PixelTextWrapping.cpp | 2 +- Source/UI/Text/TextWrapping.cpp | 2 +- Source/UI/Text/UIAchWnd.cpp | 10 +- Source/UI/Text/UIAchWnd.h | 6 +- Source/UI/Text/UIStaticText_LF.cpp | 2 +- Source/UI/Text/UITextViewer.cpp | 8 +- Source/UI/Text/UITextViewerMessages.cpp | 12 +- Source/UI/UICheckAttendanceWnd.cpp | 2 +- Source/UI/UIGradeEnchantWnd.cpp | 26 +- Source/UI/UIGradeEnchantWnd.h | 2 +- Source/UI/UIIngredientInfoWnd.h | 2 +- Source/UI/UILapineBoxWnd.cpp | 4 +- Source/UI/UILapineScrollBar.cpp | 2 +- Source/UI/UILapineUpgradeBoxWnd.cpp | 2 +- Source/UI/UIMacroBlackListCheckWnd.cpp | 14 +- Source/UI/UIMacroUserInfoWnd.cpp | 16 +- Source/UI/UIMacroUserInfoWnd.h | 8 +- Source/UI/UIRefiningWnd.cpp | 10 +- Source/UI/Window/UIHotKeyWnd.cpp | 2 +- Source/UI/Window/UIMessageBox.cpp | 4 +- Source/UI/Window/UINewSkillListWnd.cpp | 32 +- Source/UI/Window/UINewSkillListWnd.h | 12 +- Source/UI/Window/UIPetEvolutionWnd.cpp | 2 +- Source/UI/Window/UIRegisterMgr.cpp | 2 +- Source/UI/Window/UIRegisterMgr.h | 2 +- Source/UI/Window/UIRoMapWnd.cpp | 6 +- Source/UI/Window/UIWindow.cpp | 6 +- Source/UI/Window/UIWindow.h | 6 +- Source/UI/Window/UIWindowMgr.cpp | 26 +- Source/UI/Window/UIWindowMgr.h | 16 +- Source/Utility/JsonCppLoader.cpp | 14 +- Source/Utility/JsonCppLoader.h | 16 +- 120 files changed, 991 insertions(+), 993 deletions(-) diff --git a/Source/Client/Application/ApplicationWindow.cpp b/Source/Client/Application/ApplicationWindow.cpp index 40feb18f..9815045e 100644 --- a/Source/Client/Application/ApplicationWindow.cpp +++ b/Source/Client/Application/ApplicationWindow.cpp @@ -56,7 +56,7 @@ BOOL ReleaseApplicationCursor() { // OFFSET: 0x00E5C430 // FUNCTION: fn_24372 -LRESULT CALLBACK sub_E5C430(HWND window, UINT message, WPARAM wParam, LPARAM lParam) { +LRESULT CALLBACK WindowProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam) { std::uint8_t handled = 0; const LRESULT result = g_serverLanguage->Message(window, message, wParam, lParam, handled); if (handled) { diff --git a/Source/Client/Application/Launcher.cpp b/Source/Client/Application/Launcher.cpp index 913e6571..c3f16817 100644 --- a/Source/Client/Application/Launcher.cpp +++ b/Source/Client/Application/Launcher.cpp @@ -904,10 +904,10 @@ public: bool CreateCooldownOwner(); CMapSkyMgr* GetMapSkyMgr(); -void sub_E198F0(); -void __fastcall sub_81FE50(CSignBoardMgr* manager); -LRESULT CALLBACK sub_E5C430(HWND window, UINT message, WPARAM wParam, LPARAM lParam); -int sub_E59030(); +void InitMapTypeInfoTable(); +void __fastcall InitializeSignBoardManager(CSignBoardMgr* manager); +LRESULT CALLBACK WindowProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam); +int ReadSetup(); int RemoveProtectionTools(); void IgnoreNull(); LSTATUS SaveDisplayDeviceSettings(); @@ -916,12 +916,12 @@ LSTATUS SaveDisplayDeviceSettings(); // OFFSET: 0x00E58100 // FUNCTION: fn_24362 -int sub_E58100(HINSTANCE instance, int showCommand) { +int InitApp(HINSTANCE instance, int showCommand) { g_instance = instance; WNDCLASSA windowClass; windowClass.style = 0; - windowClass.lpfnWndProc = sub_E5C430; + windowClass.lpfnWndProc = WindowProc; windowClass.cbClsExtra = 0; windowClass.cbWndExtra = 0; windowClass.hInstance = instance; @@ -1248,7 +1248,7 @@ std::pair InitializeManagers() { return std::make_pair(false, std::string(name.Text())); } - sub_E198F0(); + InitMapTypeInfoTable(); if (!RodexMailStore::Create()) { const std::uint8_t nameSource[] = {0xE8, 0x1D, 0xF0, 0xC7, 0xE0, 0x57, 0x42, 0x7E, 0xD8, 0x3B, 0xFA, 0xCE, 0xC8, 0x48, 0x63, 0x3D, 0x91, 0x0C, 0xED, 0xC6, 0xE4, 0x5B, 0x74, 0x4E, 0xC5, 0x3C, 0xEB, 0xC2, 0xEB, 0x4C, 0x74, 0x2F, @@ -1354,7 +1354,7 @@ std::pair InitializeManagers() { return std::make_pair(false, std::string(name.Text())); } - sub_81FE50(s_signBoardMgr); + InitializeSignBoardManager(s_signBoardMgr); if (!CAdventurerAgencyMgr::Initialize()) { return std::make_pair(false, std::string(AdventurerAgencyCreateInstanceName()().Text())); } @@ -1363,7 +1363,7 @@ std::pair InitializeManagers() { return std::make_pair(false, std::string(RequestJoinPartyCreateInstanceName()().Text())); } - Singleton::GetInstance()->sub_60DBF0(); + Singleton::GetInstance()->Load(); CItemDBToIDMgr::GetInstance()->Load(); CItemReformMgr::Instance()->Load(); Singleton::GetInstance()->Init(); @@ -1613,7 +1613,7 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE previous, LPSTR commandLine, in const std::uint8_t setupSource[] = {0x64, 0x98, 0x01, 0x20, 0x45, 0xEF, 0x30, 0x3F, 0x52, 0xFD}; thread_local EncryptedName setup(setupSource); - while (sub_E59030() == 0) { + while (ReadSetup() == 0) { if (_access(setup.Text(), 0) == 0) { WaitForSingleObject(StartClientProcess(const_cast(setup.Text())), INFINITE); } @@ -1659,7 +1659,7 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE previous, LPSTR commandLine, in } } - g_session.sub_DD9D50(); + g_session.InitClientData(); ResourceMgr& resources = ResourceMgr::Instance(); const std::uint8_t resourceNamesSource[] = {0x8F, 0xA4, 0x00, 0x0D, 0x46, 0x3C, 0x78, 0x4B, 0x9C, 0xA3, 0x1F, 0x26, 0x09, 0x25, 0x65, 0x6B, @@ -1667,7 +1667,7 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE previous, LPSTR commandLine, in thread_local EncryptedName resourceNames(resourceNamesSource); resources.aliases.Load(reinterpret_cast(resourceNames.Text())); - if (!sub_E58100(instance, showCommand)) { + if (!InitApp(instance, showCommand)) { return 1; } diff --git a/Source/Client/Mode/CGameMode.h b/Source/Client/Mode/CGameMode.h index d0350521..d379ac05 100644 --- a/Source/Client/Mode/CGameMode.h +++ b/Source/Client/Mode/CGameMode.h @@ -102,10 +102,10 @@ class CGameMode : public CMode { public: CGameMode(); int SendMsg(int event, int argument1, int argument2, int argument3, int argument4) override; - void sub_D1C050(const AchievementStatePacket* packet); + void ReceiveStorageClose(const AchievementStatePacket* packet); void ReceiveBuyingStoreResult(const BuyingStoreResultPacket* packet); - void sub_D6C460(int count, int unknown01738784, short unknown01738788, int completed, int total, const AchievementRecordPacket* packets); - void sub_D6AD60(int count, const int* aids); + void ReceiveAchievementList(int count, int unknown01738784, short unknown01738788, int completed, int total, const AchievementRecordPacket* packets); + void ReceiveMacroReporterList(int count, const int* aids); /* 0058 */ unsigned char unknown_0058[0x10]; /* 0068 */ char mapName[16]; /* 0078 */ unsigned char unknown_0078[0xC]; @@ -239,7 +239,7 @@ public: bool IsEffectId990Group(int id); bool IsEffectId994Group(int id); bool ConfirmDraggedItemUse(); - void sub_CFE480(int actorId); + void RefreshStatusStateEffect(int actorId); void NotifyUnknown0604(int value); void UpdatePetFriendlyWindow(int previousFriendly); __declspec(noinline) bool SaveEmblemFile(const std::vector& data); @@ -492,8 +492,8 @@ public: void IgnoreRemovedPacket7(const unsigned char* packet); void IgnoreRemovedPacket8(); void IgnoreRemovedPacket9(); - void sub_D079A0(unsigned char kind, int argument); - void sub_D08390(const unsigned char* packet); + void ReceiveWhisperResult(unsigned char kind, int argument); + void ReceiveChangeZoneServerWithHost(const unsigned char* packet); void IgnoreRemovedPacket10(const unsigned char* packet); void IgnoreRemovedPacket11(const unsigned char* packet); void IgnoreRemovedPacket12(const unsigned char* packet, int value1, int value2, int value3, int value4); @@ -567,33 +567,33 @@ public: static bool ShowRestrictedNotice(int grade); void AddUnknown0604(UIWindow* window); void RequestAdminStatus(); - void sub_CEB8E0(); - unsigned sub_CEBBB0(const std::vector& data); - __declspec(noinline) unsigned sub_CEBF30(const std::vector& data); - unsigned sub_CEC100(const std::vector& data); - unsigned sub_CEC6A0(const std::vector& data); - void sub_D40730(const unsigned char* record); + void RecordChatRoomSettings(); + unsigned ReadReplayGuildInfo(const std::vector& data); + __declspec(noinline) unsigned ReadReplayGroundItems(const std::vector& data); + unsigned ReadReplayActors(const std::vector& data); + unsigned ReadReplayGroundSkills(const std::vector& data); + void Zc_Skill_Entry2(const unsigned char* record); void ReceiveGroundSkill8(const unsigned char* record); void ReceiveGroundSkill32(const unsigned char* record); void ReceiveGroundSkillExtended(const unsigned char* record); void ReceivePartyRoster(const unsigned char* packet); void ReceivePartyMemberInfo(const unsigned char* packet); void ReceivePartyMemberList(const unsigned char* packet); - void sub_D59FD0(const char* partyName, std::vector* members); - void sub_D48C60(const unsigned char* data); - void sub_D4A060(const unsigned char* data); - void sub_D6F900(const unsigned char* data); - void sub_D48530(const unsigned char* data); + void SetPartyMemberList(const char* partyName, std::vector* members); + void ReceiveGuildExpulsion2(const unsigned char* data); + void ReceiveGuildLeave2(const unsigned char* data); + void ReceivePartyInfo2(const unsigned char* data); + void ReceiveWhisper(const unsigned char* data); void RefreshInventoryOrEquipItem(std::uint16_t itemId, unsigned char unknownValue, std::uint16_t refine, ItemCardSlots cards, ItemSlotOptions options); void RefreshInventoryOrEquipItem2(const unsigned char* data); void ReceiveRankingList(const unsigned char* data); void ApplyStatusIcons(int level, unsigned int flags); void ReceiveGuildStorageLogItems(const unsigned char* data); - void sub_D1A330(const unsigned char* data); - void sub_D1A520(int unknown_0004, std::string name, std::string text, bool flag); + void ReceiveWhisper2(const unsigned char* data); + void ProcessWhisper(int unknown_0004, std::string name, std::string text, bool flag); void SpawnGroundSkill(std::uint32_t aid, std::uint32_t owner, int value, std::int16_t x, std::int16_t y, int type, signed char level, unsigned char visible, unsigned char flags); - void sub_D41250(const unsigned char* record); - void sub_D65FC0(const unsigned char* record); + void Zc_Skill_Entry(const unsigned char* record); + void ReceiveStatusChangeEntry(const unsigned char* record); void ReceiveBroadcastBalloonNotice(const unsigned char* packet); void ReceiveUnknownD65870(const unsigned char* packet); void ReceiveStatusChangeEffect2(const unsigned char* packet); @@ -603,7 +603,7 @@ public: void Initialize(const char* name) override; void End() override; void Update() override; - void sub_D08910(); + void ProcessIncomingPackets(); void TargetActorByAid(int aid); void Slot7(int value) override; void PlaceWindowAtActor(UIWindow* window, CGameActor* actor); @@ -676,8 +676,8 @@ public: void ReceiveShopName(const char* text, int shopId); void ReceiveFriendList(const unsigned char* packet); void ReceiveGuildMemberMemoList(const unsigned char* packet); - void sub_D591A0(std::uint32_t aid, int state, int flag, int options); - void sub_D5EEF0( + void ApplyActorStatusEffects(std::uint32_t aid, int state, int flag, int options); + void UpdatePartyMemberInfo( const char* first, int second, const char* third, int fourth, unsigned char fifth, std::uint16_t sixth, std::uint16_t seventh, const char* eighth, unsigned char ninth, unsigned char tenth, int eleventh ); @@ -732,7 +732,7 @@ public: void LoadCooldownSnapshot(const void* packet); void ApplyCooldownStart(const void* packet); void LoadCooldownRecords(const void* packet); - void sub_D5B030( + void NotifySkillCasting( std::uint32_t source, std::uint32_t target, std::uint16_t skill, std::uint16_t x, std::uint16_t y, int tick, int level, unsigned char flag, int result ); @@ -971,8 +971,8 @@ bool LaunchLuaSkillEffect(int skillId, int level, CGameActor* source, CGameActor void LaunchRollingCutterEffect(CGameActor* actor); void LaunchSkillCastEffect(CGameMode* mode, CGameActor* source, CGameActor* target, std::uint32_t targetAid, std::uint16_t skillId, short x, short y, int delay); void LaunchSkillActorEffect(CGameActor* actor, short x, short y, std::uint16_t skillId, int delay, int effectId); -void __stdcall sub_CDBC30(const vector3d* position, int actorId, float scale, int job); -void __stdcall sub_D08670(int field14, int itemId, int quantity, int field8, int fieldC, int field10); +void __stdcall LaunchBulletSpriteEffect(const vector3d* position, int actorId, float scale, int job); +void __stdcall ProcessBuyingStorePurchase(int field14, int itemId, int quantity, int field8, int fieldC, int field10); void DecodeSrcDst(const unsigned char* packed, int* srcX, int* srcY, int* dstX, int* dstY, int* subX, int* subY); #if defined(_WIN32) && !defined(_WIN64) @@ -1008,8 +1008,8 @@ static_assert(sizeof(CGameMode) == 0x670); void SendPacketHeader(std::uint16_t packetType); void SendPacketHeader2(std::uint16_t packetType); -void sub_D73A10(const unsigned char* packet); -void sub_D6E440(); +void ReceiveNavigation(const unsigned char* packet); +void CloseAccountLimitedTool(); struct MiniMapEffectMarker { /* 0000 */ int count; @@ -1021,7 +1021,7 @@ extern std::map g_miniMapEffectMarkers; extern char g_pendingWhisperCount; extern int g_whisperRecord; extern int g_timeAttackStart; -void sub_CCFF10(); +void CloseWhisperRecord(); extern unsigned char g_gameModePacketBuffer[0x10000]; extern int g_unknown173A5BC; extern int g_unknown_01738268; diff --git a/Source/Client/Mode/GameMode.cpp b/Source/Client/Mode/GameMode.cpp index cf6d2324..e431cec1 100644 --- a/Source/Client/Mode/GameMode.cpp +++ b/Source/Client/Mode/GameMode.cpp @@ -672,7 +672,7 @@ int CGameMode::SubD07740(int id, int defaultResult) { // OFFSET: 0x00CEB8E0 // FUNCTION: fn_21352 -void CGameMode::sub_CEB8E0() { +void CGameMode::RecordChatRoomSettings() { if (Replay::Instance().state != 2) { return; } @@ -705,7 +705,7 @@ static_assert(sizeof(GameModeChunkHeader) == 6); // OFFSET: 0x00CEC6A0 // FUNCTION: fn_21356 -unsigned CGameMode::sub_CEC6A0(const std::vector& data) { +unsigned CGameMode::ReadReplayGroundSkills(const std::vector& data) { if (data.empty()) { return 0xFFFFFFFFu; } @@ -722,12 +722,12 @@ unsigned CGameMode::sub_CEC6A0(const std::vector& data) { std::vector record(0x10); std::memcpy(record.data(), data.data() + offset, header.size); offset += header.size; - this->sub_D41250(record.data()); + this->Zc_Skill_Entry(record.data()); } else if (header.type == 0xCE) { std::vector record(0x61); std::memcpy(record.data(), data.data() + offset, header.size); offset += header.size; - this->sub_D40730(record.data()); + this->Zc_Skill_Entry2(record.data()); } else if (header.type == 0x4269) { break; } else { @@ -781,7 +781,7 @@ bool CGameMode::ShowRestrictedNotice(int grade) { return true; } -void __stdcall sub_CE8F10(const void* info, const unsigned char* data); +void __stdcall RecordWhisper(const void* info, const unsigned char* data); int ConfirmGameModeAction96(); // OFFSET: 0x00CF10B0 @@ -2474,7 +2474,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i item.SetItemId(foodId); char name[260]{}; int capacity = sizeof(name); - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); std::string text = FormatOwnedString(LookupMessage(0x24F), name); g_windowMgr.SendNotice(1, reinterpret_cast(text.c_str()), 0x1E1EF5, 0, 0, 0); g_windowMgr.SendNotice(0x13, reinterpret_cast(text.c_str()), 0x1E1EF5, 0, 0, 0); @@ -3161,7 +3161,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i const std::size_t length = std::strlen(message); if (length - 1 <= 0x14F) { g_windowMgr.ClearUnknown04DC(); - sub_CE8F10(target, reinterpret_cast(message)); + RecordWhisper(target, reinterpret_cast(message)); unsigned char packet[0x16D]; const std::uint16_t packetId = 0x96; const std::uint16_t packetLength = static_cast(length + 0x1C); @@ -3226,7 +3226,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::memset(packet + 7, 0, 8); std::memcpy(packet + 7, setting.password.c_str(), setting.password.size()); std::memcpy(packet + 15, setting.title.c_str(), setting.title.size()); - this->sub_CEB8E0(); + this->RecordChatRoomSettings(); GetRagConnection().Send(static_cast(packetLength), packet); return 0; } @@ -4173,7 +4173,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::memset(packet + 7, 0, 8); std::memcpy(packet + 7, settings.password.c_str(), settings.password.size()); std::memcpy(packet + 15, settings.title.c_str(), settings.title.size()); - this->sub_CEB8E0(); + this->RecordChatRoomSettings(); GetRagConnection().Send(static_cast(header[1]), packet); return 0; } @@ -4844,7 +4844,7 @@ bool CGameMode::ConfirmDraggedItemUse() { // OFFSET: 0x00CFE480 // FUNCTION: fn_21432 -void CGameMode::sub_CFE480(int actorId) { +void CGameMode::RefreshStatusStateEffect(int actorId) { if (g_windowMgr.unknown_0508 != 2 && actorId == static_cast(g_session.m_aid)) { this->scene->player->unknown_0544->SendMsg(nullptr, 44, 0, 1, 0, 0, 0, 0); } @@ -4852,7 +4852,7 @@ void CGameMode::sub_CFE480(int actorId) { // OFFSET: 0x00CDBC30 // FUNCTION: fn_21312 -void __stdcall sub_CDBC30(const vector3d* position, int actorId, float scale, int job) { +void __stdcall LaunchBulletSpriteEffect(const vector3d* position, int actorId, float scale, int job) { if (actorId == 0) { return; } @@ -4868,7 +4868,7 @@ void __stdcall sub_CDBC30(const vector3d* position, int actorId, float scale, in // OFFSET: 0x00CE8F10 // FUNCTION: fn_21344 -void __stdcall sub_CE8F10(const void* info, const unsigned char* data) { +void __stdcall RecordWhisper(const void* info, const unsigned char* data) { if (Replay::Instance().state != 2) { return; } @@ -5007,7 +5007,7 @@ void CGameMode::NotifyUnknown0604(int value) { // OFFSET: 0x00CEBF30 // FUNCTION: fn_21354 -unsigned CGameMode::sub_CEBF30(const std::vector& data) { +unsigned CGameMode::ReadReplayGroundItems(const std::vector& data) { if (data.empty()) { return 0xFFFFFFFFu; } @@ -5041,7 +5041,7 @@ unsigned CGameMode::sub_CEBF30(const std::vector& data) { // OFFSET: 0x00CEC100 // FUNCTION: fn_21355 -unsigned CGameMode::sub_CEC100(const std::vector& data) { +unsigned CGameMode::ReadReplayActors(const std::vector& data) { if (data.empty()) { return 0xFFFFFFFFu; } @@ -5139,7 +5139,7 @@ unsigned CGameMode::sub_CEC100(const std::vector& data) { case 0x191: std::memcpy(record.data(), data.data() + offset, header.size); offset += header.size; - this->sub_D65FC0(record.data()); + this->ReceiveStatusChangeEntry(record.data()); break; default: offset += header.size; @@ -5743,7 +5743,7 @@ std::vector CGameMode::WriteReplaySkillState() { // OFFSET: 0x00CEBBB0 // FUNCTION: fn_21353 -unsigned CGameMode::sub_CEBBB0(const std::vector& data) { +unsigned CGameMode::ReadReplayGuildInfo(const std::vector& data) { if (data.empty()) { return 0xFFFFFFFFu; } @@ -6304,7 +6304,7 @@ void CGameMode::ProcessUiMessage(unsigned char* message) { break; case 910: { const GameModeUiNavigationMessage* navigation = reinterpret_cast(message); - g_navigationManager.sub_B99030( + g_navigationManager.StartNavigation( std::string(navigation->name), navigation->kind, navigation->mode, navigation->flag != 0, navigation->x, navigation->y, navigation->id ); break; @@ -6759,7 +6759,7 @@ void CGameMode::End() { if (schedule) { schedule->active = false; } - g_timeScheduler->sub_BA95F0(4); + g_timeScheduler->RemoveSchedulesByKey(4); this->StopReplayRecording(); g_soundMgr->EndSamples(); @@ -6805,7 +6805,7 @@ void CGameMode::End() { } if (g_session.m_whisperRecord != 0) { - sub_CCFF10(); + CloseWhisperRecord(); } g_effectMgr->Clear(); g_session.SaveMiniPartyInfo(); @@ -7303,7 +7303,7 @@ void CGameMode::InitializeState() { } g_snapMgr.Clear(); - g_windowMgr.sub_AA6B80(); + g_windowMgr.ClearMapWindows(); this->broadcastBalloon = nullptr; this->noticeBalloon = nullptr; g_windowMgr.SetSurface0478(nullptr); @@ -7902,7 +7902,7 @@ void CGameMode::Initialize(const char* name) { g_session.RefreshHpSpWindows(); g_session.InvalidateWindowFrames(); g_windowMgr.SetSurface0478(nullptr); - g_windowMgr.sub_AA6B80(); + g_windowMgr.ClearMapWindows(); this->broadcastBalloon = nullptr; this->noticeBalloon = nullptr; g_windowMgr.HideWindow01C8(); @@ -7990,10 +7990,10 @@ void CGameMode::Initialize(const char* name) { g_session.ReadReplayEntryQueue(Replay::Instance().ReadSection(12)); g_session.ReadReplayShortcuts(Replay::Instance().ReadSection(13)); g_session.ReadReplayShops(Replay::Instance().ReadSection(14)); - this->sub_CEBBB0(Replay::Instance().ReadSection(0x16)); - this->sub_CEC100(Replay::Instance().ReadSection(0xF)); - this->sub_CEBF30(Replay::Instance().ReadSection(0x10)); - this->sub_CEC6A0(Replay::Instance().ReadSection(0x11)); + this->ReadReplayGuildInfo(Replay::Instance().ReadSection(0x16)); + this->ReadReplayActors(Replay::Instance().ReadSection(0xF)); + this->ReadReplayGroundItems(Replay::Instance().ReadSection(0x10)); + this->ReadReplayGroundSkills(Replay::Instance().ReadSection(0x11)); const std::vector data = Replay::Instance().ReadSection(0x17); if (data.begin() != data.end()) { @@ -8408,7 +8408,7 @@ int CGameMode::ProcessMousePick(int result, ActorPickInfo* pick) { if (g_sub_1319eb4 == 1 && pick) { UIMacroReporterWnd* reporter = static_cast(g_windowMgr.LookupWindow(286)); if (reporter && reporter->unknown_010C == true && reporter->m_mode == 0) { - reporter->sub_7EF2C0(reinterpret_cast(pick)); + reporter->AddPickedActor(reinterpret_cast(pick)); return -1; } } @@ -8814,7 +8814,7 @@ std::uint32_t g_spriteAtlasClearTick; // FUNCTION: fn_21323 void CGameMode::Update() { PumpApplicationMessages(); - this->sub_D08910(); + this->ProcessIncomingPackets(); if (Replay::Instance().AdvanceFrame() == 0) { g_windowMgr.window_4F168->SendMsg(nullptr, 35, 0, 0, 0, 0); } @@ -9291,7 +9291,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { } else { std::sprintf(text, "Chatting Auto Save END"); g_modeMgr.GetGameMode(); - sub_CCFF10(); + CloseWhisperRecord(); } g_windowMgr.SendNotice(1, reinterpret_cast(text), 0xFFFF, 0, 0, 0); break; @@ -9379,12 +9379,12 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { case 151: { char text[256]; if (std::strcmp(parts[0].c_str(), "") == 0) { - g_session.sub_DE3D90(nullptr); + g_session.HiFriends(nullptr); std::sprintf(text, "[ To Friends ] : (Hi) *^_^*"); } else { char* message = const_cast(g_windowMgr.unknown_04DC.c_str()); std::string copy(message); - g_session.sub_DE3D90(message); + g_session.HiFriends(message); if (g_serviceType == 0) { std::sprintf(text, "[ To Friends ] : (Hi) %s", copy.c_str()); } else { @@ -9453,13 +9453,13 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { g_serviceOptions.Set(0xA5, !g_serviceOptions.Get(0xA5)); g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(1, reinterpret_cast(LookupMessage(g_serviceOptions.Get(0xA5) ? 0x414 : 0x415)), 0x64FFFF, 0, 0, 0); - g_windowMgr.sub_AAB090(); + g_windowMgr.RefreshGameSettings(); break; case 243: g_serviceOptions.Set(0xF3, !g_serviceOptions.Get(0xF3)); g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(1, reinterpret_cast(LookupMessage(g_serviceOptions.Get(0xF3) ? 0xDC7 : 0xDC8)), 0x64FFFF, 0, 0, 0); - g_windowMgr.sub_AAB090(); + g_windowMgr.RefreshGameSettings(); break; case 135: g_windowMgr.chatModeChanged = g_windowMgr.chatModeChanged == 0; @@ -9514,7 +9514,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { char text[120]; std::sprintf(text, "%s %d", LookupMessage(0x19), volume); g_windowMgr.SendNotice(1, reinterpret_cast(text), 0x64FFFF, 0, 0, 0); - g_windowMgr.sub_AAB090(); + g_windowMgr.RefreshGameSettings(); break; } case 13: { @@ -9524,7 +9524,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { char text[120]; std::sprintf(text, "%s %d", LookupMessage(0x1A), volume); g_windowMgr.SendNotice(1, reinterpret_cast(text), 0x64FFFF, 0, 0, 0); - g_windowMgr.sub_AAB090(); + g_windowMgr.RefreshGameSettings(); break; } case 11: @@ -9534,7 +9534,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { if (g_serviceOptions.Get(0xB)) { g_soundMgr->unknown = 0; } - g_windowMgr.sub_AAB090(); + g_windowMgr.RefreshGameSettings(); break; case 195: g_soundMgr->unknown = g_soundMgr->unknown == 0; @@ -9554,7 +9554,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { } else { g_soundMgr->StopStreams(); } - g_windowMgr.sub_AAB090(); + g_windowMgr.RefreshGameSettings(); break; case 49: { const int third = std::atoi(parts[2].c_str()); @@ -9960,7 +9960,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { g_navigationManager.ShowRouteResult(-100, 1); break; } - g_navigationManager.sub_B99030(parts[0], 0, 5, true, cell.x, cell.y, 0x3EA); + g_navigationManager.StartNavigation(parts[0], 0, 5, true, cell.x, cell.y, 0x3EA); break; } case 210: { @@ -9979,7 +9979,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { if (third) { mode += 4; } - g_navigationManager.sub_B99030(parts[0], 0, mode, true, cell.x, cell.y, 0x3EA); + g_navigationManager.StartNavigation(parts[0], 0, mode, true, cell.x, cell.y, 0x3EA); break; } case 217: diff --git a/Source/Client/Mode/GameModeActorEffects.cpp b/Source/Client/Mode/GameModeActorEffects.cpp index ead2ea2b..7256b129 100644 --- a/Source/Client/Mode/GameModeActorEffects.cpp +++ b/Source/Client/Mode/GameModeActorEffects.cpp @@ -6,13 +6,13 @@ // FUNCTION: fn_21289 void CGameMode::RefreshActorJobEffects(bool playerOnly) { this->scene->player->ResetJobEffects(); - this->scene->player->sub_CAA4D0(); + this->scene->player->UpdateMaxLevelAura(); if (!playerOnly) { for (std::list::iterator it = this->scene->actors.begin(); it != this->scene->actors.end(); ++it) { CGameActor* actor = static_cast(*it); if (actor->unknown_02B4 != 0) { actor->ResetJobEffects(); - actor->sub_CAA4D0(); + actor->UpdateMaxLevelAura(); } } } diff --git a/Source/Client/Mode/GameModeHandlers.cpp b/Source/Client/Mode/GameModeHandlers.cpp index e5429ce5..7d5b9407 100644 --- a/Source/Client/Mode/GameModeHandlers.cpp +++ b/Source/Client/Mode/GameModeHandlers.cpp @@ -372,7 +372,7 @@ void CGameMode::ReceivePartyRoster(const unsigned char* packet) { for (unsigned i = 0; i < count; ++i) { members.push_back(*entry++); } - this->sub_D59FD0(reinterpret_cast(packet + 4), &members); + this->SetPartyMemberList(reinterpret_cast(packet + 4), &members); } // OFFSET: 0x00D40E40 @@ -482,7 +482,7 @@ void CGameMode::SpawnGroundSkill(std::uint32_t aid, std::uint32_t owner, int val } -int sub_D64A40(const unsigned char* entries); +int CountItemRandomOptions(const unsigned char* entries); struct GameOptionEntry { /* 0000 */ int id; @@ -1491,7 +1491,7 @@ void CGameMode::ReceivePackageItemTest(const unsigned char* packet) { ITEM_INFO item; item.SetItemId(*reinterpret_cast(packet + 4)); int capacity = sizeof(packageName); - item.sub_6D5810(packageName, capacity, 0); + item.GetIdDisplayName(packageName, capacity, 0); char path[2048]; std::memset(path, 0, sizeof(path)); @@ -1523,7 +1523,7 @@ void CGameMode::ReceivePackageItemTest(const unsigned char* packet) { const PackageItemTestEntry current = *entry; item.SetItemId(current.itemId); int nameCapacity = sizeof(itemName); - item.sub_6D5810(itemName, nameCapacity, 0); + item.GetIdDisplayName(itemName, nameCapacity, 0); std::fprintf(file, "%s\t\t\t%d\t%c%d%c\n", itemName, current.count, '(', current.unknown_0004, ')'); total += current.count; ++entry; @@ -2081,7 +2081,7 @@ void CGameMode::ReceiveGameOptionResult(int command, int result, int enabled) { } g_gameOptionFlag = enabled != 0; - g_windowMgr.sub_AAB090(); + g_windowMgr.RefreshGameSettings(); g_windowMgr.SendNotice(1, reinterpret_cast(LookupMessage(g_gameOptionFlag ? 0xF17 : 0xF16)), 0x64FFFF, 0, 0, 0); } @@ -2102,7 +2102,7 @@ void CGameMode::ReceiveServiceRequest(unsigned char type, int value) { } break; case 6: - g_renewQuestMgr->sub_67B650(value); + g_renewQuestMgr->ShowQuestInfo(value); break; case 7: if (UIWindow* window = g_windowMgr.EnsureWindow(328)) { @@ -2296,7 +2296,7 @@ void CGameMode::ReceiveItemReward(const unsigned char* data) { item.unknown_005D = packet->damaged; item.unknown_0060 = packet->refine; std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); - item.unknown_0098 = sub_D64A40(reinterpret_cast(packet->options)); + item.unknown_0098 = CountItemRandomOptions(reinterpret_cast(packet->options)); item.unknown_0000[2] = packet->expireTime; for (int index = 0; index < item.unknown_0098; ++index) { reinterpret_cast(item.unknown_009C)[index] = packet->options[index]; @@ -2434,7 +2434,7 @@ void CGameMode::ReceiveDdukddakBoxTest(const unsigned char* packet) { ITEM_INFO box; box.SetItemId(*reinterpret_cast(packet + 4)); int capacity = sizeof(name); - box.sub_6D5810(name, capacity, 0); + box.GetIdDisplayName(name, capacity, 0); SYSTEMTIME time; GetLocalTime(&time); @@ -2448,7 +2448,7 @@ void CGameMode::ReceiveDdukddakBoxTest(const unsigned char* packet) { for (auto item = items.begin(); item != items.end(); ++item) { ITEM_INFO info; info.SetItemId(item->first); - info.sub_6D5810(name, capacity, 0); + info.GetIdDisplayName(name, capacity, 0); std::string amount = FormatOwnedString("%d", item->second); std::string ratio = FormatOwnedString("%.5f%%", static_cast(item->second) / static_cast(total) * 100.0f); output << FormatOwnedString("%d\t%s\t%s\t%s\n", item->first, name, amount.c_str(), ratio.c_str()); @@ -2490,7 +2490,7 @@ void CGameMode::ReceiveBroadcastBalloonNotice(const unsigned char* packet) { // OFFSET: 0x00D65870 // FUNCTION: fn_22003 void CGameMode::ReceiveUnknownD65870(const unsigned char* packet) { - this->sub_D5EEF0( + this->UpdatePartyMemberInfo( reinterpret_cast(packet + 0x2F), *reinterpret_cast(packet + 2), reinterpret_cast(packet + 0x47), *reinterpret_cast(packet + 10), packet[0x16], *reinterpret_cast(packet + 0x0E), *reinterpret_cast(packet + 0x10), reinterpret_cast(packet + 0x17), packet[0x57], packet[0x58], @@ -2500,7 +2500,7 @@ void CGameMode::ReceiveUnknownD65870(const unsigned char* packet) { // OFFSET: 0x00D65FC0 // FUNCTION: fn_22007 -void CGameMode::sub_D65FC0(const unsigned char* record) { +void CGameMode::ReceiveStatusChangeEntry(const unsigned char* record) { this->ApplyStatusChange( *reinterpret_cast(record + 2), 1, *reinterpret_cast(record + 6), *reinterpret_cast(record + 0x0C), *reinterpret_cast(record + 0x10), @@ -2548,7 +2548,7 @@ void CGameMode::ReceiveWindow95Data(const unsigned char* packet) { // FUNCTION: fn_22036 void CGameMode::ReceiveActorSkillResult(const unsigned char* packet) { const ActorSkillResultPacket& value = *reinterpret_cast(packet); - this->sub_D5B030( + this->NotifySkillCasting( value.source, value.target, value.skill, value.x, value.y, value.tick, value.level, value.flag, value.result ); } @@ -2607,7 +2607,7 @@ void CGameMode::UpdateSkillCooldown(std::uint16_t skill, std::uint32_t remaining // OFFSET: 0x00D41250 // FUNCTION: fn_21823 -void CGameMode::sub_D41250(const unsigned char* record) { +void CGameMode::Zc_Skill_Entry(const unsigned char* record) { GroundSkillPacket& packet = *reinterpret_cast(const_cast(record)); GroundSkillSpawnData data; data.aid = packet.aid; @@ -2647,7 +2647,7 @@ void CGameMode::sub_D41250(const unsigned char* record) { // OFFSET: 0x00D40730 // FUNCTION: fn_21819 -void CGameMode::sub_D40730(const unsigned char* record) { +void CGameMode::Zc_Skill_Entry2(const unsigned char* record) { GroundSkillPacket& packet = *reinterpret_cast(const_cast(record)); GroundSkillSpawnData data; data.aid = packet.aid; diff --git a/Source/Client/Mode/GameModeMiniMap.cpp b/Source/Client/Mode/GameModeMiniMap.cpp index 09540a0f..9b7450cf 100644 --- a/Source/Client/Mode/GameModeMiniMap.cpp +++ b/Source/Client/Mode/GameModeMiniMap.cpp @@ -92,7 +92,7 @@ void MiniMapNoOp() { // OFFSET: 0x00CCFF10 // FUNCTION: fn_21249 -void sub_CCFF10() { +void CloseWhisperRecord() { if (g_session.m_whisperRecord != 0) { if (g_session.IsAdminSubMode(7) != 0) { char path[256]; diff --git a/Source/Client/Mode/GameModeNotices.cpp b/Source/Client/Mode/GameModeNotices.cpp index 42f3a491..27c0e181 100644 --- a/Source/Client/Mode/GameModeNotices.cpp +++ b/Source/Client/Mode/GameModeNotices.cpp @@ -957,7 +957,7 @@ void CGameMode::ReceiveEffectRemove(const unsigned char* data) { // OFFSET: 0x00D6E930 // FUNCTION: fn_22107 void CGameMode::ReceiveToggle128(int enabled) { - sub_E489C0(enabled != 0); + SetPetInfoAlert(enabled != 0); } // OFFSET: 0x00D6E950 @@ -1432,7 +1432,7 @@ void CGameMode::ReceiveItem1784List(const unsigned char* data) { item.unknown_0078[2] = entry.unknown_0014; item.unknown_0064 = 8; item.identified = 1; - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); item.SetName(name); g_session.unknown_1784[9].push_back(item); } @@ -1738,7 +1738,7 @@ void CGameMode::ReceiveWindow99Values(int count, const int* values) { // OFFSET: 0x00D6E440 // FUNCTION: fn_22099 -void sub_D6E440() { +void CloseAccountLimitedTool() { g_windowMgr.CloseWindow(0x154); } @@ -1811,7 +1811,7 @@ void __stdcall nullsub_468(int) { // OFFSET: 0x00D6AD60 // FUNCTION: fn_22063 -void CGameMode::sub_D6AD60(int count, const int* aids) { +void CGameMode::ReceiveMacroReporterList(int count, const int* aids) { if (count <= 0) { return; } @@ -1822,7 +1822,7 @@ void CGameMode::sub_D6AD60(int count, const int* aids) { } for (int i = 0; i < count; ++i) { - window->sub_7EF2E0(aids[i]); + window->AddActorByAID(aids[i]); } } @@ -1840,7 +1840,7 @@ int g_unknown_01738270; // OFFSET: 0x00D1C050 // FUNCTION: fn_21624 -void CGameMode::sub_D1C050(const AchievementStatePacket* packet) { +void CGameMode::ReceiveStorageClose(const AchievementStatePacket* packet) { UIWindow* window = nullptr; bool notify = true; @@ -1865,7 +1865,7 @@ void CGameMode::sub_D1C050(const AchievementStatePacket* packet) { // OFFSET: 0x00D6C460 // FUNCTION: fn_22081 -void CGameMode::sub_D6C460(int count, int unknown01738784, short unknown01738788, int completed, int total, const AchievementRecordPacket* packets) { +void CGameMode::ReceiveAchievementList(int count, int unknown01738784, short unknown01738788, int completed, int total, const AchievementRecordPacket* packets) { g_session.unknown_614C = unknown01738784; g_session.unknown_6150 = unknown01738788; g_session.unknown_6154 = completed; @@ -3549,7 +3549,7 @@ void CGameMode::ReceiveFeedConfig(unsigned char state, unsigned char option) { } g_serviceOptions.Set(231, option); g_windowMgr.SendNotice(1, reinterpret_cast(LookupMessage(option + 0xBA2)), 0x64FFFF, 0, 0, 0); - g_windowMgr.sub_AAB070(231); + g_windowMgr.RefreshGameSettingOption(231); } // OFFSET: 0x00D6E6F0 @@ -3562,7 +3562,7 @@ void CGameMode::ReceiveFeedConfig2(unsigned char state, unsigned char option, bo } g_serviceOptions.Set(231, option); g_windowMgr.SendNotice(1, reinterpret_cast(LookupMessage(option + 0xBA2)), 0x64FFFF, 0, 0, 0); - g_windowMgr.sub_AAB070(231); + g_windowMgr.RefreshGameSettingOption(231); g_session.SetPetAutoFeed(petAutoFeed); } @@ -3576,7 +3576,7 @@ void CGameMode::ReceiveFeedConfig3(unsigned char state, unsigned char option, bo } g_serviceOptions.Set(231, option); g_windowMgr.SendNotice(1, reinterpret_cast(LookupMessage(option + 0xBA2)), 0x64FFFF, 0, 0, 0); - g_windowMgr.sub_AAB070(231); + g_windowMgr.RefreshGameSettingOption(231); g_session.SetPetAutoFeed(petAutoFeed); g_session.SetHomunculusAutoFeed(homunculusAutoFeed); } @@ -3591,7 +3591,7 @@ void CGameMode::ReceiveFeedConfig4(unsigned char state, unsigned char option, bo } g_serviceOptions.Set(231, option); g_windowMgr.SendNotice(1, reinterpret_cast(LookupMessage(option + 0xBA2)), 0x64FFFF, 0, 0, 0); - g_windowMgr.sub_AAB070(231); + g_windowMgr.RefreshGameSettingOption(231); g_session.SetPetAutoFeed(petAutoFeed); g_session.SetHomunculusAutoFeed(homunculusAutoFeed); *reinterpret_cast(g_session.unknown_8128) = value; @@ -3653,7 +3653,7 @@ void CGameMode::ReceiveLongParChange(const unsigned char* data) { // OFFSET: 0x00D73A10 // FUNCTION: fn_22142 -void sub_D73A10(const unsigned char* packet) { +void ReceiveNavigation(const unsigned char* packet) { int group = packet[3] >= 100 ? 1 : 0; int code = packet[3] >= 100 ? packet[3] - 100 : packet[3]; if (code >= 10) { @@ -3665,7 +3665,7 @@ void sub_D73A10(const unsigned char* packet) { const int x = *reinterpret_cast(packet + 0x15); const int y = *reinterpret_cast(packet + 0x17); const int id = *reinterpret_cast(packet + 0x19); - g_navigationManager.sub_B99030(std::string(reinterpret_cast(packet + 5)), packet[2], mode, packet[4] != 0, x, y, id); + g_navigationManager.StartNavigation(std::string(reinterpret_cast(packet + 5)), packet[2], mode, packet[4] != 0, x, y, id); } // OFFSET: 0x00D73AF0 @@ -3736,7 +3736,7 @@ void CGameMode::ReceiveNotifyEffect(const unsigned char* packet) { if (g_session.IsMercenaryJob(gameActor->GetEffectiveJob(-1)) && *reinterpret_cast(packet + 6) == 0x238) { ++gameActor->unknown_0210; gameActor->ResetJobEffects(); - gameActor->sub_CAA4D0(); + gameActor->UpdateMaxLevelAura(); } } @@ -3788,7 +3788,7 @@ void CGameMode::ReceiveTypedItemList(const unsigned char* data) { item.unknown_0064 = type; item.SetItemId(itemId); int capacity = sizeof(name); - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); item.SetName(name); if (static_cast(packet->type) <= 10) { g_session.unknown_1784[packet->type].push_back(item); @@ -3917,7 +3917,7 @@ static __forceinline void FillVendingItem(ITEM_INFO& item, const VendingItemReco // OFFSET: 0x00D47720 // FUNCTION: fn_21850 void CGameMode::ReceiveVendingItemSoldNow(const unsigned char* data) { - sub_D08670(static_cast(_time32(nullptr)), *reinterpret_cast(data + 2), + ProcessBuyingStorePurchase(static_cast(_time32(nullptr)), *reinterpret_cast(data + 2), *reinterpret_cast(data + 6), *reinterpret_cast(data + 8), 0, 0); } @@ -4953,7 +4953,7 @@ void CGameMode::ReceiveStovePurchaseResult(const unsigned char* data) { int capacity = sizeof(name); ITEM_INFO item; item.SetItemId(packet->itemId); - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); message = FormatOwnedString("%s아이템 %d개 지급 완료", name, packet->count); } case 2: @@ -5083,7 +5083,7 @@ void CGameMode::ReceiveOngoingQuestList(const unsigned char* data) { g_renewQuestMgr->AddOngoingQuest(entry->questId, info); } - g_renewQuestMgr->sub_67B6B0(); + g_renewQuestMgr->UpdateQuestWindows(); } // OFFSET: 0x00D6CAD0 @@ -5143,7 +5143,7 @@ void CGameMode::ReceiveOngoingQuestList2(const unsigned char* data) { g_renewQuestMgr->AddOngoingQuest(entry->questId, info); } - g_renewQuestMgr->sub_67B6B0(); + g_renewQuestMgr->UpdateQuestWindows(); } #pragma pack(push, 1) @@ -5525,7 +5525,7 @@ void CGameMode::ReceiveSpecialBroadcast(const unsigned char* data) { item.SetItemId(packet->value); char itemName[256]; int capacity = sizeof(itemName); - item.sub_6D5810(itemName, capacity, 0); + item.GetIdDisplayName(itemName, capacity, 0); text.assign(FormatOwnedString(LookupMessage(1265), itemName)); player->LaunchEffect(543, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); break; @@ -5622,7 +5622,7 @@ void CGameMode::ReceiveQuestHuntUpdate(const unsigned char* data) { if (g_windowMgr.window_0428 != nullptr) { g_windowMgr.window_0428->Invalidate(); } - g_renewQuestMgr->sub_67B690(); + g_renewQuestMgr->UpdateOngoingQuestInfo(); } // OFFSET: 0x00D47C20 @@ -5668,7 +5668,7 @@ void CGameMode::ReceiveQuestHuntUpdate2(const unsigned char* data) { if (g_windowMgr.window_0428 != nullptr) { g_windowMgr.window_0428->Invalidate(); } - g_renewQuestMgr->sub_67B690(); + g_renewQuestMgr->UpdateOngoingQuestInfo(); } // OFFSET: 0x00D6A0D0 @@ -6230,7 +6230,7 @@ void CGameMode::ReceiveStatusChangeNotice(const unsigned char* data) { std::sprintf(message, LookupMessage(3247)); break; default: - this->sub_CFE480(packet->aid); + this->RefreshStatusStateEffect(packet->aid); return; } } else { @@ -7019,7 +7019,7 @@ void CGameMode::ReceiveStatusChangeNotice(const unsigned char* data) { break; default: if (CSkillActionMgr::GetInstance()->HasEfstAction(packet->type) != true) { - this->sub_CFE480(packet->aid); + this->RefreshStatusStateEffect(packet->aid); return; } { @@ -7032,7 +7032,7 @@ void CGameMode::ReceiveStatusChangeNotice(const unsigned char* data) { } } - this->sub_CFE480(packet->aid); + this->RefreshStatusStateEffect(packet->aid); if (std::strlen(message) > 1) { char text[512]; std::sprintf(text, "%s%s", name, message); @@ -7211,7 +7211,7 @@ void ClearGuildShortcutSkills() { // OFFSET: 0x00D48C60 // FUNCTION: fn_21856 -void CGameMode::sub_D48C60(const unsigned char* data) { +void CGameMode::ReceiveGuildExpulsion2(const unsigned char* data) { const auto* packet = reinterpret_cast(data); GuildInfo* guildInfo = &g_guildInfo; char reason[41]; @@ -7260,7 +7260,7 @@ void CGameMode::sub_D48C60(const unsigned char* data) { // OFFSET: 0x00D4A060 // FUNCTION: fn_21861 -void CGameMode::sub_D4A060(const unsigned char* data) { +void CGameMode::ReceiveGuildLeave2(const unsigned char* data) { const auto* packet = reinterpret_cast(data); GuildInfo* guildInfo = &g_guildInfo; char reason[40]; @@ -7326,7 +7326,7 @@ struct PartyRosterListPacket { // OFFSET: 0x00D6F900 // FUNCTION: fn_22124 -void CGameMode::sub_D6F900(const unsigned char* data) { +void CGameMode::ReceivePartyInfo2(const unsigned char* data) { const auto* packet = reinterpret_cast(data); std::vector members; const int count = (packet->length - 0x1C) / sizeof(PartyRosterRecord50); @@ -7343,7 +7343,7 @@ void CGameMode::sub_D6F900(const unsigned char* data) { members.push_back(entry); } - this->sub_D59FD0(reinterpret_cast(packet->partyName), &members); + this->SetPartyMemberList(reinterpret_cast(packet->partyName), &members); } #pragma pack(push, 1) @@ -7436,18 +7436,18 @@ void CGameMode::RefreshInventoryOrEquipItem2(const unsigned char* data) { // OFFSET: 0x00D48530 // FUNCTION: fn_21853 -void CGameMode::sub_D48530(const unsigned char* data) { +void CGameMode::ReceiveWhisper(const unsigned char* data) { const auto* packet = reinterpret_cast(data); char nameBuffer[24] = {}; StringFormat(nameBuffer, sizeof(nameBuffer), static_cast(-1), "%s", reinterpret_cast(data) + 4); std::string text(reinterpret_cast(data) + 0x20, reinterpret_cast(data) + packet->length); - this->sub_D1A520(0, std::string(nameBuffer), text, *reinterpret_cast(data + 0x1C) != 0); + this->ProcessWhisper(0, std::string(nameBuffer), text, *reinterpret_cast(data + 0x1C) != 0); } // OFFSET: 0x00D1A330 // FUNCTION: fn_21617 -void CGameMode::sub_D1A330(const unsigned char* data) { +void CGameMode::ReceiveWhisper2(const unsigned char* data) { char nameBuffer[24]; std::memset(nameBuffer, 0, sizeof(nameBuffer)); StringFormat(nameBuffer, sizeof(nameBuffer), static_cast(-1), "%s", reinterpret_cast(data) + 8); @@ -7455,7 +7455,7 @@ void CGameMode::sub_D1A330(const unsigned char* data) { const int length = *reinterpret_cast(data + 2) - 0x21; std::string text(reinterpret_cast(data) + 0x21, length > 0 ? static_cast(length) : 0); - this->sub_D1A520(static_cast(*reinterpret_cast(data + 4)), std::string(nameBuffer), text, data[0x20] != 0); + this->ProcessWhisper(static_cast(*reinterpret_cast(data + 4)), std::string(nameBuffer), text, data[0x20] != 0); } #include "Contents/ShowRankingScheduler.h" @@ -7633,7 +7633,7 @@ void CGameMode::ApplyStatusIcons(int level, unsigned int flags) { // OFFSET: 0x00D1A520 // FUNCTION: fn_21618 -void CGameMode::sub_D1A520(int unknown_0004, std::string name, std::string text, bool flag) { +void CGameMode::ProcessWhisper(int unknown_0004, std::string name, std::string text, bool flag) { const std::string sender(name); std::vector message(text.begin(), text.end()); message.push_back('\0'); diff --git a/Source/Client/Mode/GameModePackets.cpp b/Source/Client/Mode/GameModePackets.cpp index c92fa268..8dd7d017 100644 --- a/Source/Client/Mode/GameModePackets.cpp +++ b/Source/Client/Mode/GameModePackets.cpp @@ -161,7 +161,7 @@ struct TradeItemRecord { static_assert(sizeof(TradeItemRecord) == 0x22); #endif -void __fastcall sub_DFF150(CSession* session); +void __fastcall RefreshPartyWindows(CSession* session); // GLOBAL: gl_24992 char g_pendingWhisperCount; @@ -1860,7 +1860,7 @@ __declspec(noinline) void CGameMode::ReceiveDynamicNpcNotice(const unsigned char // OFFSET: 0x00D079A0 // FUNCTION: fn_21584 -void CGameMode::sub_D079A0(unsigned char kind, int argument) { +void CGameMode::ReceiveWhisperResult(unsigned char kind, int argument) { std::string& speaker = this->unknown_0214; std::string& target = this->unknown_022C; @@ -1928,7 +1928,7 @@ void CGameMode::sub_D079A0(unsigned char kind, int argument) { // OFFSET: 0x00D08390 // FUNCTION: fn_21588 -void CGameMode::sub_D08390(const unsigned char* packet) { +void CGameMode::ReceiveChangeZoneServerWithHost(const unsigned char* packet) { const int x = *reinterpret_cast(packet + 0x12); const int y = *reinterpret_cast(packet + 0x14); const int ip = *reinterpret_cast(packet + 0x16); @@ -1940,7 +1940,7 @@ void CGameMode::sub_D08390(const unsigned char* packet) { // OFFSET: 0x00D08110 // FUNCTION: fn_21585 -void __stdcall sub_D08110(int field8, int itemIdWord, int quantityWord, int field14, int field18) { +void __stdcall ProcessVendingSale(int field8, int itemIdWord, int quantityWord, int field14, int field18) { const int itemId = static_cast(itemIdWord); const int quantity = static_cast(quantityWord); ITEM_INFO item = g_session.FindItem1758(static_cast(itemId)); @@ -1973,7 +1973,7 @@ void __stdcall sub_D08110(int field8, int itemIdWord, int quantityWord, int fiel // OFFSET: 0x00D08670 // FUNCTION: fn_21592 -void __declspec(noinline) __stdcall sub_D08670(int field14, int itemId, int quantity, int field8, int fieldC, int field10) { +void __declspec(noinline) __stdcall ProcessBuyingStorePurchase(int field14, int itemId, int quantity, int field8, int fieldC, int field10) { ITEM_INFO item = g_session.FindItem1758ByItemId(itemId); item.SetItemId(itemId); item.quantity = quantity; @@ -1998,8 +1998,8 @@ void __declspec(noinline) __stdcall sub_D08670(int field14, int itemId, int quan // OFFSET: 0x00D08640 // FUNCTION: fn_21591 -__declspec(noinline) void __stdcall sub_D08640(const unsigned char* packet) { - sub_D08670( +__declspec(noinline) void __stdcall ReceiveBuyingStorePurchase(const unsigned char* packet) { + ProcessBuyingStorePurchase( *reinterpret_cast(packet + 0x14), *reinterpret_cast(packet + 2), *reinterpret_cast(packet + 6), @@ -2095,7 +2095,7 @@ void __stdcall Nullsub479(int value) { // OFFSET: 0x00D64A40 // FUNCTION: fn_21996 -int sub_D64A40(const unsigned char* entries) { +int CountItemRandomOptions(const unsigned char* entries) { int count = 0; if (*reinterpret_cast(entries) != 0) { ++count; @@ -2122,7 +2122,7 @@ __declspec(noinline) void CGameMode::ReceivePartyJobLevel(const unsigned char* p *reinterpret_cast(packet + 2), *reinterpret_cast(packet + 6), *reinterpret_cast(packet + 8) ); - sub_DFF150(&g_session); + RefreshPartyWindows(&g_session); } // OFFSET: 0x00D8A260 @@ -2131,7 +2131,7 @@ __declspec(noinline) void CGameMode::ReceivePartyDead(const unsigned char* packe MessengerMember member = g_session.PartyByAccount(*reinterpret_cast(packet + 2)); if (member.valid != 0) { g_session.SetPartyDead(*reinterpret_cast(packet + 2), packet[6]); - sub_DFF150(&g_session); + RefreshPartyWindows(&g_session); } } @@ -2265,7 +2265,7 @@ __declspec(noinline) void CGameMode::Zc_Start_Couple(const unsigned char*) { // OFFSET: 0x00D591A0 // FUNCTION: fn_21959 -void CGameMode::sub_D591A0(std::uint32_t aid, int state, int flag, int options) { +void CGameMode::ApplyActorStatusEffects(std::uint32_t aid, int state, int flag, int options) { CGameActor* actor = static_cast(this->scene->GetGameActorByAID(aid)); if (!actor) { return; @@ -2273,7 +2273,7 @@ void CGameMode::sub_D591A0(std::uint32_t aid, int state, int flag, int options) actor->unknown_0210 = static_cast(flag); if (!StateFlag06(state)) { - actor->sub_CAA4D0(); + actor->UpdateMaxLevelAura(); } if (actor->IsPlayerClass(actor->GetEffectiveJob(-1))) { @@ -2478,7 +2478,7 @@ __declspec(noinline) void CGameMode::ReceivePacket0AB8(const unsigned char*) { // OFFSET: 0x00D78010 // FUNCTION: fn_22156 __declspec(noinline) void CGameMode::ReceiveUnknownD78010(const unsigned char* packet) { - this->sub_D591A0( + this->ApplyActorStatusEffects( *reinterpret_cast(packet + 2), *reinterpret_cast(packet + 6), *reinterpret_cast(packet + 0xA), @@ -2489,7 +2489,7 @@ __declspec(noinline) void CGameMode::ReceiveUnknownD78010(const unsigned char* p // OFFSET: 0x00D89C60 // FUNCTION: fn_22212 __declspec(noinline) void CGameMode::ReceiveUnknownD89C60(const unsigned char* packet) { - this->sub_D5EEF0( + this->UpdatePartyMemberInfo( reinterpret_cast(packet + 0x2B), *reinterpret_cast(packet + 2), reinterpret_cast(packet + 0x43), @@ -4365,7 +4365,7 @@ void CGameMode::ProcessSkillUsePacket(const unsigned char* packet, int type) { delay = static_cast(value); } - this->sub_D5B030(sourceAid, targetAid, x, y, skillId, property, delay, flag, 0); + this->NotifySkillCasting(sourceAid, targetAid, x, y, skillId, property, delay, flag, 0); } namespace { @@ -5690,7 +5690,7 @@ void CGameMode::ApplyStatusChange( case 665: if (aid == g_session.m_aid) { this->scene->player->SendMsg(nullptr, 110, 0, type, type >> 31, on, 0, value1, value1 >> 31, 0, 0, 0, 0, 0, 0); - this->sub_CFE480(aid); + this->RefreshStatusStateEffect(aid); } return; case 673: @@ -5701,19 +5701,19 @@ void CGameMode::ApplyStatusChange( case 675: if (aid == g_session.m_aid) { this->scene->player->SendMsg(nullptr, 110, 0, 675, 0, on, 0, value1, value1 >> 31, 0, 0, 0, 0, 0, 0); - this->sub_CFE480(aid); + this->RefreshStatusStateEffect(aid); } return; case 676: if (aid == g_session.m_aid) { this->scene->player->SendMsg(nullptr, 110, 0, 676, 0, on, 0, value1, value1 >> 31, 0, 0, 0, 0, 0, 0); - this->sub_CFE480(aid); + this->RefreshStatusStateEffect(aid); } break; case 710: if (aid == g_session.m_aid) { this->scene->player->SendMsg(nullptr, 110, 0, 710, 0, on, 0, value1, value1 >> 31, 0, 0, 0, 0, 0, 0); - this->sub_CFE480(aid); + this->RefreshStatusStateEffect(aid); } break; case 933: @@ -5861,7 +5861,7 @@ void CGameMode::ApplyStatusChange( break; default: if (CSkillActionMgr::GetInstance()->HasEfstAction(type) != true) { - this->sub_CFE480(aid); + this->RefreshStatusStateEffect(aid); return; } { @@ -6472,12 +6472,12 @@ void CGameMode::ApplyStatusChange( case 1688: break; default: - this->sub_CFE480(aid); + this->RefreshStatusStateEffect(aid); return; } } - this->sub_CFE480(aid); + this->RefreshStatusStateEffect(aid); if (std::strlen(message) > 1) { char text[512]; std::sprintf(text, "%s%s", name, message); @@ -6591,7 +6591,7 @@ __declspec(noinline) void CGameMode::ReceiveFormattedMessage(const unsigned char ITEM_INFO item; item.SetItemId(*reinterpret_cast(packet + 4)); int capacity = sizeof(name); - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); StringFormat(text, sizeof(text), static_cast(-1), LookupMessage(3278), name); } else { std::sprintf(text, LookupMessage(messageId), *reinterpret_cast(packet + 4)); @@ -6798,7 +6798,7 @@ __declspec(noinline) void CGameMode::ReceiveFeedOption(const unsigned char* pack g_windowMgr.SendNotice( 1, reinterpret_cast(LookupMessage((*reinterpret_cast(packet + 6) != 0) + 0xBA2)), 0x64FFFF, 0, 0, 0 ); - g_windowMgr.sub_AAB070(231); + g_windowMgr.RefreshGameSettingOption(231); break; case 2: g_session.SetPetAutoFeed(*reinterpret_cast(packet + 6) > 0); @@ -6810,7 +6810,7 @@ __declspec(noinline) void CGameMode::ReceiveFeedOption(const unsigned char* pack *reinterpret_cast(g_session.unknown_8128) = *reinterpret_cast(packet + 6); break; case 6: - sub_E489C0(*reinterpret_cast(packet + 6) != 0); + SetPetInfoAlert(*reinterpret_cast(packet + 6) != 0); break; } } @@ -6932,7 +6932,7 @@ __declspec(noinline) void CGameMode::ReceivePartyLeaderChange(const unsigned cha g_session.unknown_5464 = *reinterpret_cast(packet + 6) == g_session.m_aid; std::sprintf(text, LookupMessage(1552), member.name.c_str()); g_windowMgr.SendNotice(1, reinterpret_cast(text), 0xFFFF, 12, 0, 0); - sub_DFF150(&g_session); + RefreshPartyWindows(&g_session); if (g_windowMgr.unknown_03F8) { g_windowMgr.unknown_03F8->SendMsg(nullptr, 0x3C, 0, 0, 0, 0); } @@ -7245,16 +7245,16 @@ __declspec(noinline) void CGameMode::ReceiveUiOpen(unsigned char type, std::uint // OFFSET: 0x00D17AD0 // FUNCTION: fn_21596 void CGameMode::RefreshEmotionPurchaseSchedule() { - g_timeScheduler->sub_BA95F0(5); + g_timeScheduler->RemoveSchedulesByKey(5); CCashEmotionMgr* manager = g_cashEmotionMgr; if (!manager) { return; } - manager->sub_59C5A0(); + manager->RemoveExpiredPacks(); const int expiry = manager->GetEarliestExpiry(); if (expiry < 0x7FFFFFFF) { - const std::uint64_t now = static_cast(manager->sub_59FC50()) * 10000000; + const std::uint64_t now = static_cast(manager->GetServerTime()) * 10000000; const std::int64_t interval = (static_cast(expiry) * 10000000 - static_cast(now)) / 10000; if (interval != 0 && interval >= 0) { g_timeScheduler->AddSchedule(new CEmotionPurchaseExpireSchedule(now, interval, 1)); @@ -7476,7 +7476,7 @@ void CGameMode::ReceiveGuildPositionInfo(const unsigned char* packet) { // OFFSET: 0x00D17BF0 // FUNCTION: fn_21597 void CGameMode::RefreshEmotionSaleSchedule() { - g_timeScheduler->sub_BA95F0(6); + g_timeScheduler->RemoveSchedulesByKey(6); CCashEmotionMgr* manager = g_cashEmotionMgr; if (!manager) { return; @@ -7484,7 +7484,7 @@ void CGameMode::RefreshEmotionSaleSchedule() { const int expiry = manager->RefreshUnownedPacks().nextTime; if (expiry < 0x7FFFFFFF) { - const std::uint64_t now = static_cast(manager->sub_59FC50()) * 10000000; + const std::uint64_t now = static_cast(manager->GetServerTime()) * 10000000; const std::int64_t interval = (static_cast(expiry) * 10000000 - static_cast(now)) / 10000; if (interval != 0 && interval >= 0) { g_timeScheduler->AddSchedule(new CEmotionSaleExpireSchedule(now, interval, 1)); @@ -7587,7 +7587,7 @@ static_assert(sizeof(AddQuestHunt) == 0x2A); void CGameMode::ReceiveAddQuest64(const unsigned char* data) { const auto* packet = reinterpret_cast(data); if (g_renewQuestMgr->SetOngoingQuestState(packet->questId, packet->state) == true) { - g_renewQuestMgr->sub_67B6B0(); + g_renewQuestMgr->UpdateQuestWindows(); return; } @@ -7629,7 +7629,7 @@ void CGameMode::ReceiveAddQuest64(const unsigned char* data) { } g_renewQuestMgr->AddOngoingQuest(packet->questId, info); - g_renewQuestMgr->sub_67B6B0(); + g_renewQuestMgr->UpdateQuestWindows(); g_windowMgr.EnsureWindow(0x8F); const char* text = LookupMessage(0x55E); g_windowMgr.SendNotice(1, reinterpret_cast(text), 0xFFFF, 0x13, 0, 0); @@ -7640,7 +7640,7 @@ void CGameMode::ReceiveAddQuest64(const unsigned char* data) { void CGameMode::ReceiveAddQuest(const unsigned char* data) { const auto* packet = reinterpret_cast(data); if (g_renewQuestMgr->SetOngoingQuestState(packet->questId, packet->state) == true) { - g_renewQuestMgr->sub_67B6B0(); + g_renewQuestMgr->UpdateQuestWindows(); return; } @@ -7682,7 +7682,7 @@ void CGameMode::ReceiveAddQuest(const unsigned char* data) { } g_renewQuestMgr->AddOngoingQuest(packet->questId, info); - g_renewQuestMgr->sub_67B6B0(); + g_renewQuestMgr->UpdateQuestWindows(); g_windowMgr.EnsureWindow(0x8F); const char* text = LookupMessage(0x55E); g_windowMgr.SendNotice(1, reinterpret_cast(text), 0xFFFF, 0x13, 0, 0); @@ -9011,7 +9011,7 @@ void CGameMode::ReceiveFeedResult(const unsigned char* data) { ITEM_INFO item; item.SetItemId(packet->itemId); int capacity = sizeof(name); - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); g_windowMgr.SendNotice(1, reinterpret_cast(FormatOwnedString(LookupMessage(0xA12), name, count).c_str()), 0xFFFF64, 0, 0, 0); } else { ITEM_INFO item; @@ -9030,7 +9030,7 @@ void CGameMode::ReceiveFeedResult(const unsigned char* data) { ITEM_INFO item; item.SetItemId(packet->itemId); int capacity = sizeof(name); - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); g_windowMgr.SendNotice(1, reinterpret_cast(FormatOwnedString(LookupMessage(0xCD1), name, count).c_str()), 0xFFFF64, 0, 0, 0); } else { ITEM_INFO item; @@ -10454,7 +10454,7 @@ void CGameMode::ReceiveActorDisappear(const unsigned char* data) { } else if (!g_windowMgr.CloseWindow(0x9B)) { g_windowMgr.EnsureWindow(0x9B); } - sub_DFF150(&g_session); + RefreshPartyWindows(&g_session); break; } case 2: @@ -11397,7 +11397,7 @@ void ApplyActorSkillState(CGameActor* actor, std::uint16_t skillId, int duration // OFFSET: 0x00D5B030 // FUNCTION: fn_21963 -void CGameMode::sub_D5B030( +void CGameMode::NotifySkillCasting( std::uint32_t sourceAid, std::uint32_t targetAid, std::uint16_t x, std::uint16_t y, std::uint16_t skillId, int property, int delay, unsigned char silent, int ) { CGameActor* source = static_cast(this->scene->GetGameActorByAidIncludeMe(sourceAid)); @@ -12174,7 +12174,7 @@ void CGameMode::ReceivePartyMemberLeft(const unsigned char* data) { g_session.ClearRecords0734(); } - sub_DFF150(&g_session); + RefreshPartyWindows(&g_session); if (CGameActor* actor = static_cast(this->scene->GetGameActorByAID(packet->aid))) { actor->SetUnknown02E4(0); } @@ -12439,7 +12439,7 @@ void CGameMode::ReceiveActorStandEntry(const unsigned char* data) { } } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } // OFFSET: 0x00D387B0 @@ -12532,7 +12532,7 @@ void CGameMode::ReceiveActorStandEntryFont(const unsigned char* data) { } } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } // OFFSET: 0x00D38C40 @@ -12637,7 +12637,7 @@ void CGameMode::ReceiveActorTypedEntry(const unsigned char* data) { } } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } // OFFSET: 0x00D39160 @@ -12971,7 +12971,7 @@ void CGameMode::ReceiveActorMoveEntryLegacy(const unsigned char* data) { break; } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } // OFFSET: 0x00D61F40 @@ -13240,7 +13240,7 @@ void CGameMode::ReceiveActorMoveEntryOld(const unsigned char* data) { } } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } #pragma pack(push, 1) @@ -13375,7 +13375,7 @@ void CGameMode::ReceiveActorMoveEntryOld2(const unsigned char* data) { } } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } #pragma pack(push, 1) @@ -13522,7 +13522,7 @@ void CGameMode::ReceiveActorMoveEntryNamed(const unsigned char* data) { } } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } #pragma pack(push, 1) @@ -13649,7 +13649,7 @@ void CGameMode::ReceiveActorMoveEntryOld0(const unsigned char* data) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } #pragma pack(push, 1) @@ -13972,7 +13972,7 @@ void CGameMode::ReceiveActorStandEntryLegacy(const unsigned char* data) { actor->Slot49(guildId, packet->guildVersion); } } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } #pragma pack(push, 1) @@ -14120,7 +14120,7 @@ void CGameMode::ReceiveActorStandEntryNamedOld(const unsigned char* data) { } } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } #pragma pack(push, 1) @@ -14244,7 +14244,7 @@ void CGameMode::ReceiveActorStandEntryOld(const unsigned char* data) { } } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } #pragma pack(push, 1) @@ -14370,7 +14370,7 @@ void CGameMode::ReceiveActorStandEntryOld2(const unsigned char* data) { } } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } #pragma pack(push, 1) @@ -14501,7 +14501,7 @@ void CGameMode::ReceiveActorStandEntryOld3(const unsigned char* data) { } } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } #pragma pack(push, 1) struct ActorStandEntryOld0Packet { @@ -14633,7 +14633,7 @@ void CGameMode::ReceiveActorStandEntryOld0(const unsigned char* data) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } #pragma pack(push, 1) @@ -14781,7 +14781,7 @@ void CGameMode::ReceiveActorStateEntryNamedOld(const unsigned char* data) { this->scene->objects.push_back(actor); this->scene->actors.push_back(actor); } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } #pragma pack(push, 1) @@ -14903,7 +14903,7 @@ void CGameMode::ReceiveActorStateEntryOld(const unsigned char* data) { } } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } // OFFSET: 0x00D630F0 @@ -15041,9 +15041,9 @@ void CGameMode::SpawnStandingActor( if (emblemGuildId > 0 && !actor->Slot50()) { actor->Slot49(emblemGuildId, guildVersion); } - this->sub_D591A0(aid, effectState, level, virtue); + this->ApplyActorStatusEffects(aid, effectState, level, virtue); } else { - this->sub_D591A0(aid, effectState, level, virtue); + this->ApplyActorStatusEffects(aid, effectState, level, virtue); int cell[2]; cell[0] = entry.cellX; cell[1] = entry.cellY; @@ -15319,9 +15319,9 @@ void CGameMode::SpawnStateActor( if (objectType != 0 && job == 0x2D2) { actor->Slot49(actor->Slot50(), guildVersion); - this->sub_D591A0(aid, effectState, level, virtue); + this->ApplyActorStatusEffects(aid, effectState, level, virtue); } else { - this->sub_D591A0(aid, effectState, level, virtue); + this->ApplyActorStatusEffects(aid, effectState, level, virtue); if (objectType == 0) { int cell[2]; cell[0] = entry.cellX; @@ -15785,7 +15785,7 @@ void CGameMode::ReceiveActorStateEntryLegacy(const unsigned char* data) { actor->Slot49(guildId, packet->guildVersion); } } - this->sub_D591A0(packet->aid, packet->effectState, packet->level, packet->virtue); + this->ApplyActorStatusEffects(packet->aid, packet->effectState, packet->level, packet->virtue); } namespace { @@ -15868,7 +15868,7 @@ void CGameMode::ReceivePartyMemberInfo(const unsigned char* data) { } g_session.AddPartyMember(member); - sub_DFF150(&g_session); + RefreshPartyWindows(&g_session); } // OFFSET: 0x00D2AFA0 @@ -15907,13 +15907,13 @@ void CGameMode::ReceivePartyMemberList(const unsigned char* data) { g_session.unknown_5464 = 1; } } - sub_DFF150(&g_session); + RefreshPartyWindows(&g_session); } } // OFFSET: 0x00D59FD0 // FUNCTION: fn_21960 -void CGameMode::sub_D59FD0(const char* value, std::vector* members) { +void CGameMode::SetPartyMemberList(const char* value, std::vector* members) { g_session.ClearPartyMembers(); char partyName[25]; partyName[24] = '\0'; @@ -15950,12 +15950,12 @@ void CGameMode::sub_D59FD0(const char* value, std::vector* mem g_session.LoadMiniPartyInfo(); g_windowMgr.RestoreMiniPartyWindows(); - sub_DFF150(&g_session); + RefreshPartyWindows(&g_session); } // OFFSET: 0x00D5EEF0 // FUNCTION: fn_21968 -void CGameMode::sub_D5EEF0( +void CGameMode::UpdatePartyMemberInfo( const char* name, int accountId, const char* mapName, int leader, unsigned char offline, std::uint16_t job, std::uint16_t level, const char* value, unsigned char itemShare, unsigned char itemDistribute, int characterId ) { @@ -20275,7 +20275,7 @@ static_assert(offsetof(ChatRoomMemberUpdateInfo, type) == 0x30); // OFFSET: 0x00D08910 // FUNCTION: fn_21595 -void CGameMode::sub_D08910() { +void CGameMode::ProcessIncomingPackets() { memset(g_gameModePacketBuffer, 0, sizeof(g_gameModePacketBuffer)); if (!g_replayAnimationScaling) { const std::uint32_t elapsedHours = (timeGetTime() - g_loginAcceptTime) / 3600000; @@ -20390,7 +20390,7 @@ void CGameMode::sub_D08910() { this->ReceiveZoneServerChange(g_gameModePacketBuffer); break; case 0x97: - this->sub_D48530(g_gameModePacketBuffer); + this->ReceiveWhisper(g_gameModePacketBuffer); break; case 0xA0: this->ReceiveItemPickupAck(g_gameModePacketBuffer); @@ -20477,7 +20477,7 @@ void CGameMode::sub_D08910() { this->ReceiveNotifyGroundSkill(g_gameModePacketBuffer); break; case 0x11F: - this->sub_D41250(g_gameModePacketBuffer); + this->Zc_Skill_Entry(g_gameModePacketBuffer); break; case 0x133: case 0x800: @@ -20584,7 +20584,7 @@ void CGameMode::sub_D08910() { this->ReceiveItem1740Add(g_gameModePacketBuffer); break; case 0x1C9: - this->sub_D40730(g_gameModePacketBuffer); + this->Zc_Skill_Entry2(g_gameModePacketBuffer); break; case 0x1CF: this->ReceiveDevotionList(g_gameModePacketBuffer); @@ -20993,7 +20993,7 @@ void CGameMode::sub_D08910() { this->ReceiveStatusChangeEffect2(g_gameModePacketBuffer); break; case 0x984: - this->sub_D65FC0(g_gameModePacketBuffer); + this->ReceiveStatusChangeEntry(g_gameModePacketBuffer); break; case 0x985: this->LoadCooldownSnapshot(g_gameModePacketBuffer); @@ -21074,7 +21074,7 @@ void CGameMode::sub_D08910() { this->ReceiveActorStateEntryNamed(g_gameModePacketBuffer); break; case 0x9DE: - this->sub_D1A330(g_gameModePacketBuffer); + this->ReceiveWhisper2(g_gameModePacketBuffer); break; case 0x9E7: this->ReceiveUnknownD77BF0(g_gameModePacketBuffer); @@ -21194,7 +21194,7 @@ void CGameMode::sub_D08910() { this->ReceiveUnknownD89C60(g_gameModePacketBuffer); break; case 0xA44: - this->sub_D6F900(g_gameModePacketBuffer); + this->ReceivePartyInfo2(g_gameModePacketBuffer); break; case 0xA47: this->ReceiveCharacterRenameResult(g_gameModePacketBuffer); @@ -21203,10 +21203,10 @@ void CGameMode::sub_D08910() { this->ReceiveRodexMailListRefresh(g_gameModePacketBuffer); break; case 0xA82: - this->sub_D48C60(g_gameModePacketBuffer); + this->ReceiveGuildExpulsion2(g_gameModePacketBuffer); break; case 0xA83: - this->sub_D4A060(g_gameModePacketBuffer); + this->ReceiveGuildLeave2(g_gameModePacketBuffer); break; case 0xA84: this->ReceiveGuildInfo3(g_gameModePacketBuffer); @@ -21263,7 +21263,7 @@ void CGameMode::sub_D08910() { this->ReceiveRodexMailList(g_gameModePacketBuffer); break; case 0xAC7: - this->sub_D08390(g_gameModePacketBuffer); + this->ReceiveChangeZoneServerWithHost(g_gameModePacketBuffer); break; case 0xAC8: this->ResetItemLists(g_gameModePacketBuffer); @@ -21845,9 +21845,9 @@ void CGameMode::sub_D08910() { g_navigationManager.unknown_125C = 0; g_clanInfo->Clear(); if (g_gameModePacketBuffer[2] == 1) { - g_timeScheduler->sub_BA95F0(6); - g_timeScheduler->sub_BA95F0(5); - g_timeScheduler->sub_BA95F0(7); + g_timeScheduler->RemoveSchedulesByKey(6); + g_timeScheduler->RemoveSchedulesByKey(5); + g_timeScheduler->RemoveSchedulesByKey(7); GetRagConnection().Close(); g_loginStartMode = 5; g_modeMgr.Switch(0, "login.rsw"); @@ -22497,7 +22497,7 @@ void CGameMode::sub_D08910() { } break; case 0x137: - sub_D08110(_time32(nullptr), *reinterpret_cast(g_gameModePacketBuffer + 2), + ProcessVendingSale(_time32(nullptr), *reinterpret_cast(g_gameModePacketBuffer + 2), *reinterpret_cast(g_gameModePacketBuffer + 4), 0, 0); break; case 0x139: { @@ -22598,7 +22598,7 @@ void CGameMode::sub_D08910() { MessengerMember member = g_session.PartyByAccount(aid); if (member.valid != 0) { g_session.SetPartyDead(aid, 0); - sub_DFF150(&g_session); + RefreshPartyWindows(&g_session); } break; } @@ -23427,7 +23427,7 @@ void CGameMode::sub_D08910() { break; } case 0x209: - sub_D1FBA0(g_gameModePacketBuffer); + ReceiveFriendAddResult(g_gameModePacketBuffer); break; case 0x20A: if (g_session.RemoveFriendByCharacterId(*reinterpret_cast(g_gameModePacketBuffer + 6))) { @@ -23514,14 +23514,14 @@ void CGameMode::sub_D08910() { CRenewQuestMgr *manager = g_renewQuestMgr; unsigned int id = *reinterpret_cast(g_gameModePacketBuffer + 2); manager->m_ongoingQuests.erase(id); - manager->sub_67B6B0(); + manager->UpdateQuestWindows(); std::string message = FormatOwnedString(LookupMessage(1611), title.c_str()); g_windowMgr.SendNotice(1, reinterpret_cast(message.c_str()), 0xFFFF, 19, 0, 0); break; } case 0x2B7: g_renewQuestMgr->SetOngoingQuestState(*reinterpret_cast(g_gameModePacketBuffer + 2), g_gameModePacketBuffer[6]); - g_renewQuestMgr->sub_67B6B0(); + g_renewQuestMgr->UpdateQuestWindows(); break; case 0x2D3: { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *reinterpret_cast(g_gameModePacketBuffer + 2)); @@ -24144,7 +24144,7 @@ void CGameMode::sub_D08910() { break; } case 0x80F: - sub_D1F770(g_gameModePacketBuffer); + ReceiveItemSlot(g_gameModePacketBuffer); break; case 0x83D: g_session.unknown_5BE8 = *reinterpret_cast(g_gameModePacketBuffer + 2); @@ -24269,7 +24269,7 @@ void CGameMode::sub_D08910() { g_entryQueueMgr->OnNotify(reinterpret_cast(g_gameModePacketBuffer)); break; case 0x8E2: - sub_D73A10(g_gameModePacketBuffer); + ReceiveNavigation(g_gameModePacketBuffer); break; case 0x90E: g_entryQueueMgr->ResetCurrent(reinterpret_cast(g_gameModePacketBuffer)); @@ -24282,23 +24282,23 @@ void CGameMode::sub_D08910() { ReceiveBuyingStoreResult(reinterpret_cast(g_gameModePacketBuffer)); break; case 0x9BF: - sub_D1C050(reinterpret_cast(g_gameModePacketBuffer)); + ReceiveStorageClose(reinterpret_cast(g_gameModePacketBuffer)); break; case 0x9CF: g_nProtectGameGuardMgr->ProcessAuth(reinterpret_cast(g_gameModePacketBuffer + 0x4), *reinterpret_cast(g_gameModePacketBuffer + 0x2) - 4); break; case 0x9DF: - this->sub_D079A0(g_gameModePacketBuffer[0x2], *reinterpret_cast(g_gameModePacketBuffer + 0x3)); + this->ReceiveWhisperResult(g_gameModePacketBuffer[0x2], *reinterpret_cast(g_gameModePacketBuffer + 0x3)); break; case 0x9E6: - sub_D08640(g_gameModePacketBuffer); + ReceiveBuyingStorePurchase(g_gameModePacketBuffer); break; case 0x9FC: this->NotifyResult2571(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); break; case 0xA09: - sub_D1F970(g_gameModePacketBuffer); + ReceiveItemSlotOptions(g_gameModePacketBuffer); break; case 0xA26: this->ReceiveAchievementResult(g_gameModePacketBuffer[0x2], *reinterpret_cast(g_gameModePacketBuffer + 0x3)); @@ -24363,7 +24363,7 @@ void CGameMode::sub_D08910() { reinterpret_cast(g_gameModePacketBuffer + 0x8)); break; case 0xA6D: - sub_D6AD60((static_cast(*reinterpret_cast(g_gameModePacketBuffer + 0x2) - 4) >> 2), + ReceiveMacroReporterList((static_cast(*reinterpret_cast(g_gameModePacketBuffer + 0x2) - 4) >> 2), reinterpret_cast(g_gameModePacketBuffer + 0x4)); break; case 0xA6F: @@ -24443,7 +24443,7 @@ void CGameMode::sub_D08910() { this->OpenWindow154(); break; case 0xB52: - sub_D6E440(); + CloseAccountLimitedTool(); break; case 0xB54: this->ReceiveUnknownD79E90(*reinterpret_cast(g_gameModePacketBuffer + 0x2), @@ -24625,7 +24625,7 @@ void CGameMode::sub_D08910() { g_gameModePacketBuffer + 5); break; case 0x9E5: - sub_D08110(*reinterpret_cast(g_gameModePacketBuffer + 0xA), *reinterpret_cast(g_gameModePacketBuffer + 2), + ProcessVendingSale(*reinterpret_cast(g_gameModePacketBuffer + 0xA), *reinterpret_cast(g_gameModePacketBuffer + 2), *reinterpret_cast(g_gameModePacketBuffer + 4), *reinterpret_cast(g_gameModePacketBuffer + 0xE), *reinterpret_cast(g_gameModePacketBuffer + 6)); break; @@ -24642,7 +24642,7 @@ void CGameMode::sub_D08910() { *reinterpret_cast(g_gameModePacketBuffer + 8), g_gameModePacketBuffer[0x10]); break; case 0xA23: - sub_D6C460(*reinterpret_cast(g_gameModePacketBuffer + 4), *reinterpret_cast(g_gameModePacketBuffer + 8), + ReceiveAchievementList(*reinterpret_cast(g_gameModePacketBuffer + 4), *reinterpret_cast(g_gameModePacketBuffer + 8), *reinterpret_cast(g_gameModePacketBuffer + 0xC), *reinterpret_cast(g_gameModePacketBuffer + 0xE), *reinterpret_cast(g_gameModePacketBuffer + 0x12), reinterpret_cast(g_gameModePacketBuffer + 0x16)); @@ -24884,7 +24884,7 @@ void CGameMode::sub_D08910() { if (!manager) { break; } - manager->sub_59CDE0(*reinterpret_cast(g_gameModePacketBuffer + 4)); + manager->SetServerTime(*reinterpret_cast(g_gameModePacketBuffer + 4)); manager->SetServerTimeZone(*reinterpret_cast(g_gameModePacketBuffer + 8)); const unsigned char *entry = g_gameModePacketBuffer + 0xA; for (int i = 0; i < count; ++i, entry += 7) { @@ -25029,7 +25029,7 @@ void CGameMode::sub_D08910() { if (g_windowMgr.window_0428) { g_windowMgr.window_0428->Invalidate(); } - g_renewQuestMgr->sub_67B690(); + g_renewQuestMgr->UpdateOngoingQuestInfo(); break; } case 0x900: { diff --git a/Source/Client/Session.cpp b/Source/Client/Session.cpp index 6090229e..c562554f 100644 --- a/Source/Client/Session.cpp +++ b/Source/Client/Session.cpp @@ -2010,7 +2010,7 @@ void CSession::UpdateUnknown1708(int enabled) { // OFFSET: 0x00DFF150 // FUNCTION: fn_23611 -void __fastcall sub_DFF150(CSession*) { +void __fastcall RefreshPartyWindows(CSession*) { if (UIWindow* window = g_windowMgr.window_02C8) { window->SendMsg(nullptr, 23, 0, 0, 0, 0); } @@ -2662,7 +2662,7 @@ bool CSession::HasControlCharacter(std::string text) { // OFFSET: 0x00DE3D90 // FUNCTION: fn_23488 -void CSession::sub_DE3D90(char* text) { +void CSession::HiFriends(char* text) { std::string greeting = "(Hi) "; greeting += text ? text : "*^_^*"; @@ -6998,7 +6998,7 @@ void CSession::ReloadLanguageTables() { // OFFSET: 0x00DF33B0 // FUNCTION: fn_23506 -void CSession::sub_DF33B0() { +void CSession::LoadSessionTables() { CSession* session = this; ++g_sessionTableLoadCount; session->InitJobHitWaveNames(); diff --git a/Source/Client/Session.h b/Source/Client/Session.h index c51f9da3..46d00e29 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -899,7 +899,6 @@ public: int SkillLevel(int id) const; CRenderObject* FindGameActor(std::uint32_t aid) const; int GetPetTargetAid() const; - int sub_DDD2C0(const ITEM_INFO& item); const char* GetJobName(unsigned job, int sex); void InitJobNameTable(); int SyncUnknown0E98(); @@ -966,8 +965,8 @@ public: void UpdateRandomStats(); void ResetEquipment(); void ResetSlots(); - void sub_DD9D50(); - void sub_DF33B0(); + void InitClientData(); + void LoadSessionTables(); int GetList0Size() const; int GetList1Size() const; int GetList2Size() const; @@ -1190,7 +1189,7 @@ public: bool EquipItem61B8(const ITEM_INFO& item); void SetUnknown7EC8(std::uint32_t value); void NotifyUnknown7F94Name(std::uint32_t id, const char* name); - void sub_DE3D90(char* text); + void HiFriends(char* text); void sub_DE4FF0(); std::pair GetShopEntry(unsigned int index, int key); bool HasUnknown809C(std::string name); diff --git a/Source/Client/Stove/StoveMgr.cpp b/Source/Client/Stove/StoveMgr.cpp index 7dc5a608..40de704a 100644 --- a/Source/Client/Stove/StoveMgr.cpp +++ b/Source/Client/Stove/StoveMgr.cpp @@ -30,7 +30,6 @@ bool g_stoveWaitingCallback; void OnStoveTermsAgreementFetched(Stove::PCSDK::CallbackResult callbackResult, int unused, const wchar_t* url); void OnStoveCategoryProductsFetched(Stove::PCSDK::CallbackResult callbackResult, const Stove::PCSDK::IAP::StovePCProduct* products, unsigned int count); void OnStoveAllProductsFetched(Stove::PCSDK::CallbackResult callbackResult, const Stove::PCSDK::IAP::StovePCProduct* products, unsigned int count); -void sub_DD8A20(int value); void OnStoveInitialized(Stove::PCSDK::CallbackResult callbackResult); void OnStoveShutdown(Stove::PCSDK::CallbackResult callbackResult, Stove::PCSDK::Base::StovePCShutdown shutdown); void OnStovePurchaseStarted(Stove::PCSDK::CallbackResult callbackResult, Stove::PCSDK::IAP::StovePCPurchaseResult purchaseResult); @@ -269,7 +268,7 @@ void FetchProductsCallback::operator()(Stove::PCSDK::CallbackResult callbackResu item.SetItemId(std::atoi(itemId.c_str())); char name[256]; int capacity = 256; - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); item.SetName(name); item.identified = 1; if (product.GetPurchaseLimitCount() != 0 && product.GetSaleBeginDate() != 0 && product.GetSaleEndDate() != 0) { @@ -393,7 +392,7 @@ void CategoryProductsCallback::operator()(Stove::PCSDK::CallbackResult callbackR item.SetItemId(std::atoi(itemId.c_str())); char name[256]; int capacity = 256; - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); item.SetName(name); item.identified = 1; if (list == 8) { diff --git a/Source/Contents/Actors/GameActor.h b/Source/Contents/Actors/GameActor.h index 9d0ac0c0..7735329c 100644 --- a/Source/Contents/Actors/GameActor.h +++ b/Source/Contents/Actors/GameActor.h @@ -227,8 +227,8 @@ public: void SetUnknown02C8(int value); void SetUnknown0260(int value); void ApplyPendingUnknown0408(); - void sub_CC40D0(); - void sub_CAA4D0(); + void ApplyNatureProtection(); + void UpdateMaxLevelAura(); void SetActorJob(int job); void RenderMercenary(const float* matrix, int job); void ProcessBodyState(); diff --git a/Source/Contents/Actors/Player.cpp b/Source/Contents/Actors/Player.cpp index 84a5b628..f9b01d49 100644 --- a/Source/Contents/Actors/Player.cpp +++ b/Source/Contents/Actors/Player.cpp @@ -3172,7 +3172,7 @@ void CPlayer::ReapplySkillEffects() { g_weatherEffect.StopDarken(); this->unknown_0210 = static_cast(g_session.m_level); - this->sub_CAA4D0(); + this->UpdateMaxLevelAura(); CTetraBallEffect* tetraBall; for (int id = 0x4EE; id <= 0x4F1; ++id) { diff --git a/Source/Contents/Actors/RenderObject.cpp b/Source/Contents/Actors/RenderObject.cpp index 8fb4ae29..dd6f48a7 100644 --- a/Source/Contents/Actors/RenderObject.cpp +++ b/Source/Contents/Actors/RenderObject.cpp @@ -2402,7 +2402,7 @@ void CGameActor::LaunchAttackProjectile(int target, float scale) { case 0x57F8: case 0x5800: case 0x5812: - sub_CDBC30(&this->render.position, target, scale, this->GetEffectiveJob(-1)); + LaunchBulletSpriteEffect(&this->render.position, target, scale, this->GetEffectiveJob(-1)); return; default: return; @@ -4346,7 +4346,7 @@ __declspec(noinline) bool __stdcall IsTreeGroupThreeLocal(int job) { // OFFSET: 0x00CAA4D0 // FUNCTION: fn_21017 -void CGameActor::sub_CAA4D0() { +void CGameActor::UpdateMaxLevelAura() { if (g_serviceOptions.Get(0x6b) != 0) { return; } @@ -4533,7 +4533,7 @@ void CGameActor::SetActorJob(int job) { this->Slot21(slotJob); this->ResetJobEffects(); - this->sub_CAA4D0(); + this->UpdateMaxLevelAura(); } // OFFSET: 0x00CAAFD0 @@ -4593,7 +4593,7 @@ void C3dGrannyGameActor::SpawnCorpseActor() { // OFFSET: 0x00CC40D0 // FUNCTION: fn_21158 -void CGameActor::sub_CC40D0() { +void CGameActor::ApplyNatureProtection() { if (this->unknown_0404 == 3) { return; } @@ -4881,7 +4881,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef } this->RefreshGuildEmblemWindow(); if (this->unknown_02B4 != 0) { - this->sub_CAA4D0(); + this->UpdateMaxLevelAura(); } if (this->GetEffectiveJob(-1) == 45) { this->LaunchEffect(321, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); @@ -4932,7 +4932,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef } this->RefreshGuildEmblemWindow(); if (this->unknown_02B4 != 0) { - this->sub_CAA4D0(); + this->UpdateMaxLevelAura(); } } } @@ -5025,7 +5025,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef } this->RefreshGuildEmblemWindow(); if (this->unknown_02B4 != 0) { - this->sub_CAA4D0(); + this->UpdateMaxLevelAura(); } } } diff --git a/Source/Contents/CashEmotionMgr.cpp b/Source/Contents/CashEmotionMgr.cpp index 2501602d..125bba11 100644 --- a/Source/Contents/CashEmotionMgr.cpp +++ b/Source/Contents/CashEmotionMgr.cpp @@ -284,7 +284,7 @@ public: UIBitmapButton* CreateButton(int x, int y, int width, int height, int id, const char* format, bool hasDisabled); void RefreshCurrentList(); __declspec(noinline) void ShowPack(int packId); - void sub_7C7E50(); + void RefreshPackLists(); __declspec(noinline) void ResetLists(); int SetPeriod(int packId); void SetTab(char tab); @@ -426,7 +426,7 @@ bool CCashEmotionAction_SelectedUnPurchasedPack::Execute(int packId, int) { listWnd = static_cast(g_windowMgr.EnsureWindow(87)); } - const unsigned int now = g_cashEmotionMgr->sub_59FC50(); + const unsigned int now = g_cashEmotionMgr->GetServerTime(); if (g_cashEmotionMgr->IsPackAvailable(now, packId)) { if (listWnd) { listWnd->ShowPack(packId); @@ -509,9 +509,9 @@ CCashEmotionMgr::~CCashEmotionMgr() { this->m_action = nullptr; } - g_timeScheduler->sub_BA95F0(5); - g_timeScheduler->sub_BA95F0(6); - g_timeScheduler->sub_BA95F0(7); + g_timeScheduler->RemoveSchedulesByKey(5); + g_timeScheduler->RemoveSchedulesByKey(6); + g_timeScheduler->RemoveSchedulesByKey(7); } // OFFSET: 0x00598C70 @@ -1228,7 +1228,7 @@ bool CCashEmotionMgr::IsOwnedPack(int packId) { // OFFSET: 0x0059C5A0 // FUNCTION: fn_02977 -bool CCashEmotionMgr::sub_59C5A0() { +bool CCashEmotionMgr::RemoveExpiredPacks() { auto* listWnd = g_cashEmotionListWnd; bool expired = false; const __time32_t now = _time32(nullptr) - this->unknown_01D0 - this->unknown_01CC; @@ -1273,7 +1273,7 @@ void CCashEmotionMgr::RemoveOwnedPack(int packId, bool refresh, bool clearExpiry if (refresh) { if (auto* listWnd = g_cashEmotionListWnd) { - listWnd->sub_7C7E50(); + listWnd->RefreshPackLists(); } } @@ -1349,7 +1349,7 @@ CashEmotionPackRefresh CCashEmotionMgr::RefreshUnownedPacks() { // OFFSET: 0x0059CDE0 // FUNCTION: fn_02981 -void CCashEmotionMgr::sub_59CDE0(int param) { +void CCashEmotionMgr::SetServerTime(int param) { this->unknown_01D0 = _time32(nullptr) - param; } @@ -1413,7 +1413,7 @@ void CCashEmotionMgr::AcquirePack(int packId, unsigned int expiry) { // OFFSET: 0x0059D2C0 // FUNCTION: fn_02986 -bool CCashEmotionMgr::sub_59D2C0() { +bool CCashEmotionMgr::UpdatePurchasedPackExpiry() { auto* listWnd = g_cashEmotionListWnd; if (!listWnd) { return false; @@ -1439,13 +1439,13 @@ bool CCashEmotionMgr::sub_59D2C0() { it = this->m_expiry.erase(it); } - listWnd->sub_7C7E50(); + listWnd->RefreshPackLists(); return this->m_expiry.size() != 0; } // OFFSET: 0x0059FC50 // FUNCTION: fn_03031 -int CCashEmotionMgr::sub_59FC50() { +int CCashEmotionMgr::GetServerTime() { return _time32(nullptr) - this->unknown_01D0 - this->unknown_01CC; } @@ -2328,7 +2328,7 @@ void UICashEmotionListWnd::ShowPack(int packId) { // OFFSET: 0x007C7E50 // FUNCTION: fn_09413 -void UICashEmotionListWnd::sub_7C7E50() { +void UICashEmotionListWnd::RefreshPackLists() { if (this->m_purchaseList) { this->m_purchaseList->Refresh(this->m_tab == 2 && this->m_searchEdit ? this->m_searchEdit->Text() : nullptr); } @@ -2385,7 +2385,7 @@ int UICashEmotionListWnd::SetPeriod(int packId) { // OFFSET: 0x007C80C0 // FUNCTION: fn_09416 void UICashEmotionListWnd::RestartExpirySchedule() { - g_timeScheduler->sub_BA95F0(7); + g_timeScheduler->RemoveSchedulesByKey(7); if (g_cashEmotionMgr->m_expiry.size() != 0) { const std::uint64_t now = _Xtime_get_ticks(); g_timeScheduler->AddSchedule(new CEmotionPurchaseUseableTimeUISchedule(now, 30000, 1)); @@ -3180,7 +3180,7 @@ void UICashEmotionPack_Purchase::ShowExpiry(__time32_t expiry) { return; } - const unsigned int remaining = expiry - g_cashEmotionMgr->sub_59FC50(); + const unsigned int remaining = expiry - g_cashEmotionMgr->GetServerTime(); if (remaining < 61) { this->m_titleText->SetTextFitted(g_simpleStringMgr->GetString("EMSG_PERIOD_OF_LAST_TIME")); } else { diff --git a/Source/Contents/CashEmotionMgr.h b/Source/Contents/CashEmotionMgr.h index befdb57c..20ce730c 100644 --- a/Source/Contents/CashEmotionMgr.h +++ b/Source/Contents/CashEmotionMgr.h @@ -165,13 +165,13 @@ public: bool IsOwnedPack(int packId); void RemoveOwnedPack(int packId, bool refresh, bool clearExpiry); CashEmotionPackRefresh RefreshUnownedPacks(); - void sub_59CDE0(int param); + void SetServerTime(int param); void SetServerTimeZone(short serverBias); - bool sub_59C5A0(); - bool sub_59D2C0(); + bool RemoveExpiredPacks(); + bool UpdatePurchasedPackExpiry(); void ShowErrorMessage(const char* key, int value); void Unknown59D040(int argument1, int argument2); - __declspec(noinline) int sub_59FC50(); + __declspec(noinline) int GetServerTime(); // INLINED int BasePackId() const { return this->unknown_000C; diff --git a/Source/Contents/ClientItemLists.cpp b/Source/Contents/ClientItemLists.cpp index 8ad9971c..aa6793c7 100644 --- a/Source/Contents/ClientItemLists.cpp +++ b/Source/Contents/ClientItemLists.cpp @@ -291,7 +291,7 @@ void CGameMode::ReceiveItem1738Add(const unsigned char* data) { // OFFSET: 0x00D1F770 // FUNCTION: fn_21641 -void sub_D1F770(const unsigned char* data) { +void ReceiveItemSlot(const unsigned char* data) { const ItemAddSlotPacket* packet = reinterpret_cast(data); if (packet->slot < 0) { g_modeMgr.gameMode->SendMsg(0x35, 0, 0, 0, 0); @@ -317,7 +317,7 @@ void sub_D1F770(const unsigned char* data) { // OFFSET: 0x00D1F970 // FUNCTION: fn_21642 -void sub_D1F970(const unsigned char* data) { +void ReceiveItemSlotOptions(const unsigned char* data) { const ItemAddSlotOptionsPacket* packet = reinterpret_cast(data); if (packet->slot < 0) { g_modeMgr.gameMode->SendMsg(0x35, 0, 0, 0, 0); @@ -369,7 +369,7 @@ void sub_D1F970(const unsigned char* data) { // OFFSET: 0x00D1FBA0 // FUNCTION: fn_21643 -void sub_D1FBA0(const unsigned char* data) { +void ReceiveFriendAddResult(const unsigned char* data) { const FriendNoticePacket* packet = reinterpret_cast(data); char name[25]; std::memcpy(name, packet->name, 24); diff --git a/Source/Contents/ClientItemLists.h b/Source/Contents/ClientItemLists.h index ff6025d7..d5943fda 100644 --- a/Source/Contents/ClientItemLists.h +++ b/Source/Contents/ClientItemLists.h @@ -1,8 +1,8 @@ #ifndef RAGNAROK_SOURCE_CONTENTS_CLIENTITEMLISTS_H #define RAGNAROK_SOURCE_CONTENTS_CLIENTITEMLISTS_H -void sub_D1F770(const unsigned char* data); -void sub_D1F970(const unsigned char* data); -void sub_D1FBA0(const unsigned char* data); +void ReceiveItemSlot(const unsigned char* data); +void ReceiveItemSlotOptions(const unsigned char* data); +void ReceiveFriendAddResult(const unsigned char* data); #endif diff --git a/Source/Contents/ClientState.cpp b/Source/Contents/ClientState.cpp index 9a9b0dee..67b599cb 100644 --- a/Source/Contents/ClientState.cpp +++ b/Source/Contents/ClientState.cpp @@ -984,11 +984,11 @@ void CSession::SetPetAutoFeed(bool enabled) { // OFFSET: 0x00E489C0 // FUNCTION: fn_24224 -void __stdcall sub_E489C0(bool enabled) { +void __stdcall SetPetInfoAlert(bool enabled) { std::string notice = LookupMessage(enabled ? 4357 : 4379); g_windowMgr.SendNotice(1, reinterpret_cast(notice.c_str()), 0x64FFFF, 0, 0, 0); g_serviceOptions.Set(0x128, enabled); - g_windowMgr.sub_AAB070(0x128); + g_windowMgr.RefreshGameSettingOption(0x128); } // OFFSET: 0x00E48B00 diff --git a/Source/Contents/ClientState.h b/Source/Contents/ClientState.h index e1ad82fa..eaa8f478 100644 --- a/Source/Contents/ClientState.h +++ b/Source/Contents/ClientState.h @@ -6,7 +6,7 @@ extern bool g_petAutoFeed; void RequestBasicInfoRefresh(); -void __stdcall sub_E489C0(bool enabled); +void __stdcall SetPetInfoAlert(bool enabled); void AppendBytes(std::vector& output, const std::vector& bytes); #endif diff --git a/Source/Contents/Configuration/GameSettingsMgr.h b/Source/Contents/Configuration/GameSettingsMgr.h index 29545c2d..3ca7a76b 100644 --- a/Source/Contents/Configuration/GameSettingsMgr.h +++ b/Source/Contents/Configuration/GameSettingsMgr.h @@ -42,7 +42,7 @@ public: bool ReadOptionTable(); void ResetToDefaults(); void ToggleOption(int id); - void sub_6C0C40(int id, unsigned char value, bool notify); + void SetOption(int id, unsigned char value, bool notify); void ApplyScriptOption(int id, const char* key); bool RunFunction(int id); std::optional FindOption(int id); diff --git a/Source/Contents/Configuration/ServiceOptions.cpp b/Source/Contents/Configuration/ServiceOptions.cpp index e6d92179..4dbe8af3 100644 --- a/Source/Contents/Configuration/ServiceOptions.cpp +++ b/Source/Contents/Configuration/ServiceOptions.cpp @@ -79,7 +79,7 @@ public: bool ReadOptionTable(); void ResetToDefaults(); void ToggleOption(int id); - void sub_6C0C40(int id, unsigned char value, bool notify); + void SetOption(int id, unsigned char value, bool notify); void ApplyScriptOption(int id, const char* key); bool RunFunction(int id); std::optional FindOption(int id); @@ -417,7 +417,7 @@ __declspec(noinline) void ApplyServiceOption(int id, unsigned char value, bool n // OFFSET: 0x006C48C0 // FUNCTION: fn_45461 void GreetFriends() { - g_session.sub_DE3D90(nullptr); + g_session.HiFriends(nullptr); g_windowMgr.SendNotice(1, reinterpret_cast("[ To Friends ] : (Hi) *^_^*"), 0x1EFFFF, 0, 0, 0); } @@ -438,7 +438,7 @@ CGameSettingsMgr::~CGameSettingsMgr() { // OFFSET: 0x006C0C40 // FUNCTION: fn_06312 -void GameSettings::sub_6C0C40(int id, unsigned char value, bool notify) { +void GameSettings::SetOption(int id, unsigned char value, bool notify) { for (const GameSettingsOption& option : this->options) { if (option.id != id) { continue; @@ -683,7 +683,7 @@ bool GameSettings::ReadOptionTable() { void GameSettings::ResetToDefaults() { for (const GameSettingsOption& option : this->options) { if (option.type == 0) { - this->sub_6C0C40(option.id, option.defaultValue, true); + this->SetOption(option.id, option.defaultValue, true); } } } @@ -698,8 +698,8 @@ void GameSettings::ToggleOption(int id) { if (option.type == 0) { const unsigned char current = g_serviceOptions.Get(id); - this->sub_6C0C40(id, current == 0, true); - g_windowMgr.sub_AAB070(id); + this->SetOption(id, current == 0, true); + g_windowMgr.RefreshGameSettingOption(id); } else if (option.type == 1) { const auto entry = this->functions.find(id); if (entry != this->functions.end() && entry->second) { @@ -1082,7 +1082,7 @@ void ApplyServiceOptionAskOnDisable(int id, unsigned char value, bool notify, in if (!value && g_windowMgr.Confirm(LookupMessage(0x1104), 2, true, false, 0, "Message", 0x118, 0x78, 0) == 0xBC) { g_serviceOptions.Set(0x128, 1); - g_windowMgr.sub_AAB070(0x128); + g_windowMgr.RefreshGameSettingOption(0x128); return; } diff --git a/Source/Contents/EffectResourceSwitcher.cpp b/Source/Contents/EffectResourceSwitcher.cpp index c454b9d7..9ab7749d 100644 --- a/Source/Contents/EffectResourceSwitcher.cpp +++ b/Source/Contents/EffectResourceSwitcher.cpp @@ -575,14 +575,14 @@ bool CEZ2STREffectMgr::Load() { { const auto* data = static_cast(file.GetData()); std::vector buffer(data, data + file.GetSize()); - failed = !loader.sub_4F3C70(buffer, true); + failed = !loader.Load(buffer, true); } if (failed) { return false; } std::map records; - if (!loader.sub_50C2A0(&records)) { + if (!loader.GetEZ2STREffect(&records)) { return false; } diff --git a/Source/Contents/Items/ItemDescription.cpp b/Source/Contents/Items/ItemDescription.cpp index 459caa23..83d2bf7b 100644 --- a/Source/Contents/Items/ItemDescription.cpp +++ b/Source/Contents/Items/ItemDescription.cpp @@ -110,7 +110,7 @@ const std::vector& ITEM_INFO::Description() const { // OFFSET: 0x006D5810 // FUNCTION: fn_06578 -int ITEM_INFO::sub_6D5810(char* output, int& capacity, unsigned char consume) const { +int ITEM_INFO::GetIdDisplayName(char* output, int& capacity, unsigned char consume) const { const char* name = FindItemDescription(std::atoi(this->itemId.c_str()), g_itemDescriptions).identifiedName; const int error = strncpy_s(output, capacity, name ? name : " ", _TRUNCATE); diff --git a/Source/Contents/Items/ItemInfo.h b/Source/Contents/Items/ItemInfo.h index 1e253c3b..5509719a 100644 --- a/Source/Contents/Items/ItemInfo.h +++ b/Source/Contents/Items/ItemInfo.h @@ -90,7 +90,7 @@ struct alignas(8) ITEM_INFO { bool IsElementalStone() const; bool IsAboveItemId600() const; int Refine(char* output, int& capacity, unsigned char consume) const; - int sub_6D5810(char* output, int& capacity, unsigned char consume) const; + int GetIdDisplayName(char* output, int& capacity, unsigned char consume) const; const std::vector& Description() const; std::vector Serialize() const; std::uint32_t Deserialize(const std::vector& data); diff --git a/Source/Contents/Messenger/ClientMessenger.cpp b/Source/Contents/Messenger/ClientMessenger.cpp index 7ab1c059..c503c767 100644 --- a/Source/Contents/Messenger/ClientMessenger.cpp +++ b/Source/Contents/Messenger/ClientMessenger.cpp @@ -2758,7 +2758,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::SetWindow(UIWindow* window) { // OFFSET: 0x006A6490 // FUNCTION: fn_06059 -int __stdcall sub_6A6490(lua_State* state) { +int __stdcall subspconsumption(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2768,7 +2768,7 @@ int __stdcall sub_6A6490(lua_State* state) { // OFFSET: 0x006A6550 // FUNCTION: fn_06060 -int __stdcall sub_6A6550(lua_State* state) { +int __stdcall SubSPdrain(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2778,7 +2778,7 @@ int __stdcall sub_6A6550(lua_State* state) { // OFFSET: 0x006A6610 // FUNCTION: fn_06061 -int __stdcall sub_6A6610(lua_State* state) { +int __stdcall SubSkillDelay(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2788,7 +2788,7 @@ int __stdcall sub_6A6610(lua_State* state) { // OFFSET: 0x006A66D0 // FUNCTION: fn_06062 -int __stdcall sub_6A66D0(lua_State* state) { +int __stdcall SubSkillMDamage(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2798,7 +2798,7 @@ int __stdcall sub_6A66D0(lua_State* state) { // OFFSET: 0x006A6790 // FUNCTION: fn_06063 -int __stdcall sub_6A6790(lua_State* state) { +int __stdcall SubSkillSP(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2808,7 +2808,7 @@ int __stdcall sub_6A6790(lua_State* state) { // OFFSET: 0x006A6850 // FUNCTION: fn_06064 -int __stdcall sub_6A6850(lua_State* state) { +int __stdcall SubSpecificSpellCastTime(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2818,7 +2818,7 @@ int __stdcall sub_6A6850(lua_State* state) { // OFFSET: 0x006A6910 // FUNCTION: fn_06065 -int __stdcall sub_6A6910(lua_State* state) { +int __stdcall SubSpellCastTime(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2828,7 +2828,7 @@ int __stdcall sub_6A6910(lua_State* state) { // OFFSET: 0x006A69D0 // FUNCTION: fn_06066 -int __stdcall sub_6A69D0(lua_State* state) { +int __stdcall SubSpellDelay(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2838,7 +2838,7 @@ int __stdcall sub_6A69D0(lua_State* state) { // OFFSET: 0x006A6A90 // FUNCTION: fn_06067 -int __stdcall sub_6A6A90(lua_State* state) { +int __stdcall AddEXPPercent_KillRace(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2848,7 +2848,7 @@ int __stdcall sub_6A6A90(lua_State* state) { // OFFSET: 0x006A6B50 // FUNCTION: fn_06068 -int __stdcall sub_6A6B50(lua_State* state) { +int __stdcall AddExtParam(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2858,7 +2858,7 @@ int __stdcall sub_6A6B50(lua_State* state) { // OFFSET: 0x006A6C10 // FUNCTION: fn_06069 -int __stdcall sub_6A6C10(lua_State* state) { +int __stdcall AddGuideAttack(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2868,7 +2868,7 @@ int __stdcall sub_6A6C10(lua_State* state) { // OFFSET: 0x006A6CD0 // FUNCTION: fn_06070 -int __stdcall sub_6A6CD0(lua_State* state) { +int __stdcall AddHPdrain(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2878,7 +2878,7 @@ int __stdcall sub_6A6CD0(lua_State* state) { // OFFSET: 0x006A6D90 // FUNCTION: fn_06071 -int __stdcall sub_6A6D90(lua_State* state) { +int __stdcall AddHealModifyPercent(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2888,7 +2888,7 @@ int __stdcall sub_6A6D90(lua_State* state) { // OFFSET: 0x006A6E50 // FUNCTION: fn_06072 -int __stdcall sub_6A6E50(lua_State* state) { +int __stdcall AddHealValue(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2898,7 +2898,7 @@ int __stdcall sub_6A6E50(lua_State* state) { // OFFSET: 0x006A6F10 // FUNCTION: fn_06073 -int __stdcall sub_6A6F10(lua_State* state) { +int __stdcall AddIgnore_MRES_RacePercent(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2908,7 +2908,7 @@ int __stdcall sub_6A6F10(lua_State* state) { // OFFSET: 0x006A6FD0 // FUNCTION: fn_06074 -int __stdcall sub_6A6FD0(lua_State* state) { +int __stdcall AddIgnore_RES_RacePercent(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2918,7 +2918,7 @@ int __stdcall sub_6A6FD0(lua_State* state) { // OFFSET: 0x006A7090 // FUNCTION: fn_06075 -int __stdcall sub_6A7090(lua_State* state) { +int __stdcall AddMDamage_Property(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2928,7 +2928,7 @@ int __stdcall sub_6A7090(lua_State* state) { // OFFSET: 0x006A7150 // FUNCTION: fn_06076 -int __stdcall sub_6A7150(lua_State* state) { +int __stdcall AddMDamage_Size(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2938,7 +2938,7 @@ int __stdcall sub_6A7150(lua_State* state) { // OFFSET: 0x006A7210 // FUNCTION: fn_06077 -int __stdcall sub_6A7210(lua_State* state) { +int __stdcall AddAttrTolerace(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2948,7 +2948,7 @@ int __stdcall sub_6A7210(lua_State* state) { // OFFSET: 0x006A72D0 // FUNCTION: fn_06078 -int __stdcall sub_6A72D0(lua_State* state) { +int __stdcall AddMdamage_Class(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2958,7 +2958,7 @@ int __stdcall sub_6A72D0(lua_State* state) { // OFFSET: 0x006A7390 // FUNCTION: fn_06079 -int __stdcall sub_6A7390(lua_State* state) { +int __stdcall AddMdamage_Race(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2968,7 +2968,7 @@ int __stdcall sub_6A7390(lua_State* state) { // OFFSET: 0x006A7450 // FUNCTION: fn_06080 -int __stdcall sub_6A7450(lua_State* state) { +int __stdcall AddMeleeAttackDamage(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2978,7 +2978,7 @@ int __stdcall sub_6A7450(lua_State* state) { // OFFSET: 0x006A7510 // FUNCTION: fn_06081 -int __stdcall sub_6A7510(lua_State* state) { +int __stdcall AddMeleeAttackReflect(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2988,7 +2988,7 @@ int __stdcall sub_6A7510(lua_State* state) { // OFFSET: 0x006A75D0 // FUNCTION: fn_06082 -int __stdcall sub_6A75D0(lua_State* state) { +int __stdcall AddNeverknockback(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -2998,7 +2998,7 @@ int __stdcall sub_6A75D0(lua_State* state) { // OFFSET: 0x006A7690 // FUNCTION: fn_06083 -int __stdcall sub_6A7690(lua_State* state) { +int __stdcall AddRaceTolerace(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3008,7 +3008,7 @@ int __stdcall sub_6A7690(lua_State* state) { // OFFSET: 0x006A7750 // FUNCTION: fn_06084 -int __stdcall sub_6A7750(lua_State* state) { +int __stdcall AddRangeAttackDamage(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3018,7 +3018,7 @@ int __stdcall sub_6A7750(lua_State* state) { // OFFSET: 0x006A7810 // FUNCTION: fn_06085 -int __stdcall sub_6A7810(lua_State* state) { +int __stdcall AddReceiveItem_Equip(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3028,7 +3028,7 @@ int __stdcall sub_6A7810(lua_State* state) { // OFFSET: 0x006A78D0 // FUNCTION: fn_06086 -int __stdcall sub_6A78D0(lua_State* state) { +int __stdcall AddReflectMagic(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3038,7 +3038,7 @@ int __stdcall sub_6A78D0(lua_State* state) { // OFFSET: 0x006A7990 // FUNCTION: fn_06087 -int __stdcall sub_6A7990(lua_State* state) { +int __stdcall AddReflectTolerace(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3048,7 +3048,7 @@ int __stdcall sub_6A7990(lua_State* state) { // OFFSET: 0x006A7A50 // FUNCTION: fn_06088 -int __stdcall sub_6A7A50(lua_State* state) { +int __stdcall addattrtolerace(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3058,7 +3058,7 @@ int __stdcall sub_6A7A50(lua_State* state) { // OFFSET: 0x006A7B10 // FUNCTION: fn_06089 -int __stdcall sub_6A7B10(lua_State* state) { +int __stdcall AddSFCTEquipAmount(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3068,7 +3068,7 @@ int __stdcall sub_6A7B10(lua_State* state) { // OFFSET: 0x006A7BD0 // FUNCTION: fn_06090 -int __stdcall sub_6A7BD0(lua_State* state) { +int __stdcall AddSFCTEquipPermill(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3078,7 +3078,7 @@ int __stdcall sub_6A7BD0(lua_State* state) { // OFFSET: 0x006A7C90 // FUNCTION: fn_06091 -int __stdcall sub_6A7C90(lua_State* state) { +int __stdcall AddSPconsumption(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3088,7 +3088,7 @@ int __stdcall sub_6A7C90(lua_State* state) { // OFFSET: 0x006A7D50 // FUNCTION: fn_06092 -int __stdcall sub_6A7D50(lua_State* state) { +int __stdcall addspconsumption(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3098,7 +3098,7 @@ int __stdcall sub_6A7D50(lua_State* state) { // OFFSET: 0x006A7E10 // FUNCTION: fn_06093 -int __stdcall sub_6A7E10(lua_State* state) { +int __stdcall AddSPdrain(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3108,7 +3108,7 @@ int __stdcall sub_6A7E10(lua_State* state) { // OFFSET: 0x006A7ED0 // FUNCTION: fn_06094 -int __stdcall sub_6A7ED0(lua_State* state) { +int __stdcall AddSkillDelay(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3118,7 +3118,7 @@ int __stdcall sub_6A7ED0(lua_State* state) { // OFFSET: 0x006A7F90 // FUNCTION: fn_06095 -int __stdcall sub_6A7F90(lua_State* state) { +int __stdcall AddSkillMDamage(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3128,7 +3128,7 @@ int __stdcall sub_6A7F90(lua_State* state) { // OFFSET: 0x006A8050 // FUNCTION: fn_06096 -int __stdcall sub_6A8050(lua_State* state) { +int __stdcall AddSkillSP(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3138,7 +3138,7 @@ int __stdcall sub_6A8050(lua_State* state) { // OFFSET: 0x006A8110 // FUNCTION: fn_06097 -int __stdcall sub_6A8110(lua_State* state) { +int __stdcall AddSpecificSpellCastTime(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3148,7 +3148,7 @@ int __stdcall sub_6A8110(lua_State* state) { // OFFSET: 0x006A81D0 // FUNCTION: fn_06098 -int __stdcall sub_6A81D0(lua_State* state) { +int __stdcall AddSpellCastTime(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3158,7 +3158,7 @@ int __stdcall sub_6A81D0(lua_State* state) { // OFFSET: 0x006A8290 // FUNCTION: fn_06099 -int __stdcall sub_6A8290(lua_State* state) { +int __stdcall AddBowAttackDamage(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3168,7 +3168,7 @@ int __stdcall sub_6A8290(lua_State* state) { // OFFSET: 0x006A8350 // FUNCTION: fn_06100 -int __stdcall sub_6A8350(lua_State* state) { +int __stdcall AddSpellDelay(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3178,7 +3178,7 @@ int __stdcall sub_6A8350(lua_State* state) { // OFFSET: 0x006A84D0 // FUNCTION: fn_06102 -int __stdcall sub_6A84D0(lua_State* state) { +int __stdcall Clairvoyance(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3188,7 +3188,7 @@ int __stdcall sub_6A84D0(lua_State* state) { // OFFSET: 0x006A8590 // FUNCTION: fn_06103 -int __stdcall sub_6A8590(lua_State* state) { +int __stdcall ClassAddDamage(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3198,7 +3198,7 @@ int __stdcall sub_6A8590(lua_State* state) { // OFFSET: 0x006A8650 // FUNCTION: fn_06104 -int __stdcall sub_6A8650(lua_State* state) { +int __stdcall ClassSubDamage(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3208,7 +3208,7 @@ int __stdcall sub_6A8650(lua_State* state) { // OFFSET: 0x006A87D0 // FUNCTION: fn_06106 -int __stdcall sub_6A87D0(lua_State* state) { +int __stdcall DisableSkill(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3218,7 +3218,7 @@ int __stdcall sub_6A87D0(lua_State* state) { // OFFSET: 0x006A8890 // FUNCTION: fn_06107 -int __stdcall sub_6A8890(lua_State* state) { +int __stdcall EnableSkill(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3228,7 +3228,7 @@ int __stdcall sub_6A8890(lua_State* state) { // OFFSET: 0x006A8950 // FUNCTION: fn_06108 -int __stdcall sub_6A8950(lua_State* state) { +int __stdcall IndestructibleArmor(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3238,7 +3238,7 @@ int __stdcall sub_6A8950(lua_State* state) { // OFFSET: 0x006A8A10 // FUNCTION: fn_06109 -int __stdcall sub_6A8A10(lua_State* state) { +int __stdcall IndestructibleWeapon(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3248,7 +3248,7 @@ int __stdcall sub_6A8A10(lua_State* state) { // OFFSET: 0x006A8AD0 // FUNCTION: fn_06110 -int __stdcall sub_6A8AD0(lua_State* state) { +int __stdcall AddCRIPercent_Race(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3258,7 +3258,7 @@ int __stdcall sub_6A8AD0(lua_State* state) { // OFFSET: 0x006A8B90 // FUNCTION: fn_06111 -int __stdcall sub_6A8B90(lua_State* state) { +int __stdcall Magicimmune(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3268,7 +3268,7 @@ int __stdcall sub_6A8B90(lua_State* state) { // OFFSET: 0x006A8C50 // FUNCTION: fn_06112 -int __stdcall sub_6A8C50(lua_State* state) { +int __stdcall NoDispell(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3278,7 +3278,7 @@ int __stdcall sub_6A8C50(lua_State* state) { // OFFSET: 0x006A8D10 // FUNCTION: fn_06113 -int __stdcall sub_6A8D10(lua_State* state) { +int __stdcall NoJamstone(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3288,7 +3288,7 @@ int __stdcall sub_6A8D10(lua_State* state) { // OFFSET: 0x006A8DD0 // FUNCTION: fn_06114 -int __stdcall sub_6A8DD0(lua_State* state) { +int __stdcall NoMadogearfuel(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3298,7 +3298,7 @@ int __stdcall sub_6A8DD0(lua_State* state) { // OFFSET: 0x006A8E90 // FUNCTION: fn_06115 -int __stdcall sub_6A8E90(lua_State* state) { +int __stdcall PerfectDamage(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3308,7 +3308,7 @@ int __stdcall sub_6A8E90(lua_State* state) { // OFFSET: 0x006A8F50 // FUNCTION: fn_06116 -int __stdcall sub_6A8F50(lua_State* state) { +int __stdcall RaceAddDamage(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3318,7 +3318,7 @@ int __stdcall sub_6A8F50(lua_State* state) { // OFFSET: 0x006A9010 // FUNCTION: fn_06117 -int __stdcall sub_6A9010(lua_State* state) { +int __stdcall RaceAddDamageSelf(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3328,7 +3328,7 @@ int __stdcall sub_6A9010(lua_State* state) { // OFFSET: 0x006A90D0 // FUNCTION: fn_06118 -int __stdcall sub_6A90D0(lua_State* state) { +int __stdcall RaceSubDamage(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3338,7 +3338,7 @@ int __stdcall sub_6A90D0(lua_State* state) { // OFFSET: 0x006A9190 // FUNCTION: fn_06119 -int __stdcall sub_6A9190(lua_State* state) { +int __stdcall RaceSubDamageSelf(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3348,7 +3348,7 @@ int __stdcall sub_6A9190(lua_State* state) { // OFFSET: 0x006A9250 // FUNCTION: fn_06120 -int __stdcall sub_6A9250(lua_State* state) { +int __stdcall Reincarnation(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3358,7 +3358,7 @@ int __stdcall sub_6A9250(lua_State* state) { // OFFSET: 0x006A9310 // FUNCTION: fn_06121 -int __stdcall sub_6A9310(lua_State* state) { +int __stdcall AddDamage_CRI(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3368,7 +3368,7 @@ int __stdcall sub_6A9310(lua_State* state) { // OFFSET: 0x006A93D0 // FUNCTION: fn_06122 -int __stdcall sub_6A93D0(lua_State* state) { +int __stdcall SetIgnoreDEFClass(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3378,7 +3378,7 @@ int __stdcall sub_6A93D0(lua_State* state) { // OFFSET: 0x006A9490 // FUNCTION: fn_06123 -int __stdcall sub_6A9490(lua_State* state) { +int __stdcall SetIgnoreDEFRace(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3388,7 +3388,7 @@ int __stdcall sub_6A9490(lua_State* state) { // OFFSET: 0x006A9550 // FUNCTION: fn_06124 -int __stdcall sub_6A9550(lua_State* state) { +int __stdcall SetIgnoreDefClass_Percent(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3398,7 +3398,7 @@ int __stdcall sub_6A9550(lua_State* state) { // OFFSET: 0x006A9610 // FUNCTION: fn_06125 -int __stdcall sub_6A9610(lua_State* state) { +int __stdcall SetIgnoreDefRace_Percent(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3408,7 +3408,7 @@ int __stdcall sub_6A9610(lua_State* state) { // OFFSET: 0x006A96D0 // FUNCTION: fn_06126 -int __stdcall sub_6A96D0(lua_State* state) { +int __stdcall SetIgnoreMdefClass(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3418,7 +3418,7 @@ int __stdcall sub_6A96D0(lua_State* state) { // OFFSET: 0x006A9790 // FUNCTION: fn_06127 -int __stdcall sub_6A9790(lua_State* state) { +int __stdcall SetIgnoreMdefRace(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3428,7 +3428,7 @@ int __stdcall sub_6A9790(lua_State* state) { // OFFSET: 0x006A9850 // FUNCTION: fn_06128 -int __stdcall sub_6A9850(lua_State* state) { +int __stdcall SetInvestigate(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3438,7 +3438,7 @@ int __stdcall sub_6A9850(lua_State* state) { // OFFSET: 0x006A8410 // FUNCTION: fn_06101 -int __stdcall sub_6A8410(lua_State* state) { +int __stdcall BodyAttribute(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3448,7 +3448,7 @@ int __stdcall sub_6A8410(lua_State* state) { // OFFSET: 0x006A8710 // FUNCTION: fn_06105 -int __stdcall sub_6A8710(lua_State* state) { +int __stdcall Condition(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3458,7 +3458,7 @@ int __stdcall sub_6A8710(lua_State* state) { // OFFSET: 0x006A9910 // FUNCTION: fn_06129 -int __stdcall sub_6A9910(lua_State* state) { +int __stdcall SplashAttack(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3476,7 +3476,7 @@ int __stdcall sub_6A9910(lua_State* state) { // OFFSET: 0x006A99D0 // FUNCTION: fn_06130 -int __stdcall sub_6A99D0(lua_State* state) { +int __stdcall SubAttrTolerace(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3490,7 +3490,7 @@ int __stdcall sub_6A99D0(lua_State* state) { // OFFSET: 0x006A9A90 // FUNCTION: fn_06131 -int __stdcall sub_6A9A90(lua_State* state) { +int __stdcall subattrtolerace(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3504,7 +3504,7 @@ int __stdcall sub_6A9A90(lua_State* state) { // OFFSET: 0x006A9B50 // FUNCTION: fn_06132 -int __stdcall sub_6A9B50(lua_State* state) { +int __stdcall AddDamage_HIT(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3518,7 +3518,7 @@ int __stdcall sub_6A9B50(lua_State* state) { // OFFSET: 0x006A9C10 // FUNCTION: fn_06133 -int __stdcall sub_6A9C10(lua_State* state) { +int __stdcall SubBowAttackDamage(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3532,7 +3532,7 @@ int __stdcall sub_6A9C10(lua_State* state) { // OFFSET: 0x006A9CD0 // FUNCTION: fn_06134 -int __stdcall sub_6A9CD0(lua_State* state) { +int __stdcall SubCRIPercent_Race(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3546,7 +3546,7 @@ int __stdcall sub_6A9CD0(lua_State* state) { // OFFSET: 0x006A9D90 // FUNCTION: fn_06135 -int __stdcall sub_6A9D90(lua_State* state) { +int __stdcall SubDamage_CRI(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3560,7 +3560,7 @@ int __stdcall sub_6A9D90(lua_State* state) { // OFFSET: 0x006A9E50 // FUNCTION: fn_06136 -int __stdcall sub_6A9E50(lua_State* state) { +int __stdcall SubDamage_HIT(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3574,7 +3574,7 @@ int __stdcall sub_6A9E50(lua_State* state) { // OFFSET: 0x006A9F10 // FUNCTION: fn_06137 -int __stdcall sub_6A9F10(lua_State* state) { +int __stdcall SubDamage_Property(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3588,7 +3588,7 @@ int __stdcall sub_6A9F10(lua_State* state) { // OFFSET: 0x006A9FD0 // FUNCTION: fn_06138 -int __stdcall sub_6A9FD0(lua_State* state) { +int __stdcall SubDamage_SKID(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3602,7 +3602,7 @@ int __stdcall sub_6A9FD0(lua_State* state) { // OFFSET: 0x006AA090 // FUNCTION: fn_06139 -int __stdcall sub_6AA090(lua_State* state) { +int __stdcall SubDamage_Size(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3616,7 +3616,7 @@ int __stdcall sub_6AA090(lua_State* state) { // OFFSET: 0x006AA150 // FUNCTION: fn_06140 -int __stdcall sub_6AA150(lua_State* state) { +int __stdcall SubEXPPercent_KillRace(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3630,7 +3630,7 @@ int __stdcall sub_6AA150(lua_State* state) { // OFFSET: 0x006AA210 // FUNCTION: fn_06141 -int __stdcall sub_6AA210(lua_State* state) { +int __stdcall SubExtParam(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3644,7 +3644,7 @@ int __stdcall sub_6AA210(lua_State* state) { // OFFSET: 0x006AA2D0 // FUNCTION: fn_06142 -int __stdcall sub_6AA2D0(lua_State* state) { +int __stdcall SubGuideAttack(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3658,7 +3658,7 @@ int __stdcall sub_6AA2D0(lua_State* state) { // OFFSET: 0x006AA390 // FUNCTION: fn_06143 -int __stdcall sub_6AA390(lua_State* state) { +int __stdcall AddDamage_Property(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3672,7 +3672,7 @@ int __stdcall sub_6AA390(lua_State* state) { // OFFSET: 0x006AA450 // FUNCTION: fn_06144 -int __stdcall sub_6AA450(lua_State* state) { +int __stdcall SubHPdrain(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3686,7 +3686,7 @@ int __stdcall sub_6AA450(lua_State* state) { // OFFSET: 0x006AA510 // FUNCTION: fn_06145 -int __stdcall sub_6AA510(lua_State* state) { +int __stdcall SubHealModifyPercent(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3700,7 +3700,7 @@ int __stdcall sub_6AA510(lua_State* state) { // OFFSET: 0x006AA5D0 // FUNCTION: fn_06146 -int __stdcall sub_6AA5D0(lua_State* state) { +int __stdcall SubHealValue(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3714,7 +3714,7 @@ int __stdcall sub_6AA5D0(lua_State* state) { // OFFSET: 0x006AA690 // FUNCTION: fn_06147 -int __stdcall sub_6AA690(lua_State* state) { +int __stdcall SubIgnore_MRES_RacePercent(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3728,7 +3728,7 @@ int __stdcall sub_6AA690(lua_State* state) { // OFFSET: 0x006AA750 // FUNCTION: fn_06148 -int __stdcall sub_6AA750(lua_State* state) { +int __stdcall SubIgnore_RES_RacePercent(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3742,7 +3742,7 @@ int __stdcall sub_6AA750(lua_State* state) { // OFFSET: 0x006AA810 // FUNCTION: fn_06149 -int __stdcall sub_6AA810(lua_State* state) { +int __stdcall SubMDamage_Property(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3752,7 +3752,7 @@ int __stdcall sub_6AA810(lua_State* state) { // OFFSET: 0x006AA8D0 // FUNCTION: fn_06150 -int __stdcall sub_6AA8D0(lua_State* state) { +int __stdcall SubMDamage_Size(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3762,7 +3762,7 @@ int __stdcall sub_6AA8D0(lua_State* state) { // OFFSET: 0x006AA990 // FUNCTION: fn_06151 -int __stdcall sub_6AA990(lua_State* state) { +int __stdcall SubMdamage_Class(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3772,7 +3772,7 @@ int __stdcall sub_6AA990(lua_State* state) { // OFFSET: 0x006AAA50 // FUNCTION: fn_06152 -int __stdcall sub_6AAA50(lua_State* state) { +int __stdcall SubMdamage_Race(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3782,7 +3782,7 @@ int __stdcall sub_6AAA50(lua_State* state) { // OFFSET: 0x006AAB10 // FUNCTION: fn_06153 -int __stdcall sub_6AAB10(lua_State* state) { +int __stdcall SubMeleeAttackDamage(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3792,7 +3792,7 @@ int __stdcall sub_6AAB10(lua_State* state) { // OFFSET: 0x006AABD0 // FUNCTION: fn_06154 -int __stdcall sub_6AABD0(lua_State* state) { +int __stdcall AddDamage_SKID(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3802,7 +3802,7 @@ int __stdcall sub_6AABD0(lua_State* state) { // OFFSET: 0x006AAC90 // FUNCTION: fn_06155 -int __stdcall sub_6AAC90(lua_State* state) { +int __stdcall SubMeleeAttackReflect(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3812,7 +3812,7 @@ int __stdcall sub_6AAC90(lua_State* state) { // OFFSET: 0x006AAD50 // FUNCTION: fn_06156 -int __stdcall sub_6AAD50(lua_State* state) { +int __stdcall SubNeverknockback(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3822,7 +3822,7 @@ int __stdcall sub_6AAD50(lua_State* state) { // OFFSET: 0x006AAE10 // FUNCTION: fn_06157 -int __stdcall sub_6AAE10(lua_State* state) { +int __stdcall SubRaceTolerace(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3832,7 +3832,7 @@ int __stdcall sub_6AAE10(lua_State* state) { // OFFSET: 0x006AAED0 // FUNCTION: fn_06158 -int __stdcall sub_6AAED0(lua_State* state) { +int __stdcall SubRangeAttackDamage(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3842,7 +3842,7 @@ int __stdcall sub_6AAED0(lua_State* state) { // OFFSET: 0x006AAF90 // FUNCTION: fn_06159 -int __stdcall sub_6AAF90(lua_State* state) { +int __stdcall SubReceiveItem_Equip(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3852,7 +3852,7 @@ int __stdcall sub_6AAF90(lua_State* state) { // OFFSET: 0x006AB050 // FUNCTION: fn_06160 -int __stdcall sub_6AB050(lua_State* state) { +int __stdcall SubReflectMagic(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3862,7 +3862,7 @@ int __stdcall sub_6AB050(lua_State* state) { // OFFSET: 0x006AB110 // FUNCTION: fn_06161 -int __stdcall sub_6AB110(lua_State* state) { +int __stdcall SubReflectTolerace(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3872,7 +3872,7 @@ int __stdcall sub_6AB110(lua_State* state) { // OFFSET: 0x006AB1D0 // FUNCTION: fn_06162 -int __stdcall sub_6AB1D0(lua_State* state) { +int __stdcall SubSFCTEquipAmount(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3882,7 +3882,7 @@ int __stdcall sub_6AB1D0(lua_State* state) { // OFFSET: 0x006AB290 // FUNCTION: fn_06163 -int __stdcall sub_6AB290(lua_State* state) { +int __stdcall SubSFCTEquipPermill(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3892,7 +3892,7 @@ int __stdcall sub_6AB290(lua_State* state) { // OFFSET: 0x006AB350 // FUNCTION: fn_06164 -int __stdcall sub_6AB350(lua_State* state) { +int __stdcall SubSPconsumption(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -3902,7 +3902,7 @@ int __stdcall sub_6AB350(lua_State* state) { // OFFSET: 0x006AB410 // FUNCTION: fn_06165 -int __stdcall sub_6AB410(lua_State* state) { +int __stdcall AddDamage_Size(lua_State* state) { if (g_equipmentPropertiesMgr == nullptr) { g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr; } @@ -6258,7 +6258,7 @@ HANDLE g_embedFontFiles; // OFFSET: 0x00DD9D50 // FUNCTION: fn_23337 -void CSession::sub_DD9D50() { +void CSession::InitClientData() { if (!g_itemInfoMgr->Load()) { const std::uint8_t caption[] = {0x2A, 0x0F, 0x89, 0x4C, 0x03, 0x07}; const std::uint8_t message[] = {0x80, 0x81, 0x3A, 0xE6, 0xC6, 0xBB, 0xDD, 0x4C, 0xE9, 0x93, 0x36, 0xE7, 0xEA, 0xF5, 0xF2, 0x4D, 0xA0, 0x81, 0x5F}; @@ -6288,7 +6288,7 @@ void CSession::sub_DD9D50() { static_cast(CCashEmotionMgr::Initialize()); srand(static_cast(_time32(nullptr))); this->UpdateRandomStats(); - this->sub_DF33B0(); + this->LoadSessionTables(); static_cast(g_mapInfoMgr->LoadScript()); CGameSettingsMgr* settings = Singleton::GetInstance(); @@ -6804,113 +6804,113 @@ bool EquipmentProperties::CEquipmentPropertiesMgr::InitializeLua() { this->script.SetGlobal("IsPremiumPcCafe", ::IsPremiumPcCafe); this->script.SetGlobal("CheckJobGroup2", ::CheckJobGroup2); this->script.SetGlobal("GetCategoryJob", ::GetCategoryJob); - this->script.SetGlobal("AddAttrTolerace", +[](lua_State* state) { return ::sub_6A7210(state); }); - this->script.SetGlobal("addattrtolerace", +[](lua_State* state) { return ::sub_6A7A50(state); }); - this->script.SetGlobal("AddBowAttackDamage", +[](lua_State* state) { return ::sub_6A8290(state); }); - this->script.SetGlobal("AddCRIPercent_Race", +[](lua_State* state) { return ::sub_6A8AD0(state); }); - this->script.SetGlobal("AddDamage_CRI", +[](lua_State* state) { return ::sub_6A9310(state); }); - this->script.SetGlobal("AddDamage_HIT", +[](lua_State* state) { return ::sub_6A9B50(state); }); - this->script.SetGlobal("AddDamage_Property", +[](lua_State* state) { return ::sub_6AA390(state); }); - this->script.SetGlobal("AddDamage_SKID", +[](lua_State* state) { return ::sub_6AABD0(state); }); - this->script.SetGlobal("AddDamage_Size", +[](lua_State* state) { return ::sub_6AB410(state); }); - this->script.SetGlobal("AddEXPPercent_KillRace", +[](lua_State* state) { return ::sub_6A6A90(state); }); - this->script.SetGlobal("AddExtParam", +[](lua_State* state) { return ::sub_6A6B50(state); }); - this->script.SetGlobal("AddGuideAttack", +[](lua_State* state) { return ::sub_6A6C10(state); }); - this->script.SetGlobal("AddHPdrain", +[](lua_State* state) { return ::sub_6A6CD0(state); }); - this->script.SetGlobal("AddHealModifyPercent", +[](lua_State* state) { return ::sub_6A6D90(state); }); - this->script.SetGlobal("AddHealValue", +[](lua_State* state) { return ::sub_6A6E50(state); }); - this->script.SetGlobal("AddIgnore_MRES_RacePercent", +[](lua_State* state) { return ::sub_6A6F10(state); }); - this->script.SetGlobal("AddIgnore_RES_RacePercent", +[](lua_State* state) { return ::sub_6A6FD0(state); }); - this->script.SetGlobal("AddMDamage_Property", +[](lua_State* state) { return ::sub_6A7090(state); }); - this->script.SetGlobal("AddMDamage_Size", +[](lua_State* state) { return ::sub_6A7150(state); }); - this->script.SetGlobal("AddMdamage_Class", +[](lua_State* state) { return ::sub_6A72D0(state); }); - this->script.SetGlobal("AddMdamage_Race", +[](lua_State* state) { return ::sub_6A7390(state); }); - this->script.SetGlobal("AddMeleeAttackDamage", +[](lua_State* state) { return ::sub_6A7450(state); }); - this->script.SetGlobal("AddMeleeAttackReflect", +[](lua_State* state) { return ::sub_6A7510(state); }); - this->script.SetGlobal("AddNeverknockback", +[](lua_State* state) { return ::sub_6A75D0(state); }); - this->script.SetGlobal("AddRaceTolerace", +[](lua_State* state) { return ::sub_6A7690(state); }); - this->script.SetGlobal("AddRangeAttackDamage", +[](lua_State* state) { return ::sub_6A7750(state); }); - this->script.SetGlobal("AddReceiveItem_Equip", +[](lua_State* state) { return ::sub_6A7810(state); }); - this->script.SetGlobal("AddReflectMagic", +[](lua_State* state) { return ::sub_6A78D0(state); }); - this->script.SetGlobal("AddReflectTolerace", +[](lua_State* state) { return ::sub_6A7990(state); }); - this->script.SetGlobal("AddSFCTEquipAmount", +[](lua_State* state) { return ::sub_6A7B10(state); }); - this->script.SetGlobal("AddSFCTEquipPermill", +[](lua_State* state) { return ::sub_6A7BD0(state); }); - this->script.SetGlobal("AddSPconsumption", +[](lua_State* state) { return ::sub_6A7C90(state); }); - this->script.SetGlobal("addspconsumption", +[](lua_State* state) { return ::sub_6A7D50(state); }); - this->script.SetGlobal("AddSPdrain", +[](lua_State* state) { return ::sub_6A7E10(state); }); - this->script.SetGlobal("AddSkillDelay", +[](lua_State* state) { return ::sub_6A7ED0(state); }); - this->script.SetGlobal("AddSkillMDamage", +[](lua_State* state) { return ::sub_6A7F90(state); }); - this->script.SetGlobal("AddSkillSP", +[](lua_State* state) { return ::sub_6A8050(state); }); - this->script.SetGlobal("AddSpecificSpellCastTime", +[](lua_State* state) { return ::sub_6A8110(state); }); - this->script.SetGlobal("AddSpellCastTime", +[](lua_State* state) { return ::sub_6A81D0(state); }); - this->script.SetGlobal("AddSpellDelay", +[](lua_State* state) { return ::sub_6A8350(state); }); - this->script.SetGlobal("BodyAttribute", +[](lua_State* state) { return ::sub_6A8410(state); }); - this->script.SetGlobal("Clairvoyance", +[](lua_State* state) { return ::sub_6A84D0(state); }); - this->script.SetGlobal("ClassAddDamage", +[](lua_State* state) { return ::sub_6A8590(state); }); - this->script.SetGlobal("ClassSubDamage", +[](lua_State* state) { return ::sub_6A8650(state); }); - this->script.SetGlobal("Condition", +[](lua_State* state) { return ::sub_6A8710(state); }); - this->script.SetGlobal("DisableSkill", +[](lua_State* state) { return ::sub_6A87D0(state); }); - this->script.SetGlobal("EnableSkill", +[](lua_State* state) { return ::sub_6A8890(state); }); - this->script.SetGlobal("IndestructibleArmor", +[](lua_State* state) { return ::sub_6A8950(state); }); - this->script.SetGlobal("IndestructibleWeapon", +[](lua_State* state) { return ::sub_6A8A10(state); }); - this->script.SetGlobal("Magicimmune", +[](lua_State* state) { return ::sub_6A8B90(state); }); - this->script.SetGlobal("NoDispell", +[](lua_State* state) { return ::sub_6A8C50(state); }); - this->script.SetGlobal("NoJamstone", +[](lua_State* state) { return ::sub_6A8D10(state); }); - this->script.SetGlobal("NoMadogearfuel", +[](lua_State* state) { return ::sub_6A8DD0(state); }); - this->script.SetGlobal("PerfectDamage", +[](lua_State* state) { return ::sub_6A8E90(state); }); - this->script.SetGlobal("RaceAddDamage", +[](lua_State* state) { return ::sub_6A8F50(state); }); - this->script.SetGlobal("RaceAddDamageSelf", +[](lua_State* state) { return ::sub_6A9010(state); }); - this->script.SetGlobal("RaceSubDamage", +[](lua_State* state) { return ::sub_6A90D0(state); }); - this->script.SetGlobal("RaceSubDamageSelf", +[](lua_State* state) { return ::sub_6A9190(state); }); - this->script.SetGlobal("Reincarnation", +[](lua_State* state) { return ::sub_6A9250(state); }); - this->script.SetGlobal("SetIgnoreDEFClass", +[](lua_State* state) { return ::sub_6A93D0(state); }); - this->script.SetGlobal("SetIgnoreDEFRace", +[](lua_State* state) { return ::sub_6A9490(state); }); - this->script.SetGlobal("SetIgnoreDefClass_Percent", +[](lua_State* state) { return ::sub_6A9550(state); }); - this->script.SetGlobal("SetIgnoreDefRace_Percent", +[](lua_State* state) { return ::sub_6A9610(state); }); - this->script.SetGlobal("SetIgnoreMdefClass", +[](lua_State* state) { return ::sub_6A96D0(state); }); - this->script.SetGlobal("SetIgnoreMdefRace", +[](lua_State* state) { return ::sub_6A9790(state); }); - this->script.SetGlobal("SetInvestigate", +[](lua_State* state) { return ::sub_6A9850(state); }); - this->script.SetGlobal("SplashAttack", +[](lua_State* state) { return ::sub_6A9910(state); }); - this->script.SetGlobal("SubAttrTolerace", +[](lua_State* state) { return ::sub_6A99D0(state); }); - this->script.SetGlobal("subattrtolerace", +[](lua_State* state) { return ::sub_6A9A90(state); }); - this->script.SetGlobal("SubBowAttackDamage", +[](lua_State* state) { return ::sub_6A9C10(state); }); - this->script.SetGlobal("SubCRIPercent_Race", +[](lua_State* state) { return ::sub_6A9CD0(state); }); - this->script.SetGlobal("SubDamage_CRI", +[](lua_State* state) { return ::sub_6A9D90(state); }); - this->script.SetGlobal("SubDamage_HIT", +[](lua_State* state) { return ::sub_6A9E50(state); }); - this->script.SetGlobal("SubDamage_Property", +[](lua_State* state) { return ::sub_6A9F10(state); }); - this->script.SetGlobal("SubDamage_SKID", +[](lua_State* state) { return ::sub_6A9FD0(state); }); - this->script.SetGlobal("SubDamage_Size", +[](lua_State* state) { return ::sub_6AA090(state); }); - this->script.SetGlobal("SubEXPPercent_KillRace", +[](lua_State* state) { return ::sub_6AA150(state); }); - this->script.SetGlobal("SubExtParam", +[](lua_State* state) { return ::sub_6AA210(state); }); - this->script.SetGlobal("SubGuideAttack", +[](lua_State* state) { return ::sub_6AA2D0(state); }); - this->script.SetGlobal("SubHPdrain", +[](lua_State* state) { return ::sub_6AA450(state); }); - this->script.SetGlobal("SubHealModifyPercent", +[](lua_State* state) { return ::sub_6AA510(state); }); - this->script.SetGlobal("SubHealValue", +[](lua_State* state) { return ::sub_6AA5D0(state); }); - this->script.SetGlobal("SubIgnore_MRES_RacePercent", +[](lua_State* state) { return ::sub_6AA690(state); }); - this->script.SetGlobal("SubIgnore_RES_RacePercent", +[](lua_State* state) { return ::sub_6AA750(state); }); - this->script.SetGlobal("SubMDamage_Property", +[](lua_State* state) { return ::sub_6AA810(state); }); - this->script.SetGlobal("SubMDamage_Size", +[](lua_State* state) { return ::sub_6AA8D0(state); }); - this->script.SetGlobal("SubMdamage_Class", +[](lua_State* state) { return ::sub_6AA990(state); }); - this->script.SetGlobal("SubMdamage_Race", +[](lua_State* state) { return ::sub_6AAA50(state); }); - this->script.SetGlobal("SubMeleeAttackDamage", +[](lua_State* state) { return ::sub_6AAB10(state); }); - this->script.SetGlobal("SubMeleeAttackReflect", +[](lua_State* state) { return ::sub_6AAC90(state); }); - this->script.SetGlobal("SubNeverknockback", +[](lua_State* state) { return ::sub_6AAD50(state); }); - this->script.SetGlobal("SubRaceTolerace", +[](lua_State* state) { return ::sub_6AAE10(state); }); - this->script.SetGlobal("SubRangeAttackDamage", +[](lua_State* state) { return ::sub_6AAED0(state); }); - this->script.SetGlobal("SubReceiveItem_Equip", +[](lua_State* state) { return ::sub_6AAF90(state); }); - this->script.SetGlobal("SubReflectMagic", +[](lua_State* state) { return ::sub_6AB050(state); }); - this->script.SetGlobal("SubReflectTolerace", +[](lua_State* state) { return ::sub_6AB110(state); }); - this->script.SetGlobal("SubSFCTEquipAmount", +[](lua_State* state) { return ::sub_6AB1D0(state); }); - this->script.SetGlobal("SubSFCTEquipPermill", +[](lua_State* state) { return ::sub_6AB290(state); }); - this->script.SetGlobal("SubSPconsumption", +[](lua_State* state) { return ::sub_6AB350(state); }); - this->script.SetGlobal("subspconsumption", +[](lua_State* state) { return ::sub_6A6490(state); }); - this->script.SetGlobal("SubSPdrain", +[](lua_State* state) { return ::sub_6A6550(state); }); - this->script.SetGlobal("SubSkillDelay", +[](lua_State* state) { return ::sub_6A6610(state); }); - this->script.SetGlobal("SubSkillMDamage", +[](lua_State* state) { return ::sub_6A66D0(state); }); - this->script.SetGlobal("SubSkillSP", +[](lua_State* state) { return ::sub_6A6790(state); }); - this->script.SetGlobal("SubSpecificSpellCastTime", +[](lua_State* state) { return ::sub_6A6850(state); }); - this->script.SetGlobal("SubSpellCastTime", +[](lua_State* state) { return ::sub_6A6910(state); }); - this->script.SetGlobal("SubSpellDelay", +[](lua_State* state) { return ::sub_6A69D0(state); }); + this->script.SetGlobal("AddAttrTolerace", +[](lua_State* state) { return ::AddAttrTolerace(state); }); + this->script.SetGlobal("addattrtolerace", +[](lua_State* state) { return ::addattrtolerace(state); }); + this->script.SetGlobal("AddBowAttackDamage", +[](lua_State* state) { return ::AddBowAttackDamage(state); }); + this->script.SetGlobal("AddCRIPercent_Race", +[](lua_State* state) { return ::AddCRIPercent_Race(state); }); + this->script.SetGlobal("AddDamage_CRI", +[](lua_State* state) { return ::AddDamage_CRI(state); }); + this->script.SetGlobal("AddDamage_HIT", +[](lua_State* state) { return ::AddDamage_HIT(state); }); + this->script.SetGlobal("AddDamage_Property", +[](lua_State* state) { return ::AddDamage_Property(state); }); + this->script.SetGlobal("AddDamage_SKID", +[](lua_State* state) { return ::AddDamage_SKID(state); }); + this->script.SetGlobal("AddDamage_Size", +[](lua_State* state) { return ::AddDamage_Size(state); }); + this->script.SetGlobal("AddEXPPercent_KillRace", +[](lua_State* state) { return ::AddEXPPercent_KillRace(state); }); + this->script.SetGlobal("AddExtParam", +[](lua_State* state) { return ::AddExtParam(state); }); + this->script.SetGlobal("AddGuideAttack", +[](lua_State* state) { return ::AddGuideAttack(state); }); + this->script.SetGlobal("AddHPdrain", +[](lua_State* state) { return ::AddHPdrain(state); }); + this->script.SetGlobal("AddHealModifyPercent", +[](lua_State* state) { return ::AddHealModifyPercent(state); }); + this->script.SetGlobal("AddHealValue", +[](lua_State* state) { return ::AddHealValue(state); }); + this->script.SetGlobal("AddIgnore_MRES_RacePercent", +[](lua_State* state) { return ::AddIgnore_MRES_RacePercent(state); }); + this->script.SetGlobal("AddIgnore_RES_RacePercent", +[](lua_State* state) { return ::AddIgnore_RES_RacePercent(state); }); + this->script.SetGlobal("AddMDamage_Property", +[](lua_State* state) { return ::AddMDamage_Property(state); }); + this->script.SetGlobal("AddMDamage_Size", +[](lua_State* state) { return ::AddMDamage_Size(state); }); + this->script.SetGlobal("AddMdamage_Class", +[](lua_State* state) { return ::AddMdamage_Class(state); }); + this->script.SetGlobal("AddMdamage_Race", +[](lua_State* state) { return ::AddMdamage_Race(state); }); + this->script.SetGlobal("AddMeleeAttackDamage", +[](lua_State* state) { return ::AddMeleeAttackDamage(state); }); + this->script.SetGlobal("AddMeleeAttackReflect", +[](lua_State* state) { return ::AddMeleeAttackReflect(state); }); + this->script.SetGlobal("AddNeverknockback", +[](lua_State* state) { return ::AddNeverknockback(state); }); + this->script.SetGlobal("AddRaceTolerace", +[](lua_State* state) { return ::AddRaceTolerace(state); }); + this->script.SetGlobal("AddRangeAttackDamage", +[](lua_State* state) { return ::AddRangeAttackDamage(state); }); + this->script.SetGlobal("AddReceiveItem_Equip", +[](lua_State* state) { return ::AddReceiveItem_Equip(state); }); + this->script.SetGlobal("AddReflectMagic", +[](lua_State* state) { return ::AddReflectMagic(state); }); + this->script.SetGlobal("AddReflectTolerace", +[](lua_State* state) { return ::AddReflectTolerace(state); }); + this->script.SetGlobal("AddSFCTEquipAmount", +[](lua_State* state) { return ::AddSFCTEquipAmount(state); }); + this->script.SetGlobal("AddSFCTEquipPermill", +[](lua_State* state) { return ::AddSFCTEquipPermill(state); }); + this->script.SetGlobal("AddSPconsumption", +[](lua_State* state) { return ::AddSPconsumption(state); }); + this->script.SetGlobal("addspconsumption", +[](lua_State* state) { return ::addspconsumption(state); }); + this->script.SetGlobal("AddSPdrain", +[](lua_State* state) { return ::AddSPdrain(state); }); + this->script.SetGlobal("AddSkillDelay", +[](lua_State* state) { return ::AddSkillDelay(state); }); + this->script.SetGlobal("AddSkillMDamage", +[](lua_State* state) { return ::AddSkillMDamage(state); }); + this->script.SetGlobal("AddSkillSP", +[](lua_State* state) { return ::AddSkillSP(state); }); + this->script.SetGlobal("AddSpecificSpellCastTime", +[](lua_State* state) { return ::AddSpecificSpellCastTime(state); }); + this->script.SetGlobal("AddSpellCastTime", +[](lua_State* state) { return ::AddSpellCastTime(state); }); + this->script.SetGlobal("AddSpellDelay", +[](lua_State* state) { return ::AddSpellDelay(state); }); + this->script.SetGlobal("BodyAttribute", +[](lua_State* state) { return ::BodyAttribute(state); }); + this->script.SetGlobal("Clairvoyance", +[](lua_State* state) { return ::Clairvoyance(state); }); + this->script.SetGlobal("ClassAddDamage", +[](lua_State* state) { return ::ClassAddDamage(state); }); + this->script.SetGlobal("ClassSubDamage", +[](lua_State* state) { return ::ClassSubDamage(state); }); + this->script.SetGlobal("Condition", +[](lua_State* state) { return ::Condition(state); }); + this->script.SetGlobal("DisableSkill", +[](lua_State* state) { return ::DisableSkill(state); }); + this->script.SetGlobal("EnableSkill", +[](lua_State* state) { return ::EnableSkill(state); }); + this->script.SetGlobal("IndestructibleArmor", +[](lua_State* state) { return ::IndestructibleArmor(state); }); + this->script.SetGlobal("IndestructibleWeapon", +[](lua_State* state) { return ::IndestructibleWeapon(state); }); + this->script.SetGlobal("Magicimmune", +[](lua_State* state) { return ::Magicimmune(state); }); + this->script.SetGlobal("NoDispell", +[](lua_State* state) { return ::NoDispell(state); }); + this->script.SetGlobal("NoJamstone", +[](lua_State* state) { return ::NoJamstone(state); }); + this->script.SetGlobal("NoMadogearfuel", +[](lua_State* state) { return ::NoMadogearfuel(state); }); + this->script.SetGlobal("PerfectDamage", +[](lua_State* state) { return ::PerfectDamage(state); }); + this->script.SetGlobal("RaceAddDamage", +[](lua_State* state) { return ::RaceAddDamage(state); }); + this->script.SetGlobal("RaceAddDamageSelf", +[](lua_State* state) { return ::RaceAddDamageSelf(state); }); + this->script.SetGlobal("RaceSubDamage", +[](lua_State* state) { return ::RaceSubDamage(state); }); + this->script.SetGlobal("RaceSubDamageSelf", +[](lua_State* state) { return ::RaceSubDamageSelf(state); }); + this->script.SetGlobal("Reincarnation", +[](lua_State* state) { return ::Reincarnation(state); }); + this->script.SetGlobal("SetIgnoreDEFClass", +[](lua_State* state) { return ::SetIgnoreDEFClass(state); }); + this->script.SetGlobal("SetIgnoreDEFRace", +[](lua_State* state) { return ::SetIgnoreDEFRace(state); }); + this->script.SetGlobal("SetIgnoreDefClass_Percent", +[](lua_State* state) { return ::SetIgnoreDefClass_Percent(state); }); + this->script.SetGlobal("SetIgnoreDefRace_Percent", +[](lua_State* state) { return ::SetIgnoreDefRace_Percent(state); }); + this->script.SetGlobal("SetIgnoreMdefClass", +[](lua_State* state) { return ::SetIgnoreMdefClass(state); }); + this->script.SetGlobal("SetIgnoreMdefRace", +[](lua_State* state) { return ::SetIgnoreMdefRace(state); }); + this->script.SetGlobal("SetInvestigate", +[](lua_State* state) { return ::SetInvestigate(state); }); + this->script.SetGlobal("SplashAttack", +[](lua_State* state) { return ::SplashAttack(state); }); + this->script.SetGlobal("SubAttrTolerace", +[](lua_State* state) { return ::SubAttrTolerace(state); }); + this->script.SetGlobal("subattrtolerace", +[](lua_State* state) { return ::subattrtolerace(state); }); + this->script.SetGlobal("SubBowAttackDamage", +[](lua_State* state) { return ::SubBowAttackDamage(state); }); + this->script.SetGlobal("SubCRIPercent_Race", +[](lua_State* state) { return ::SubCRIPercent_Race(state); }); + this->script.SetGlobal("SubDamage_CRI", +[](lua_State* state) { return ::SubDamage_CRI(state); }); + this->script.SetGlobal("SubDamage_HIT", +[](lua_State* state) { return ::SubDamage_HIT(state); }); + this->script.SetGlobal("SubDamage_Property", +[](lua_State* state) { return ::SubDamage_Property(state); }); + this->script.SetGlobal("SubDamage_SKID", +[](lua_State* state) { return ::SubDamage_SKID(state); }); + this->script.SetGlobal("SubDamage_Size", +[](lua_State* state) { return ::SubDamage_Size(state); }); + this->script.SetGlobal("SubEXPPercent_KillRace", +[](lua_State* state) { return ::SubEXPPercent_KillRace(state); }); + this->script.SetGlobal("SubExtParam", +[](lua_State* state) { return ::SubExtParam(state); }); + this->script.SetGlobal("SubGuideAttack", +[](lua_State* state) { return ::SubGuideAttack(state); }); + this->script.SetGlobal("SubHPdrain", +[](lua_State* state) { return ::SubHPdrain(state); }); + this->script.SetGlobal("SubHealModifyPercent", +[](lua_State* state) { return ::SubHealModifyPercent(state); }); + this->script.SetGlobal("SubHealValue", +[](lua_State* state) { return ::SubHealValue(state); }); + this->script.SetGlobal("SubIgnore_MRES_RacePercent", +[](lua_State* state) { return ::SubIgnore_MRES_RacePercent(state); }); + this->script.SetGlobal("SubIgnore_RES_RacePercent", +[](lua_State* state) { return ::SubIgnore_RES_RacePercent(state); }); + this->script.SetGlobal("SubMDamage_Property", +[](lua_State* state) { return ::SubMDamage_Property(state); }); + this->script.SetGlobal("SubMDamage_Size", +[](lua_State* state) { return ::SubMDamage_Size(state); }); + this->script.SetGlobal("SubMdamage_Class", +[](lua_State* state) { return ::SubMdamage_Class(state); }); + this->script.SetGlobal("SubMdamage_Race", +[](lua_State* state) { return ::SubMdamage_Race(state); }); + this->script.SetGlobal("SubMeleeAttackDamage", +[](lua_State* state) { return ::SubMeleeAttackDamage(state); }); + this->script.SetGlobal("SubMeleeAttackReflect", +[](lua_State* state) { return ::SubMeleeAttackReflect(state); }); + this->script.SetGlobal("SubNeverknockback", +[](lua_State* state) { return ::SubNeverknockback(state); }); + this->script.SetGlobal("SubRaceTolerace", +[](lua_State* state) { return ::SubRaceTolerace(state); }); + this->script.SetGlobal("SubRangeAttackDamage", +[](lua_State* state) { return ::SubRangeAttackDamage(state); }); + this->script.SetGlobal("SubReceiveItem_Equip", +[](lua_State* state) { return ::SubReceiveItem_Equip(state); }); + this->script.SetGlobal("SubReflectMagic", +[](lua_State* state) { return ::SubReflectMagic(state); }); + this->script.SetGlobal("SubReflectTolerace", +[](lua_State* state) { return ::SubReflectTolerace(state); }); + this->script.SetGlobal("SubSFCTEquipAmount", +[](lua_State* state) { return ::SubSFCTEquipAmount(state); }); + this->script.SetGlobal("SubSFCTEquipPermill", +[](lua_State* state) { return ::SubSFCTEquipPermill(state); }); + this->script.SetGlobal("SubSPconsumption", +[](lua_State* state) { return ::SubSPconsumption(state); }); + this->script.SetGlobal("subspconsumption", +[](lua_State* state) { return ::subspconsumption(state); }); + this->script.SetGlobal("SubSPdrain", +[](lua_State* state) { return ::SubSPdrain(state); }); + this->script.SetGlobal("SubSkillDelay", +[](lua_State* state) { return ::SubSkillDelay(state); }); + this->script.SetGlobal("SubSkillMDamage", +[](lua_State* state) { return ::SubSkillMDamage(state); }); + this->script.SetGlobal("SubSkillSP", +[](lua_State* state) { return ::SubSkillSP(state); }); + this->script.SetGlobal("SubSpecificSpellCastTime", +[](lua_State* state) { return ::SubSpecificSpellCastTime(state); }); + this->script.SetGlobal("SubSpellCastTime", +[](lua_State* state) { return ::SubSpellCastTime(state); }); + this->script.SetGlobal("SubSpellDelay", +[](lua_State* state) { return ::SubSpellDelay(state); }); this->script.SetGlobal("SetEquipTempValue", ::SetEquipTempValue); if (!this->script.LoadFile("LuaFiles514\\Lua Files\\EquipmentProperties\\EquipmentProperties.lub")) { diff --git a/Source/Contents/Messenger/MessengerMember.cpp b/Source/Contents/Messenger/MessengerMember.cpp index 38006636..d6a96591 100644 --- a/Source/Contents/Messenger/MessengerMember.cpp +++ b/Source/Contents/Messenger/MessengerMember.cpp @@ -1952,7 +1952,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, case 0x3D: { MessengerMember target = this->MemberAtIndex(this->selected); if (target.valid) { - g_windowMgr.sub_A8C4B0(target.accountId); + g_windowMgr.CloseMiniPartyWindow(target.accountId); } return 0; } diff --git a/Source/Contents/NavigationManager.h b/Source/Contents/NavigationManager.h index a374ddc8..88c2a55a 100644 --- a/Source/Contents/NavigationManager.h +++ b/Source/Contents/NavigationManager.h @@ -310,8 +310,8 @@ public: int NodeCount() const; void SetViewIcon(int icon); bool SetViewMode(int mode); - bool sub_B995D0(std::string name, int type, bool flag); - bool sub_B99030(std::string name, int type, unsigned char mode, bool flag, int x, int y, int id); + bool SearchNavigation(std::string name, int type, bool flag); + bool StartNavigation(std::string name, int type, unsigned char mode, bool flag, int x, int y, int id); void BuildGridLabels(); bool LoadScript(LuaScript* script); bool BuildRoute(int startX, int startY, int destX, int destY, bool collectCells); diff --git a/Source/Contents/NavigationRoute.cpp b/Source/Contents/NavigationRoute.cpp index f1972cec..308173a7 100644 --- a/Source/Contents/NavigationRoute.cpp +++ b/Source/Contents/NavigationRoute.cpp @@ -598,7 +598,7 @@ static_assert(sizeof(NavigationRouteRecord) == 0x36); // OFFSET: 0x00B99030 // FUNCTION: fn_19611 -bool CNavigationManager::sub_B99030(std::string name, int type, unsigned char mode, bool flag, int x, int y, int id) { +bool CNavigationManager::StartNavigation(std::string name, int type, unsigned char mode, bool flag, int x, int y, int id) { if (static_cast(type) > 4 || name.size() == 0) { return false; } @@ -719,7 +719,7 @@ bool CNavigationManager::sub_B99030(std::string name, int type, unsigned char mo // OFFSET: 0x00B995D0 // FUNCTION: fn_19612 -bool CNavigationManager::sub_B995D0(std::string name, int type, bool flag) { +bool CNavigationManager::SearchNavigation(std::string name, int type, bool flag) { if (static_cast(type) <= 4) { this->unknown_1264 = name; this->unknown_1248 = flag; diff --git a/Source/Contents/RenewQuestMgr.cpp b/Source/Contents/RenewQuestMgr.cpp index 072b992f..b789e517 100644 --- a/Source/Contents/RenewQuestMgr.cpp +++ b/Source/Contents/RenewQuestMgr.cpp @@ -631,7 +631,7 @@ int CRenewQuestMgr::L_AddQuestIconTooltip(lua_State* state) { // OFFSET: 0x0067B620 // FUNCTION: fn_05457 -void CRenewQuestMgr::sub_67B620(unsigned int questId) { +void CRenewQuestMgr::ShowOngoingQuestInfo(unsigned int questId) { if (auto* window = static_cast(g_windowMgr.EnsureWindow(0x2719))) { window->SetQuest(questId); } @@ -639,30 +639,30 @@ void CRenewQuestMgr::sub_67B620(unsigned int questId) { // OFFSET: 0x0067B650 // FUNCTION: fn_05458 -void CRenewQuestMgr::sub_67B650(unsigned int questId) { +void CRenewQuestMgr::ShowQuestInfo(unsigned int questId) { if (auto* window = static_cast(g_windowMgr.EnsureWindow(0x2718))) { - window->sub_A67290(0xF); - window->sub_A66FF0(questId); + window->UpdateQuestLists(0xF); + window->SelectQuest(questId); } } // OFFSET: 0x0067B690 // FUNCTION: fn_05459 -void CRenewQuestMgr::sub_67B690() { +void CRenewQuestMgr::UpdateOngoingQuestInfo() { if (auto* window = static_cast(g_windowMgr.LookupWindow(0x2719))) { - window->sub_A55B70(); + window->UpdateHuntInfo(); } } // OFFSET: 0x0067B6B0 // FUNCTION: fn_05460 -void CRenewQuestMgr::sub_67B6B0() { +void CRenewQuestMgr::UpdateQuestWindows() { if (g_windowMgr.window_0428 != nullptr) { g_windowMgr.window_0428->Invalidate(); } if (auto* window = static_cast(g_windowMgr.LookupWindow(0x2718))) { - window->sub_A67290(0xD); + window->UpdateQuestLists(0xD); } } @@ -782,7 +782,7 @@ void CRenewQuestMgr::ReadOngoingQuests(const char* buffer, unsigned int) { } if (auto* window = static_cast(g_windowMgr.LookupWindow(0x2718))) { - window->sub_A67290(0xD); + window->UpdateQuestLists(0xD); } } diff --git a/Source/Contents/RenewQuestMgr.h b/Source/Contents/RenewQuestMgr.h index 26eae08a..b620ba3f 100644 --- a/Source/Contents/RenewQuestMgr.h +++ b/Source/Contents/RenewQuestMgr.h @@ -121,10 +121,10 @@ public: void SetParameter(int key, int value); void SaveOngoingSimpleViewList(); void SaveRecommendedActiveList(); - void sub_67B620(unsigned int questId); - void sub_67B650(unsigned int questId); - void sub_67B690(); - void sub_67B6B0(); + void ShowOngoingQuestInfo(unsigned int questId); + void ShowQuestInfo(unsigned int questId); + void UpdateOngoingQuestInfo(); + void UpdateQuestWindows(); void SetOngoingQuest(unsigned int id, const RenewQuestOngoingInfo& info); }; diff --git a/Source/Contents/ReputeMgr.cpp b/Source/Contents/ReputeMgr.cpp index 05bb2be7..1a796c77 100644 --- a/Source/Contents/ReputeMgr.cpp +++ b/Source/Contents/ReputeMgr.cpp @@ -14,7 +14,7 @@ // OFFSET: 0x0050AE30 // FUNCTION: fn_00894 -bool JsonCppLoader::sub_50AE30(std::map* out) { +bool JsonCppLoader::GetReputeGroupData(std::map* out) { if (!this->loaded) { this->Fail("초기화가 되어야 합니다."); return false; @@ -74,7 +74,7 @@ bool JsonCppLoader::sub_50AE30(std::map* out) { // OFFSET: 0x0050B830 // FUNCTION: fn_00895 -bool JsonCppLoader::sub_50B830(std::map* out) { +bool JsonCppLoader::GetReputeInfoData(std::map* out) { if (!this->loaded) { this->Fail("초기화가 되어야 합니다."); return false; @@ -117,7 +117,7 @@ bool JsonCppLoader::sub_50B830(std::map* out) { // OFFSET: 0x0060DC70 // FUNCTION: fn_04294 -bool CReputeMgr::sub_60DC70(std::map& groups) { +bool CReputeMgr::LoadReputeGroupData(std::map& groups) { std::string path = "ContentData\\Repute\\ReputeGroupData.bson"; CFile file; if (!file.Open(path.c_str(), 0, true, false)) { @@ -128,12 +128,12 @@ bool CReputeMgr::sub_60DC70(std::map& groups) { std::vector buffer(data, data + file.GetSize()); JsonCppLoader loader; - if (!loader.sub_4F3C70(buffer, true)) { + if (!loader.Load(buffer, true)) { return false; } std::map records; - if (!loader.sub_50AE30(&records)) { + if (!loader.GetReputeGroupData(&records)) { return false; } @@ -146,7 +146,7 @@ bool CReputeMgr::sub_60DC70(std::map& groups) { // OFFSET: 0x0060E090 // FUNCTION: fn_04295 -bool CReputeMgr::sub_60E090(std::map& infos) { +bool CReputeMgr::LoadReputeInfoData(std::map& infos) { std::string path = "ContentData\\Repute\\ReputeInfoData.bson"; CFile file; if (!file.Open(path.c_str(), 0, true, false)) { @@ -157,12 +157,12 @@ bool CReputeMgr::sub_60E090(std::map& infos) { std::vector buffer(data, data + file.GetSize()); JsonCppLoader loader; - if (!loader.sub_4F3C70(buffer, true)) { + if (!loader.Load(buffer, true)) { return false; } std::map records; - if (!loader.sub_50B830(&records)) { + if (!loader.GetReputeInfoData(&records)) { return false; } @@ -235,8 +235,8 @@ std::vector CReputeMgr::GetAllReputes() const { // OFFSET: 0x0060DBF0 // FUNCTION: fn_04293 -bool CReputeMgr::sub_60DBF0() { - if (this->sub_60E090(this->m_infos) && this->sub_60DC70(this->m_groups)) { +bool CReputeMgr::Load() { + if (this->LoadReputeInfoData(this->m_infos) && this->LoadReputeGroupData(this->m_groups)) { return true; } diff --git a/Source/Contents/ReputeMgr.h b/Source/Contents/ReputeMgr.h index 8863f397..a38942fb 100644 --- a/Source/Contents/ReputeMgr.h +++ b/Source/Contents/ReputeMgr.h @@ -40,9 +40,9 @@ public: std::vector GetGroupNames() const; std::vector GetGroupReputes(const std::string& groupName) const; std::vector GetAllReputes() const; - bool sub_60DBF0(); - bool sub_60DC70(std::map& groups); - bool sub_60E090(std::map& infos); + bool Load(); + bool LoadReputeGroupData(std::map& groups); + bool LoadReputeInfoData(std::map& infos); void OpenRepute(std::uint64_t groupId, std::uint64_t reputeId); void SetPoint(std::uint64_t id, std::int64_t point); std::vector FindReputes(const std::string& keyword) const; diff --git a/Source/Contents/Schedule/EmotionSchedule.cpp b/Source/Contents/Schedule/EmotionSchedule.cpp index 9be7a221..129c19ce 100644 --- a/Source/Contents/Schedule/EmotionSchedule.cpp +++ b/Source/Contents/Schedule/EmotionSchedule.cpp @@ -5,7 +5,7 @@ class UICashEmotionListWnd { public: - void sub_7C7E50(); + void RefreshPackLists(); void RefreshSelection(); }; @@ -22,14 +22,14 @@ CEmotionPurchaseExpireSchedule::CEmotionPurchaseExpireSchedule(const std::uint64 // FUNCTION: fn_04717 void CEmotionPurchaseExpireSchedule::Process(const std::uint64_t& now) { CSchedule::Process(now); - if (g_cashEmotionMgr->sub_59C5A0()) { + if (g_cashEmotionMgr->RemoveExpiredPacks()) { if (g_cashEmotionListWnd) { - g_cashEmotionListWnd->sub_7C7E50(); + g_cashEmotionListWnd->RefreshPackLists(); } } int earliest = g_cashEmotionMgr->GetEarliestExpiry(); if (earliest != 0x7FFFFFFF) { - int current = g_cashEmotionMgr->sub_59FC50(); + int current = g_cashEmotionMgr->GetServerTime(); if (current < earliest) { this->interval = (static_cast(earliest) * 10000000i64 - static_cast(current) * 10000000i64) / 10000i64; return; @@ -50,7 +50,7 @@ CEmotionPurchaseUseableTimeUISchedule::CEmotionPurchaseUseableTimeUISchedule( // FUNCTION: fn_04720 void CEmotionPurchaseUseableTimeUISchedule::Process(const std::uint64_t& now) { CSchedule::Process(now); - if (!g_cashEmotionMgr->sub_59D2C0()) { + if (!g_cashEmotionMgr->UpdatePurchasedPackExpiry()) { this->active = false; } } @@ -67,11 +67,11 @@ void CEmotionSaleExpireSchedule::Process(const std::uint64_t& now) { CSchedule::Process(now); CashEmotionPackRefresh refresh = g_cashEmotionMgr->RefreshUnownedPacks(); if (refresh.changed && g_cashEmotionListWnd) { - g_cashEmotionListWnd->sub_7C7E50(); + g_cashEmotionListWnd->RefreshPackLists(); g_cashEmotionListWnd->RefreshSelection(); } if (refresh.nextTime != 0x7FFFFFFF) { - int current = g_cashEmotionMgr->sub_59FC50(); + int current = g_cashEmotionMgr->GetServerTime(); if (current < refresh.nextTime) { this->interval = (static_cast(refresh.nextTime) * 10000000i64 - static_cast(current) * 10000000i64) / 10000i64; return; diff --git a/Source/Contents/Schedule/TimeScheduler.cpp b/Source/Contents/Schedule/TimeScheduler.cpp index f2c28f99..af7115d5 100644 --- a/Source/Contents/Schedule/TimeScheduler.cpp +++ b/Source/Contents/Schedule/TimeScheduler.cpp @@ -145,7 +145,7 @@ void CTimeScheduler::Process() { // OFFSET: 0x00BA95F0 // FUNCTION: fn_19739 -void CTimeScheduler::sub_BA95F0(int value) { +void CTimeScheduler::RemoveSchedulesByKey(int value) { for (CSchedule* schedule : this->m_schedules) { if (schedule->unknown_002C == value) { schedule->active = false; diff --git a/Source/Contents/Schedule/TimeScheduler.h b/Source/Contents/Schedule/TimeScheduler.h index 16b20471..ecfad9ae 100644 --- a/Source/Contents/Schedule/TimeScheduler.h +++ b/Source/Contents/Schedule/TimeScheduler.h @@ -27,7 +27,7 @@ public: CSchedule* CreateSchedule(const std::int64_t& interval, int scheduleType); CSchedule* AddSchedule(CSchedule* schedule); void Process(); - void sub_BA95F0(int value); + void RemoveSchedulesByKey(int value); }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/Contents/SignBoard/SignBoard.cpp b/Source/Contents/SignBoard/SignBoard.cpp index 31b68e7e..9888238a 100644 --- a/Source/Contents/SignBoard/SignBoard.cpp +++ b/Source/Contents/SignBoard/SignBoard.cpp @@ -55,7 +55,7 @@ void DestroySignBoardMgr() { // OFFSET: 0x0081FE50 // FUNCTION: fn_10246 -void __fastcall sub_81FE50(CSignBoardMgr* manager) { +void __fastcall InitializeSignBoardManager(CSignBoardMgr* manager) { manager->LoadList(); manager->Initialize(); } diff --git a/Source/Contents/Skills/ClientSkills.cpp b/Source/Contents/Skills/ClientSkills.cpp index a0c7a8fd..be9f4bbe 100644 --- a/Source/Contents/Skills/ClientSkills.cpp +++ b/Source/Contents/Skills/ClientSkills.cpp @@ -29,7 +29,7 @@ char g_decodedPlayerName[64]; // OFFSET: 0x00E198F0 // FUNCTION: fn_23844 -void sub_E198F0() { +void InitMapTypeInfoTable() { CFile file; if (!file.Open("MapInfoTable.scp", 0, true, false)) { if (g_serviceType == 0) { diff --git a/Source/Contents/Skills/SkillActionAlitea.cpp b/Source/Contents/Skills/SkillActionAlitea.cpp index ecad44fc..443010d0 100644 --- a/Source/Contents/Skills/SkillActionAlitea.cpp +++ b/Source/Contents/Skills/SkillActionAlitea.cpp @@ -73,9 +73,9 @@ public: class CSkillAction_DamageWereRaptorForm : public CSkillAction_AnimalForm, public CSkillAction_Direction { public: - void sub_5A4760(int sourceActor, CGameActor* target); - __declspec(noinline) void sub_5A4930(int level, CGameActor* source); - __declspec(noinline) void sub_5A4B00(int level, CGameActor* source); + void SpawnAttack00Effect(int sourceActor, CGameActor* target); + __declspec(noinline) void SpawnAttack01Effect(int level, CGameActor* source); + __declspec(noinline) void SpawnAttack02Effect(int level, CGameActor* source); void Slot16(int level, CGameActor* source, CGameActor* target) override; bool Slot17(CGameActor* actor) override; void Slot18(CGameActor* actor) override; @@ -866,7 +866,7 @@ void CSkillAction_AT_PINION_SHOT::Slot11(int level, CGameActor* source, CGameAct // OFFSET: 0x005A7180 // FUNCTION: fn_03201 void CSkillAction_AT_PINION_SHOT::Slot15(int level, CGameActor* source, CGameActor* target) { - this->sub_5A4930(level, source); + this->SpawnAttack01Effect(level, source); } // OFFSET: 0x005A71A0 @@ -1849,7 +1849,7 @@ void CEfstAction_INSANE3::Slot00(int efstId, int value, int argument3, int argum // OFFSET: 0x005AF030 // FUNCTION: fn_03285 -bool __stdcall sub_5AF030(int) { +bool __stdcall KeepSkillAttackMotion(int) { return false; } @@ -1901,130 +1901,130 @@ void CSkillAction_AT_TEMPEST_FLAP::Slot08(int level, CGameActor* source) { // OFFSET: 0x005AF000 // FUNCTION: fn_03282 -bool sub_5AF000() { +bool SkillActionIsSupport() { return false; } // OFFSET: 0x005AF010 // FUNCTION: fn_03283 -int sub_5AF010() { +int GetSkillCastMotion() { return 8; } // OFFSET: 0x005AF020 // FUNCTION: fn_03284 -int sub_5AF020() { +int GetSkillAttackMotion() { return 7; } // OFFSET: 0x005AF040 // FUNCTION: fn_03286 -bool sub_5AF040() { +bool IsSkillWithoutMotion() { return false; } // OFFSET: 0x005AF050 // FUNCTION: fn_03287 -bool sub_5AF050() { +bool KeepSkillAttackSpeed() { return false; } // OFFSET: 0x005AF060 // FUNCTION: fn_03288 -bool sub_5AF060() { +bool SuppressSupportSkillArrow() { return false; } // OFFSET: 0x005AF070 // FUNCTION: fn_03289 -bool sub_5AF070() { +bool SuppressAttackSkillArrow() { return false; } // OFFSET: 0x005AF080 // FUNCTION: fn_03290 -void __stdcall sub_5AF080(int a, int b) { +void __stdcall OnSkillCast(int a, int b) { } // OFFSET: 0x005AF090 // FUNCTION: fn_03291 -void __stdcall sub_5AF090(int a, int b, int c) { +void __stdcall OnTargetSkillCast(int a, int b, int c) { } // OFFSET: 0x005AF0A0 // FUNCTION: fn_03292 -void __stdcall sub_5AF0A0(int a, int b, int c, int d, int e) { +void __stdcall OnGroundSkillCast(int a, int b, int c, int d, int e) { } // OFFSET: 0x005AF0B0 // FUNCTION: fn_03293 -void __stdcall sub_5AF0B0(int a, int b, int c) { +void __stdcall OnSkillEffect(int a, int b, int c) { } // OFFSET: 0x005AF0C0 // FUNCTION: fn_03294 -void __stdcall sub_5AF0C0(vector3d a, int b, int c) { +void __stdcall OnGroundSkillEffect(vector3d a, int b, int c) { } // OFFSET: 0x005AF0D0 // FUNCTION: fn_03295 -bool sub_5AF0D0() { +bool UseGroundSkillLastFrame() { return false; } // OFFSET: 0x005AF0E0 // FUNCTION: fn_03296 -int sub_5AF0E0() { +int GetSkillScopeType() { return 0; } // OFFSET: 0x005AF0F0 // FUNCTION: fn_03297 -void __stdcall sub_5AF0F0(int a, int b, int c) { +void __stdcall OnSkillHit(int a, int b, int c) { } // OFFSET: 0x005AF100 // FUNCTION: fn_03298 -void __stdcall sub_5AF100(int a, int b, int c) { +void __stdcall OnSkillDamage(int a, int b, int c) { } // OFFSET: 0x005AF110 // FUNCTION: fn_03299 -void __stdcall sub_5AF110(int a, int b, int c, int d, int e, int f) { +void __stdcall OnEfstBegin(int a, int b, int c, int d, int e, int f) { } // OFFSET: 0x005AF120 // FUNCTION: fn_03300 -void __stdcall sub_5AF120(int a, int b, int c, int d, int e) { +void __stdcall OnEfstEnd(int a, int b, int c, int d, int e) { } // OFFSET: 0x005AF130 // FUNCTION: fn_03301 -void __stdcall sub_5AF130(int a, int b, int c, int d, int e) { +void __stdcall OnEfstUpdate(int a, int b, int c, int d, int e) { } // OFFSET: 0x005AF140 // FUNCTION: fn_03302 -void __stdcall sub_5AF140(std::uint32_t* out) { +void __stdcall GetEfstBeginMessage(std::uint32_t* out) { out[0] = 0; out[1] = 0xFFFF00; } // OFFSET: 0x005AF160 // FUNCTION: fn_03303 -void __stdcall sub_5AF160(std::uint32_t* out) { +void __stdcall GetEfstEndMessage(std::uint32_t* out) { out[0] = 0; out[1] = 0xFF; } // OFFSET: 0x005AF180 // FUNCTION: fn_03304 -void __stdcall sub_5AF180(int a, int b, int c) { +void __stdcall OnSkillObjectCreate(int a, int b, int c) { } // OFFSET: 0x005AF190 // FUNCTION: fn_03305 -void __stdcall sub_5AF190(int a) { +void __stdcall OnSkillObjectRemove(int a) { } @@ -2073,7 +2073,7 @@ const float g_featherOffsets[3] = {0.0f, 0.1f, -0.1f}; // OFFSET: 0x005A4760 // FUNCTION: fn_03152 -void CSkillAction_DamageWereRaptorForm::sub_5A4760(int sourceActor, CGameActor* target) { +void CSkillAction_DamageWereRaptorForm::SpawnAttack00Effect(int sourceActor, CGameActor* target) { CGameActor* source = reinterpret_cast(sourceActor); if (source && target) { const std::uint8_t bytes[] = {0x46, 0x75, 0x73, 0x0C, 0x60, 0xAE, 0xAC, 0x1F, 0x17, 0x01}; @@ -2085,7 +2085,7 @@ void CSkillAction_DamageWereRaptorForm::sub_5A4760(int sourceActor, CGameActor* // OFFSET: 0x005A4930 // FUNCTION: fn_03153 -void CSkillAction_DamageWereRaptorForm::sub_5A4930(int sourceActor, CGameActor* target) { +void CSkillAction_DamageWereRaptorForm::SpawnAttack01Effect(int sourceActor, CGameActor* target) { CGameActor* source = reinterpret_cast(sourceActor); if (source && target) { const std::uint8_t bytes[] = {0xD2, 0x13, 0xB7, 0x32, 0x9A, 0xF0, 0x6A, 0x27, 0x82, 0x67}; @@ -2097,7 +2097,7 @@ void CSkillAction_DamageWereRaptorForm::sub_5A4930(int sourceActor, CGameActor* // OFFSET: 0x005A4B00 // FUNCTION: fn_03154 -void CSkillAction_DamageWereRaptorForm::sub_5A4B00(int sourceActor, CGameActor* target) { +void CSkillAction_DamageWereRaptorForm::SpawnAttack02Effect(int sourceActor, CGameActor* target) { CGameActor* source = reinterpret_cast(sourceActor); if (!target || !source) { return; diff --git a/Source/Contents/Skills/SkillActionDruid.cpp b/Source/Contents/Skills/SkillActionDruid.cpp index 5a3e2571..1027a778 100644 --- a/Source/Contents/Skills/SkillActionDruid.cpp +++ b/Source/Contents/Skills/SkillActionDruid.cpp @@ -68,7 +68,7 @@ public: class CSkillAction_DamageWereRaptorForm : public CSkillAction_AnimalForm, public CSkillAction_Direction { public: - void sub_5A4760(int sourceActor, CGameActor* target); + void SpawnAttack00Effect(int sourceActor, CGameActor* target); void Slot16(int level, CGameActor* source, CGameActor* target) override; bool Slot17(CGameActor* actor) override; void Slot18(CGameActor* actor) override; @@ -745,7 +745,7 @@ int CEfstAction_NATURE_PROTECTION::Slot05(int efstId, int argument4) { // FUNCTION: fn_04512 void CEfstAction_NATURE_PROTECTION::Slot00(int efstId, int value, int argument3, int argument4, CRenderObject* actor, bool argument6) { if (actor) { - static_cast(actor)->sub_CC40D0(); + static_cast(actor)->ApplyNatureProtection(); } CEfstAction_BasicAction::Slot00(efstId, value, argument3, argument4, actor, argument6); } @@ -1223,7 +1223,7 @@ void CSkillAction_DR_SHOOTING_FEATHER::Slot11(int level, CGameActor* source, CGa // OFFSET: 0x00621830 // FUNCTION: fn_04496 void CSkillAction_DR_SHOOTING_FEATHER::Slot15(int level, CGameActor* source, CGameActor* target) { - this->sub_5A4760(level, source); + this->SpawnAttack00Effect(level, source); } // OFFSET: 0x0061FF40 diff --git a/Source/Contents/Skills/SkillActionKarnos.cpp b/Source/Contents/Skills/SkillActionKarnos.cpp index 07f8fd99..def8bd81 100644 --- a/Source/Contents/Skills/SkillActionKarnos.cpp +++ b/Source/Contents/Skills/SkillActionKarnos.cpp @@ -68,8 +68,8 @@ class CSkillAction_Direction { class CSkillAction_DamageWereRaptorForm : public CSkillAction_AnimalForm, public CSkillAction_Direction { public: - void sub_5A4930(int level, CGameActor* source); - void sub_5A4B00(int level, CGameActor* source); + void SpawnAttack01Effect(int level, CGameActor* source); + void SpawnAttack02Effect(int level, CGameActor* source); }; class CSkillAction_DamageWereWolfForm : public CSkillAction_AnimalForm { @@ -637,7 +637,7 @@ int CSkillAction_KR_FEATHER_SPRINKLE::Slot02() { // OFFSET: 0x005B4240 // FUNCTION: fn_03370 void CSkillAction_KR_FEATHER_SPRINKLE::Slot15(int level, CGameActor* source, CGameActor* target) { - this->sub_5A4930(level, source); + this->SpawnAttack01Effect(level, source); } // OFFSET: 0x005B4260 @@ -663,8 +663,8 @@ void CSkillAction_KR_SHARPEN_GUST::Slot08(int level, CGameActor* source) { // OFFSET: 0x005B46D0 // FUNCTION: fn_03375 void CSkillAction_KR_SHARPEN_GUST::Slot15(int level, CGameActor* source, CGameActor* target) { - this->sub_5A4930(level, source); - this->sub_5A4B00(level, source); + this->SpawnAttack01Effect(level, source); + this->SpawnAttack02Effect(level, source); } // OFFSET: 0x005B4700 @@ -776,7 +776,7 @@ void CSkillAction_KR_SHARPEN_HAIL::Slot11(int level, CGameActor* source, CGameAc // OFFSET: 0x005B4F70 // FUNCTION: fn_03380 void CSkillAction_KR_SHARPEN_HAIL::Slot15(int level, CGameActor* source, CGameActor* target) { - this->sub_5A4930(level, source); + this->SpawnAttack01Effect(level, source); } // OFFSET: 0x005B4F90 diff --git a/Source/Contents/Sound/SoundConfiguration.cpp b/Source/Contents/Sound/SoundConfiguration.cpp index b7111638..5a293ac8 100644 --- a/Source/Contents/Sound/SoundConfiguration.cpp +++ b/Source/Contents/Sound/SoundConfiguration.cpp @@ -56,7 +56,7 @@ const char* g_renewSetupSubKey = RenewSetupSubKey(); // OFFSET: 0x00E59030 // FUNCTION: fn_24366 -int sub_E59030() { +int ReadSetup() { HKEY key; LSTATUS status = RegOpenKeyExA(HKEY_LOCAL_MACHINE, g_renewSetupSubKey, 0, KEY_QUERY_VALUE, &key); RegCloseKey(key); diff --git a/Source/Contents/WorldView/WorldViewData.cpp b/Source/Contents/WorldView/WorldViewData.cpp index e0693ea3..eefe0e96 100644 --- a/Source/Contents/WorldView/WorldViewData.cpp +++ b/Source/Contents/WorldView/WorldViewData.cpp @@ -327,7 +327,7 @@ static int gl_25167 = 0; // OFFSET: 0x006168F0 // FUNCTION: fn_04375 -void CWorldViewMgr::sub_6168F0() { +void CWorldViewMgr::LoadTextures() { const int width = g_renderer->viewport.width; if (width > 640) { if (width <= 800) { diff --git a/Source/Contents/WorldView/WorldViewData.h b/Source/Contents/WorldView/WorldViewData.h index c14007c9..52d44fc8 100644 --- a/Source/Contents/WorldView/WorldViewData.h +++ b/Source/Contents/WorldView/WorldViewData.h @@ -99,7 +99,7 @@ public: void Load(LuaScript& script); bool ScaleToScreen(); - void sub_6168F0(); + void LoadTextures(); unsigned int FindWorld(int mapId); void ResetSelection(); bool SelectField(const char* name); diff --git a/Source/File/FileCreation.cpp b/Source/File/FileCreation.cpp index ea561cac..861ce426 100644 --- a/Source/File/FileCreation.cpp +++ b/Source/File/FileCreation.cpp @@ -56,7 +56,7 @@ std::string CreateUniqueFileName(const std::string& filename) { // OFFSET: 0x0050C2A0 // FUNCTION: fn_00896 -bool JsonCppLoader::sub_50C2A0(std::map* out) { +bool JsonCppLoader::GetEZ2STREffect(std::map* out) { if (!this->loaded) { this->Fail("초기화가 되어야 합니다."); return false; diff --git a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp index c49afd9d..acd6c520 100644 --- a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp +++ b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp @@ -851,7 +851,7 @@ int UIMinimapZoomWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argum if (extension != std::string::npos) { mapName = mapName.substr(0, extension); } - g_navigationManager.sub_B99030(mapName.c_str(), 0, 5, true, town.x, town.y, 1002); + g_navigationManager.StartNavigation(mapName.c_str(), 0, 5, true, town.x, town.y, 1002); } return 0; } @@ -986,7 +986,7 @@ void UINpcTextEditDialogWnd::Paint() { } this->m_tagCtrl->SetTaggedText(std::string(this->edit->Text()), this->edit->geometry.width); - this->m_tagCtrl->sub_8962C0(); + this->m_tagCtrl->UpdateItemTags(); if (this->m_tagCtrl->unknown_011C == 0) { delete this->m_tagCtrl; this->m_tagCtrl = nullptr; @@ -2375,7 +2375,7 @@ void UINpcTextEditDialogWnd::InsertItemTag(const ITEM_INFO& item) { } this->edit->SetText(this->m_tagCtrl->AppendTag(item.DisplayName(0)).c_str()); this->edit->MoveCursorToEnd(); - this->m_tagCtrl->sub_89CFE0(item, 0x12B8A4); + this->m_tagCtrl->AddItemTag(item, 0x12B8A4); } // OFFSET: 0x008DACF0 @@ -2396,7 +2396,7 @@ void UINpcTextEditDialogWnd::InsertSkillTag(int tagId) { return; } - std::string tag = this->m_tagCtrl->sub_874A40(tagId, 0xD630A9); + std::string tag = this->m_tagCtrl->AddSkillTag(tagId, 0xD630A9); { auto* const tagCtrl = this->m_tagCtrl; std::string text = this->edit->Text(); @@ -4759,7 +4759,7 @@ void UIWhisperWnd::SaveChatLog() { // OFFSET: 0x0090C350 // FUNCTION: fn_12443 -int UISecondPasswordInputWnd::sub_90C350(unsigned int target) { +int UISecondPasswordInputWnd::FindKeypadDigit(unsigned int target) { for (int i = 0; i < 10; ++i) { if (this->m_digits[i] == target) { return i; @@ -4770,7 +4770,7 @@ int UISecondPasswordInputWnd::sub_90C350(unsigned int target) { // OFFSET: 0x0090C380 // FUNCTION: fn_12444 -void UISecondPasswordInputWnd::sub_90C380() { +void UISecondPasswordInputWnd::DisableButtons() { for (int i = 0; i < 11; ++i) { UIButton* button = this->unknown_0124[i]; button->SetDisabled(1); @@ -10034,7 +10034,7 @@ void UIEquipWnd::Slot25(int x, int y) { } else if (g_windowMgr.GetHoverWindow()->geometry.id == 493) { reinterpret_cast(ChatWindow()->m_chatEdit)->InsertItemLink(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 491) { - reinterpret_cast(g_windowMgr.unknown_0458)->sub_7FF710(item); + reinterpret_cast(g_windowMgr.unknown_0458)->InsertItemTag(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 494) { static_cast(g_windowMgr.GetHoverWindow())->InsertItemLink(item); } @@ -10709,7 +10709,7 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr packet.accountId = g_session.m_passwordWndAccountId; std::memcpy(packet.password, this->unknown_00D0, sizeof(packet.password)); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); - this->sub_90C380(); + this->DisableButtons(); break; } g_windowMgr.Confirm(LookupMessage(1887), 0, true, false, 0, "Message", 280, 120, 0); @@ -10781,7 +10781,7 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr std::memcpy(packet.password, this->unknown_00D0, sizeof(packet.password)); std::memcpy(packet.newPassword, this->unknown_00E2, sizeof(packet.newPassword)); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); - this->sub_90C380(); + this->DisableButtons(); } else { g_windowMgr.Confirm(LookupMessage(1016), 0, true, false, 0, "Message", 280, 120, 0); this->unknown_00F4 = 2; @@ -10843,13 +10843,13 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(0), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(0), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(0), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(0), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(0), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(0), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -10863,13 +10863,13 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(1), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(1), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(1), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(1), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(1), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(1), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -10883,13 +10883,13 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(2), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(2), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(2), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(2), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(2), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(2), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -10903,13 +10903,13 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(3), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(3), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(3), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(3), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(3), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(3), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -10923,13 +10923,13 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(4), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(4), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(4), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(4), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(4), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(4), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -10943,13 +10943,13 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(5), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(5), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(5), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(5), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(5), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(5), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -10963,13 +10963,13 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(6), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(6), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(6), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(6), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(6), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(6), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -10983,13 +10983,13 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(7), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(7), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(7), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(7), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(7), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(7), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -11003,13 +11003,13 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(8), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(8), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(8), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(8), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(8), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(8), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -11023,13 +11023,13 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(9), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(9), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(9), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(9), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(9), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(9), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -11083,7 +11083,7 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr packet.accountId = g_session.m_passwordWndAccountId; std::memcpy(packet.password, this->unknown_00D0, sizeof(packet.password)); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); - this->sub_90C380(); + this->DisableButtons(); break; } g_windowMgr.Confirm(LookupMessage(1887), 0, true, false, 0, "Message", 280, 120, 0); @@ -11117,7 +11117,7 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ packet.accountId = g_session.m_passwordWndAccountId; std::memcpy(packet.password, this->unknown_00D0, sizeof(packet.password)); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); - this->sub_90C380(); + this->DisableButtons(); break; } g_windowMgr.Confirm(LookupMessage(1887), 0, true, false, 0, "Message", 280, 120, 0); @@ -11183,7 +11183,7 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ packet.accountId = g_session.m_passwordWndAccountId; std::memcpy(packet.password, this->unknown_00E2, sizeof(packet.password)); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); - this->sub_90C380(); + this->DisableButtons(); break; } g_windowMgr.Confirm(LookupMessage(1016), 0, true, false, 0, "Message", 280, 120, 0); @@ -11235,13 +11235,13 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(0), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(0), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(0), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(0), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(0), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(0), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -11255,13 +11255,13 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(1), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(1), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(1), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(1), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(1), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(1), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -11275,13 +11275,13 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(2), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(2), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(2), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(2), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(2), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(2), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -11295,13 +11295,13 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(3), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(3), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(3), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(3), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(3), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(3), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -11315,13 +11315,13 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(4), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(4), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(4), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(4), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(4), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(4), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -11335,13 +11335,13 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(5), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(5), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(5), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(5), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(5), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(5), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -11355,13 +11355,13 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(6), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(6), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(6), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(6), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(6), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(6), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -11375,13 +11375,13 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(7), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(7), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(7), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(7), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(7), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(7), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -11395,13 +11395,13 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(8), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(8), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(8), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(8), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(8), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(8), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -11415,13 +11415,13 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ switch (this->unknown_00F4) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->sub_90C350(9), 0).c_str()); + std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(9), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->sub_90C350(9), 0).c_str()); + std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(9), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->sub_90C350(9), 0).c_str()); + std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(9), 0).c_str()); break; } this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); @@ -11475,7 +11475,7 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ packet.accountId = g_session.m_passwordWndAccountId; std::memcpy(packet.password, this->unknown_00D0, sizeof(packet.password)); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); - this->sub_90C380(); + this->DisableButtons(); break; } g_windowMgr.Confirm(LookupMessage(1887), 0, true, false, 0, "Message", 280, 120, 0); @@ -11687,7 +11687,7 @@ int UIFrameWnd::BuildItemName( } if (g_serviceType == 12 || g_serviceType == 14) { - *cursor += item->sub_6D5810(*cursor, capacity, 1); + *cursor += item->GetIdDisplayName(*cursor, capacity, 1); breaks->push_back(*cursor); *cursor += item->Element(*cursor, capacity, 1); breaks->push_back(*cursor); @@ -11715,7 +11715,7 @@ int UIFrameWnd::BuildItemName( } } else { if (!isEquipment()) { - *cursor += item->sub_6D5810(*cursor, capacity, 1); + *cursor += item->GetIdDisplayName(*cursor, capacity, 1); breaks->push_back(*cursor); if (withSlots == 1) { *cursor += item->Slots(*cursor, capacity, 1); @@ -11736,7 +11736,7 @@ int UIFrameWnd::BuildItemName( if (item->HasCards()) { *cursor += item->Prefixes(*cursor, capacity, 1); breaks->push_back(*cursor); - *cursor += item->sub_6D5810(*cursor, capacity, 1); + *cursor += item->GetIdDisplayName(*cursor, capacity, 1); breaks->push_back(*cursor); *cursor += item->Suffixes(*cursor, capacity, 1); breaks->push_back(*cursor); @@ -11748,7 +11748,7 @@ int UIFrameWnd::BuildItemName( } if (!item->HasSpecialCard()) { - *cursor += item->sub_6D5810(*cursor, capacity, 1); + *cursor += item->GetIdDisplayName(*cursor, capacity, 1); breaks->push_back(*cursor); if (withSlots == 1) { *cursor += item->Slots(*cursor, capacity, 1); @@ -11759,7 +11759,7 @@ int UIFrameWnd::BuildItemName( if (g_serviceType == 12 || g_serviceType == 14) { if (g_serviceType == 12) { - *cursor += item->sub_6D5810(*cursor, capacity, 1); + *cursor += item->GetIdDisplayName(*cursor, capacity, 1); breaks->push_back(*cursor); *cursor += item->Element(*cursor, capacity, 1); breaks->push_back(*cursor); @@ -11767,7 +11767,7 @@ int UIFrameWnd::BuildItemName( } else { *cursor += item->Star(*cursor, capacity, 1); breaks->push_back(*cursor); - *cursor += item->sub_6D5810(*cursor, capacity, 1); + *cursor += item->GetIdDisplayName(*cursor, capacity, 1); breaks->push_back(*cursor); *cursor += item->Element(*cursor, capacity, 1); } @@ -11804,7 +11804,7 @@ int UIFrameWnd::BuildItemName( if (!splitCreator) { *cursor += item->Element(*cursor, capacity, 1); breaks->push_back(*cursor); - *cursor += item->sub_6D5810(*cursor, capacity, 1); + *cursor += item->GetIdDisplayName(*cursor, capacity, 1); breaks->push_back(*cursor); return 1; } @@ -11813,7 +11813,7 @@ int UIFrameWnd::BuildItemName( breaks->push_back(*cursor); *cursor += item->Element(*cursor, capacity, 1); breaks->push_back(*cursor); - *cursor += item->sub_6D5810(*cursor, capacity, 1); + *cursor += item->GetIdDisplayName(*cursor, capacity, 1); breaks->push_back(*cursor); return 1; } @@ -12097,7 +12097,7 @@ int UITipboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in static_cast(g_windowMgr.GetHoverWindow())->InsertItemTag(id); break; case 0x1EB: - static_cast(g_windowMgr.unknown_0458)->sub_7FF940(id); + static_cast(g_windowMgr.unknown_0458)->InsertSkillTag(id); break; case 0x1EC: static_cast(g_windowMgr.unknown_0318)->InsertSkillTag(id); diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.cpp b/Source/UI/AdventureGuide/UIAdventureGuide.cpp index 0f531bc4..e10381ff 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.cpp +++ b/Source/UI/AdventureGuide/UIAdventureGuide.cpp @@ -2062,9 +2062,9 @@ void CUIItem::RequestNavigation() { } if (x != -1 && y != -1) { - g_navigationManager.sub_B99030(name, 0, 5, false, x, y, 1002); + g_navigationManager.StartNavigation(name, 0, 5, false, x, y, 1002); } else { - g_navigationManager.sub_B99030(name, 1, 5, false, -1, -1, 1002); + g_navigationManager.StartNavigation(name, 1, 5, false, -1, -1, 1002); } } @@ -2082,9 +2082,9 @@ void CUIQuest::RequestNavigation() { } if (x != -1 && y != -1) { - g_navigationManager.sub_B99030(name, 0, 5, false, x, y, 1002); + g_navigationManager.StartNavigation(name, 0, 5, false, x, y, 1002); } else { - g_navigationManager.sub_B99030(name, 1, 5, false, -1, -1, 1002); + g_navigationManager.StartNavigation(name, 1, 5, false, -1, -1, 1002); } } diff --git a/Source/UI/Buttons/UIDescriptRace.h b/Source/UI/Buttons/UIDescriptRace.h index 7419d135..121e9087 100644 --- a/Source/UI/Buttons/UIDescriptRace.h +++ b/Source/UI/Buttons/UIDescriptRace.h @@ -26,7 +26,7 @@ public: void Slot25(int x, int y) override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; void Paint() override; - void sub_8A0B10(); + void DrawRaceDescription(); /* 0120 */ int m_race; /* 0124 */ UIDescriptRaceText m_text; diff --git a/Source/UI/Buttons/UITextButton.cpp b/Source/UI/Buttons/UITextButton.cpp index 7d17d369..aca16625 100644 --- a/Source/UI/Buttons/UITextButton.cpp +++ b/Source/UI/Buttons/UITextButton.cpp @@ -623,7 +623,7 @@ void UIStaticItem::Slot28(int, int) { char text[260]; std::memset(text, 0, sizeof(text)); int capacity = sizeof(text); - this->m_item.sub_6D5810(text, capacity, 0); + this->m_item.GetIdDisplayName(text, capacity, 0); if (std::strlen(text) == 0) { return; @@ -753,7 +753,7 @@ void UIChatHisBox::Resize(int width, int height, bool flag) { const int oldWidth = this->geometry.width; this->Resize(width, height); if (oldWidth != this->geometry.width && flag) { - this->sub_89C080(); + this->RebuildHistory(); } } @@ -2703,7 +2703,7 @@ void UIDescriptRace::Slot25(int, int) { // FUNCTION: fn_11358 void UIDescriptRace::Paint() { UIBitmapButton::Paint(); - this->sub_8A0B10(); + this->DrawRaceDescription(); } // OFFSET: 0x00890330 @@ -2747,7 +2747,7 @@ void UIShowAndEditTimeCtrl::Paint() { // OFFSET: 0x008906C0 // FUNCTION: fn_11423 -void __fastcall sub_8906C0(UINaviLinkButton* button, void*, int x, int y) { +void __fastcall ActivateNaviLink(UINaviLinkButton* button, void*, int x, int y) { button->UINaviLinkButton::Slot25(x, y); } diff --git a/Source/UI/CashEmotion/UICashEmotionListWnd.h b/Source/UI/CashEmotion/UICashEmotionListWnd.h index ac4aed2a..713cf061 100644 --- a/Source/UI/CashEmotion/UICashEmotionListWnd.h +++ b/Source/UI/CashEmotion/UICashEmotionListWnd.h @@ -29,7 +29,7 @@ public: UIBitmapButton* CreateButton(int x, int y, int width, int height, int id, const char* format, bool hasDisabled); void RefreshCurrentList(); __declspec(noinline) void ShowPack(int packId); - void sub_7C7E50(); + void RefreshPackLists(); __declspec(noinline) void ResetLists(); int SetPeriod(int packId); void SetTab(char tab); diff --git a/Source/UI/CashShop/UICashShopWnd.cpp b/Source/UI/CashShop/UICashShopWnd.cpp index 507ac234..1b784a1b 100644 --- a/Source/UI/CashShop/UICashShopWnd.cpp +++ b/Source/UI/CashShop/UICashShopWnd.cpp @@ -438,9 +438,9 @@ void UICashShopWnd::Paint() { this->DrawTitleBar(false, LookupMessage(0xCD8), 0); if (this->m_pageCount == 0) { - this->sub_A84400(0xF7, 0x1EE, std::string("0 / 0"), 0x2B, 0, 6, 0, 0xC, 0x6B2921, 0); + this->DrawWrappedFormattedText(0xF7, 0x1EE, std::string("0 / 0"), 0x2B, 0, 6, 0, 0xC, 0x6B2921, 0); } else { - this->sub_A84400(0xF7, 0x1EE, FormatOwnedString("^b%d^/b / %d", this->m_page + 1, this->m_pageCount), 0x2B, 0, 6, 0, 0xC, 0x6B2921, 0); + this->DrawWrappedFormattedText(0xF7, 0x1EE, FormatOwnedString("^b%d^/b / %d", this->m_page + 1, this->m_pageCount), 0x2B, 0, 6, 0, 0xC, 0x6B2921, 0); } if (!g_session.unknown_5912) { diff --git a/Source/UI/Chat/UINewChatWnd.cpp b/Source/UI/Chat/UINewChatWnd.cpp index c27f5d83..0e5fec6f 100644 --- a/Source/UI/Chat/UINewChatWnd.cpp +++ b/Source/UI/Chat/UINewChatWnd.cpp @@ -74,7 +74,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i this->m_tabControl->RemoveTab(this->m_currentTab); this->m_tabWidth = this->m_tabControl->geometry.width / names.size(); - UISubChatHisWnd* window = static_cast(g_windowMgr.sub_A97580(static_cast(g_windowMgr.retainedWindows.size()), -1, -1, 0, 0)); + UISubChatHisWnd* window = static_cast(g_windowMgr.OpenSubChatWindow(static_cast(g_windowMgr.retainedWindows.size()), -1, -1, 0, 0)); if (window == nullptr) { return 0; } @@ -516,7 +516,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i info.name += _itoa(total + 1, number, 10); if ((noSubCount + 1) * this->m_tabWidth > this->geometry.width - 0x5A) { g_session.m_subChatWnds[subCount] = info; - g_windowMgr.sub_A97580(static_cast(g_windowMgr.retainedWindows.size()), -1, -1, 0, 0); + g_windowMgr.OpenSubChatWindow(static_cast(g_windowMgr.retainedWindows.size()), -1, -1, 0, 0); } else { g_session.m_noSubChatWnds[noSubCount] = info; this->m_tabControl->AddTab(info.name.c_str(), ""); diff --git a/Source/UI/Dialogs/UIEditctrlWnd.cpp b/Source/UI/Dialogs/UIEditctrlWnd.cpp index a0a03bde..c0562ef4 100644 --- a/Source/UI/Dialogs/UIEditctrlWnd.cpp +++ b/Source/UI/Dialogs/UIEditctrlWnd.cpp @@ -434,7 +434,7 @@ int UIMiniMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 if (extension != std::string::npos) { mapName = mapName.substr(0, extension); } - g_navigationManager.sub_B99030(mapName.c_str(), 0, 5, true, town.x, town.y, 1002); + g_navigationManager.StartNavigation(mapName.c_str(), 0, 5, true, town.x, town.y, 1002); } return 0; } @@ -446,7 +446,7 @@ int UIMiniMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 if (extension != std::string::npos) { mapName = mapName.substr(0, extension); } - g_navigationManager.sub_B99030(mapName.c_str(), 0, 5, true, mark->second.x, mark->second.y, 1002); + g_navigationManager.StartNavigation(mapName.c_str(), 0, 5, true, mark->second.x, mark->second.y, 1002); return 0; } return 0; diff --git a/Source/UI/Dialogs/UIPasswordWnd.cpp b/Source/UI/Dialogs/UIPasswordWnd.cpp index 5b16cbc1..f0393dca 100644 --- a/Source/UI/Dialogs/UIPasswordWnd.cpp +++ b/Source/UI/Dialogs/UIPasswordWnd.cpp @@ -17,7 +17,7 @@ UIPasswordWnd::UIPasswordWnd() : UIItemDropCntWnd() {} // OFFSET: 0x0090C970 // FUNCTION: fn_12451 -void UISecondPasswordInputWnd::sub_90C970(int value) { +void UISecondPasswordInputWnd::SetInputMode(int value) { this->unknown_011C = value; if (value == 0) { this->unknown_0164->SetText(LookupMessage(0xa06), 0); @@ -128,7 +128,7 @@ void UISecondPasswordInputWnd::CreateKeypad(unsigned int seed) { // OFFSET: 0x0090DE10 // FUNCTION: fn_12454 -void UISecondPasswordInputWnd::sub_90DE10() { +void UISecondPasswordInputWnd::EnableKeypad() { UIBitmapButton** slot = this->unknown_0124; for (int remaining = 11; remaining != 0; --remaining) { UIButton* button = *slot; diff --git a/Source/UI/Dialogs/UIPasswordWnd.h b/Source/UI/Dialogs/UIPasswordWnd.h index 714a964a..7eee169b 100644 --- a/Source/UI/Dialogs/UIPasswordWnd.h +++ b/Source/UI/Dialogs/UIPasswordWnd.h @@ -62,11 +62,11 @@ public: void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; void ShuffleKeypad(); - int sub_90C350(unsigned int target); - void sub_90C380(); - void sub_90C970(int value); + int FindKeypadDigit(unsigned int target); + void DisableButtons(); + void SetInputMode(int value); void CreateKeypad(unsigned int seed); - void sub_90DE10(); + void EnableKeypad(); /* 010C */ int unknown_010C; /* 0110 */ unsigned char m_digits[10]; diff --git a/Source/UI/Edit/ItemTagRetirement.cpp b/Source/UI/Edit/ItemTagRetirement.cpp index 9dba4576..0b90dc2f 100644 --- a/Source/UI/Edit/ItemTagRetirement.cpp +++ b/Source/UI/Edit/ItemTagRetirement.cpp @@ -214,7 +214,7 @@ void UIItemTagOnMail::SetLines(const std::vector& lines) { // OFFSET: 0x0089CFE0 // FUNCTION: fn_11597 -void UIItemTagCtrl::sub_89CFE0(const ITEM_INFO& item, unsigned int color) { +void UIItemTagCtrl::AddItemTag(const ITEM_INFO& item, unsigned int color) { std::string tag = "<"; tag += item.DisplayName(0); tag += ">"; @@ -325,7 +325,7 @@ bool UIItemTagOnMegaPhone::CanInsertTag(const std::string& name, int width) { // OFFSET: 0x008962C0 // FUNCTION: fn_11517 -void UIItemTagCtrl::sub_8962C0() { +void UIItemTagCtrl::UpdateItemTags() { this->unknown_0140.clear(); if (this->unknown_011C != static_cast(this->tags.size()) && this->SyncTagsWithText()) { this->unknown_011C = static_cast(this->tags.size()); diff --git a/Source/UI/Edit/UIEditBoxEx.cpp b/Source/UI/Edit/UIEditBoxEx.cpp index 451820ec..b86e20ff 100644 --- a/Source/UI/Edit/UIEditBoxEx.cpp +++ b/Source/UI/Edit/UIEditBoxEx.cpp @@ -612,7 +612,7 @@ void CUIEditCtrlEx::SetText(const char* value) { } if (this->text.find(s_editExItemLinkOpen) != std::string::npos || this->text.find(s_editExItemLinkClose) != std::string::npos) { - this->sub_869810(this->text.c_str()); + this->SetLinkedText(this->text.c_str()); } this->selectedAll = 1; diff --git a/Source/UI/Edit/UIEditCtrl.cpp b/Source/UI/Edit/UIEditCtrl.cpp index 728a931c..1ec31ac6 100644 --- a/Source/UI/Edit/UIEditCtrl.cpp +++ b/Source/UI/Edit/UIEditCtrl.cpp @@ -279,7 +279,7 @@ void UIEditCtrl::Slot24(int) { // OFFSET: 0x0085E400 // FUNCTION: fn_10828 void UIWhisperEditCtrl::Slot24(int retained) { - this->sub_86A060(); + this->AddHistory(); this->Synchronize(); this->Invalidate(); } @@ -630,7 +630,7 @@ void UIChatEditCtrl::PushHistory() { // OFFSET: 0x0086A060 // FUNCTION: fn_10976 -void UIWhisperEditCtrl::sub_86A060() { +void UIWhisperEditCtrl::AddHistory() { if (this->Length() == 0) { this->historyIndex = static_cast(this->history.size()); return; @@ -3780,7 +3780,7 @@ bool ItemTypeNameLess::operator()(const ITEM_INFO& left, const ITEM_INFO& right) // OFFSET: 0x00996870 // FUNCTION: fn_13470 bool UIItemStoreSubWnd::Sort1() { - if (!this->sub_996950()) { + if (!this->UpdateItemNames1()) { return false; } this->items.sort(); @@ -3790,7 +3790,7 @@ bool UIItemStoreSubWnd::Sort1() { // OFFSET: 0x009968B0 // FUNCTION: fn_13471 bool UIItemStoreSubWnd::Sort2() { - if (!this->sub_996AF0()) { + if (!this->UpdateItemNames2()) { return false; } this->items.sort(); @@ -3800,7 +3800,7 @@ bool UIItemStoreSubWnd::Sort2() { // OFFSET: 0x009968F0 // FUNCTION: fn_13472 bool UIItemStoreSubWnd::Sort3() { - if (!this->sub_996C90()) { + if (!this->UpdateItemNames3()) { return false; } this->items.sort(); @@ -3810,7 +3810,7 @@ bool UIItemStoreSubWnd::Sort3() { // OFFSET: 0x00995CF0 // FUNCTION: fn_13463 bool UIItemStoreSubWnd::SortReversed1() { - if (!this->sub_996950()) { + if (!this->UpdateItemNames1()) { return false; } this->items.sort(); @@ -3821,7 +3821,7 @@ bool UIItemStoreSubWnd::SortReversed1() { // OFFSET: 0x00995D50 // FUNCTION: fn_13464 bool UIItemStoreSubWnd::SortReversed2() { - if (!this->sub_996AF0()) { + if (!this->UpdateItemNames2()) { return false; } this->items.sort(); @@ -3832,7 +3832,7 @@ bool UIItemStoreSubWnd::SortReversed2() { // OFFSET: 0x00995DB0 // FUNCTION: fn_13465 bool UIItemStoreSubWnd::SortReversed3() { - if (!this->sub_996C90()) { + if (!this->UpdateItemNames3()) { return false; } this->items.sort(); @@ -3928,7 +3928,7 @@ int UIMerchantShopMakeWnd::CommitPrice(int next) { ITEM_INFO item = g_session.GetItem1768At(this->editIndex); char name[128]; int capacity = 128; - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); std::string message = FormatOwnedString(LookupMessage(2473), name); const int high = static_cast(price / std::atoi(LookupMessage(2474))); @@ -3983,7 +3983,7 @@ void UIMerchantShopMakeWnd::PrintBuyList() { for (unsigned index = 0; index < this->items.size(); ++index, ++it) { int capacity = 256; - it->sub_6D5810(name, capacity, 0); + it->GetIdDisplayName(name, capacity, 0); std::sprintf(text, "%s ", this->priceEdits[index]->Text()); g_session.IsNumberWithCommas(text); @@ -4396,7 +4396,7 @@ std::string UIEditCtrl3::PlaceLineLinks(const char* line, std::string& text, con // OFFSET: 0x00869810 // FUNCTION: fn_10973 -void UIEditCtrl3::sub_869810(const char* value) { +void UIEditCtrl3::SetLinkedText(const char* value) { std::string resolved = this->ResolveItemLinks(std::string(value, std::strlen(value))); std::vector lines; @@ -5090,7 +5090,7 @@ void UIMerchantShopMakeWnd::Slot10(int x, int y, std::intptr_t value) { // OFFSET: 0x00972E60 // FUNCTION: fn_13281 -std::vector* sub_972E60(std::vector* result) { +std::vector* BuildItemPurchaseReplayRecords(std::vector* result) { new (result) std::vector(); const auto first = BuildReplayTaggedRecord(0x50DC, nullptr, 0); result->insert(result->end(), first.begin(), first.end()); @@ -5120,7 +5120,7 @@ std::vector UIItemSellWnd2::BuildReplayRecords() { // OFFSET: 0x00973080 // FUNCTION: fn_13283 -std::vector* sub_973080(std::vector* result) { +std::vector* BuildItemSellReplayRecords(std::vector* result) { new (result) std::vector(); const auto first = BuildReplayTaggedRecord(0x510E, nullptr, 0); result->insert(result->end(), first.begin(), first.end()); @@ -5131,7 +5131,7 @@ std::vector* sub_973080(std::vector* result) { // OFFSET: 0x00973170 // FUNCTION: fn_13284 -std::vector* sub_973170(std::vector* result) { +std::vector* BuildItemStoreReplayRecords(std::vector* result) { new (result) std::vector(); const auto first = BuildReplayTaggedRecord(0x51A4, nullptr, 0); result->insert(result->end(), first.begin(), first.end()); @@ -5224,7 +5224,7 @@ std::vector UIMerchantItemShopWnd::BuildReplayRecords() { // OFFSET: 0x00973670 // FUNCTION: fn_13288 -std::vector* sub_973670(std::vector* result) { +std::vector* BuildMerchantMirrorItemReplayRecords(std::vector* result) { new (result) std::vector(); const auto first = BuildReplayTaggedRecord(0x5398, nullptr, 0); result->insert(result->end(), first.begin(), first.end()); @@ -8845,7 +8845,7 @@ void UIChatEditCtrl::InsertItemLink(const ITEM_INFO& item) { const std::string tag = this->unknown_0144->AppendTag(name); g_serverLanguage->ResetInput(); g_serverLanguage->Insert(tag.c_str()); - this->unknown_0144->sub_89CFE0(item, 0x12B8A4); + this->unknown_0144->AddItemTag(item, 0x12B8A4); } // OFFSET: 0x00980340 @@ -10006,7 +10006,7 @@ void UIItemWnd::RefreshItems() { // OFFSET: 0x00995E10 // FUNCTION: fn_13466 bool UIItemStoreSubWnd::FilterByName1(std::string query) { - if (!this->sub_996950()) { + if (!this->UpdateItemNames1()) { return false; } @@ -10025,7 +10025,7 @@ bool UIItemStoreSubWnd::FilterByName1(std::string query) { // OFFSET: 0x00996090 // FUNCTION: fn_13467 bool UIItemStoreSubWnd::FilterByName2(std::string query) { - if (!this->sub_996AF0()) { + if (!this->UpdateItemNames2()) { return false; } @@ -10044,7 +10044,7 @@ bool UIItemStoreSubWnd::FilterByName2(std::string query) { // OFFSET: 0x00996440 // FUNCTION: fn_13468 bool UIItemStoreSubWnd::FilterByName3(std::string query) { - if (!this->sub_996C90()) { + if (!this->UpdateItemNames3()) { return false; } @@ -10062,7 +10062,7 @@ bool UIItemStoreSubWnd::FilterByName3(std::string query) { // OFFSET: 0x00996950 // FUNCTION: fn_13474 -bool UIItemStoreSubWnd::sub_996950() { +bool UIItemStoreSubWnd::UpdateItemNames1() { if (this->items.empty()) { return false; } @@ -10083,7 +10083,7 @@ bool UIItemStoreSubWnd::sub_996950() { // OFFSET: 0x00996AF0 // FUNCTION: fn_13475 -bool UIItemStoreSubWnd::sub_996AF0() { +bool UIItemStoreSubWnd::UpdateItemNames2() { if (this->items.empty()) { return false; } @@ -10104,7 +10104,7 @@ bool UIItemStoreSubWnd::sub_996AF0() { // OFFSET: 0x00996C90 // FUNCTION: fn_13476 -bool UIItemStoreSubWnd::sub_996C90() { +bool UIItemStoreSubWnd::UpdateItemNames3() { if (this->items.empty()) { return false; } @@ -10471,16 +10471,16 @@ void UIMerchantShopMakeWnd::PrintSellList() { if (item.HasCards()) { cursor += item.Prefixes(cursor, capacity, 1); - cursor += item.sub_6D5810(cursor, capacity, 1); + cursor += item.GetIdDisplayName(cursor, capacity, 1); cursor += item.Suffixes(cursor, capacity, 1); item.Slots(cursor, capacity, 1); } else if (item.HasSpecialCard()) { cursor += item.Star(cursor, capacity, 1); cursor += item.Creator(cursor, capacity, 1); cursor += item.Element(cursor, capacity, 1); - item.sub_6D5810(cursor, capacity, 1); + item.GetIdDisplayName(cursor, capacity, 1); } else { - cursor += item.sub_6D5810(cursor, capacity, 1); + cursor += item.GetIdDisplayName(cursor, capacity, 1); item.Slots(cursor, capacity, 1); } @@ -10536,7 +10536,7 @@ void UIItemWnd::Slot25(int x, int y) { } else if (g_windowMgr.GetHoverWindow()->geometry.id == 493) { reinterpret_cast(ChatWindow()->m_chatEdit)->InsertItemLink(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 491) { - reinterpret_cast(g_windowMgr.unknown_0458)->sub_7FF710(item); + reinterpret_cast(g_windowMgr.unknown_0458)->InsertItemTag(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 494) { static_cast(g_windowMgr.GetHoverWindow())->InsertItemLink(item); } @@ -10573,7 +10573,7 @@ void UIMerchantItemWnd::Slot25(int x, int y) { } else if (g_windowMgr.GetHoverWindow()->geometry.id == 493) { reinterpret_cast(ChatWindow()->m_chatEdit)->InsertItemLink(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 491) { - reinterpret_cast(g_windowMgr.unknown_0458)->sub_7FF710(item); + reinterpret_cast(g_windowMgr.unknown_0458)->InsertItemTag(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 494) { static_cast(g_windowMgr.GetHoverWindow())->InsertItemLink(item); } diff --git a/Source/UI/Edit/UIEditCtrl.h b/Source/UI/Edit/UIEditCtrl.h index 33db422e..07fc7ed3 100644 --- a/Source/UI/Edit/UIEditCtrl.h +++ b/Source/UI/Edit/UIEditCtrl.h @@ -115,7 +115,7 @@ public: int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; void SetText(const char* value) override; void PaintText() override; - void sub_869810(const char* value); + void SetLinkedText(const char* value); void Slot35(int value) override; void Trim() override; virtual void UpdateScrollBar(); @@ -232,7 +232,7 @@ public: void Slot24(int retained) override; int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; void SetText(const char* value) override; - void sub_86A060(); + void AddHistory(); /* 011C */ std::vector history; /* 0128 */ int historyIndex; }; diff --git a/Source/UI/Edit/UIEditLinks.cpp b/Source/UI/Edit/UIEditLinks.cpp index 4ab6a03a..9a922492 100644 --- a/Source/UI/Edit/UIEditLinks.cpp +++ b/Source/UI/Edit/UIEditLinks.cpp @@ -222,7 +222,7 @@ void UIChatEditCtrl::InsertItemTag(int tagId) { return; } - const std::string tag = this->unknown_0144->sub_874A40(tagId, 0x7F00E4); + const std::string tag = this->unknown_0144->AddSkillTag(tagId, 0x7F00E4); const std::string combined = this->text + tag; g_serverLanguage->ResetInput(); g_serverLanguage->Insert(combined.c_str()); diff --git a/Source/UI/Edit/UIEditVariants.cpp b/Source/UI/Edit/UIEditVariants.cpp index 977c9fd0..fc83c36c 100644 --- a/Source/UI/Edit/UIEditVariants.cpp +++ b/Source/UI/Edit/UIEditVariants.cpp @@ -1148,7 +1148,7 @@ void UIChatEditCtrl::Paint() { if (tag != nullptr) { tag->SetTaggedText(this->text, this->geometry.width); tag = this->unknown_0144; - tag->sub_8962C0(); + tag->UpdateItemTags(); tag = this->unknown_0144; const int span = static_cast(tag->unknown_0140.size() - tag->taggedText.size()); this->unknown_00F0 = span > 0 ? span : 0; @@ -1173,7 +1173,7 @@ void UIEditCtrl3::SetText(const char* value) { this->SelectAll(); if (this->text.find("") != std::string::npos || this->text.find("") != std::string::npos) { - this->sub_869810(this->text.c_str()); + this->SetLinkedText(this->text.c_str()); } if (this->parent != nullptr) { diff --git a/Source/UI/Edit/UIItemTagCtrl.h b/Source/UI/Edit/UIItemTagCtrl.h index 16b0ec8f..870e3653 100644 --- a/Source/UI/Edit/UIItemTagCtrl.h +++ b/Source/UI/Edit/UIItemTagCtrl.h @@ -26,9 +26,9 @@ public: bool SyncTagsWithText(); bool RemoveInvalidTag(std::list::iterator& entry); void SetTaggedText(const std::string& text, int width); - void sub_8962C0(); - void sub_89CFE0(const ITEM_INFO& item, unsigned int color); - std::string sub_874A40(int tagId, unsigned int color); + void UpdateItemTags(); + void AddItemTag(const ITEM_INFO& item, unsigned int color); + std::string AddSkillTag(int tagId, unsigned int color); /* 011C */ int unknown_011C; /* 0120 */ std::list tags; diff --git a/Source/UI/GameSettings/GameSettingsUI.cpp b/Source/UI/GameSettings/GameSettingsUI.cpp index 16c67d03..fe3a19a7 100644 --- a/Source/UI/GameSettings/GameSettingsUI.cpp +++ b/Source/UI/GameSettings/GameSettingsUI.cpp @@ -1918,7 +1918,7 @@ void CUIGameSettingsUI::Slot25(int x, int y) { // OFFSET: 0x00A3F0F0 // FUNCTION: fn_15939 -void CUIGameSettingsUI::sub_A3F0F0() { +void CUIGameSettingsUI::OnTitleIconClick() { } // OFFSET: 0x00A3F100 @@ -1927,7 +1927,7 @@ void CUIGameSettingsUI::OnApply() { const bool modified = this->m_graphicsPage->IsModified(); if (g_windowMgr.Confirm(LookupMessage(modified ? 3168 : 3167), 2, true, false, 0, "Message", 280, 120, 0) != 188) { this->m_graphicsPage->ApplySettings(); - this->sub_A421E0(); + this->UpdateApplyButton(); } } @@ -1952,27 +1952,27 @@ __declspec(noinline) bool CUIGameSettingsUI::IsTab4Selected() { // OFFSET: 0x00A43380 // FUNCTION: fn_16024 -void CUIGameSettingsUI::sub_A43380() { +void CUIGameSettingsUI::OnBasicTabClick() { } // OFFSET: 0x00A43390 // FUNCTION: fn_16025 -void CUIGameSettingsUI::sub_A43390() { +void CUIGameSettingsUI::OnControlTabClick() { } // OFFSET: 0x00A433A0 // FUNCTION: fn_16026 -void CUIGameSettingsUI::sub_A433A0() { +void CUIGameSettingsUI::OnEffectTabClick() { } // OFFSET: 0x00A433B0 // FUNCTION: fn_16027 -void CUIGameSettingsUI::sub_A433B0() { +void CUIGameSettingsUI::OnEtcTabClick() { } // OFFSET: 0x00A433C0 // FUNCTION: fn_16028 -void CUIGameSettingsUI::sub_A433C0() { +void CUIGameSettingsUI::OnGraphicsTabClick() { } // OFFSET: 0x00A42FC0 @@ -1984,7 +1984,7 @@ void GameSettingsUI::CUIGroupGraphicsAPI::Apply() { // OFFSET: 0x00A404D0 // FUNCTION: fn_15973 -void sub_A404D0() { +void SetNormalProcessPriority() { dwPriorityClass = NORMAL_PRIORITY_CLASS; HANDLE process = GetCurrentProcess(); SetPriorityClass(process, NORMAL_PRIORITY_CLASS); @@ -1992,7 +1992,7 @@ void sub_A404D0() { // OFFSET: 0x00A421E0 // FUNCTION: fn_16013 -void CUIGameSettingsUI::sub_A421E0() { +void CUIGameSettingsUI::UpdateApplyButton() { bool visible = false; if (this->m_tab->current && this->m_tab->current->geometry.id == 3) { GameSettingsUI::CUIGraphicsPage* page = this->m_graphicsPage; @@ -2013,45 +2013,45 @@ void CUIGameSettingsUI::SelectTab4() { // OFFSET: 0x00A41E50 // FUNCTION: fn_16004 -void sub_A41E50(int option) { +void OnFullscreenOptionChanged(int option) { CUIGameSettingsUI* wnd = dynamic_cast(g_windowMgr.LookupWindow(0x271E)); if (wnd) { - wnd->sub_A421E0(); + wnd->UpdateApplyButton(); } } // OFFSET: 0x00A41FA0 // FUNCTION: fn_16008 -void sub_A41FA0(int option) { +void OnTrilinearOptionChanged(int option) { CUIGameSettingsUI* wnd = dynamic_cast(g_windowMgr.LookupWindow(0x271E)); if (wnd) { - wnd->sub_A421E0(); + wnd->UpdateApplyButton(); } } // OFFSET: 0x00A43000 // FUNCTION: fn_16022 -void sub_A43000(int option) { +void OnSpriteDetailLevelChanged(int option) { CUIGameSettingsUI* wnd = dynamic_cast(g_windowMgr.LookupWindow(0x271E)); if (wnd) { - wnd->sub_A421E0(); + wnd->UpdateApplyButton(); } } // OFFSET: 0x00A43040 // FUNCTION: fn_16023 -void sub_A43040(int option) { +void OnTextureDetailLevelChanged(int option) { CUIGameSettingsUI* wnd = dynamic_cast(g_windowMgr.LookupWindow(0x271E)); if (wnd) { - wnd->sub_A421E0(); + wnd->UpdateApplyButton(); } } // OFFSET: 0x00A433D0 // FUNCTION: fn_16029 -void CUIGameSettingsUI::sub_A433D0(UIWindow* window) { +void CUIGameSettingsUI::OnTabChanged(UIWindow* window) { this->m_pageContainer->Show(window != this->m_tab->FindChildById(3)); - this->sub_A421E0(); + this->UpdateApplyButton(); } // OFFSET: 0x00A3F9B0 @@ -2111,28 +2111,28 @@ void ToggleGameSettingsTab4() { // OFFSET: 0x00AAB070 // FUNCTION: fn_17277 -void UIWindowMgr::sub_AAB070(int option) { +void UIWindowMgr::RefreshGameSettingOption(int option) { CUIGameSettingsUI* settings = static_cast(this->LookupWindow(0x271E)); if (settings) { - settings->sub_A43590(option); + settings->RefreshOption(option); } } // OFFSET: 0x00AAB090 // FUNCTION: fn_17278 -void UIWindowMgr::sub_AAB090() { +void UIWindowMgr::RefreshGameSettings() { CUIGameSettingsUI* settings = static_cast(this->LookupWindow(0x271E)); if (settings) { - settings->sub_A43BA0(); + settings->RefreshOptions(); } } // OFFSET: 0x00AAB0B0 // FUNCTION: fn_17279 -void UIWindowMgr::sub_AAB0B0() { +void UIWindowMgr::RefreshGameSettingHotkeys() { CUIGameSettingsUI* settings = static_cast(this->LookupWindow(0x271E)); if (settings) { - settings->sub_A43C70(); + settings->RefreshHotkeyLabels(); } } @@ -2213,7 +2213,7 @@ bool GameSettingsUI::CUIListPage::SetOptionChecked(int id) { // OFFSET: 0x00A43590 // FUNCTION: fn_16031 -__declspec(noinline) void CUIGameSettingsUI::sub_A43590(int id) { +__declspec(noinline) void CUIGameSettingsUI::RefreshOption(int id) { for (GameSettingsUI::CUIListPage* page : this->m_pages) { for (GameSettingsUI::CUIOptionItem* item : page->m_optionList->items) { if (item->m_optionId == id) { @@ -2418,7 +2418,7 @@ void GameSettingsUI::CUIGroupGraphics::OnModeSelect(CUIComboItem* item, const Di this->m_pendingMode = *node; CUIGameSettingsUI* wnd = dynamic_cast(g_windowMgr.LookupWindow(0x271E)); if (wnd) { - wnd->sub_A421E0(); + wnd->UpdateApplyButton(); } } } @@ -2776,7 +2776,7 @@ void GameSettingsUI::CUIGroupFullscreen::Slot15(int width, int height) { this->m_onButton = new CUIRadioButton(); this->m_onButton->SetSize(12, 12); this->m_onButton->Move(150, 12); - this->m_onButton->SetOnSelect([this](CUIRadioButton* button) { sub_A41E50(reinterpret_cast(button)); }); + this->m_onButton->SetOnSelect([this](CUIRadioButton* button) { OnFullscreenOptionChanged(reinterpret_cast(button)); }); this->m_onButton->disabled = 0; this->m_onButton->Invalidate(); const std::uint8_t onButtonNormalSource[] = {0x8F, 0xE4, 0x73, 0x75, 0xED, 0xDB, 0x84, 0x4A, 0x89, 0xAF, 0x73, 0x43, 0x90, 0xAF, 0x1D, 0xF5, 0x2E, 0x2F, 0xDA, 0xE0, 0x4F, 0x61, 0x2F, 0xD8, 0x20, 0x2D, 0xD5, 0xA1, 0x4F, 0x78, 0x31, 0x87}; @@ -2812,7 +2812,7 @@ void GameSettingsUI::CUIGroupFullscreen::Slot15(int width, int height) { this->m_offButton = new CUIRadioButton(); this->m_offButton->SetSize(12, 12); this->m_offButton->Move(270, 12); - this->m_offButton->SetOnSelect([this](CUIRadioButton* button) { sub_A41E50(reinterpret_cast(button)); }); + this->m_offButton->SetOnSelect([this](CUIRadioButton* button) { OnFullscreenOptionChanged(reinterpret_cast(button)); }); this->m_offButton->disabled = 0; this->m_offButton->Invalidate(); const std::uint8_t offButtonNormalSource[] = {0x95, 0x52, 0x75, 0x21, 0x07, 0x7F, 0xB0, 0xFE, 0x93, 0x19, 0x75, 0x17, 0x7A, 0x0B, 0x29, 0x41, 0x34, 0x99, 0xDC, 0xB4, 0xA5, 0xC5, 0x1B, 0x6C, 0x3A, 0x9B, 0xD3, 0xF5, 0xA5, 0xDC, 0x05, 0x33}; @@ -3497,7 +3497,7 @@ void GameSettingsUI::CUIGroupSpriteDetailLevel::Slot15(int width, int height) { this->m_slider = new CUIHScrollBar(); this->m_slider->SetSize(175, 13); this->m_slider->Move(153, 11); - this->m_slider->SetOnChange([this](int position) { sub_A43000(position); }); + this->m_slider->SetOnChange([this](int position) { OnSpriteDetailLevelChanged(position); }); this->m_slider->SetTotal(128); this->m_slider->SetVisible(128); this->m_slider->step = 1; @@ -3543,7 +3543,7 @@ void GameSettingsUI::CUIGroupTextureDetailLevel::Slot15(int width, int height) { this->m_slider = new CUIHScrollBar(); this->m_slider->SetSize(175, 13); this->m_slider->Move(153, 11); - this->m_slider->SetOnChange([this](int position) { sub_A43040(position); }); + this->m_slider->SetOnChange([this](int position) { OnTextureDetailLevelChanged(position); }); this->m_slider->SetTotal(128); this->m_slider->SetVisible(128); this->m_slider->step = 1; @@ -3589,7 +3589,7 @@ void GameSettingsUI::CUIGroupTrilinear::Slot15(int width, int height) { this->m_onButton = new CUIRadioButton(); this->m_onButton->SetSize(12, 12); this->m_onButton->Move(150, 12); - this->m_onButton->SetOnSelect([this](CUIRadioButton* button) { sub_A41FA0(reinterpret_cast(button)); }); + this->m_onButton->SetOnSelect([this](CUIRadioButton* button) { OnTrilinearOptionChanged(reinterpret_cast(button)); }); this->m_onButton->disabled = 0; this->m_onButton->Invalidate(); const std::uint8_t onButtonNormalSource[] = {0xB1, 0x56, 0x99, 0x0F, 0x41, 0xD3, 0xA0, 0x5C, 0xB7, 0x1D, 0x99, 0x39, 0x3C, 0xA7, 0x39, 0xE3, 0x10, 0x9D, 0x30, 0x9A, 0xE3, 0x69, 0x0B, 0xCE, 0x1E, 0x9F, 0x3F, 0xDB, 0xE3, 0x70, 0x15, 0x91}; @@ -3625,7 +3625,7 @@ void GameSettingsUI::CUIGroupTrilinear::Slot15(int width, int height) { this->m_offButton = new CUIRadioButton(); this->m_offButton->SetSize(12, 12); this->m_offButton->Move(270, 12); - this->m_offButton->SetOnSelect([this](CUIRadioButton* button) { sub_A41FA0(reinterpret_cast(button)); }); + this->m_offButton->SetOnSelect([this](CUIRadioButton* button) { OnTrilinearOptionChanged(reinterpret_cast(button)); }); this->m_offButton->disabled = 0; this->m_offButton->Invalidate(); const std::uint8_t offButtonNormalSource[] = {0x21, 0x34, 0x33, 0x81, 0x2D, 0x49, 0x3A, 0xAC, 0x27, 0x7F, 0x33, 0xB7, 0x50, 0x3D, 0xA3, 0x13, 0x80, 0xFF, 0x9A, 0x14, 0x8F, 0xF3, 0x91, 0x3E, 0x8E, 0xFD, 0x95, 0x55, 0x8F, 0xEA, 0x8F, 0x61}; @@ -3689,7 +3689,7 @@ void GameSettingsUI::CUIOptionItem::OnCheck(bool checked) { if (Singleton::s_instance == nullptr) { Singleton::s_instance = new (std::nothrow) CGameSettingsMgr; } - Singleton::s_instance->sub_6C0C40(this->m_optionId, IsServiceOption(this->m_optionId) ^ checked, false); + Singleton::s_instance->SetOption(this->m_optionId, IsServiceOption(this->m_optionId) ^ checked, false); } // OFFSET: 0x00A40280 @@ -3779,7 +3779,7 @@ void GameSettingsUI::CUIListPage::RefreshHotkeyLabels() { // OFFSET: 0x00A43BA0 // FUNCTION: fn_16046 -void CUIGameSettingsUI::sub_A43BA0() { +void CUIGameSettingsUI::RefreshOptions() { for (UIWindow* child : this->m_currentPage->m_children) { static_cast(child)->Refresh(); } @@ -3790,7 +3790,7 @@ void CUIGameSettingsUI::sub_A43BA0() { // OFFSET: 0x00A43C70 // FUNCTION: fn_16048 -void CUIGameSettingsUI::sub_A43C70() { +void CUIGameSettingsUI::RefreshHotkeyLabels() { for (GameSettingsUI::CUIListPage* page : this->m_pages) { for (GameSettingsUI::CUIOptionItem* item : page->m_optionList->items) { if (!item->geometry.visible) { @@ -4003,7 +4003,7 @@ void CUIGameSettingsUI::Slot15(int width, int height) { CUIImageButton* baseButton = new CUIImageButton(); baseButton->SetSize(11, 11); baseButton->Move(3, 3); - baseButton->SetOnClick([this]() { this->sub_A3F0F0(); }); + baseButton->SetOnClick([this]() { this->OnTitleIconClick(); }); baseButton->disabled = 0; baseButton->Invalidate(); { @@ -4087,13 +4087,13 @@ void CUIGameSettingsUI::Slot15(int width, int height) { this->m_tab = new CUITab(); this->m_tab->SetSize(400, 18); this->m_tab->Move(0, 17); - this->m_tab->SetOnChange([this](CUITabButton* button) { this->sub_A433D0(button); }); + this->m_tab->SetOnChange([this](CUITabButton* button) { this->OnTabChanged(button); }); this->AddChild(this->m_tab); CUITabButton* basicButton = new CUITabButton(); basicButton->SetSize(72, 18); basicButton->Move(0, 0); - basicButton->SetOnClick([this]() { this->sub_A43380(); }); + basicButton->SetOnClick([this]() { this->OnBasicTabClick(); }); basicButton->disabled = 0; basicButton->Invalidate(); basicButton->SetId(0); @@ -4120,7 +4120,7 @@ void CUIGameSettingsUI::Slot15(int width, int height) { CUITabButton* effectButton = new CUITabButton(); effectButton->SetSize(72, 18); effectButton->Move(71, 0); - effectButton->SetOnClick([this]() { this->sub_A433A0(); }); + effectButton->SetOnClick([this]() { this->OnEffectTabClick(); }); effectButton->disabled = 0; effectButton->Invalidate(); effectButton->SetId(1); @@ -4147,7 +4147,7 @@ void CUIGameSettingsUI::Slot15(int width, int height) { CUITabButton* controlButton = new CUITabButton(); controlButton->SetSize(72, 18); controlButton->Move(142, 0); - controlButton->SetOnClick([this]() { this->sub_A43390(); }); + controlButton->SetOnClick([this]() { this->OnControlTabClick(); }); controlButton->disabled = 0; controlButton->Invalidate(); controlButton->SetId(2); @@ -4174,7 +4174,7 @@ void CUIGameSettingsUI::Slot15(int width, int height) { CUITabButton* graphicsButton = new CUITabButton(); graphicsButton->SetSize(72, 18); graphicsButton->Move(213, 0); - graphicsButton->SetOnClick([this]() { this->sub_A433C0(); }); + graphicsButton->SetOnClick([this]() { this->OnGraphicsTabClick(); }); graphicsButton->disabled = 0; graphicsButton->Invalidate(); graphicsButton->SetId(3); @@ -4201,7 +4201,7 @@ void CUIGameSettingsUI::Slot15(int width, int height) { CUITabButton* etcButton = new CUITabButton(); etcButton->SetSize(72, 18); etcButton->Move(284, 0); - etcButton->SetOnClick([this]() { this->sub_A433B0(); }); + etcButton->SetOnClick([this]() { this->OnEtcTabClick(); }); etcButton->disabled = 0; etcButton->Invalidate(); etcButton->SetId(4); diff --git a/Source/UI/GameSettings/GameSettingsUI.h b/Source/UI/GameSettings/GameSettingsUI.h index f634204d..d2883e20 100644 --- a/Source/UI/GameSettings/GameSettingsUI.h +++ b/Source/UI/GameSettings/GameSettingsUI.h @@ -358,19 +358,19 @@ public: void OnApply(); void OnCloseButton(); void OnTitleClose(); - void sub_A3F0F0(); - void sub_A421E0(); - void sub_A433D0(UIWindow* window); + void OnTitleIconClick(); + void UpdateApplyButton(); + void OnTabChanged(UIWindow* window); bool IsTab4Selected(); void SelectTab4(); - void sub_A43380(); - void sub_A43390(); - void sub_A433A0(); - void sub_A433B0(); - void sub_A433C0(); - void sub_A43590(int id); - __declspec(noinline) void sub_A43BA0(); - void sub_A43C70(); + void OnBasicTabClick(); + void OnControlTabClick(); + void OnEffectTabClick(); + void OnEtcTabClick(); + void OnGraphicsTabClick(); + void RefreshOption(int id); + __declspec(noinline) void RefreshOptions(); + void RefreshHotkeyLabels(); void ResetToDefaults(); /* 00D8 */ CUITitleBar* m_titleBar; diff --git a/Source/UI/Item/UIItemStoreSubWnd.h b/Source/UI/Item/UIItemStoreSubWnd.h index 80b5d8c0..d4d28f24 100644 --- a/Source/UI/Item/UIItemStoreSubWnd.h +++ b/Source/UI/Item/UIItemStoreSubWnd.h @@ -32,9 +32,9 @@ public: bool SortReversed1(); bool SortReversed2(); bool SortReversed3(); - bool sub_996950(); - bool sub_996AF0(); - bool sub_996C90(); + bool UpdateItemNames1(); + bool UpdateItemNames2(); + bool UpdateItemNames3(); bool FilterByName1(std::string query); bool FilterByName2(std::string query); bool FilterByName3(std::string query); diff --git a/Source/UI/Items/UISwapEquipmentWnd.cpp b/Source/UI/Items/UISwapEquipmentWnd.cpp index b6db0634..3b2447af 100644 --- a/Source/UI/Items/UISwapEquipmentWnd.cpp +++ b/Source/UI/Items/UISwapEquipmentWnd.cpp @@ -95,7 +95,7 @@ void UISwapEquipmentWnd::Slot10(int x, int y, std::intptr_t value) { // OFFSET: 0x0082FD90 // FUNCTION: fn_10391 -void UISwapEquipmentWnd::sub_82FD90() { +void UISwapEquipmentWnd::DrawEquipmentSlots() { this->unknown_00D0 = 0; this->unknown_00C4 = 0; this->unknown_00C8 = 0; @@ -339,7 +339,7 @@ void UISwapEquipmentWnd::Paint() { const char* title = LookupMessage(3110); this->DrawCenteredText(140, 4, title, std::strlen(title), 0, 12, 0x14234B, 0); - this->sub_82FD90(); + this->DrawEquipmentSlots(); FuncDrawWNDChar drawer( this, @@ -413,7 +413,7 @@ void UISwapEquipmentWnd::Slot25(int x, int y) { } else if (g_windowMgr.GetHoverWindow()->geometry.id == 493) { reinterpret_cast(ChatWindow()->m_chatEdit)->InsertItemLink(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 491) { - reinterpret_cast(g_windowMgr.unknown_0458)->sub_7FF710(item); + reinterpret_cast(g_windowMgr.unknown_0458)->InsertItemTag(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 494) { static_cast(g_windowMgr.GetHoverWindow())->InsertItemLink(item); } diff --git a/Source/UI/Items/UISwapEquipmentWnd.h b/Source/UI/Items/UISwapEquipmentWnd.h index 30ffe6af..bda56656 100644 --- a/Source/UI/Items/UISwapEquipmentWnd.h +++ b/Source/UI/Items/UISwapEquipmentWnd.h @@ -34,7 +34,7 @@ public: ITEM_INFO ItemAtPoint(int x, int y); __declspec(noinline) ITEM_INFO GetSlotItem(int slot); void SetSlotValue(int index, int value); - void sub_82FD90(); + void DrawEquipmentSlots(); protected: /* 00B4 */ std::uint32_t unknown_00B4; diff --git a/Source/UI/Lists/UIChatHisBox.cpp b/Source/UI/Lists/UIChatHisBox.cpp index fae2632d..bdf3d80e 100644 --- a/Source/UI/Lists/UIChatHisBox.cpp +++ b/Source/UI/Lists/UIChatHisBox.cpp @@ -66,13 +66,13 @@ std::string UIChatHisBox::ResolvePlayerTags(const char* name) { } } - this->sub_89C080(); + this->RebuildHistory(); return result; } // OFFSET: 0x0089C080 // FUNCTION: fn_11581 -__declspec(noinline) void UIChatHisBox::sub_89C080() { +__declspec(noinline) void UIChatHisBox::RebuildHistory() { this->Clear(); this->ClearNaviLinks(); diff --git a/Source/UI/Lists/UIChatHisBox.h b/Source/UI/Lists/UIChatHisBox.h index 7c68b302..9b1f6561 100644 --- a/Source/UI/Lists/UIChatHisBox.h +++ b/Source/UI/Lists/UIChatHisBox.h @@ -27,8 +27,8 @@ public: void Clear() override; virtual void AddText(const char* text, int color, const char* style); void AddTextWrapped(const char* text, int color, const char* style); - void sub_89DC30(const char* text, int& color, int& mode); - void sub_89E0F0(const char* text, int& color, int& mode); + void AddItemLinkLine(const char* text, int& color, int& mode); + void AddNavigationLinkLine(const char* text, int& color, int& mode); std::string RenderItemLinks(const char* lineText, std::string& source); std::string RenderNavigationLinks(const char* text, std::string& source); void RewrapLinkLines(std::vector& wrapped, int& mode); @@ -45,7 +45,7 @@ public: __declspec(noinline) void PlaceItemTags(int line); void CopyHistory(const UIChatHisBox& other); void Resize(int width, int height, bool flag); - void sub_89C080(); + void RebuildHistory(); std::string ResolvePlayerTags(const char* name); bool Name(const std::string& encoded, std::string& output); bool Next(std::string& remaining, std::string& encoded, unsigned& position, const char* original); diff --git a/Source/UI/Lists/UIComboBoxDefWnd.cpp b/Source/UI/Lists/UIComboBoxDefWnd.cpp index 547f578e..2ec44092 100644 --- a/Source/UI/Lists/UIComboBoxDefWnd.cpp +++ b/Source/UI/Lists/UIComboBoxDefWnd.cpp @@ -499,7 +499,7 @@ void UIString::ParseTags(std::string text) { // OFFSET: 0x008A0B10 // FUNCTION: fn_11630 -void UIDescriptRace::sub_8A0B10() { +void UIDescriptRace::DrawRaceDescription() { if (this->m_race == 1) { if (!g_doramCreationEnabled) { return; diff --git a/Source/UI/Lists/UIListBox.cpp b/Source/UI/Lists/UIListBox.cpp index d143ea8b..e60ceed4 100644 --- a/Source/UI/Lists/UIListBox.cpp +++ b/Source/UI/Lists/UIListBox.cpp @@ -172,9 +172,9 @@ void UIChatHisBox3::AddText(const char* text, int color) { const auto* bytes = reinterpret_cast(text); if (_mbsstr(bytes, reinterpret_cast(g_itemLinkTagBegin.c_str())) || _mbsstr(bytes, reinterpret_cast(g_itemLinkTagEnd.c_str()))) { - this->sub_89DC30(text, color, mode); + this->AddItemLinkLine(text, color, mode); } else if (g_navigationLinkParser->HasLink(std::string(text))) { - this->sub_89E0F0(text, color, mode); + this->AddNavigationLinkLine(text, color, mode); } else { this->UIListBox::AddLine(text); } @@ -207,9 +207,9 @@ void UIChatHisBox::AddText(const char* text, int color, const char* style) { const auto* bytes = reinterpret_cast(text); if (_mbsstr(bytes, reinterpret_cast(g_itemLinkTagBegin.c_str())) || _mbsstr(bytes, reinterpret_cast(g_itemLinkTagEnd.c_str()))) { - this->sub_89DC30(text, color, mode); + this->AddItemLinkLine(text, color, mode); } else if (g_navigationLinkParser->HasLink(std::string(text))) { - this->sub_89E0F0(text, color, mode); + this->AddNavigationLinkLine(text, color, mode); } else { this->UIListBox::AddLine(text); } @@ -508,7 +508,7 @@ void UIChatHisBox::CopyHistory(const UIChatHisBox& other) { this->unknown_0100 = other.unknown_0100; this->unknown_010C = other.unknown_010C; this->unknown_0118 = other.unknown_0118; - this->sub_89C080(); + this->RebuildHistory(); } // OFFSET: 0x00875860 diff --git a/Source/UI/Lists/UIScrollBar.cpp b/Source/UI/Lists/UIScrollBar.cpp index 651259cf..1a3423c6 100644 --- a/Source/UI/Lists/UIScrollBar.cpp +++ b/Source/UI/Lists/UIScrollBar.cpp @@ -1246,7 +1246,7 @@ void UIChatHisBox::DropOldestRecords() { } this->unknown_0118.resize(half); - this->sub_89C080(); + this->RebuildHistory(); } // OFFSET: 0x0087CEC0 @@ -2082,7 +2082,7 @@ void UIChatHisBox::RewrapLinkLines(std::vector& wrapped, int& mode) } std::vector split; - this->sub_8932D0(&mode, &split, wrapped[line]); + this->WrapLinkText(&mode, &split, wrapped[line]); if (split.size() > 1) { for (unsigned int part = 0; part < split.size(); ++part) { if (part == 0) { @@ -2143,7 +2143,7 @@ void UIChatHisBox::RewrapLinkLines(std::vector& wrapped, int& mode) // OFFSET: 0x0089DC30 // FUNCTION: fn_11598 -void UIChatHisBox::sub_89DC30(const char* text, int& color, int& mode) { +void UIChatHisBox::AddItemLinkLine(const char* text, int& color, int& mode) { if (!_mbsstr(reinterpret_cast(text), reinterpret_cast(g_itemLinkTagBegin.c_str())) || !_mbsstr(reinterpret_cast(text), reinterpret_cast(g_itemLinkTagEnd.c_str()))) { this->UIListBox::AddLine(text); @@ -2152,7 +2152,7 @@ void UIChatHisBox::sub_89DC30(const char* text, int& color, int& mode) { std::vector wrapped; const std::string converted = this->Convert(text); - this->sub_8932D0(&mode, &wrapped, converted); + this->WrapLinkText(&mode, &wrapped, converted); this->RewrapLinkLines(wrapped, mode); std::string source = text; for (unsigned int line = 0; line < wrapped.size(); ++line) { @@ -2167,7 +2167,7 @@ void UIChatHisBox::sub_89DC30(const char* text, int& color, int& mode) { // OFFSET: 0x0089E0F0 // FUNCTION: fn_11599 -void UIChatHisBox::sub_89E0F0(const char* text, int& color, int& mode) { +void UIChatHisBox::AddNavigationLinkLine(const char* text, int& color, int& mode) { if (!g_navigationLinkParser->HasLink(text)) { this->UIListBox::AddLine(text); return; @@ -2176,7 +2176,7 @@ void UIChatHisBox::sub_89E0F0(const char* text, int& color, int& mode) { std::vector wrapped; std::string display; DisplayNavigationLink(display, text); - this->sub_8932D0(&mode, &wrapped, display); + this->WrapLinkText(&mode, &wrapped, display); this->RewrapLinkLines(wrapped, mode); std::string source = text; for (unsigned int line = 0; line < wrapped.size(); ++line) { diff --git a/Source/UI/Lists/UITagListBox.cpp b/Source/UI/Lists/UITagListBox.cpp index 8a0448f0..ef4168e8 100644 --- a/Source/UI/Lists/UITagListBox.cpp +++ b/Source/UI/Lists/UITagListBox.cpp @@ -354,10 +354,10 @@ int UITagListBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 } break; case 29: - this->sub_9B9EA0(argument1, argument2, argument3, argument4); + this->AppendText(argument1, argument2, argument3, argument4); return 0; case 98: - this->sub_9BC0A0(argument1, sender); + this->OnTagClick(argument1, sender); break; default: return UIListBox::SendMsg(sender, message, argument1, argument2, argument3, argument4); @@ -368,7 +368,7 @@ int UITagListBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 // OFFSET: 0x009B9EA0 // FUNCTION: fn_13881 -void UITagListBox::sub_9B9EA0(std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { +void UITagListBox::AppendText(std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { char* text = reinterpret_cast(argument1); const int width = static_cast(argument2); std::vector lines; @@ -394,8 +394,8 @@ void UITagListBox::sub_9B9EA0(std::intptr_t argument1, std::intptr_t argument2, } } else { std::vector tags; - const std::string parsed = this->sub_9B8AA0(std::string(text), tags); - this->sub_9BB8E0(parsed, tags, width == 0 ? 35 : width); + const std::string parsed = this->ParseTaggedText(std::string(text), tags); + this->AppendTaggedLines(parsed, tags, width == 0 ? 35 : width); } this->unknown_00BC &= ~255; @@ -483,7 +483,7 @@ std::pair UITagListBox::ParseTag(std::string text, int // OFFSET: 0x009BC0A0 // FUNCTION: fn_13889 -void UITagListBox::sub_9BC0A0(std::intptr_t type, UIWindow* sender) { +void UITagListBox::OnTagClick(std::intptr_t type, UIWindow* sender) { UITagButton* button = static_cast(sender); if (!button) { return; @@ -509,7 +509,7 @@ void UITagListBox::sub_9BC0A0(std::intptr_t type, UIWindow* sender) { } tag += name; - g_navigationManager.sub_B995D0(tag, mode, false); + g_navigationManager.SearchNavigation(tag, mode, false); } else { const int flag = std::atoi(button->GetString(5).c_str()); const int id = std::atoi(button->GetString(6).c_str()); @@ -522,10 +522,10 @@ void UITagListBox::sub_9BC0A0(std::intptr_t type, UIWindow* sender) { const unsigned char group = code < 10 ? hundreds : static_cast(hundreds + 2); const int remainder = code < 10 ? code : code - 10; const unsigned char kind = remainder < 1 ? group : static_cast(group + 4); - g_navigationManager.sub_B99030(name.c_str(), mode, kind, flag == 0, x, y, id); + g_navigationManager.StartNavigation(name.c_str(), mode, kind, flag == 0, x, y, id); } } else { - g_navigationManager.sub_B99030(name.c_str(), 2, 5, false, x, y, 1002); + g_navigationManager.StartNavigation(name.c_str(), 2, 5, false, x, y, 1002); } break; } @@ -540,7 +540,7 @@ void UITagListBox::sub_9BC0A0(std::intptr_t type, UIWindow* sender) { // OFFSET: 0x009B8AA0 // FUNCTION: fn_13874 -std::string UITagListBox::sub_9B8AA0(std::string text, std::vector& tags) { +std::string UITagListBox::ParseTaggedText(std::string text, std::vector& tags) { std::vector extracted = ExtractTextTags(text); if (extracted.empty()) { return text; @@ -606,7 +606,7 @@ int WrappedLineLength(const char* text, int length, int width) { // OFFSET: 0x009BB8E0 // FUNCTION: fn_13888 -void UITagListBox::sub_9BB8E0(std::string text, std::vector& tags, int width) { +void UITagListBox::AppendTaggedLines(std::string text, std::vector& tags, int width) { const int firstLine = static_cast(this->lines.size()); const char* buffer = text.c_str(); std::size_t position = 0; diff --git a/Source/UI/Lists/UITagListBox.h b/Source/UI/Lists/UITagListBox.h index 16fe1ad1..42297e15 100644 --- a/Source/UI/Lists/UITagListBox.h +++ b/Source/UI/Lists/UITagListBox.h @@ -31,11 +31,11 @@ public: void Slot31(int x, int y) override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; - void sub_9B9EA0(std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4); - void sub_9BC0A0(std::intptr_t type, UIWindow* sender); - std::string sub_9B8AA0(std::string text, std::vector& tags); + void AppendText(std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4); + void OnTagClick(std::intptr_t type, UIWindow* sender); + std::string ParseTaggedText(std::string text, std::vector& tags); std::pair ParseTag(std::string text, int tagIndex); - void sub_9BB8E0(std::string text, std::vector& tags, int width); + void AppendTaggedLines(std::string text, std::vector& tags, int width); int DecodeNumber(std::string text); void DecodeItemFields(const std::string& text, std::vector& fields); bool ItemFromFields(const std::vector& fields, ITEM_INFO& item); diff --git a/Source/UI/Party/UIMiniPartyWnd.cpp b/Source/UI/Party/UIMiniPartyWnd.cpp index a0a3af01..076336cd 100644 --- a/Source/UI/Party/UIMiniPartyWnd.cpp +++ b/Source/UI/Party/UIMiniPartyWnd.cpp @@ -295,7 +295,7 @@ int UIMiniPartyInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg break; case 61: if (this->m_owner->GetMember().valid) { - g_windowMgr.sub_A8C4B0(this->m_owner->GetMember().accountId); + g_windowMgr.CloseMiniPartyWindow(this->m_owner->GetMember().accountId); return 0; } break; diff --git a/Source/UI/Quest/UIOngoingQuestInfo.cpp b/Source/UI/Quest/UIOngoingQuestInfo.cpp index 60996a49..47349460 100644 --- a/Source/UI/Quest/UIOngoingQuestInfo.cpp +++ b/Source/UI/Quest/UIOngoingQuestInfo.cpp @@ -351,7 +351,7 @@ void CUIRewards::Slot16() { // OFFSET: 0x00A55B70 // FUNCTION: fn_16313 -void CUIOngoingQuestInfo::sub_A55B70() { +void CUIOngoingQuestInfo::UpdateHuntInfo() { OngoingQuestInfo::CUIScrollWindow* window = this->scrollWindow; const unsigned int questId = this->questId; window->secondContents->textViewer->Clear(); diff --git a/Source/UI/Quest/UIOngoingQuestInfo.h b/Source/UI/Quest/UIOngoingQuestInfo.h index c5eb544f..fa1be1f5 100644 --- a/Source/UI/Quest/UIOngoingQuestInfo.h +++ b/Source/UI/Quest/UIOngoingQuestInfo.h @@ -22,7 +22,7 @@ public: void OnFirstAction(); void OnClose(); virtual void Slot53(); - void sub_A55B70(); + void UpdateHuntInfo(); void SetQuest(unsigned int id); /* 00D8 */ CUITitleBar* titleBar; diff --git a/Source/UI/Quest/UIQuestDisplay.cpp b/Source/UI/Quest/UIQuestDisplay.cpp index 38607101..f1e3569f 100644 --- a/Source/UI/Quest/UIQuestDisplay.cpp +++ b/Source/UI/Quest/UIQuestDisplay.cpp @@ -229,7 +229,7 @@ int UIQuestDisplay::SendMsg(UIWindow* sender, int message, std::intptr_t argumen GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.packetType), &packet); this->Invalidate(); } else if (command == 49) { - g_renewQuestMgr->sub_67B620(it->first); + g_renewQuestMgr->ShowOngoingQuestInfo(it->first); } break; } diff --git a/Source/UI/Quest/UIRenewQuestUI.cpp b/Source/UI/Quest/UIRenewQuestUI.cpp index b368777e..9b6e2069 100644 --- a/Source/UI/Quest/UIRenewQuestUI.cpp +++ b/Source/UI/Quest/UIRenewQuestUI.cpp @@ -856,7 +856,7 @@ void RenewQuestUI::CUIQuestItem::OnActiveStateChanged(bool active) { if (this->questType == 2) { g_renewQuestMgr->SetRecommendedQuestActive(this->questId, active); if (auto* window = static_cast(g_windowMgr.LookupWindow(0x2718))) { - window->sub_A67290(this->questType); + window->UpdateQuestLists(this->questType); } g_renewQuestMgr->SaveRecommendedActiveList(); return; @@ -919,7 +919,7 @@ void CUIRenewQuestUI::Slot53() { void CUIRenewQuestUI::OnFilterButton(UIWindow* button) { if (button) { this->filter = button->geometry.id; - this->sub_A67290(0xF); + this->UpdateQuestLists(0xF); } } @@ -993,7 +993,7 @@ void CUIRenewQuestUI::OnCallback56() { // OFFSET: 0x00A66FF0 // FUNCTION: fn_16628 -void CUIRenewQuestUI::sub_A66FF0(unsigned int questId) { +void CUIRenewQuestUI::SelectQuest(unsigned int questId) { for (RenewQuestUI::CUIQuestList* list : this->questLists) { CUIListBoxEx* listBox = list->list; auto node = listBox->data.begin(); @@ -1194,7 +1194,7 @@ void RenewQuestUI::CUIQuestList::BindItem(CUIQuestItem* item, const unsigned lon // OFFSET: 0x00A67290 // FUNCTION: fn_16629 -void CUIRenewQuestUI::sub_A67290(unsigned int flags) { +void CUIRenewQuestUI::UpdateQuestLists(unsigned int flags) { if (flags & 1) { for (RenewQuestUI::CUIQuestList* list : this->questLists) { if (list->type != 1) { @@ -2010,7 +2010,7 @@ void CUIRenewQuestUI::Slot15(int width, int height) { this->searchEdit->SetAlignment(0); this->searchEdit->SetOnSubmit([this]() { this->searchText = this->searchEdit->edit->Text(); - this->sub_A67290(0xF); + this->UpdateQuestLists(0xF); }); this->AddChild(this->searchEdit); @@ -2019,7 +2019,7 @@ void CUIRenewQuestUI::Slot15(int width, int height) { this->searchButton->Move(342, 416); this->searchButton->SetOnClick([this]() { this->searchText = this->searchEdit->edit->Text(); - this->sub_A67290(0xF); + this->UpdateQuestLists(0xF); }); this->searchButton->disabled = 0; this->searchButton->Invalidate(); @@ -2184,7 +2184,7 @@ void CUIRenewQuestUI::OnWaitTabClick() { // FUNCTION: fn_45521 void CUIRenewQuestUI::OnSearchSubmit() { this->searchText = this->searchEdit->edit->Text(); - this->sub_A67290(0xF); + this->UpdateQuestLists(0xF); } // OFFSET: 0x00A66100 @@ -2197,7 +2197,7 @@ void CUIRenewQuestUI::OnClose() { // FUNCTION: fn_45520 void CUIRenewQuestUI::OnSearchButton() { this->searchText = this->searchEdit->edit->Text(); - this->sub_A67290(0xF); + this->UpdateQuestLists(0xF); } // OFFSET: 0x00A65AF0 @@ -2228,7 +2228,7 @@ void CUIRenewQuestUI::Slot16() { for (unsigned int index = 0; index < this->questLists.size(); ++index) { this->questLists[index]->type = 1 << index; } - this->sub_A67290(0xF); + this->UpdateQuestLists(0xF); for (UIWindow* child : this->filterPanel->m_children) { const std::string name = g_renewQuestMgr->GetFilterName(child->geometry.id); diff --git a/Source/UI/Quest/UIRenewQuestUI.h b/Source/UI/Quest/UIRenewQuestUI.h index 26ad2bcc..d663785a 100644 --- a/Source/UI/Quest/UIRenewQuestUI.h +++ b/Source/UI/Quest/UIRenewQuestUI.h @@ -85,8 +85,8 @@ public: void OnCallback56(); void OnCallback74(); void OnCallback80(); - void sub_A67290(unsigned int flags); - void sub_A66FF0(unsigned int questId); + void UpdateQuestLists(unsigned int flags); + void SelectQuest(unsigned int questId); /* 00D8 */ CUITitleBar* titleBar; diff --git a/Source/UI/Quest/UIRenewQuestWnd.cpp b/Source/UI/Quest/UIRenewQuestWnd.cpp index a13b4267..6296f684 100644 --- a/Source/UI/Quest/UIRenewQuestWnd.cpp +++ b/Source/UI/Quest/UIRenewQuestWnd.cpp @@ -131,7 +131,7 @@ void UINpcSprWnd::Paint() { // FUNCTION: fn_09935 void UINpcSprWnd::Slot31(int, int) { if (this->m_mapName.size() != 0) { - g_navigationManager.sub_B99030(this->m_mapName, 0, 5, false, this->m_destinationX, this->m_destinationY, 1002); + g_navigationManager.StartNavigation(this->m_mapName, 0, 5, false, this->m_destinationX, this->m_destinationY, 1002); } } diff --git a/Source/UI/Rodex/UIRodexComposeWnd.cpp b/Source/UI/Rodex/UIRodexComposeWnd.cpp index d697f51c..db046ebf 100644 --- a/Source/UI/Rodex/UIRodexComposeWnd.cpp +++ b/Source/UI/Rodex/UIRodexComposeWnd.cpp @@ -90,7 +90,7 @@ ITEM_INFO UIRodexComposeWnd::GetItemAtPoint(int x, int y) { // OFFSET: 0x007FF710 // FUNCTION: fn_10003 -void UIRodexComposeWnd::sub_7FF710(const ITEM_INFO& item) { +void UIRodexComposeWnd::InsertItemTag(const ITEM_INFO& item) { if (!this->unknown_0100) { this->unknown_0100 = new UIItemTagOnMail(); if (!this->unknown_0100) { @@ -108,12 +108,12 @@ void UIRodexComposeWnd::sub_7FF710(const ITEM_INFO& item) { std::string appendResult = tagCtrl->AppendTag(item.DisplayName(0)); this->m_contents->SetText(appendResult.c_str()); this->m_contents->MoveCursorToEnd(); - tagCtrl->sub_89CFE0(item, 0xd630a9); + tagCtrl->AddItemTag(item, 0xd630a9); } // OFFSET: 0x007FF940 // FUNCTION: fn_10004 -void UIRodexComposeWnd::sub_7FF940(int tagId) { +void UIRodexComposeWnd::InsertSkillTag(int tagId) { if (!this->unknown_0100) { this->unknown_0100 = new UIItemTagOnMail(); if (!this->unknown_0100) { @@ -130,7 +130,7 @@ void UIRodexComposeWnd::sub_7FF940(int tagId) { return; } - std::string tagText = tagCtrl->sub_874A40(tagId, 0xd630a9); + std::string tagText = tagCtrl->AddSkillTag(tagId, 0xd630a9); tagCtrl->taggedText = std::string(this->m_contents->Text()); std::string fullText = std::string(this->m_contents->Text()) + tagText; @@ -534,7 +534,7 @@ void UIRodexComposeWnd::Paint() { auto* tagCtrl = static_cast(this->unknown_0100); tagCtrl->SetLines(this->m_contents->unknown_0168); tagCtrl->SetTaggedText(this->m_contents->Text(), this->m_contents->geometry.width); - tagCtrl->sub_8962C0(); + tagCtrl->UpdateItemTags(); auto* editCtrl3 = static_cast(this->unknown_0100); int diff = editCtrl3->unknown_0150 - editCtrl3->unknown_0138; this->m_contents->unknown_00F0 = std::max(0, diff); diff --git a/Source/UI/Rodex/UIRodexComposeWnd.h b/Source/UI/Rodex/UIRodexComposeWnd.h index 25895a84..4acb99dc 100644 --- a/Source/UI/Rodex/UIRodexComposeWnd.h +++ b/Source/UI/Rodex/UIRodexComposeWnd.h @@ -41,8 +41,8 @@ public: void Slot32(int x, int y) override; void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; - void sub_7FF710(const ITEM_INFO& item); - void sub_7FF940(int tagId); + void InsertItemTag(const ITEM_INFO& item); + void InsertSkillTag(int tagId); ITEM_INFO GetItemAtPoint(int x, int y); int MeasureText(const std::string& text, const unsigned& bytes); void SetRecipient(int id, unsigned short job, unsigned short level, const char* name); diff --git a/Source/UI/Rodex/UIRodexInboxWnd.cpp b/Source/UI/Rodex/UIRodexInboxWnd.cpp index d5cc9a9d..2e23b020 100644 --- a/Source/UI/Rodex/UIRodexInboxWnd.cpp +++ b/Source/UI/Rodex/UIRodexInboxWnd.cpp @@ -396,7 +396,7 @@ void UIRodexInboxWnd::Paint() { if (!g_rodexMailStore->unknown_001C) { this->DrawBitmap(0x1F, 0x9A, reinterpret_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\img_notice.bmp"))), true); - this->sub_A84400(0x1F, 0xE5, std::string(LookupMessage(0xC76)), 0xF8, 3, 6, 0, 12, 0, 0); + this->DrawWrappedFormattedText(0x1F, 0xE5, std::string(LookupMessage(0xC76)), 0xF8, 3, 6, 0, 12, 0, 0); this->DrawCenteredText(0x1F, 0x10E, LookupMessage(0xC77), 0xF8, 0, 0x12, 0xC89482, 1); return; } diff --git a/Source/UI/RuneSystem/UIRuneSystemWnd.cpp b/Source/UI/RuneSystem/UIRuneSystemWnd.cpp index 742a5691..b5859314 100644 --- a/Source/UI/RuneSystem/UIRuneSystemWnd.cpp +++ b/Source/UI/RuneSystem/UIRuneSystemWnd.cpp @@ -1075,7 +1075,7 @@ void UIDecomlist::Paint() { std::memset(text, 0, sizeof(text)); int capacity = sizeof(text); - item.sub_6D5810(text, capacity, 0); + item.GetIdDisplayName(text, capacity, 0); this->DrawTextAt(57, y + 8, text, 0, 0, 13, 0, 0, 0); this->DrawTextAt(58, y + 28, FormatOwnedString("%d", item.quantity).c_str(), 0, 0, 13, 0, 0, 0); } diff --git a/Source/UI/Shortcuts/UIShortCutWnd.cpp b/Source/UI/Shortcuts/UIShortCutWnd.cpp index c19a6453..aaac8fe4 100644 --- a/Source/UI/Shortcuts/UIShortCutWnd.cpp +++ b/Source/UI/Shortcuts/UIShortCutWnd.cpp @@ -642,7 +642,7 @@ void UIRoMapWnd::Slot31(int x, int y) { } g_navigationMinimized = false; - g_navigationManager.sub_B995D0(name, 0, false); + g_navigationManager.SearchNavigation(name, 0, false); if (g_windowMgr.window_4F174) { static_cast(g_windowMgr.window_4F174)->SelectRoute(0); static_cast(g_windowMgr.window_4F174)->SelectRouteNode(0); @@ -1407,7 +1407,7 @@ void UINewChatWnd::Slot15(int width, int height) { int subIndex = 0; for (std::map::iterator it = g_session.m_subChatWnds.begin(); it != g_session.m_subChatWnds.end(); ++it, ++subIndex) { - g_windowMgr.sub_A97580(subIndex, it->second.x, it->second.y, it->second.width, it->second.height); + g_windowMgr.OpenSubChatWindow(subIndex, it->second.x, it->second.y, it->second.width, it->second.height); } this->m_chatEdit = new UIChatEditCtrl(); diff --git a/Source/UI/Text/NavigationLink.cpp b/Source/UI/Text/NavigationLink.cpp index d618925f..406f3058 100644 --- a/Source/UI/Text/NavigationLink.cpp +++ b/Source/UI/Text/NavigationLink.cpp @@ -1416,7 +1416,7 @@ int CCreateLineInfo::ParseItemName(int index) { char name[260]; std::memset(name, 0, sizeof(name)); int capacity = sizeof(name); - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); this->AddSegment(LINE_SEGMENT_TEXT); this->AppendText(std::string(name)); index += static_cast(digits.size()) + 9; @@ -1770,7 +1770,7 @@ void OpenTextButtonNavigation(UITextButton* button) { const int x = std::atoi(button->GetLine(1).c_str()); const int y = std::atoi(button->GetLine(2).c_str()); if (button->m_lines.size() <= 3) { - g_navigationManager.sub_B99030(name, 2, 5, false, x, y, 1002); + g_navigationManager.StartNavigation(name, 2, 5, false, x, y, 1002); return; } @@ -1783,7 +1783,7 @@ void OpenTextButtonNavigation(UITextButton* button) { } tag += name; - g_navigationManager.sub_B995D0(tag, mode, false); + g_navigationManager.SearchNavigation(tag, mode, false); return; } @@ -1798,7 +1798,7 @@ void OpenTextButtonNavigation(UITextButton* button) { const unsigned char group = code < 10 ? hundreds : static_cast(hundreds + 2); const int remainder = code < 10 ? code : code - 10; const unsigned char kind = remainder < 1 ? group : static_cast(group + 4); - g_navigationManager.sub_B99030(name, mode, kind, flag == 0, x, y, id); + g_navigationManager.StartNavigation(name, mode, kind, flag == 0, x, y, id); } // OFFSET: 0x0083BAF0 diff --git a/Source/UI/Text/PixelTextWrapping.cpp b/Source/UI/Text/PixelTextWrapping.cpp index 5af49243..57792db1 100644 --- a/Source/UI/Text/PixelTextWrapping.cpp +++ b/Source/UI/Text/PixelTextWrapping.cpp @@ -129,7 +129,7 @@ void UIWindow::WrapPixelText(const char* text, std::vector& lines, // OFFSET: 0x008932D0 // FUNCTION: fn_11504 -void UIWindow::sub_8932D0(int* kind, std::vector* lines, const std::string& text) { +void UIWindow::WrapLinkText(int* kind, std::vector* lines, const std::string& text) { const char* characters = text.c_str(); if (*kind != 3) { this->WrapPixelText(characters, *lines, this->geometry.width - 16); diff --git a/Source/UI/Text/TextWrapping.cpp b/Source/UI/Text/TextWrapping.cpp index beb4cc55..35f595a2 100644 --- a/Source/UI/Text/TextWrapping.cpp +++ b/Source/UI/Text/TextWrapping.cpp @@ -101,7 +101,7 @@ void WrapRichText( char name[260]; int capacity = sizeof(name); - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); lines.push_back(name); } } else { diff --git a/Source/UI/Text/UIAchWnd.cpp b/Source/UI/Text/UIAchWnd.cpp index 916124e6..ded2e19a 100644 --- a/Source/UI/Text/UIAchWnd.cpp +++ b/Source/UI/Text/UIAchWnd.cpp @@ -53,7 +53,7 @@ UIAchievementWnd::~UIAchievementWnd() { // OFFSET: 0x007B37F0 // FUNCTION: fn_09205 -void UIAchListWnd::sub_7B37F0(int index) { +void UIAchListWnd::SelectAchievement(int index) { this->selectedIndex = index; if (this->parent) { @@ -168,7 +168,7 @@ std::string UIAchTab::Label(int group, int sub) { // OFFSET: 0x007B4370 // FUNCTION: fn_09211 -bool UIAchTab::sub_7B4370(int x, int y, int* a, int* b) { +bool UIAchTab::HitTestTab(int x, int y, int* a, int* b) { if (x < 0 || x > this->tabWidth || y < 0) { return false; } @@ -665,7 +665,7 @@ void UIToolTipBitmapWnd::Paint() { void UIAchTab::Slot27(int x, int y) { int group = 0; int sub = 0; - this->sub_7B4370(x, y, &group, &sub); + this->HitTestTab(x, y, &group, &sub); this->hoverGroup = group; this->hoverSub = sub; this->Invalidate(); @@ -787,7 +787,7 @@ void UIAchListWnd::UpdateScroll() { // OFFSET: 0x007B7F10 // FUNCTION: fn_09242 -void UIAchTab::sub_7B7F10() { +void UIAchTab::UpdateScrollBar() { if (!this->scrollBar) { return; } @@ -863,7 +863,7 @@ int UIAchTab::SendMsg(UIWindow*, int message, std::intptr_t argument1, std::intp } if (previous != this->scrollPos) { - this->sub_7B7F10(); + this->UpdateScrollBar(); this->Invalidate(); } diff --git a/Source/UI/Text/UIAchWnd.h b/Source/UI/Text/UIAchWnd.h index 9833c4c2..cbf6bfbb 100644 --- a/Source/UI/Text/UIAchWnd.h +++ b/Source/UI/Text/UIAchWnd.h @@ -67,7 +67,7 @@ public: /* 00AC */ UIAchListInfo* unknown_00AC; void Create(int width, int height, int rows); - void sub_7B37F0(int index); + void SelectAchievement(int index); __declspec(noinline) void SetAchievements(std::map* achievements, int mode); __declspec(noinline) void UpdateScroll(); @@ -116,8 +116,8 @@ public: void ClearGroups(); void DrawGroup(int group); __declspec(noinline) std::string Label(int group, int sub); - __declspec(noinline) bool sub_7B4370(int x, int y, int* a, int* b); - __declspec(noinline) void sub_7B7F10(); + __declspec(noinline) bool HitTestTab(int x, int y, int* a, int* b); + __declspec(noinline) void UpdateScrollBar(); void Refresh(); void SetLabel(const char* text, int group, int sub); diff --git a/Source/UI/Text/UIStaticText_LF.cpp b/Source/UI/Text/UIStaticText_LF.cpp index 326e2fc8..1a4674cc 100644 --- a/Source/UI/Text/UIStaticText_LF.cpp +++ b/Source/UI/Text/UIStaticText_LF.cpp @@ -7,7 +7,7 @@ // FUNCTION: fn_12915 void UIStaticText_LF::Paint() { this->ClearSurface(0xFFFF00FF); - this->sub_A84400( + this->DrawWrappedFormattedText( 0, 0, *reinterpret_cast(reinterpret_cast(this) + 0x7C), this->geometry.width, diff --git a/Source/UI/Text/UITextViewer.cpp b/Source/UI/Text/UITextViewer.cpp index b2783707..bd905f97 100644 --- a/Source/UI/Text/UITextViewer.cpp +++ b/Source/UI/Text/UITextViewer.cpp @@ -116,7 +116,7 @@ void UIAchListWnd::Slot25(int x, int y) { return; } - this->sub_7B37F0(this->unknown_008C + row); + this->SelectAchievement(this->unknown_008C + row); g_windowMgr.SetCapture(this); } @@ -138,7 +138,7 @@ void UIAchTV::Slot25(int, int) { void UIAchTab::Slot25(int x, int y) { int a = 0; int b = 0; - if (!this->sub_7B4370(x, y, &a, &b)) { + if (!this->HitTestTab(x, y, &a, &b)) { return; } @@ -149,7 +149,7 @@ void UIAchTab::Slot25(int x, int y) { this->parent->Invalidate(); } - this->sub_7B7F10(); + this->UpdateScrollBar(); this->Invalidate(); g_windowMgr.SetCapture(this); } @@ -337,7 +337,7 @@ int UITextViewEX::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 // OFFSET: 0x00874A40 // FUNCTION: fn_11193 -std::string UIItemTagCtrl::sub_874A40(int tagId, unsigned int color) { +std::string UIItemTagCtrl::AddSkillTag(int tagId, unsigned int color) { std::string label; const std::string title = g_itemTagOwner->Title(tagId, &label, 17); diff --git a/Source/UI/Text/UITextViewerMessages.cpp b/Source/UI/Text/UITextViewerMessages.cpp index 5cc690a6..79de0246 100644 --- a/Source/UI/Text/UITextViewerMessages.cpp +++ b/Source/UI/Text/UITextViewerMessages.cpp @@ -63,7 +63,7 @@ __forceinline void UITextViewer::Activate(UITextButton* button, int id) { } name += map; - g_navigationManager.sub_B995D0(name, type, 0); + g_navigationManager.SearchNavigation(name, type, 0); break; } @@ -85,9 +85,9 @@ __forceinline void UITextViewer::Activate(UITextButton* button, int id) { flag += 4; } - g_navigationManager.sub_B99030(map.c_str(), type, flag, option == 0, x, y, target); + g_navigationManager.StartNavigation(map.c_str(), type, flag, option == 0, x, y, target); } else { - g_navigationManager.sub_B99030(map.c_str(), 2, 5, false, x, y, 1002); + g_navigationManager.StartNavigation(map.c_str(), 2, 5, false, x, y, 1002); } break; @@ -336,7 +336,7 @@ int UITextViewer::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 if (policy == -222) { std::string name = type == 3 ? "$$DB " : ""; name += map; - g_navigationManager.sub_B995D0(name, type, 0); + g_navigationManager.SearchNavigation(name, type, 0); break; } const int option = std::atoi(button->GetLine(5).c_str()); @@ -345,9 +345,9 @@ int UITextViewer::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 if (policy >= 100) { flag = 1; policy -= 100; } if (policy >= 10) { flag += 2; policy -= 10; } if (policy >= 1) { flag += 4; } - g_navigationManager.sub_B99030(map.c_str(), type, flag, option == 0, x, y, target); + g_navigationManager.StartNavigation(map.c_str(), type, flag, option == 0, x, y, target); } else { - g_navigationManager.sub_B99030(map.c_str(), 2, 5, false, x, y, 1002); + g_navigationManager.StartNavigation(map.c_str(), 2, 5, false, x, y, 1002); } } break; diff --git a/Source/UI/UICheckAttendanceWnd.cpp b/Source/UI/UICheckAttendanceWnd.cpp index 09bfeea9..2423565c 100644 --- a/Source/UI/UICheckAttendanceWnd.cpp +++ b/Source/UI/UICheckAttendanceWnd.cpp @@ -287,7 +287,7 @@ void UICheckAttendanceWnd::Slot28(int x, int y) { char name[260]; std::memset(name, 0, sizeof(name)); int capacity = sizeof(name); - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); if (std::strlen(name) != 0) { int tipX = 0; int tipY = -20; diff --git a/Source/UI/UIGradeEnchantWnd.cpp b/Source/UI/UIGradeEnchantWnd.cpp index 3dd81ee5..5e4f0a97 100644 --- a/Source/UI/UIGradeEnchantWnd.cpp +++ b/Source/UI/UIGradeEnchantWnd.cpp @@ -225,9 +225,9 @@ void UIGradeEnchantWnd::Paint() { this->DrawBitmap(152, 62, reinterpret_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\caution.bmp").c_str()))), true); this->DrawBitmap(152, 78, reinterpret_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\caution.bmp").c_str()))), true); - this->sub_A85850(166, 46, LookupMessage(3870), 228, 0, 0x00A0ADC, 0, 0, 11, 1, 0); - this->sub_A85850(166, 62, LookupMessage(3871), 228, 0, 0x5AEB00, 0, 0, 11, 1, 0); - this->sub_A85850(166, 78, LookupMessage(3872), 228, 0, 0x5AEB00, 0, 0, 11, 1, 0); + this->DrawAlignedText(166, 46, LookupMessage(3870), 228, 0, 0x00A0ADC, 0, 0, 11, 1, 0); + this->DrawAlignedText(166, 62, LookupMessage(3871), 228, 0, 0x5AEB00, 0, 0, 11, 1, 0); + this->DrawAlignedText(166, 78, LookupMessage(3872), 228, 0, 0x5AEB00, 0, 0, 11, 1, 0); } if (this->state == 1 || this->state == 2) { @@ -250,23 +250,23 @@ void UIGradeEnchantWnd::Paint() { for (const GradeEnchantMaterial& material : this->materials) { ITEM_INFO itemInfo; itemInfo.SetItemId(material.itemId); - itemInfo.sub_6D5810(description, capacity, 0); + itemInfo.GetIdDisplayName(description, capacity, 0); DrawItemIcon(*this, ResourceMgr::Instance(), 170, y - 9, itemInfo, 0); std::string text = FormatOwnedString(LookupMessage(3553), description, material.amount); - this->sub_A85850(203, y, text, 180, 0, 0, 0, 0, 11, 0, 0); + this->DrawAlignedText(203, y, text, 180, 0, 0, 0, 0, 11, 0, 0); y += 40; } if (this->info.unknown_0000 > 0) { ITEM_INFO itemInfo; itemInfo.SetItemId(this->info.unknown_0000); - itemInfo.sub_6D5810(description, capacity, 0); + itemInfo.GetIdDisplayName(description, capacity, 0); DrawItemIcon(*this, ResourceMgr::Instance(), 195, 228, itemInfo, 0); std::string text = FormatOwnedString(LookupMessage(3553), description, this->unknown_0114); - this->sub_A85850(228, 237, text, 160, 0, 0xFFFFFF, 0, 0, 11, 1, 1); + this->DrawAlignedText(228, 237, text, 160, 0, 0xFFFFFF, 0, 0, 11, 1, 1); } - this->sub_7E7050(); + this->UpdateEnchantMessages(); const int count = static_cast(this->unknown_011C.size()); for (int i = 0; i < 3; ++i) { @@ -275,15 +275,15 @@ void UIGradeEnchantWnd::Paint() { this->DrawBitmap(152, itemY, reinterpret_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\caution.bmp").c_str()))), true); const int msgId = this->unknown_011C[i]; if (msgId == 3711 || msgId == 3822) { - this->sub_A85850(166, itemY, LookupMessage(msgId), 228, 0, 0x5AEB00, 0, 0, 11, 1, 0); + this->DrawAlignedText(166, itemY, LookupMessage(msgId), 228, 0, 0x5AEB00, 0, 0, 11, 1, 0); } else { - this->sub_A85850(166, itemY, LookupMessage(msgId), 228, 0, 0x00A0ADC, 0, 0, 11, 1, 0); + this->DrawAlignedText(166, itemY, LookupMessage(msgId), 228, 0, 0x00A0ADC, 0, 0, 11, 1, 0); } } } std::string zeny = FormatOwnedString("%d", this->SelectedMaterialZeny()); - this->sub_A85850(307, 303, zeny, 120, 2, 0, 0, 0, 16, 1, 0); + this->DrawAlignedText(307, 303, zeny, 120, 2, 0, 0, 0, 16, 1, 0); } if (this->state == 2) { @@ -301,7 +301,7 @@ void UIGradeEnchantWnd::Paint() { if (this->state == 1 || this->state == 2) { std::string rate = FormatOwnedString("%d%%", this->SuccessRate()); - this->sub_A85850(39, 88, rate, 74, 6, 0xFFFFFF, 0, 29, 28, 1, 1); + this->DrawAlignedText(39, 88, rate, 74, 6, 0xFFFFFF, 0, 29, 28, 1, 1); } } @@ -667,7 +667,7 @@ void UIGradeEnchantWnd::SetResult(int state, int result) { // OFFSET: 0x007E7050 // FUNCTION: fn_09748 -void UIGradeEnchantWnd::sub_7E7050() { +void UIGradeEnchantWnd::UpdateEnchantMessages() { this->unknown_011C.clear(); if (this->state != 1) { return; diff --git a/Source/UI/UIGradeEnchantWnd.h b/Source/UI/UIGradeEnchantWnd.h index d6996c91..df11b54a 100644 --- a/Source/UI/UIGradeEnchantWnd.h +++ b/Source/UI/UIGradeEnchantWnd.h @@ -72,7 +72,7 @@ public: void ResetItem(); int SelectedMaterialZeny(); int SuccessRate(); - void sub_7E7050(); + void UpdateEnchantMessages(); void SetEnchantInfo( short index, int value, int materialCount, GradeEnchantInfo info, int value0108, int value010C, const GradeEnchantMaterial* materials ); diff --git a/Source/UI/UIIngredientInfoWnd.h b/Source/UI/UIIngredientInfoWnd.h index 772bec65..51fb6454 100644 --- a/Source/UI/UIIngredientInfoWnd.h +++ b/Source/UI/UIIngredientInfoWnd.h @@ -26,7 +26,7 @@ public: void Slot35(int argument) override; void Paint() override; void Click(int button, int unused); - void sub_6028C0(std::uint32_t id); + void SetIngredientItem(std::uint32_t id); /* 00B8 */ ITEM_INFO item; /* 01B0 */ unsigned char selected; diff --git a/Source/UI/UILapineBoxWnd.cpp b/Source/UI/UILapineBoxWnd.cpp index 3fa6bb35..7013c4e5 100644 --- a/Source/UI/UILapineBoxWnd.cpp +++ b/Source/UI/UILapineBoxWnd.cpp @@ -528,7 +528,7 @@ void UILapineBoxWnd::SetIngredient(int id) { char name[0x104]; std::memset(name, 0, sizeof(name)); int capacity = 0x104; - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); this->title.assign(name, std::strlen(name)); } @@ -574,7 +574,7 @@ void UILapineBoxWnd::AddMaterial(int id, int quantity) { // OFFSET: 0x006028C0 // FUNCTION: fn_04183 -void UIIngredientInfoWnd::sub_6028C0(std::uint32_t id) { +void UIIngredientInfoWnd::SetIngredientItem(std::uint32_t id) { this->item = LookupClientItemByIdentity(g_session.m_inventoryItems, id); std::vector breaks; diff --git a/Source/UI/UILapineScrollBar.cpp b/Source/UI/UILapineScrollBar.cpp index 7c9c8f07..f2a4ea19 100644 --- a/Source/UI/UILapineScrollBar.cpp +++ b/Source/UI/UILapineScrollBar.cpp @@ -344,7 +344,7 @@ unsigned char UILapineBox_IngredientListWnd::AddIngredient(std::uint32_t id) { UILapineBoxWnd* owner = static_cast(this->parent); UIIngredientInfoWnd* info = new UIIngredientInfoWnd(); info->SetSize(136, 30); - info->sub_6028C0(id); + info->SetIngredientItem(id); info->quantity = it->quantity; this->AddScrollChild(info); diff --git a/Source/UI/UILapineUpgradeBoxWnd.cpp b/Source/UI/UILapineUpgradeBoxWnd.cpp index 37fd9984..3831067e 100644 --- a/Source/UI/UILapineUpgradeBoxWnd.cpp +++ b/Source/UI/UILapineUpgradeBoxWnd.cpp @@ -288,7 +288,7 @@ void UILapineUpgradeBoxWnd::SetIngredient(int id) { char name[0x104]; std::memset(name, 0, sizeof(name)); int capacity = sizeof(name); - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); this->title.assign(name, std::strlen(name)); int minimumRefine = 0; diff --git a/Source/UI/UIMacroBlackListCheckWnd.cpp b/Source/UI/UIMacroBlackListCheckWnd.cpp index 15292f27..5e97ff36 100644 --- a/Source/UI/UIMacroBlackListCheckWnd.cpp +++ b/Source/UI/UIMacroBlackListCheckWnd.cpp @@ -99,15 +99,15 @@ void UIMacroBlackListCheckWnd::Paint() { this->DrawPanelBackground(titleHeight, 0x21C, "유저인터페이스\\basic_interface\\blacklist_check_bg.bmp"); this->DrawButtonBar(2, this->geometry.width + 1, 1); - this->sub_A85850(7, 0x24, FormatOwnedString(LookupMessage(0xFB4)).c_str(), 0x20E, 6, 0, 0, 0, 0xC, 1, 0); - this->sub_A85850(7, 0x159, FormatOwnedString(LookupMessage(0xFB5), this->unknown_00E4).c_str(), 0x20E, 6, 0x3939FF, 0, 0, 0xC, 1, 0); - this->sub_A85850(0x4F, 0xF6, FormatOwnedString(LookupMessage(0xFB6), this->unknown_00E4).c_str(), 0xA2, 6, 0, 0, 0, 0xC, 0, 0); + this->DrawAlignedText(7, 0x24, FormatOwnedString(LookupMessage(0xFB4)).c_str(), 0x20E, 6, 0, 0, 0, 0xC, 1, 0); + this->DrawAlignedText(7, 0x159, FormatOwnedString(LookupMessage(0xFB5), this->unknown_00E4).c_str(), 0x20E, 6, 0x3939FF, 0, 0, 0xC, 1, 0); + this->DrawAlignedText(0x4F, 0xF6, FormatOwnedString(LookupMessage(0xFB6), this->unknown_00E4).c_str(), 0xA2, 6, 0, 0, 0, 0xC, 0, 0); std::string stars; for (int i = 0; i < this->inputLength; ++i) { stars += "*"; } - this->sub_A85850(0x86, 0x109, stars.c_str(), 0x32, 6, 0x4949FF, 0, 0, 0xC, 0, 0); + this->DrawAlignedText(0x86, 0x109, stars.c_str(), 0x32, 6, 0x4949FF, 0, 0, 0xC, 0, 0); int x = 0; for (int i = 0; i < this->codeLength; ++i) { @@ -118,7 +118,7 @@ void UIMacroBlackListCheckWnd::Paint() { base = 0x5D; } - this->sub_A85850(x + base, this->charColors[i], this->code + i, 0, 0, 0, 0, 0, this->charSizes[i], this->charFlags[i], 0); + this->DrawAlignedText(x + base, this->charColors[i], this->code + i, 0, 0, 0, 0, 0, this->charSizes[i], this->charFlags[i], 0); x += 0x17; } @@ -127,12 +127,12 @@ void UIMacroBlackListCheckWnd::Paint() { const unsigned remainingSec = remainingMs / 1000u; const unsigned remainingMin = remainingSec / 60u; if (remainingSec < 60u) { - this->sub_A85850( + this->DrawAlignedText( 0x4F, 0xA4, FormatOwnedString(LookupMessage(0xFB3), 0, static_cast(remainingMin), static_cast(remainingSec)).c_str(), 0xA2, 6, 0xFF, 0, 0, 0xD, 1, 0 ); } else { - this->sub_A85850(0x4F, 0xA4, FormatOwnedString(LookupMessage(0xFB3), 0, 0, 0).c_str(), 0xA2, 6, 0xFF, 0, 0, 0xD, 1, 0); + this->DrawAlignedText(0x4F, 0xA4, FormatOwnedString(LookupMessage(0xFB3), 0, 0, 0).c_str(), 0xA2, 6, 0xFF, 0, 0, 0xD, 1, 0); } } diff --git a/Source/UI/UIMacroUserInfoWnd.cpp b/Source/UI/UIMacroUserInfoWnd.cpp index c40b09df..39cec3f2 100644 --- a/Source/UI/UIMacroUserInfoWnd.cpp +++ b/Source/UI/UIMacroUserInfoWnd.cpp @@ -64,15 +64,15 @@ UIMacroUserInfoWnd::UIMacroUserInfoWnd() // OFFSET: 0x007EF2C0 // FUNCTION: fn_09839 -void UIMacroReporterWnd::sub_7EF2C0(MacroReporterEntry* entry) { +void UIMacroReporterWnd::AddPickedActor(MacroReporterEntry* entry) { if (entry) { - this->sub_7EF2E0(entry->id); + this->AddActorByAID(entry->id); } } // OFFSET: 0x007EF2E0 // FUNCTION: fn_09840 -void UIMacroReporterWnd::sub_7EF2E0(int aid) { +void UIMacroReporterWnd::AddActorByAID(int aid) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); CGameActor* actor = static_cast(mode->scene->GetGameActorByAID(aid)); if (!actor) { @@ -95,7 +95,7 @@ void UIMacroReporterWnd::sub_7EF2E0(int aid) { this->m_entries.push_back(MacroReporterEntry(name, aid, static_cast(actor->GetEffectiveJob(-1)))); found: - this->sub_7EF430(aid, name); + this->AddActorRow(aid, name); this->UpdateScrollBar(); } @@ -109,7 +109,7 @@ struct AccessibleTextButton : public UITextButton { // OFFSET: 0x007EF430 // FUNCTION: fn_09841 -void UIMacroReporterWnd::sub_7EF430(int aid, std::string name) { +void UIMacroReporterWnd::AddActorRow(int aid, std::string name) { for (std::size_t i = 0; i < this->m_rows.size(); ++i) { if (this->m_rows[i].second->geometry.id == aid) { return; @@ -126,7 +126,7 @@ void UIMacroReporterWnd::sub_7EF430(int aid, std::string name) { btn1->Enable(0); this->AddChild(btn1); - std::string truncated = this->sub_7EF680(0x8E, name.c_str(), 0, 13, 0); + std::string truncated = this->EllipsizeText(0x8E, name.c_str(), 0, 13, 0); auto* btn2 = new UITextButton(); btn2->Configure("", 0, 0, 13, 0, 1); static_cast(btn2)->m_hoverColor = 0x2D2D2D; @@ -142,7 +142,7 @@ void UIMacroReporterWnd::sub_7EF430(int aid, std::string name) { // OFFSET: 0x007EF680 // FUNCTION: fn_09842 -std::string UIMacroReporterWnd::sub_7EF680(int maxWidth, const char* text, int font, int height, unsigned char bold) { +std::string UIMacroReporterWnd::EllipsizeText(int maxWidth, const char* text, int font, int height, unsigned char bold) { std::string source(text); const int width = this->TextWidth(text, 0, font, height, bold, 0); this->TextWidth("...", 0, font, height, bold, 0); @@ -827,7 +827,7 @@ int UIMacroReporterWnd::SendMsg( for (unsigned int index = 0; index < this->m_state->entries.size(); ++index) { const MacroReporterEntry& entry = this->m_state->entries[index]; this->m_entries.push_back(MacroReporterEntry(entry.name, entry.id, entry.unknown_001C)); - this->sub_7EF430(entry.id, entry.name); + this->AddActorRow(entry.id, entry.name); } this->UpdateScrollBar(); break; diff --git a/Source/UI/UIMacroUserInfoWnd.h b/Source/UI/UIMacroUserInfoWnd.h index 864ba70c..f8c1c11d 100644 --- a/Source/UI/UIMacroUserInfoWnd.h +++ b/Source/UI/UIMacroUserInfoWnd.h @@ -60,10 +60,10 @@ public: void UpdateScrollBar(); bool ValidateTarget(unsigned char notify); bool ValidateNames(unsigned char notify); - void sub_7EF2C0(MacroReporterEntry* entry); - void sub_7EF2E0(int aid); - void sub_7EF430(int aid, std::string name); - std::string sub_7EF680(int maxWidth, const char* text, int font, int height, unsigned char bold); + void AddPickedActor(MacroReporterEntry* entry); + void AddActorByAID(int aid); + void AddActorRow(int aid, std::string name); + std::string EllipsizeText(int maxWidth, const char* text, int font, int height, unsigned char bold); /* 00B4 */ std::vector> m_rows; /* 00C0 */ UIScrollBar* m_scrollBar; diff --git a/Source/UI/UIRefiningWnd.cpp b/Source/UI/UIRefiningWnd.cpp index cce1cd8f..2d270dbe 100644 --- a/Source/UI/UIRefiningWnd.cpp +++ b/Source/UI/UIRefiningWnd.cpp @@ -316,7 +316,7 @@ __declspec(safebuffers) void UIRefiningWnd::ApplyResult() { std::memset(name, 0, sizeof(name)); info.SetItemId(itemId); int capacity = 260; - info.sub_6D5810(name, capacity, 0); + info.GetIdDisplayName(name, capacity, 0); this->againButton->SetTooltip(name); const ITEM_INFO owned = LookupClientItem(g_session.m_inventoryItems, itemId, 0); @@ -535,7 +535,7 @@ void UIRefiningWnd::Slot28(int x, int y) { ITEM_INFO info; info.SetItemId(this->materials[this->selectedMaterial].itemId); int capacity = 260; - info.sub_6D5810(name, capacity, 0); + info.GetIdDisplayName(name, capacity, 0); int tipX = 81; int tipY = 150; this->ToScreen(tipX, tipY); @@ -547,7 +547,7 @@ void UIRefiningWnd::Slot28(int x, int y) { ITEM_INFO info; info.SetItemId(this->catalystItemId); int capacity = 260; - info.sub_6D5810(name, capacity, 0); + info.GetIdDisplayName(name, capacity, 0); int tipX = 161; int tipY = 150; this->ToScreen(tipX, tipY); @@ -568,12 +568,12 @@ void UIRefiningWnd::Slot28(int x, int y) { ITEM_INFO info; info.SetItemId(this->materials[slot].itemId); int capacity = 260; - info.sub_6D5810(name, capacity, 0); + info.GetIdDisplayName(name, capacity, 0); } else if (slot == 4 && this->catalystCount > 0) { ITEM_INFO info; info.SetItemId(this->catalystItemId); int capacity = 260; - info.sub_6D5810(name, capacity, 0); + info.GetIdDisplayName(name, capacity, 0); } if (std::strlen(name) != 0) { diff --git a/Source/UI/Window/UIHotKeyWnd.cpp b/Source/UI/Window/UIHotKeyWnd.cpp index 53128d52..86e8b7cf 100644 --- a/Source/UI/Window/UIHotKeyWnd.cpp +++ b/Source/UI/Window/UIHotKeyWnd.cpp @@ -197,7 +197,7 @@ void UIHotKeyWnd::SaveHotkeys() { for (const auto& entry : this->hotkeys[tab]) { g_session.m_hotkeyScript->Call("ChangeUserHotKey", "ddsdd", tab + 1, entry.first, entry.second.description.c_str(), entry.second.key1, entry.second.key2); if (tab == 1) { - g_windowMgr.sub_AAB0B0(); + g_windowMgr.RefreshGameSettingHotkeys(); } } } diff --git a/Source/UI/Window/UIMessageBox.cpp b/Source/UI/Window/UIMessageBox.cpp index d6bac9b6..4d80edf9 100644 --- a/Source/UI/Window/UIMessageBox.cpp +++ b/Source/UI/Window/UIMessageBox.cpp @@ -3540,8 +3540,8 @@ void UIHomunInfoWnd::Paint() { std::strcpy(text, LookupMessage(676)); } this->DrawTextAt(150, 159, text, 0, 0, 12, 0, 0, 0); - this->sub_A84400(225, 136, std::string(LookupMessage(3279)), 0, 0, 0, 0, 12, 0, 0); - this->sub_A84400(8, 180, std::string(LookupMessage(3284)), 0, 0, 0, 0, 12, 0xFF, 0); + this->DrawWrappedFormattedText(225, 136, std::string(LookupMessage(3279)), 0, 0, 0, 0, 12, 0, 0); + this->DrawWrappedFormattedText(8, 180, std::string(LookupMessage(3284)), 0, 0, 0, 0, 12, 0xFF, 0); } // OFFSET: 0x008BDD10 diff --git a/Source/UI/Window/UINewSkillListWnd.cpp b/Source/UI/Window/UINewSkillListWnd.cpp index c7b26d52..f7363b2e 100644 --- a/Source/UI/Window/UINewSkillListWnd.cpp +++ b/Source/UI/Window/UINewSkillListWnd.cpp @@ -132,7 +132,7 @@ void UINewSkillListWnd::Slot35(int delta) { // OFFSET: 0x009AE730 // FUNCTION: fn_13800 -void UINewSkillListWnd::sub_9AE730() { +void UINewSkillListWnd::ApplySkillPoints() { if (g_session.m_simplifiedSkillList == 0) { for (const NewSkillListValue& entry : this->m_unknown_02A0) { const int id = entry.id; @@ -172,7 +172,7 @@ int g_skillListHeadOffsetY; // OFFSET: 0x009AE930 // FUNCTION: fn_13801 -void UINewSkillListWnd::sub_9AE930() { +void UINewSkillListWnd::DrawCharacter() { std::string bodyImf; std::string actions[2]; std::string sprites[2]; @@ -280,7 +280,7 @@ void UINewSkillListWnd::sub_9AE930() { // OFFSET: 0x009AF300 // FUNCTION: fn_13802 -void UINewSkillListWnd::sub_9AF300() { +void UINewSkillListWnd::DrawSkillList() { LuaScript& script = *g_session.m_hotkeyScript; int drawn = 0; int index = 0; @@ -934,14 +934,14 @@ void UINewSkillListWnd::Paint() { } else { StringFormat(text, sizeof(text), static_cast(-1), "%s%d", LookupMessage(2343), total); } - this->sub_A84400(80, this->geometry.height - 23, std::string(text), 0, 0, 0, 0, 12, 0, 0); - this->sub_9AF960(); - this->sub_9AE930(); + this->DrawWrappedFormattedText(80, this->geometry.height - 23, std::string(text), 0, 0, 0, 0, 12, 0, 0); + this->DrawSkillTree(); + this->DrawCharacter(); } else { std::sprintf(text, LookupMessage(284), points); this->TextWidth(text, 0, 0, 12, 0, 0); this->DrawTextAt(30, this->geometry.height - 23, text, 0, 0, 12, 0, 0, 0); - this->sub_9AF300(); + this->DrawSkillList(); } this->m_needsRedraw = 0; @@ -985,7 +985,7 @@ void UINewSkillListWnd::Slot25(int x, int y) { if (this->m_showDetail) { this->m_showDetail = false; - this->sub_9B2CD0(); + this->UpdateRequiredSkills(); } int oldSelected = this->m_selectedSkill; @@ -1022,7 +1022,7 @@ void UINewSkillListWnd::Slot31(int x, int y) { if (gate == 0 && this->IsSkillArea(x, y)) { CSkillInfo skill = this->SkillAt(this->m_selectedSkill, false); if (skill.unknown_002C != 0 && skill.available != 0) { - if (this->sub_9B3EB0(skill.id)) { + if (this->IncreaseSkillLevel(skill.id)) { this->m_needsRedraw = 1; this->m_locked = 1; this->LayoutButtons(); @@ -1055,7 +1055,7 @@ void UINewSkillListWnd::Slot28(int x, int y) { if (previous != this->m_selectedSkill) { if (!this->m_showDetail) { - this->sub_9B2CD0(); + this->UpdateRequiredSkills(); } this->m_needsRedraw = 1; this->Invalidate(); @@ -1076,7 +1076,7 @@ void UINewSkillListWnd::Slot33(int x, int y) { } } else if (this->m_detailId != this->m_selectedSkill) { this->m_showDetail = true; - this->sub_9B2CD0(); + this->UpdateRequiredSkills(); } else { this->m_showDetail = !this->m_showDetail; } @@ -1127,7 +1127,7 @@ void UINewSkillListWnd::Slot33(int x, int y) { // OFFSET: 0x009B2CD0 // FUNCTION: fn_13822 -void UINewSkillListWnd::sub_9B2CD0() { +void UINewSkillListWnd::UpdateRequiredSkills() { this->m_values.clear(); for (int i = 0; i < static_cast(this->m_tabs->labels.size()); ++i) { UITabControl* tabs = this->m_tabs; @@ -1341,7 +1341,7 @@ int UINewSkillListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s return 0; case 271: if (g_windowMgr.Confirm(LookupMessage(1377), 2, false, false, 0, "Message", 280, 120, 0) == 187) { - this->sub_9AE730(); + this->ApplySkillPoints(); this->SendMsg(nullptr, 23, 0, 0, 0, 0); if (ChatWindow()) { g_windowMgr.SetFocus(ChatWindow()->m_suggestions); @@ -1380,7 +1380,7 @@ int UINewSkillListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s case 248: if (this->m_skillPoints != 0) { CSkillInfo skill = this->SkillAt(this->m_columns * this->m_firstRow + a - 239, false); - if (skill.available != 0 && skill.unknown_0018 != 0 && this->sub_9B3EB0(skill.id)) { + if (skill.available != 0 && skill.unknown_0018 != 0 && this->IncreaseSkillLevel(skill.id)) { this->m_needsRedraw = 1; this->m_locked = 1; this->LayoutButtons(); @@ -1495,7 +1495,7 @@ int UINewSkillListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s // OFFSET: 0x009B3EB0 // FUNCTION: fn_13827 -bool UINewSkillListWnd::sub_9B3EB0(int skillId) { +bool UINewSkillListWnd::IncreaseSkillLevel(int skillId) { if (this->m_skillPoints <= 0 || this->m_showDetail) { return false; } @@ -1608,7 +1608,7 @@ static int SkillValueOf(const std::list& values, int id) { // OFFSET: 0x009AF960 // FUNCTION: fn_13803 -void UINewSkillListWnd::sub_9AF960() { +void UINewSkillListWnd::DrawSkillTree() { LuaScript& script = *g_session.m_hotkeyScript; CBitmapRes* emptySlot = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\no_skill.bmp"))); diff --git a/Source/UI/Window/UINewSkillListWnd.h b/Source/UI/Window/UINewSkillListWnd.h index a50bdf13..f5aeb89e 100644 --- a/Source/UI/Window/UINewSkillListWnd.h +++ b/Source/UI/Window/UINewSkillListWnd.h @@ -47,15 +47,15 @@ public: void InitTabs(); void ResetLists(); bool IsSkillArea(int x, int y); - void sub_9B2CD0(); + void UpdateRequiredSkills(); void UpdateScrollBar(); void LayoutButtons(); int SkillIndexAt(int x, int y); - bool sub_9B3EB0(int skillId); - void sub_9AE930(); - void sub_9AF300(); - void sub_9AF960(); - void sub_9AE730(); + bool IncreaseSkillLevel(int skillId); + void DrawCharacter(); + void DrawSkillList(); + void DrawSkillTree(); + void ApplySkillPoints(); public: /* 00B4 */ UITabControl* m_tabs; diff --git a/Source/UI/Window/UIPetEvolutionWnd.cpp b/Source/UI/Window/UIPetEvolutionWnd.cpp index 6d5ea309..f096a878 100644 --- a/Source/UI/Window/UIPetEvolutionWnd.cpp +++ b/Source/UI/Window/UIPetEvolutionWnd.cpp @@ -231,7 +231,7 @@ void UIPetEvolutionWnd::RebuildButtons() { char text[260]; std::memset(text, 0, sizeof(text)); int capacity = sizeof(text); - item.sub_6D5810(text, capacity, 0); + item.GetIdDisplayName(text, capacity, 0); UITextButton* button = new UITextButton(); button->Configure(text, 0xFF6464, 0, 12, 1, 1); button->m_hoverColor = 0x9B9B9B; diff --git a/Source/UI/Window/UIRegisterMgr.cpp b/Source/UI/Window/UIRegisterMgr.cpp index b84d3766..343dd207 100644 --- a/Source/UI/Window/UIRegisterMgr.cpp +++ b/Source/UI/Window/UIRegisterMgr.cpp @@ -2,6 +2,6 @@ // OFFSET: 0x00A970A0 // FUNCTION: fn_17199 -bool CUIRegisterMgr::sub_A970A0(int key) { +bool CUIRegisterMgr::IsRegistered(int key) { return this->entries.find(key) != this->entries.end(); } diff --git a/Source/UI/Window/UIRegisterMgr.h b/Source/UI/Window/UIRegisterMgr.h index 7eaaac25..f4889b30 100644 --- a/Source/UI/Window/UIRegisterMgr.h +++ b/Source/UI/Window/UIRegisterMgr.h @@ -14,7 +14,7 @@ class CUIFrameWnd; class CUIRegisterMgr : public Singleton { public: __declspec(noinline) CUIRegisterMgr(); - bool sub_A970A0(int key); + bool IsRegistered(int key); void Register(int key, std::function factory); CUIFrameWnd* Create(int key); void Load(); diff --git a/Source/UI/Window/UIRoMapWnd.cpp b/Source/UI/Window/UIRoMapWnd.cpp index cd6eeaae..f76e2ad6 100644 --- a/Source/UI/Window/UIRoMapWnd.cpp +++ b/Source/UI/Window/UIRoMapWnd.cpp @@ -768,7 +768,7 @@ int UIRoMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, case 321: if (this->m_searchEdit->Length()) { std::string name(this->m_searchEdit->Text()); - if (g_navigationManager.sub_B995D0(name, 0, true) == true) { + if (g_navigationManager.SearchNavigation(name, 0, true) == true) { reinterpret_cast(this)->RefreshWorldMapLevels(); } } @@ -788,7 +788,7 @@ int UIRoMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, name.resize(name.size() - 4); } g_navigationMinimized = false; - g_navigationManager.sub_B995D0(name, 0, false); + g_navigationManager.SearchNavigation(name, 0, false); if (g_windowMgr.LookupWindow(203)) { static_cast(g_windowMgr.window_4F174)->SelectRoute(0); static_cast(g_windowMgr.window_4F174)->SelectRouteNode(0); @@ -1034,7 +1034,7 @@ void UIRoMapWnd::Slot15(int, int) { g_worldViewMgr.SelectCurrentWorld(); this->m_worldCombo->Select(g_worldViewMgr.currentWorld); - g_worldViewMgr.sub_6168F0(); + g_worldViewMgr.LoadTextures(); this->Invalidate(); { std::string name = g_navigationManager.GetCurrentTargetName(); diff --git a/Source/UI/Window/UIWindow.cpp b/Source/UI/Window/UIWindow.cpp index da75b936..6dd726c9 100644 --- a/Source/UI/Window/UIWindow.cpp +++ b/Source/UI/Window/UIWindow.cpp @@ -3458,7 +3458,7 @@ void UINavigationV4Wnd::SelectRouteNode(int node) { // OFFSET: 0x00A85850 // FUNCTION: fn_17017 -void UIWindow::sub_A85850( +void UIWindow::DrawAlignedText( int x, int y, std::string text, int width, int align, std::uint32_t color, int outlineColor, int family, int height, int bold, unsigned char outlined ) { int textWidth = 0; @@ -3597,7 +3597,7 @@ void UIPrivateAirplaneWnd::Slot15(int, int) { char name[260]; std::memset(name, 0, sizeof(name)); int capacity = 0x104; - item.sub_6D5810(name, capacity, 0); + item.GetIdDisplayName(name, capacity, 0); if (std::strlen(name) == 0) { continue; } @@ -3878,7 +3878,7 @@ void UINavigationV4Wnd::DrawTargetSprite(int x, int y, int width, int height, co // OFFSET: 0x00A84400 // FUNCTION: fn_17010 -int UIWindow::sub_A84400( +int UIWindow::DrawWrappedFormattedText( int x, int y, const std::string& text, int width, int lineSpacing, int align, int family, int height, std::uint32_t color, unsigned char bold ) { std::list lines; diff --git a/Source/UI/Window/UIWindow.h b/Source/UI/Window/UIWindow.h index 07b91b87..ab7977f6 100644 --- a/Source/UI/Window/UIWindow.h +++ b/Source/UI/Window/UIWindow.h @@ -120,7 +120,7 @@ public: void ClearSurface(std::uint32_t color); void SetSize(int width, int height); void DrawBitmap(int x, int y, const BitmapImage* image, bool transparent); - void sub_A85850(int x, int y, std::string text, int width, int align, std::uint32_t color, int arg7, int arg8, int arg9, int arg10, unsigned char bold); + void DrawAlignedText(int x, int y, std::string text, int width, int align, std::uint32_t color, int arg7, int arg8, int arg9, int arg10, unsigned char bold); void FillRegion(int x, int y, int width, int height, std::uint32_t color); int TextWidth(const char* text, unsigned bytes, int family, int height, unsigned char bold, unsigned char italic); void WrapPixelText(const char* text, std::vector& lines, int width); @@ -146,13 +146,13 @@ public: ); void DrawFormattedText(int x, int y, const std::string& text, int width, int align, int family, int height, std::uint32_t color, unsigned char bold); void DrawEmboldenedText(int x, int y, const char* text, std::uint32_t color, std::uint32_t secondColor, int bytes, int family, int height); - int sub_A84400( + int DrawWrappedFormattedText( int x, int y, const std::string& text, int width, int lineSpacing, int align, int family, int height, std::uint32_t color, unsigned char bold ); void FlushPrimitives(RenderQueues& queues, bool depthAlpha, float depthStart, float depthEnd); void FillSurface(std::uint32_t color, const tagRECT* rectangle); - void sub_8932D0(int* kind, std::vector* lines, const std::string& text); + void WrapLinkText(int* kind, std::vector* lines, const std::string& text); void WrapTextWithBreaks(const char* text, std::vector* lines, std::vector* breaks, int width); int DrawItemNameSegments( int x, int y, int width, const std::vector& breaks, const char* text, const char* highlight, std::uint32_t highlightColor, diff --git a/Source/UI/Window/UIWindowMgr.cpp b/Source/UI/Window/UIWindowMgr.cpp index 625b99da..fd107703 100644 --- a/Source/UI/Window/UIWindowMgr.cpp +++ b/Source/UI/Window/UIWindowMgr.cpp @@ -974,7 +974,7 @@ void UIWindowMgr::Shutdown() { // OFFSET: 0x00AA6B80 // FUNCTION: fn_17234 -void UIWindowMgr::sub_AA6B80() { +void UIWindowMgr::ClearMapWindows() { if (!this->modalWindows.empty() && this->modalWindows.back()) { this->activeWindowId = 185; } @@ -1626,10 +1626,10 @@ bool UIWindowMgr::ProcessKeyDown(int key, int keyData, int pressed) { } lastKey = key; - if ((key == 0x0D || key == 0x20) && this->sub_A8CA20()) { + if ((key == 0x0D || key == 0x20) && this->ProcessEnterKey()) { return true; } - if (!this->sub_AA35F0(action)) { + if (!this->ProcessShortcutKey(action)) { return this->ProcessHotkeyAction(key, pressed); } if (this->IsHoverParentVisible() || this->IsHoverOnWindow01C8Button()) { @@ -2134,19 +2134,19 @@ std::vector UIWindowMgr::SaveReplayWindows() { return data; } -void __fastcall sub_DFF150(CSession* session); +void __fastcall RefreshPartyWindows(CSession* session); // OFFSET: 0x00A8C4B0 // FUNCTION: fn_17132 -void UIWindowMgr::sub_A8C4B0(int id) { +void UIWindowMgr::CloseMiniPartyWindow(int id) { g_session.EraseRecord0734(id); this->unknown_4F248.push_back(id); - sub_DFF150(&g_session); + RefreshPartyWindows(&g_session); } // OFFSET: 0x00A8CA20 // FUNCTION: fn_17139 -bool UIWindowMgr::sub_A8CA20() { +bool UIWindowMgr::ProcessEnterKey() { if (g_replayAnimationScaling != 0) { return false; } @@ -2253,7 +2253,7 @@ bool UIWindowMgr::sub_A8CA20() { // OFFSET: 0x00A97580 // FUNCTION: fn_17205 -UIWindow* UIWindowMgr::sub_A97580(int id, int x, int y, int width, int height) { +UIWindow* UIWindowMgr::OpenSubChatWindow(int id, int x, int y, int width, int height) { if (x == -1 && y == -1) { x = (id + 10) * 10; y = (id + 5) * 20; @@ -2627,7 +2627,7 @@ bool UIWindowMgr::ProcessHotkeyAction(int action, int pressed) { case 13: if (pressed) { - this->sub_A8CA20(); + this->ProcessEnterKey(); } break; @@ -4169,7 +4169,7 @@ void UIWindowMgr::ShowWaitDBSaveWindow() { // OFFSET: 0x00AA35F0 // FUNCTION: fn_17221 -bool UIWindowMgr::sub_AA35F0(int action) { +bool UIWindowMgr::ProcessShortcutKey(int action) { if (action != 4) { return false; } @@ -6744,7 +6744,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } window->Show(1); static_cast(this->unknown_03B8)->CreateKeypad(g_session.m_loginAccountId); - static_cast(this->unknown_03B8)->sub_90C970(0); + static_cast(this->unknown_03B8)->SetInputMode(0); break; } case 200: { @@ -6773,7 +6773,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } window->Show(1); static_cast(this->unknown_03BC)->CreateKeypad(g_session.m_loginAccountId); - static_cast(this->unknown_03BC)->sub_90C970(1); + static_cast(this->unknown_03BC)->SetInputMode(1); break; } case 227: @@ -7536,7 +7536,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } break; default: - if (Singleton::GetInstance()->sub_A970A0(id)) { + if (Singleton::GetInstance()->IsRegistered(id)) { window = this->LookupWindow(id); if (window == nullptr) { window = Singleton::GetInstance()->Create(id); diff --git a/Source/UI/Window/UIWindowMgr.h b/Source/UI/Window/UIWindowMgr.h index 663ded20..4699e305 100644 --- a/Source/UI/Window/UIWindowMgr.h +++ b/Source/UI/Window/UIWindowMgr.h @@ -442,7 +442,7 @@ public: void InitializeWindowPolicy(); void ResetWindows(); void Shutdown(); - void sub_AA6B80(); + void ClearMapWindows(); void SetScreenSize(int width, int height); void ArrangeMiniPartyWindows(); __declspec(noinline) void AddMiniPartyWindow(UIWindow* window); @@ -467,9 +467,9 @@ public: UIWindow* HitTestWindows(int x, int y); void ShowDropDown(UIWindow* owner, UIWindow* child, int x, int y); bool CloseDropDown(); - void sub_AAB070(int option); - void sub_AAB090(); - void sub_AAB0B0(); + void RefreshGameSettingOption(int option); + void RefreshGameSettings(); + void RefreshGameSettingHotkeys(); UIWindow* EnsureWindow(int id); UIWindow* CreateLayoutWindow(int id); RECT GetMiniPartyUsableArea(); @@ -535,9 +535,9 @@ public: bool IsOrderFixed(int id); __declspec(noinline) void RemoveOrder(int id); void BringToFront(int id); - void sub_A8C4B0(int id); - bool sub_A8CA20(); - UIWindow* sub_A97580(int id, int x, int y, int width, int height); + void CloseMiniPartyWindow(int id); + bool ProcessEnterKey(); + UIWindow* OpenSubChatWindow(int id, int x, int y, int width, int height); void SetCapture(UIWindow* window); void ReleaseCapture(); UIWindow* Capture() const; @@ -597,7 +597,7 @@ public: int GetHotkeyBehavior(); std::vector SaveReplayWindows(); bool ProcessHotkeyAction(int action, int pressed); - bool sub_AA35F0(int action); + bool ProcessShortcutKey(int action); bool ProcessKeyDown(int key, int keyData, int pressed); void ShowWaitDBSaveWindow(); void SendEmotionHotkey(int index); diff --git a/Source/Utility/JsonCppLoader.cpp b/Source/Utility/JsonCppLoader.cpp index b9ef8395..ac111ed0 100644 --- a/Source/Utility/JsonCppLoader.cpp +++ b/Source/Utility/JsonCppLoader.cpp @@ -107,7 +107,7 @@ struct JsonCppLoaderJsonOptionsGuard { // OFFSET: 0x004F3CC0 // FUNCTION: fn_00487 -bool JsonCppLoader::sub_4F3CC0(const std::string& path) { +bool JsonCppLoader::LoadBson(const std::string& path) { try { std::ifstream file(path.c_str(), std::ios::binary); if (!file.is_open()) { @@ -134,7 +134,7 @@ bool JsonCppLoader::sub_4F3CC0(const std::string& path) { // OFFSET: 0x004F3ED0 // FUNCTION: fn_00489 -bool JsonCppLoader::sub_4F3ED0(const std::string& path) { +bool JsonCppLoader::LoadJson(const std::string& path) { try { std::ifstream file(path.c_str()); if (!file.is_open()) { @@ -161,7 +161,7 @@ bool JsonCppLoader::sub_4F3ED0(const std::string& path) { // OFFSET: 0x004F3C70 // FUNCTION: fn_00486 -bool JsonCppLoader::sub_4F3C70(std::vector& buffer, bool bson) { +bool JsonCppLoader::Load(std::vector& buffer, bool bson) { if (buffer.empty()) { this->Fail("error : JsonCppLoader::Load failed (reason : 비어있는 버퍼가 전달되었습니다.)"); return false; @@ -169,9 +169,9 @@ bool JsonCppLoader::sub_4F3C70(std::vector& buffer, bool bson) { bool parsed; if (bson == true) { - parsed = this->sub_4F3DF0(buffer); + parsed = this->LoadBson(buffer); } else { - parsed = this->sub_4F4040(buffer); + parsed = this->LoadJson(buffer); } if (parsed) { @@ -184,7 +184,7 @@ bool JsonCppLoader::sub_4F3C70(std::vector& buffer, bool bson) { // OFFSET: 0x004F3DF0 // FUNCTION: fn_00488 -__declspec(noinline) bool JsonCppLoader::sub_4F3DF0(std::vector& buffer) { +__declspec(noinline) bool JsonCppLoader::LoadBson(std::vector& buffer) { if (buffer.empty()) { this->Fail("비어있는 버퍼가 전달되었습니다."); return false; @@ -208,7 +208,7 @@ __declspec(noinline) bool JsonCppLoader::sub_4F3DF0(std::vector& // OFFSET: 0x004F4040 // FUNCTION: fn_00490 -__declspec(noinline) bool JsonCppLoader::sub_4F4040(std::vector& buffer) { +__declspec(noinline) bool JsonCppLoader::LoadJson(std::vector& buffer) { if (buffer.empty()) { this->Fail("비어있는 버퍼가 전달되었습니다."); return false; diff --git a/Source/Utility/JsonCppLoader.h b/Source/Utility/JsonCppLoader.h index 0b863fcb..6764aed0 100644 --- a/Source/Utility/JsonCppLoader.h +++ b/Source/Utility/JsonCppLoader.h @@ -199,7 +199,7 @@ class JsonCppLoader { public: JsonValue& GetValue(JsonValue& out, const std::string& key, const JsonValue& node, int expectedType); void Fail(const char* format, ...); - bool sub_4F3CC0(const std::string& path); + bool LoadBson(const std::string& path); bool GetIntValue(const JsonValue& node, const std::string& key, int* out); bool GetStringValue(const JsonValue& node, const std::string& key, std::string* out); @@ -209,13 +209,13 @@ public: bool GetMapStringBoolValue(const JsonValue& node, const std::string& key, std::map* out); bool GetIntVectorValue(const JsonValue& node, const std::string& key, std::vector* out); bool GetBoolValue(const JsonValue& node, const std::string& key, bool* out); - bool sub_4F3C70(std::vector& buffer, bool bson); - bool sub_4F3DF0(std::vector& buffer); - bool sub_4F3ED0(const std::string& path); - bool sub_4F4040(std::vector& buffer); - bool sub_50C2A0(std::map* out); - bool sub_50AE30(std::map* out); - bool sub_50B830(std::map* out); + bool Load(std::vector& buffer, bool bson); + bool LoadBson(std::vector& buffer); + bool LoadJson(const std::string& path); + bool LoadJson(std::vector& buffer); + bool GetEZ2STREffect(std::map* out); + bool GetReputeGroupData(std::map* out); + bool GetReputeInfoData(std::map* out); /* 0000 */ unsigned char unknown_0000[0x08]; /* 0008 */ JsonValue document;