diff --git a/Source/Client/Application/Launcher.cpp b/Source/Client/Application/Launcher.cpp index e18718e6a..6b6a35ebf 100644 --- a/Source/Client/Application/Launcher.cpp +++ b/Source/Client/Application/Launcher.cpp @@ -1749,7 +1749,7 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE previous, LPSTR commandLine, in g_modeMgr.Run(0, "login.rsw"); - g_windowMgr.DestroyWindow0478(); + g_windowMgr.DestroyBackgroundSurface(); GetRagConnection().Close(); Cleanup(); g_windowMgr.Shutdown(); diff --git a/Source/Client/Input/Language.cpp b/Source/Client/Input/Language.cpp index f9bb8d5f7..e8f690a0a 100644 --- a/Source/Client/Input/Language.cpp +++ b/Source/Client/Input/Language.cpp @@ -159,7 +159,7 @@ void CLanguageBase::CopySelection() { // OFFSET: 0x00ACD540 // FUNCTION: fn_17764 void CLanguageBase::Paste() { - if (g_windowMgr.window_4F1FC == g_windowMgr.GetHoverWindow() || g_windowMgr.LookupWindow(WID_NEWMAKECHARWND) || g_windowMgr.LookupWindow(WID_CHANGENAMEWND)) { + if (g_windowMgr.macroDetectorEditWnd == g_windowMgr.GetHoverWindow() || g_windowMgr.LookupWindow(WID_NEWMAKECHARWND) || g_windowMgr.LookupWindow(WID_CHANGENAMEWND)) { return; } diff --git a/Source/Client/Input/LanguageTC.cpp b/Source/Client/Input/LanguageTC.cpp index 4f29f8bf1..f8747dc66 100644 --- a/Source/Client/Input/LanguageTC.cpp +++ b/Source/Client/Input/LanguageTC.cpp @@ -18,7 +18,7 @@ CLanguageTC::CLanguageTC() : keys() { 'I', 'J', 'K', 'L', 'N', 'M', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', VK_OEM_MINUS, VK_OEM_1, VK_OEM_COMMA, VK_OEM_PERIOD, VK_OEM_2, 0}; - this->unknown04C1 = 0; + this->keyStroke = 0; for (auto& mapping : this->mappings) { mapping.category = 4; diff --git a/Source/Client/Input/LanguageTC.h b/Source/Client/Input/LanguageTC.h index dce446459..c10893bd9 100644 --- a/Source/Client/Input/LanguageTC.h +++ b/Source/Client/Input/LanguageTC.h @@ -18,7 +18,7 @@ struct CLanguageTC : CLanguageBase { /* 00B8 */ std::list keys; /* 00C0 */ std::array mappings; /* 04C0 */ unsigned char keyStrokeEnabled; - /* 04C1 */ std::uint8_t unknown04C1; + /* 04C1 */ std::uint8_t keyStroke; /* 04C2 */ unsigned char unknown_04C2[2]; CLanguageTC(); @@ -37,7 +37,7 @@ static_assert(sizeof(TraditionalKeyMapping) == 4); #if defined(_WIN32) && !defined(_WIN64) static_assert(offsetof(CLanguageTC, keys) == 0xB8); static_assert(offsetof(CLanguageTC, mappings) == 0xC0); -static_assert(offsetof(CLanguageTC, unknown04C1) == 0x4C1); +static_assert(offsetof(CLanguageTC, keyStroke) == 0x4C1); static_assert(sizeof(CLanguageTC) == 0x4C4); #endif diff --git a/Source/Client/Mode/CGameMode.h b/Source/Client/Mode/CGameMode.h index 51290b3a7..3366ab288 100644 --- a/Source/Client/Mode/CGameMode.h +++ b/Source/Client/Mode/CGameMode.h @@ -104,7 +104,7 @@ public: int SendMsg(int event, int argument1, int argument2, int argument3, int argument4) override; void ReceiveStorageClose(const AchievementStatePacket* packet); void ReceiveBuyingStoreResult(const BuyingStoreResultPacket* packet); - void ReceiveAchievementList(int count, int unknown01738784, short unknown01738788, int completed, int total, const AchievementRecordPacket* packets); + void ReceiveAchievementList(int count, int score, short achievementLevel, int completed, int total, const AchievementRecordPacket* packets); void ReceiveMacroReporterList(int count, const int* aids); /* 0058 */ unsigned char areaBounds[0x10]; /* 0068 */ char mapName[16]; @@ -230,7 +230,7 @@ public: void InitializeCamera(); void ReloadScene(); void InitializeState(); - __declspec(noinline) std::string GetUnknown0084(unsigned int index); + __declspec(noinline) std::string GetMapResource(unsigned int index); void RequestPlayerAction(int target, int argument); void UpdateLoopSounds(); void AddSceneObject(CRenderObject* object); @@ -240,13 +240,13 @@ public: bool IsEffectId994Group(int id); bool ConfirmDraggedItemUse(); void RefreshStatusStateEffect(int actorId); - void NotifyUnknown0604(int value); + void RefreshNotificationWindows(int value); void UpdatePetFriendlyWindow(int previousFriendly); __declspec(noinline) bool SaveEmblemFile(const std::vector& data); void SendNpcInputText(std::uint32_t npcId, const char* text, const char* replacement, int unused); std::string HuntTargetText(const RenewQuestOngoingInfo& quest, int index); std::vector SaveActiveSkillEffects(); - std::vector SaveUnknown024C(); + std::vector SaveQuestState(); std::vector SaveNameCardState(); std::vector SaveGroundItems(); std::vector SaveActorStates(); @@ -271,7 +271,7 @@ public: bool IsAllowedPair(int kind, int value); bool IsWithinRange(const int& x1, const int& y1, const int& x2, const int& y2, int range); bool IsRegisterCell(int x, int y); - bool HasUnknown01A4(int value); + bool HasPendingItemPickup(int value); bool IsValidCell(int x, int y); bool GetClosestValidCell(int* x, int* y); void ReceiveActorNameAll(const ActorNameAllPacket* packet); @@ -295,7 +295,7 @@ public: void IgnorePacket473(const unsigned char* packet); void IgnorePacket474(const unsigned char* packet); void IgnorePacket478(const unsigned char* packet); - void ClearUnknown0244(const unsigned char* packet); + void ClearMovementRestriction(const unsigned char* packet); void ReceiveActorStatusBlock(const unsigned char* packet); void ReceiveActorStatusUpdate(const unsigned char* packet); void ReceiveActorTitle(const unsigned char* packet); @@ -322,7 +322,7 @@ public: void ReceiveNpcBgm(const unsigned char* packet); void IgnoreRemovedPacket1(const unsigned char* packet); void ReceivePlayerMessage82(const unsigned char* packet); - void ReceiveResultNotice00FC(const unsigned char* packet); + void ReceiveChatRoomEntryFailure(const unsigned char* packet); void IgnoreRemovedPacket2(const unsigned char* packet); void ReceiveBillingInfo(const unsigned char* packet); void ReceiveActorMessage32(const unsigned char* packet); @@ -338,7 +338,7 @@ public: void ReceiveItem1718BasicList(const unsigned char* packet); void ReceiveItem1718Result(const unsigned char* packet); void ReceiveItem1718IndexList(const unsigned char* packet); - void NotifyResult2571(int result); + void NotifyPetEvolutionResult(int result); void ReceiveHomunculusInfo(const unsigned char* data); void ReceiveHomunculusInfo2(const unsigned char* data); void ReceiveHomunculusInfo3(const unsigned char* data); @@ -347,7 +347,7 @@ public: void ReceiveActorNameCard(const unsigned char* packet); void ReceiveServiceRequest(unsigned char type, int value); void ReceiveAchievementUpdate( - int unknown01738784, short unknown01738788, int completed, int total, int id, unsigned char achieved, const std::uint32_t* objectives, + int score, short achievementLevel, int completed, int total, int id, unsigned char achieved, const std::uint32_t* objectives, __time32_t completedAt, unsigned char rewarded ); void ReceiveAchievementResult(unsigned char result, int id); @@ -359,14 +359,14 @@ public: void ReceiveItemReward(const unsigned char* data); void ReceiveWindow181Message(const unsigned char* packet); void ReceiveNamedResultNotice(const unsigned char* packet); - void ReceiveResultNotice0118(const unsigned char* packet); + void ReceiveWhisperFilterResult(const unsigned char* packet); bool NotifyItemResult(int result); void NotifyItemBounds(); CCorpse* SpawnCorpse(float x, float y, float z, const char* action, const char* sprite, int animation, int motion, float angle); bool LaunchTargetEffect(int effectId, CGameActor* source, CGameActor* target, int argument); void UpdateNameBalloon(CGameActor* actor); void ShowGuildEmblem(CGameActor* actor, int guildId, int unused); - void RemoveUnknown0604(int window); + void RemoveNotificationWindow(int window); void DrawMiniMapNumber(); void DrawTimeAttackTimer(); void DrawTimeAttackCountdown(std::uint32_t value, int mode); @@ -390,11 +390,11 @@ public: ); void ApplySkillUpdatePacket(const void* packet); void ReceiveLearnedSkill( - std::uint16_t id, std::int16_t level, int unknown000C, std::uint8_t unknown0018, std::int16_t unknown0014, std::int16_t unknown001C, + std::uint16_t id, std::int16_t level, int type, std::uint8_t upgradable, std::int16_t spCost, std::int16_t range, std::int16_t unknown0030 ); void ApplyAdditionalSkillPacket(const void* packet); - std::uint32_t FindUnknown01AC(std::uint32_t key); + std::uint32_t FindChatRoomActorId(std::uint32_t key); std::string ActorName(std::uint32_t id); std::uint32_t ActorNameColor(int job, std::uint32_t aid); const CActorNameCard& LookupNameCard(std::uint32_t id); @@ -403,9 +403,9 @@ public: void UpdateHoverNameBalloon(); void ShowHoverActorName(CGameActor* actor); const char* DragItemName(); - void PushUnknown01A4(int value); + void AddPendingItemPickup(int value); __declspec(noinline) bool IsOverWeight(bool notify); - void CompleteUnknown0194(std::uint32_t id, const std::string& text); + void CompleteGuildMemberStatusLookup(std::uint32_t id, const std::string& text); std::string GetActiveSkillEffectTimeText(int skillId, int* activeSkillId); void ProcessStatusIconTooltip(int x, int y); bool IsActiveSkillEffectId(std::uint32_t id); @@ -417,25 +417,25 @@ public: void ReceiveWindow154Close(std::int16_t value); void MoveWindow16(int x, int y); void ResizeWindow16(int width, int height); - void ReceiveNotice1950(const unsigned char* packet); + void ReceiveZoneItemRetrievalFailure(const unsigned char* packet); void ReceiveActorPairFreeze(const unsigned char* packet); void ReceiveEffectRemove(const unsigned char* packet); void ReceiveActorEffect347(const unsigned char* packet); - void ReceiveUnknown0294Text(const unsigned char* packet); + void ReceiveCoupleName(const unsigned char* packet); void ReceiveToggle128(int enabled); void PlaceWindow16(unsigned int xPercent, unsigned int yPercent); - void ReceiveUnknown7FBC(const unsigned char* packet); + void ReceiveExtraInventorySlots(const unsigned char* packet); void ReceiveActorMessage144(const unsigned char* packet); void StopActorMove(std::uint32_t aid, std::int16_t x, std::int16_t y, unsigned char flag); - void NotifyResult4138(int result); - void NotifyResult2877(int result); + void NotifyGmCheckerResult(int result); + void NotifyCaptchaRegistrationResult(int result); void ReceiveRodexMailDeleted(const unsigned char* packet); void ReceiveRodexMailList(const unsigned char* packet); - void NotifyResult3562(const unsigned char* packet); + void NotifyInventoryExpansionResult(const unsigned char* packet); void IgnoreRemovedPacket6(); void ReceiveRouletteResult(const unsigned char* packet); - void NotifyResult4013(unsigned char result, unsigned short value); - void ReceiveGuildUnknown0114List(const unsigned char* packet); + void NotifyMacroBlacklistCheckResult(unsigned char result, unsigned short value); + void ReceiveGuildAgitList(const unsigned char* packet); void ReceiveClanLeave(const unsigned char* packet); void ReceiveClanInfo(const unsigned char* packet); void ReceiveGameOptions(int count, const GameOptionEntry* entries); @@ -453,10 +453,10 @@ public: void ApplyRuneSetResult(int result, int tagId, int runeSetId); void ApplyRuneSetResultWithRequest(int result, int tagId, int runeSetId, int grade, int slotCount); std::uint64_t LaunchDummyEffect(const vector3d* position, int effectId, int lifeFrames, int value); - void NotifyWindow4F258(int result); + void NotifyPrivateAirplaneResult(int result); void ReceiveNamedResult(std::uint32_t aid, std::string name, int result); void ReceiveBasicInfoResult(unsigned char result); - void ReceiveUnknown0454Result(const unsigned char* packet); + void ReceiveRodexComposeResult(const unsigned char* packet); std::string MakeSimulatorFolder(const std::string& folder); std::FILE* OpenPackageSimulatorFile(const std::string& folder, int itemId, std::string& itemName); std::FILE* OpenSimulatorFile(const std::string& folder, const std::string& name); @@ -473,8 +473,8 @@ public: void ReceiveDdukddakBoxTest(const unsigned char* packet); void ReceiveDeferredReset(const unsigned char* packet); void ReceiveGradeEnchantResult(const unsigned char* packet); - void UpdateUnknown0628(int id, bool add); - void ClearUnknown0458(); + void UpdatePetFriendlyNoticeIds(int id, bool add); + void ClearGroundAlphaCheck(); void SetDragIds(int source, int id); void EnsureNameBalloon(UINameBalloonText*& balloon); void ShowNoticeBalloon(const std::vector* lines); @@ -509,20 +509,20 @@ public: void ReceiveItem1740BasicList(const unsigned char* packet); void ReceiveItem1740BasicListBind(const unsigned char* packet); void ReceiveItemInventoryList(const unsigned char* packet); - void ReceiveUnknown05C4Result(const unsigned char* packet); + void ReceiveBossMonsterInfo(const unsigned char* packet); void ReceiveHpSpRecovery(const unsigned char* packet, int variant); - void ReceiveUnknown173A5BC(const unsigned char* packet); - void ReceiveUnknown16FC588(const unsigned char* packet); + void ReceiveOverweightThreshold(const unsigned char* packet); + void ReceiveNavigationRouteResult(const unsigned char* packet); void ReceiveShopItemList(const unsigned char* data); - void ReceiveUnknownD26800(const unsigned char* packet); + void ReceiveEquipmentViewState(const unsigned char* packet); void AddMiniMapEffectMarker(const unsigned char* packet); - void ReceiveUnknownD79660(const unsigned char* packet); - void ReceiveUnknownD79E90(std::int16_t result, std::intptr_t value); + void ReceiveDebuffRemovalResult(const unsigned char* packet); + void ReceiveAccountLimitedToolApplyResult(std::int16_t result, std::intptr_t value); void ReceiveRouletteSetResult(const unsigned char* packet); void ReceiveDynamicNpcNotice(const unsigned char* packet); - void ReceiveUnknownD612A0(const unsigned char* packet); - void ReceiveUnknownD77BF0(const unsigned char* packet); - void ReceiveUnknownD264E0(const unsigned char* packet); + void ReceiveMileageInfo(const unsigned char* packet); + void ReceiveMailboxAvailability(const unsigned char* packet); + void ReceiveNpcDialogEnd(const unsigned char* packet); void ResetItemLists(const unsigned char* packet); void StepTowardWalkableCell(const int& targetX, const int& targetY, int& x, int& y); void FindWalkableCellToward(float x, float z, float originX, float originZ, int& column, int& row, int distance); @@ -549,7 +549,7 @@ public: void ReceiveRodexMailListAppend(const unsigned char* packet); void ReceiveStatusChangeNotice(const unsigned char* packet); void ReceiveItemEffectResult(const unsigned char* packet); - void NotifyResult3995(unsigned char result); + void NotifyMacroCheckRemovalResult(unsigned char result); void ReceiveActorEffect228(const unsigned char* packet); void ResendMinimapMarkers(); void ReceiveJobTitle(unsigned char result, int job); @@ -565,7 +565,7 @@ public: void SetFollowTicks(int updateTick, int lostTick); bool IsMenuWindowOpen() const; static bool ShowRestrictedNotice(int grade); - void AddUnknown0604(UIWindow* window); + void AddNotificationWindow(UIWindow* window); void RequestAdminStatus(); void RecordChatRoomSettings(); unsigned ReadReplayGuildInfo(const std::vector& data); @@ -595,7 +595,7 @@ public: 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 ReceivePartyMemberInfoWithCharacterId(const unsigned char* packet); void ReceiveStatusChangeEffect2(const unsigned char* packet); void ReceiveActorStatusValuePacket2(const unsigned char* packet); void ReceiveWindow95Data(const unsigned char* packet); @@ -650,24 +650,24 @@ public: void ReceiveOngoingQuestList(const unsigned char* data); void ReceiveOngoingQuestList2(const unsigned char* data); void ReceiveShopItemListPacket(const unsigned char* data); - void SetActorUnknown02E4(std::uint32_t aid, int value); + void SetActorGroupMemberVisible(std::uint32_t aid, int value); void IgnoreRemovedPacket13(const unsigned char* packet); void IgnoreRemovedPacket14(const unsigned char* packet); void IgnoreRemovedPacket15(const unsigned char* packet); void IgnoreRemovedPacket16(const unsigned char* packet); void ReceiveItemSlotAddOptions(const unsigned char* data); void ReceiveItemSlotAddGrade(const unsigned char* data); - void ReceiveGuildUnknown0114Change(unsigned char value, std::uint32_t removeAid, std::uint32_t addAid); + void ReceiveGuildAgitOwnershipChange(unsigned char value, std::uint32_t removeAid, std::uint32_t addAid); void ReceiveItemOptionsRefresh(const unsigned char* data); void ReceivePartyJobLevel(const unsigned char* packet); void ReceivePartyDead(const unsigned char* packet); void ReceiveShopItemList(const std::vector& items, int value, int unused1, int argument, int unused2, std::uint32_t duration, unsigned char myShop); - void ReceivePacket0B2E(short result); + void ReceiveGuildAgitMoveResult(short result); void ReceiveBuyingStoreItemList(const unsigned char* packet); - void ReceiveUnknownD2A1F0(const unsigned char* packet); + void ReceiveBuyingStoreClose(const unsigned char* packet); void ReceiveActorMessage7(const unsigned char* packet); - void ReceiveUnknownD78010(const unsigned char* packet); - void ReceiveUnknownD89C60(const unsigned char* packet); + void ReceiveActorStatusEffects(const unsigned char* packet); + void ReceivePartyMemberInfoWithoutCharacterId(const unsigned char* packet); void ReceiveEquipItemList(const unsigned char* packet); void ReceiveSwapEquipmentList(const unsigned char* packet); void ReceiveStatusBonus(const unsigned char* packet); @@ -697,35 +697,35 @@ public: void Zc_Start_Collection(const unsigned char* packet); void Zc_Start_Couple(const unsigned char* packet); void IgnorePacket(); - void RemoveUnknown01A4(int value); + void RemovePendingItemPickup(int value); bool RecordReplayMessage(int message, int value, int first, int second); void UpdateReplayActionSpeeds(); __declspec(noinline) static struct ReplayTime StopReplayRecording(); std::vector WriteReplaySkillState(); bool PickScreenTerrain(int& column, int& row); - void ReceivePacket0AB8(const unsigned char* packet); - void ReceivePacket0A29(int value); + void ReceivePlayerRouteClear(const unsigned char* packet); + void ReceiveAntiBotChallenge(int value); void ReceiveCashShopBanner(int value1, int value2, int value3); void ReceiveWindow308TextEntries(unsigned char* packet); void ReceiveActorStateValue(std::uint32_t aid, int unused, std::int16_t value); void ReceiveChatEntries(unsigned char* data); void ReceiveWindowItemList(const unsigned char* packet); - void ReceivePacket0B73(const unsigned char* data); + void ReceiveSoulEnergy(const unsigned char* data); void ReceiveInventoryItemUpdate(const unsigned char* packet); - void ReceiveUnknownD25850(const unsigned char* packet); - void ReceiveUnknownD31A40(const unsigned char* packet); + void ReceiveItemDeletionNotice(const unsigned char* packet); + void ReceiveItemNameListNotice(const unsigned char* packet); void ReceiveNotifySkill(const unsigned char* packet); void ProcessSkillUsePacket(const unsigned char* packet, int type); void ReceiveActorSkillAction(const unsigned char* packet); void ReceiveActorSkillMessage(const unsigned char* packet); void OpenWindow154(); - void ReceiveUnknownD2D990(const unsigned char* packet); - void ReceiveUnknownD4E3F0(const unsigned char* packet); - void ReceiveUnknownD4E2A0(const unsigned char* packet); + void ReceiveMemorialDungeonError(const unsigned char* packet); + void ReceiveItemIdentificationList(const unsigned char* packet); + void ReceiveCardCompositionItemList(const unsigned char* packet); void ReceiveItem1740List(const unsigned char* packet); void ReceiveDispel(const unsigned char* packet); void ReceiveItem1758List(const unsigned char* packet); - void ReceiveUnknownD50810(const unsigned char* packet); + void ReceiveOpenedVendingItemList(const unsigned char* packet); void ReceiveItem1748List(const unsigned char* packet); void ReceiveActorStatusValue(std::uint32_t aid, int status, int amount, int option); void ReceiveActorSkillResult(const unsigned char* packet); diff --git a/Source/Client/Mode/CLoginMode.h b/Source/Client/Mode/CLoginMode.h index ffff4bbd9..b14c094cf 100644 --- a/Source/Client/Mode/CLoginMode.h +++ b/Source/Client/Mode/CLoginMode.h @@ -122,7 +122,7 @@ public: /* 6EE4 */ std::string wallpaperName; /* 6EFC */ CharacterSlotExtension slotExtension; /* 6F10 */ std::uint32_t nextKeepaliveTime; - /* 6F14 */ UIWindow* window_6F14; + /* 6F14 */ UIWindow* waitWnd; /* 6F18 */ int passwordRetryCount; /* 6F1C */ std::vector noticeCommands; /* 6F28 */ int authChallengeId; diff --git a/Source/Client/Mode/GameMode.cpp b/Source/Client/Mode/GameMode.cpp index 9ea715e63..8ac5d74e5 100644 --- a/Source/Client/Mode/GameMode.cpp +++ b/Source/Client/Mode/GameMode.cpp @@ -351,7 +351,7 @@ std::vector g_activeSkillEffects; // OFFSET: 0x00CCF480 // FUNCTION: fn_21242 -void CGameMode::PushUnknown01A4(int value) { +void CGameMode::AddPendingItemPickup(int value) { this->pickupReqItemNaidList.push_back(value); } @@ -377,7 +377,7 @@ bool CGameMode::IsOverWeight(bool notify) { // OFFSET: 0x00CCFCF0 // FUNCTION: fn_21247 -__declspec(noinline) void CGameMode::CompleteUnknown0194(std::uint32_t id, const std::string& text) { +__declspec(noinline) void CGameMode::CompleteGuildMemberStatusLookup(std::uint32_t id, const std::string& text) { auto it = this->guildMemberStatusCache.find(id); if (it != this->guildMemberStatusCache.end()) { this->SendMsg(MM_GUILD_MEMBER_STATUS_CHANGE, reinterpret_cast(text.c_str()), it->second, 0, 0); @@ -502,7 +502,7 @@ void CGameMode::SendMousePointerState(int value) { // OFFSET: 0x00CECE00 // FUNCTION: fn_21360 -void CGameMode::ClearUnknown0458() { +void CGameMode::ClearGroundAlphaCheck() { *reinterpret_cast(reinterpret_cast(this) + 0x458) = 0; } @@ -517,7 +517,7 @@ void CGameMode::SetDragIds(int source, int id) { // OFFSET: 0x00CED190 // FUNCTION: fn_21363 -void CGameMode::UpdateUnknown0628(int id, bool add) { +void CGameMode::UpdatePetFriendlyNoticeIds(int id, bool add) { if (add == true) { this->petFriendlyNoticeIds.insert(id); } else { @@ -552,7 +552,7 @@ MinimapMarker* CGameMode::FindMinimapMarker(std::uint32_t key) { // OFFSET: 0x00CF05E0 // FUNCTION: fn_21415 -std::string CGameMode::GetUnknown0084(unsigned int index) { +std::string CGameMode::GetMapResource(unsigned int index) { if (!this->mapResources.empty() && index <= this->mapResources.size()) { return this->mapResources[index]; } @@ -788,7 +788,7 @@ unsigned CGameMode::ReadReplayGroundSkills(const std::vector& dat // OFFSET: 0x00CEFE50 // FUNCTION: fn_21407 -void UIWindowMgr::ClearUnknown04DC() { +void UIWindowMgr::ClearChatInputText() { this->chatInputText.assign("", 0); } @@ -885,7 +885,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_REQ_EXIT_ROOM: - if (g_windowMgr.window_027C != nullptr) { + if (g_windowMgr.chatRoomWnd != nullptr) { const std::uint16_t packet = 0xE3; GetRagConnection().Send(g_packetLengths.FixedLength(packet), &packet); } @@ -937,7 +937,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_MOVE_ITEM_FROM_STORE_TO_BODY: { - g_session.FlagItem1738(static_cast(argument1)); + g_session.FlagCartItem(static_cast(argument1)); const GameModePacketWordDword packet{ g_unknown_01738268 != 0 ? 0x9E2 : 0x365, static_cast(argument1), static_cast(argument2) @@ -977,7 +977,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; case MM_MOVE_ITEM_FROM_CART_TO_BODY: if (!this->IsMenuWindowOpen()) { - g_session.FlagItem1740(static_cast(argument1)); + g_session.FlagMerchantShopItem(static_cast(argument1)); const GameModePacketWordDword packet{ 0x127, static_cast(argument1), static_cast(argument2) }; @@ -986,7 +986,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; case MM_MOVE_ITEM_FROM_STORE_TO_CART: if (!this->IsMenuWindowOpen()) { - g_session.FlagItem1738(static_cast(argument1)); + g_session.FlagCartItem(static_cast(argument1)); const GameModePacketWordDword packet{ g_unknown_01738268 != 0 ? 0x9E4 : 0x128, static_cast(argument1), static_cast(argument2) @@ -996,7 +996,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; case MM_MOVE_ITEM_FROM_CART_TO_STORE: if (!this->IsMenuWindowOpen()) { - g_session.FlagItem1740(static_cast(argument1)); + g_session.FlagMerchantShopItem(static_cast(argument1)); const GameModePacketWordDword packet{ g_unknown_01738268 != 0 ? 0x9E3 : 0x129, static_cast(argument1), static_cast(argument2) @@ -1768,7 +1768,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i case MM_CANCEL_WRITE_RODEX: { const std::uint16_t packet = 0xA03; GetRagConnection().Send(g_packetLengths.FixedLength(packet), &packet); - g_session.RestoreItems5C68(); + g_session.RestoreSelectionItems(); g_session.ClearItemQuantities(); return 0; } @@ -1803,7 +1803,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } case MM_MOVE_ITEM_TO_PERSONAL_FROM_STORAGE: if (!this->IsMenuWindowOpen()) { - g_session.FlagItem1740(static_cast(argument1)); + g_session.FlagMerchantShopItem(static_cast(argument1)); const GameModePacketDwordWordDword packet{ static_cast(ID_CZ_MOVE_ITEM_TO_PERSONAL), 2, static_cast(argument1), static_cast(argument2) @@ -1970,7 +1970,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i const char* prefix = g_serverLanguage->Prefix(false); const char* name = g_session.DecodePlayerName(); StringFormat(message, sizeof(message), static_cast(-1), "%s : %s%s", name, prefix, input); - g_windowMgr.ClearUnknown04DC(); + g_windowMgr.ClearChatInputText(); const std::size_t size = std::strlen(message); unsigned char packet[0x16D]; const std::uint16_t header[2] = {0xF3, static_cast(size + 4)}; @@ -2236,7 +2236,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i char characterName[64]{}; std::sprintf(characterName, "%s", g_session.DecodePlayerName()); Replay::Instance().SetHeaderInfo(key0, key1, characterName, g_session.m_navigationPlayerMap, g_session.m_aid, - column, row, g_session.m_playerDir, g_serviceType, g_serviceMode, g_session.SyncUnknown0E98()); + column, row, g_session.m_playerDir, g_serviceType, g_serviceMode, g_session.GetCurrentSex()); reinterpret_cast(ReplayFileList::Instance()).SetBaseFrame(reinterpret_cast(&Replay::Instance())); int windowIds[0x100]; const int windowCount = g_windowMgr.GetRenderedWindowIds(windowIds); @@ -2323,7 +2323,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i Replay::Instance().WriteSection(0x11, records, 0xE); } { - auto records = this->SaveUnknown024C(); + auto records = this->SaveQuestState(); Replay::Instance().WriteSection(0x17, records, 0xE); } { @@ -2404,7 +2404,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i this->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); } if (this->isOnQuest == 0 && !g_windowMgr.LookupWindow(WID_EXCHANGEUI) && - !g_windowMgr.equipWnd && !g_windowMgr.window_0288 && !g_windowMgr.rodexComposeWnd && + !g_windowMgr.equipWnd && !g_windowMgr.itemStoreWnd && !g_windowMgr.rodexComposeWnd && !g_windowMgr.LookupWindow(WID_LAPINEBOXWND) && !g_windowMgr.LookupWindow(WID_LAPINEUPGRADEBOXWND) && !g_windowMgr.LookupWindow(WID_REFININGWND) && !g_windowMgr.LookupWindow(0x128) && !g_windowMgr.LookupWindow(WID_BARTERMARKETWND) && !g_windowMgr.LookupWindow(WID_GRADEENCHANTWND)) { @@ -2420,7 +2420,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i this->SendMsg(MM_ITEMTHROW, this->drag.id, 1, 0, 0); } else { g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 0, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 0, 0, 0, 0); } g_windowMgr.RetireTransientWindow(); return 0; @@ -2441,7 +2441,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_REQ_ENTER_ROOM: { - UIWindow* window = g_windowMgr.window_027C; + UIWindow* window = g_windowMgr.chatRoomWnd; std::uint32_t& lastTick = *reinterpret_cast(&this->requestTimers[0xE]); if (timeGetTime() > lastTick + 1000U) { this->isWaitingEnterRoom = 0; @@ -2678,7 +2678,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } } if ((!g_session.IsHomunculusSkill(argument1) && !g_session.IsMercenarySkill(argument1) && - this->scene->player->render.state == 6) || g_windowMgr.window_027C != nullptr) { + this->scene->player->render.state == 6) || g_windowMgr.chatRoomWnd != nullptr) { g_session.m_automaticSkills.Complete(argument1); return 0; } @@ -2806,7 +2806,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } ITEM_INFO item(0); - item = argument2 != 0 ? g_session.GetItem2B50(argument1) : g_session.GetItem17F0(argument1); + item = argument2 != 0 ? g_session.GetCostumeItemAt(argument1) : g_session.GetEquippedItemAt(argument1); if (item.identity[1] == 0 || item.quantity <= 0) { return 0; } @@ -2990,7 +2990,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i if (this->IsMenuWindowOpen()) { return 0; } - if (g_windowMgr.window_4F260 != nullptr || g_windowMgr.window_4F268 != nullptr) { + if (g_windowMgr.barterMarketWnd != nullptr || g_windowMgr.expandedBarterMarketWnd != nullptr) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_LIMIT_HAVE_ITEM_CNT)), 255, 0, 0, 0); return 0; } @@ -2998,7 +2998,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } const EquipSlots slots = g_session.GetEquipSlots(argument2); - const ITEM_INFO equipped = g_session.GetItem17F0(slots.values[2]); + const ITEM_INFO equipped = g_session.GetEquippedItemAt(slots.values[2]); if (equipped.damaged != 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_DAMAGED_ITEM)), 255, 0, 0, 0); return 0; @@ -3158,7 +3158,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i length += copied; } text[length] = 0; - g_windowMgr.ClearUnknown04DC(); + g_windowMgr.ClearChatInputText(); length = std::strlen(text); unsigned char packet[0x16C]; const std::uint16_t header[2]{0xBDD, static_cast(length + 4)}; @@ -3205,7 +3205,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i this->lastWhisper.assign(message, std::strlen(message)); const std::size_t length = std::strlen(message); if (length - 1 <= 0x14F) { - g_windowMgr.ClearUnknown04DC(); + g_windowMgr.ClearChatInputText(); RecordWhisper(target, reinterpret_cast(message)); unsigned char packet[0x16D]; const std::uint16_t packetId = 0x96; @@ -3218,7 +3218,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } } - g_windowMgr.ClearUnknown04DC(); + g_windowMgr.ClearChatInputText(); return 0; } case MM_RELEASE_QUEST: @@ -3315,9 +3315,9 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i case MM_HOMUN_WAIT: { CGameActor* actor = static_cast(this->scene->GetGameActorByAID( *reinterpret_cast(&g_session.spAndHomunculusStats[8]))); - if (actor != nullptr && actor->HasUnknown030CEntry()) { + if (actor != nullptr && actor->HasActiveHomunculusAI()) { const int message[6] = {9, 0, 0, 0, 0, 0}; - actor->SetUnknown0318(reinterpret_cast(message), 0); + actor->SetMsg2AI(reinterpret_cast(message), 0); } return 0; } @@ -3526,7 +3526,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i char formatted[16384]; std::sprintf(formatted, "%s : %s%s", name, prefix, message); const std::size_t length = std::strlen(formatted); - g_windowMgr.ClearUnknown04DC(); + g_windowMgr.ClearChatInputText(); std::uint16_t packet[16384]; packet[0] = 0x2DB; packet[1] = static_cast(length + 5); @@ -3586,7 +3586,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i if (g_windowMgr.menuWnd) { g_windowMgr.CloseWindow(WID_MENUWND); } - if (g_windowMgr.window_0288 || static_cast(argument1) >= this->actorMenuIds.size()) { + if (g_windowMgr.itemStoreWnd || static_cast(argument1) >= this->actorMenuIds.size()) { return 0; } const int action = this->actorMenuIds[argument1]; @@ -3703,11 +3703,11 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; case MENUID_HOMUN_FOLLOW: { auto* actor = static_cast(this->scene->GetGameActorByAID(*reinterpret_cast(&g_session.spAndHomunculusStats[8]))); - if (actor && actor->HasUnknown030CEntry()) { + if (actor && actor->HasActiveHomunculusAI()) { float value[6] = {}; const int type = 9; std::memcpy(value, &type, sizeof(type)); - actor->SetUnknown0318(value, 0); + actor->SetMsg2AI(value, 0); } return 0; } @@ -3723,7 +3723,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i float value[6] = {}; const int type = 9; std::memcpy(value, &type, sizeof(type)); - actor->SetUnknown0318(value, 1); + actor->SetMsg2AI(value, 1); } return 0; } @@ -3819,7 +3819,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i packet[84] = 0; } GetRagConnection().Send(*reinterpret_cast(packet + 2), packet); - g_session.ClearItems1768(); + g_session.ClearMerchantPurchaseSavedItems(); return 0; } case MM_REQ_LEAVE_GUILD: { @@ -3904,7 +3904,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } ITEM_INFO item(0); - item = argument2 ? g_session.GetItem6B68(argument1) : g_session.GetItem61B8(argument1); + item = argument2 ? g_session.GetSwapEquippedItem(argument1) : g_session.GetSwapCostumeItem(argument1); if (item.identity[1] && item.quantity > 0) { const GameModePacketWord packet{0xA99, static_cast(item.identity[1])}; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); @@ -4033,7 +4033,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i g_windowMgr.Confirm(LookupMessage(MSI_BANK_SYSTEM_BUSY), 0, true, false, 0, "Message", 0x118, 0x78, 0); return 0; } - g_session.RestoreItems5C68(); + g_session.RestoreSelectionItems(); g_session.ClearItemQuantities(); unsigned char header[0x44]; *reinterpret_cast(header) = 0xA6E; @@ -4099,7 +4099,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i char formatted[0x400]; std::sprintf(formatted, "%s : %s%s", playerName, prefix, message); const std::size_t textLength = std::strlen(formatted); - g_windowMgr.ClearUnknown04DC(); + g_windowMgr.ClearChatInputText(); if (textLength > 0xDC) { return 0; } @@ -4151,9 +4151,9 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i for (int index = 2; index >= 0; --index) { ITEM_INFO equipped; if (g_session.IsCostumeLocation(argument2)) { - equipped = g_session.GetItem6B68(slots.values[index]); + equipped = g_session.GetSwapEquippedItem(slots.values[index]); } else { - equipped = g_session.GetItem61B8(slots.values[index]); + equipped = g_session.GetSwapCostumeItem(slots.values[index]); } if (static_cast(argument1) == equipped.identity[1]) { return 0; @@ -4166,7 +4166,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_MOVE_ITEM_TO_PERSONAL: { - g_session.FlagItem1738(static_cast(argument1)); + g_session.FlagCartItem(static_cast(argument1)); const GameModePacketDwordWordDword packet{ 0xC22, g_unknown_01738268 != 0 ? 1U : 0U, static_cast(argument1), static_cast(argument2) }; @@ -4199,7 +4199,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_CHANGE_CHATROOM: { - if (g_windowMgr.window_027C == nullptr) { + if (g_windowMgr.chatRoomWnd == nullptr) { return 0; } const ChatRoomSetting& settings = *reinterpret_cast(argument1); @@ -4250,7 +4250,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i const char* prefix = g_serverLanguage->Prefix(false); const char* name = g_session.DecodePlayerName(); StringFormat(message, sizeof(message), static_cast(-1), "%s : %s%s", name, prefix, input); - g_windowMgr.ClearUnknown04DC(); + g_windowMgr.ClearChatInputText(); const std::size_t size = std::strlen(message); unsigned char packet[0x16D]; const std::uint16_t header[2] = {0x108, static_cast(size + 4)}; @@ -4320,7 +4320,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::sprintf(message, "%s : %s", g_session.DecodePlayerName(), decoded); message[0x169] = 0; const std::size_t messageLength = std::strlen(message); - g_windowMgr.ClearUnknown04DC(); + g_windowMgr.ClearChatInputText(); unsigned char packet[0x800]; const std::uint16_t header[2] = {0xF3, static_cast(messageLength + 5)}; std::memcpy(packet, header, sizeof(header)); @@ -4426,7 +4426,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::memcpy(packet + 4, message, length); GetRagConnection().Send(packetLength, packet); } - g_windowMgr.ClearUnknown04DC(); + g_windowMgr.ClearChatInputText(); return 0; } case MM_CONTACTNPC: { @@ -4513,7 +4513,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i const char* body = g_windowMgr.chatInputText.c_str(); const char* prefix = g_serverLanguage->Prefix(false); StringFormat(message, sizeof(message), static_cast(-1), "%s : %s%s", g_session.DecodePlayerName(), prefix, body); - g_windowMgr.ClearUnknown04DC(); + g_windowMgr.ClearChatInputText(); const std::size_t length = std::strlen(message); unsigned char packet[0x16D]; const std::uint16_t header[] = {0x17E, static_cast(length + 4)}; @@ -4604,7 +4604,7 @@ CGameMode::CGameMode() // OFFSET: 0x00CEFE70 // FUNCTION: fn_21408 -void CGameMode::RemoveUnknown0604(int window) { +void CGameMode::RemoveNotificationWindow(int window) { UIWindow* target = reinterpret_cast(window); for (std::list::iterator it = this->notificationWindows.begin(); it != this->notificationWindows.end(); ++it) { if (*it == target) { @@ -4616,7 +4616,7 @@ void CGameMode::RemoveUnknown0604(int window) { // OFFSET: 0x00CEFB30 // FUNCTION: fn_21404 -void CGameMode::AddUnknown0604(UIWindow* window) { +void CGameMode::AddNotificationWindow(UIWindow* window) { this->notificationWindows.push_back(window); } @@ -4653,10 +4653,10 @@ void CGameMode::RequestAdminStatus() { // FUNCTION: fn_21578 void SetPlayerName(std::uint32_t id, std::string name) { g_playerNameDictionary->Set(id, name); - static_cast(g_modeMgr.GetGameMode())->CompleteUnknown0194(id, name); + static_cast(g_modeMgr.GetGameMode())->CompleteGuildMemberStatusLookup(id, name); GuildInfo* guildInfo = &g_guildInfo; guildInfo->UpdateCharacterName(id, name.c_str()); - g_session.NotifyUnknown7F94Name(id, name.c_str()); + g_session.ResolvePendingActorName(id, name.c_str()); g_session.UpdateFriendName(id, name.c_str()); } @@ -4938,7 +4938,7 @@ void CGameMode::IgnorePacket() { // OFFSET: 0x00CE8EC0 // FUNCTION: fn_21343 -void CGameMode::RemoveUnknown01A4(int value) { +void CGameMode::RemovePendingItemPickup(int value) { for (std::list::iterator it = this->pickupReqItemNaidList.begin(); it != this->pickupReqItemNaidList.end(); ++it) { if (*it == value) { this->pickupReqItemNaidList.erase(it); @@ -5017,34 +5017,34 @@ ReplayTime CGameMode::StopReplayRecording() { #pragma pack(push, 1) struct GameModeStoredRecord00DA { /* 0000 */ std::uint16_t type; - /* 0002 */ int value0002; - /* 0006 */ int value0006; - /* 000A */ std::uint16_t value000A; - /* 000C */ std::uint16_t value000C; - /* 000E */ unsigned char value000E; - /* 000F */ std::uint16_t value000F; - /* 0011 */ int value0011; - /* 0015 */ int value0015; - /* 0019 */ std::uint16_t value0019; - /* 001B */ std::uint16_t value001B; - /* 001D */ std::uint16_t value001D; - /* 001F */ std::uint16_t value001F; - /* 0021 */ std::uint16_t value0021; - /* 0023 */ std::uint16_t value0023; + /* 0002 */ int aid; + /* 0006 */ int job; + /* 000A */ std::uint16_t cellX; + /* 000C */ std::uint16_t cellY; + /* 000E */ unsigned char sex; + /* 000F */ std::uint16_t head; + /* 0011 */ int weapon; + /* 0015 */ int shield; + /* 0019 */ std::uint16_t accessory; + /* 001B */ std::uint16_t accessory2; + /* 001D */ std::uint16_t accessory3; + /* 001F */ std::uint16_t headPalette; + /* 0021 */ std::uint16_t bodyPalette; + /* 0023 */ std::uint16_t robe; /* 0025 */ char text[0x18]; - /* 003D */ std::uint16_t value003D; + /* 003D */ std::uint16_t bodyCostume; }; #pragma pack(pop) static_assert(offsetof(GameModeStoredRecord00DA, text) == 0x25); -static_assert(offsetof(GameModeStoredRecord00DA, value003D) == 0x3D); +static_assert(offsetof(GameModeStoredRecord00DA, bodyCostume) == 0x3D); static_assert(sizeof(GameModeTextRecord) == 0x190); static_assert(offsetof(GameModeTextRecord, buffer) == 0x1E); // OFFSET: 0x00CFE4D0 // FUNCTION: fn_21433 -void CGameMode::NotifyUnknown0604(int value) { +void CGameMode::RefreshNotificationWindows(int value) { for (std::list::iterator it = this->notificationWindows.begin(); it != this->notificationWindows.end(); ++it) { (*it)->SendMsg(nullptr, UM_REFRESH, value, 0, 0, 0); } @@ -5175,9 +5175,9 @@ unsigned CGameMode::ReadReplayActors(const std::vector& data) { offset += header.size; const auto* stored = reinterpret_cast(record.data()); this->SpawnStandingPc2( - stored->value0002, stored->value0006, stored->value000A, stored->value000C, stored->value000E, stored->value000F, - stored->value0011, stored->value0015, stored->value0019, stored->value001B, stored->value001D, stored->value001F, - stored->value0021, stored->value0023, stored->text, stored->value003D + stored->aid, stored->job, stored->cellX, stored->cellY, stored->sex, stored->head, + stored->weapon, stored->shield, stored->accessory, stored->accessory2, stored->accessory3, stored->headPalette, + stored->bodyPalette, stored->robe, stored->text, stored->bodyCostume ); break; } @@ -5207,11 +5207,11 @@ void CGameMode::UpdatePetFriendlyWindow(int previousFriendly) { if (g_session.GetPetFriendlyState(g_session.m_petFriendly) == 0 && g_session.m_petFriendly <= 100) { if (this->petFriendlyNoticeIds.find(g_session.petGid) == this->petFriendlyNoticeIds.end()) { - if (g_windowMgr.window_038C == nullptr) { + if (g_windowMgr.petInfoWnd == nullptr) { g_windowMgr.EnsureWindow(WID_PETINFOWND); } - this->UpdateUnknown0628(g_session.petGid, true); + this->UpdatePetFriendlyNoticeIds(g_session.petGid, true); } } @@ -5348,7 +5348,7 @@ std::vector CGameMode::SaveActiveSkillEffects() { // OFFSET: 0x00CE9DB0 // FUNCTION: fn_21348 -std::vector CGameMode::SaveUnknown024C() { +std::vector CGameMode::SaveQuestState() { std::vector data; { @@ -5444,7 +5444,7 @@ void CGameMode::InitializeCamera() { } } - const bool indoor = g_session.IsUnknownName5248(this->mapName); + const bool indoor = g_session.IsIndoorMapName(this->mapName); this->canRotateView = !indoor; float pitchRange = 10.0f; float maxDistance = g_cameraBaseDistance; @@ -5684,7 +5684,7 @@ void CGameMode::TargetActorByAid(int aid) { if (allowed && g_mouse.buttons[0] == 1 && force != 0 && !HIBYTE(GetAsyncKeyState(VK_MENU))) { this->SendMsg(MM_SETLOCKONMOUSE, 1, 0, 0, 0); *reinterpret_cast(&this->leftBtnClickTick[0x20]) = 0; - if (g_session.GetSceneUnknown004C() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { + if (g_session.GetSiegeMode() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { this->RequestPlayerAction(aid, 0); this->forcedAttack = 1; return; @@ -5898,14 +5898,14 @@ struct ProgressPacket { }; struct GameModeStoredRecord0191 { - /* 0000 */ std::uint16_t value0000; + /* 0000 */ std::uint16_t packetType; /* 0002 */ std::uint32_t aid; - /* 0006 */ std::uint16_t value0006; - /* 0008 */ int value0008; - /* 000C */ int value000C; + /* 0006 */ std::uint16_t statusType; + /* 0008 */ int total; + /* 000C */ int remaining; /* 0010 */ int count; - /* 0014 */ int value0014; - /* 0018 */ int value0018; + /* 0014 */ int value2; + /* 0018 */ int value3; }; #pragma pack(pop) @@ -5963,22 +5963,22 @@ std::vector CGameMode::SaveActorStates() { std::vector record; record.resize(sizeof(GameModeStoredRecord00DA), 0); auto* stored = reinterpret_cast(record.data()); - stored->value0002 = actor->render.accountId; - stored->value0006 = actor->GetEffectiveJob(-1); - stored->value000E = static_cast(actor->sex); - stored->value000A = static_cast(actor->movementState[5]); - stored->value000C = static_cast(*reinterpret_cast(actor->destinationAndSpeed)); - stored->value000F = static_cast(pc->head); + stored->aid = actor->render.accountId; + stored->job = actor->GetEffectiveJob(-1); + stored->sex = static_cast(actor->sex); + stored->cellX = static_cast(actor->movementState[5]); + stored->cellY = static_cast(*reinterpret_cast(actor->destinationAndSpeed)); + stored->head = static_cast(pc->head); const std::int64_t value = actor->GetWeapon(); - stored->value0011 = static_cast(value); - stored->value0015 = static_cast(value >> 32); - stored->value0019 = static_cast(pc->accessory); - stored->value001B = static_cast(pc->accessory2); - stored->value001D = static_cast(pc->accessory3); - stored->value001F = static_cast(pc->headPalette); - stored->value0021 = static_cast(actor->render.bodyPalette); - stored->value0023 = static_cast(pc->robe); - stored->value003D = static_cast(actor->GetBodyCostume()); + stored->weapon = static_cast(value); + stored->shield = static_cast(value >> 32); + stored->accessory = static_cast(pc->accessory); + stored->accessory2 = static_cast(pc->accessory2); + stored->accessory3 = static_cast(pc->accessory3); + stored->headPalette = static_cast(pc->headPalette); + stored->bodyPalette = static_cast(actor->render.bodyPalette); + stored->robe = static_cast(pc->robe); + stored->bodyCostume = static_cast(actor->GetBodyCostume()); { std::string name = this->nameCard.Name(actor->render.accountId); std::memcpy(stored->text, name.c_str(), sizeof(stored->text)); @@ -6026,14 +6026,14 @@ std::vector CGameMode::SaveActorStates() { const int count = actor->GetMadogearType(); if (count > 0) { GameModeStoredRecord0191 record; - record.value000C = 9999; - record.value0000 = 0; + record.remaining = 9999; + record.packetType = 0; record.count = count; - record.value0014 = 0; - record.value0008 = 9999; + record.value2 = 0; + record.total = 9999; record.aid = actor->render.accountId; - record.value0006 = 0x47D; - record.value0018 = 0; + record.statusType = 0x47D; + record.value3 = 0; std::vector chunk(sizeof(GameModeChunkHeader) + sizeof(record), 0); auto* header = reinterpret_cast(chunk.data()); @@ -6231,8 +6231,8 @@ void CGameMode::ProcessUiMessage(unsigned char* message) { break; } case 908: - if (values->values[0] == 0xCB && g_windowMgr.window_4F174 != nullptr) { - g_windowMgr.window_4F174->SendMsg(nullptr, values->values[1], values->values[2], reinterpret_cast(&values->values[3]), 0, 0); + if (values->values[0] == 0xCB && g_windowMgr.navigationWnd != nullptr) { + g_windowMgr.navigationWnd->SendMsg(nullptr, values->values[1], values->values[2], reinterpret_cast(&values->values[3]), 0, 0); } break; case 909: @@ -6250,8 +6250,8 @@ void CGameMode::ProcessUiMessage(unsigned char* message) { std::memcpy(&states[0], values->values, states.size()); g_windowMgr.CloseWindow(WID_COMBOBOXWND); g_navigationManager.LoadStates(states); - if (g_windowMgr.window_4F174 != nullptr) { - static_cast(g_windowMgr.window_4F174)->FillRouteGroups(); + if (g_windowMgr.navigationWnd != nullptr) { + static_cast(g_windowMgr.navigationWnd)->FillRouteGroups(); } break; } @@ -6334,13 +6334,13 @@ void CGameMode::ReceiveUiDragMessage(const unsigned char* message) { const int kind = packet->windowId; if (kind == 0x24 || kind == 0x9F) { this->replayDragState[0] = 0; - } else if (this->replayDragState[0] == 1 && g_windowMgr.window_01EC != nullptr) { + } else if (this->replayDragState[0] == 1 && g_windowMgr.itemDropCntWnd != nullptr) { if (drag.type == 6) { const ItemCardName card = FindItemCardName(std::atoi(drag.name.c_str())); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETTEXT, 0, reinterpret_cast(card.name), 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETTEXT, 0, reinterpret_cast(card.name), 0, 0); } else { const ITEM_DESC description = FindItemDescription(std::atoi(drag.name.c_str())); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETTEXT, 0, reinterpret_cast(description.identifiedName), 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETTEXT, 0, reinterpret_cast(description.identifiedName), 0, 0); } } @@ -6506,7 +6506,7 @@ void CGameMode::ChangeZoneServer(std::string mapName, int x, int y, int ip, int g_session.m_loginTimeTicks = std::chrono::system_clock::now().time_since_epoch().count(); g_session.SetOption(20, 1, 0); this->nameCard.Clear(); - g_session.ClearEntryList5BD4(); + g_session.ClearStoreSearchResults(); g_session.ClearShortcutSlots(); g_session.ClearSecondaryShortcutSlots(); g_session.playerAppearanceState = 0; @@ -6554,7 +6554,7 @@ void CGameMode::ChangeZoneServer(std::string mapName, int x, int y, int ip, int packet.aid = g_session.m_aid; packet.gid = g_session.m_gid; packet.authCode = *reinterpret_cast(&g_session.characterLoginData[0x04]); - packet.sex = static_cast(g_session.SyncUnknown0E98()); + packet.sex = static_cast(g_session.GetCurrentSex()); GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.packetType), &packet); g_session.SetOption(17, 1, 0); GetRagConnection().SetBlock(1); @@ -6748,7 +6748,7 @@ void CGameMode::End() { } g_effectMgr->Clear(); g_session.SaveMiniPartyInfo(); - g_session.SetUnknown8134(0); + g_session.SetPlayerSkillMode(0); } @@ -7237,15 +7237,15 @@ void CGameMode::InitializeState() { this->spriteMirrorActorIds.clear(); this->minimapMarkers.clear(); - if (g_windowMgr.window_4F1CC) { - g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_CLEAR_QUEST_MARKS, 0, 0, 0, 0); + if (g_windowMgr.miniMapWnd) { + g_windowMgr.miniMapWnd->SendMsg(nullptr, UM_MINIMAP_CLEAR_QUEST_MARKS, 0, 0, 0, 0); } g_snapMgr.Clear(); g_windowMgr.ClearMapWindows(); this->broadcastBalloon = nullptr; this->noticeBalloon = nullptr; - g_windowMgr.SetSurface0478(nullptr); + g_windowMgr.SetBackgroundSurface(nullptr); g_windowMgr.EnsureWindow(WID_BASICINFOWND); g_windowMgr.ShowWindowsWithId(WID_WHISPERWND, 1); g_windowMgr.EnsureWindow(WID_QUESTDISPLAY); @@ -7389,13 +7389,13 @@ void CGameMode::InitializeState() { } } - g_session.ResetUnknown166C(); + g_session.ResetStatBonuses(); g_session.UpdateRandomStats(); - g_session.ClearItems1738(); + g_session.ClearCartItems(); g_session.ClearTradeItems(); - g_session.ClearItems1768(); - g_session.ClearItems1758(); - g_session.ClearItems1750(); + g_session.ClearMerchantPurchaseSavedItems(); + g_session.ClearMerchantPurchaseItems(); + g_session.ClearMerchantMyShopItems(); // GLOBAL: gl_25334 static int s_window315Checked; @@ -7444,20 +7444,20 @@ void CGameMode::InitializeState() { g_session.ResetMercenaryStats(); g_windowMgr.FocusWindow01C8Edit(); - g_windowMgr.window_4F168 = nullptr; + g_windowMgr.replayControlWnd = nullptr; const int replayState = Replay::Instance().state; if (g_replayAnimationScaling) { g_windowMgr.EnsureWindow(WID_REPLAYCONTROLWND); if (replayState == 8) { - g_windowMgr.window_4F168->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); + g_windowMgr.replayControlWnd->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); } } if (replayState == 3) { Replay::Instance().SetState(2); g_windowMgr.EnsureWindow(WID_REPLAYRECCONTROLWND); - g_windowMgr.window_4F164->Move(Replay::Instance().recordingState, Replay::Instance().playbackState); - g_windowMgr.window_4F164->SendMsg(nullptr, 123, 0, 0, 0, 0); + g_windowMgr.replayRecordControlWnd->Move(Replay::Instance().recordingState, Replay::Instance().playbackState); + g_windowMgr.replayRecordControlWnd->SendMsg(nullptr, 123, 0, 0, 0, 0); } else if (replayState == 8) { Replay::Instance().SetState(7); } @@ -7479,7 +7479,7 @@ void CGameMode::InitializeState() { localMapMove = 0; } - g_guildInfo.ClearUnknown0114(); + g_guildInfo.ClearAgitIds(); this->menuTargetName = ""; } @@ -7500,7 +7500,7 @@ void CGameMode::ProcessRightButtonDrag() { return; } - UIShortCutWnd* shortcuts = static_cast(g_windowMgr.window_01E8); + UIShortCutWnd* shortcuts = static_cast(g_windowMgr.shortCutWnd); if (!shortcuts) { return; } @@ -7668,7 +7668,7 @@ void CGameMode::ProcessMouseWheel(int requireControl) { } if (g_serviceOptions.Get(0x79)) { - UIShortCutWnd* shortcuts = static_cast(g_windowMgr.window_01E8); + UIShortCutWnd* shortcuts = static_cast(g_windowMgr.shortCutWnd); *reinterpret_cast(&g_session.mapTransitionFlag[0x00]) = 1; AutomaticSkills* automatic = &g_session.m_automaticSkills; if (g_mouse.wheel > 0) { @@ -7840,15 +7840,15 @@ void CGameMode::Initialize(const char* name) { g_session.m_maxWeight = 0; g_session.RefreshHpSpWindows(); g_session.InvalidateWindowFrames(); - g_windowMgr.SetSurface0478(nullptr); + g_windowMgr.SetBackgroundSurface(nullptr); g_windowMgr.ClearMapWindows(); this->broadcastBalloon = nullptr; this->noticeBalloon = nullptr; - g_windowMgr.HideWindow01C8(); + g_windowMgr.HideChatWnd(); g_windowMgr.ShowWindowsWithId(WID_WHISPERWND, 0); g_windowMgr.EnsureWindow(WID_LOADINGWND); g_windowMgr.SendNotice(UIM_LOADINGPERCENT, 0, 0, 0, 0, 0); - g_windowMgr.CenterSurface0478(); + g_windowMgr.DrawCenteredBackground(); g_windowMgr.DrawWindows(); if (g_renderer->Draw()) { g_renderer->Present(1); @@ -7880,7 +7880,7 @@ void CGameMode::Initialize(const char* name) { } Replay::Instance().ResetPlayback(); - g_session.RestoreItems5C68(); + g_session.RestoreSelectionItems(); g_session.ClearItemQuantities(); this->InitializeState(); ShowCurrentMapName(); @@ -7907,7 +7907,7 @@ void CGameMode::Initialize(const char* name) { g_timeScheduler->AddSchedule(ping); } - if (g_session.HasNoUnknown1784Items()) { + if (g_session.AreInventoryCategoriesEmpty()) { if (g_launchPassCommandLine) { this->SendMsg(MM_STOVE_AUTHENTICATION, 1, 0, 0, 0); g_stoveMgr->FetchAllProducts(); @@ -8166,19 +8166,19 @@ void CGameMode::ProcessActorClick(int& handled, ActorPickInfo* pick, CGameActor* if (g_mouse.buttons[1] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); - if (homun && homun->HasUnknown030CEntry()) { + if (homun && homun->HasActiveHomunculusAI()) { AiMessage message = {}; message.type = 3; message.target = actor->render.accountId; - homun->SetUnknown0330(reinterpret_cast(&message), 0); + homun->SetResMsg2AI(reinterpret_cast(&message), 0); } } else if (g_session.attackHomunEnemy != 0 && g_groundMarkAid == actor->render.accountId) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); - if (homun && homun->HasUnknown030CEntry()) { + if (homun && homun->HasActiveHomunculusAI()) { AiMessage message = {}; message.type = 3; message.target = g_groundMarkAid; - homun->SetUnknown0318(reinterpret_cast(&message), 0); + homun->SetMsg2AI(reinterpret_cast(&message), 0); } g_session.attackHomunEnemy = 0; } else { @@ -8194,13 +8194,13 @@ void CGameMode::ProcessActorClick(int& handled, ActorPickInfo* pick, CGameActor* if (g_session.homunAlive != 0 && g_mouse.buttons[0] == 1 && g_session.IsHomunculusSkill(this->skillId)) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); - if (homun && homun->HasUnknown030CEntry()) { + if (homun && homun->HasActiveHomunculusAI()) { AiMessage message = {}; message.type = 7; message.level = this->skillUseLevel; message.skill = this->skillId; message.target = actor->render.accountId; - homun->SetUnknown0318(reinterpret_cast(&message), 0); + homun->SetMsg2AI(reinterpret_cast(&message), 0); } return; } @@ -8209,19 +8209,19 @@ void CGameMode::ProcessActorClick(int& handled, ActorPickInfo* pick, CGameActor* if (g_session.mercenaryAlive != 0 && g_mouse.buttons[0] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); - if (mercenary && mercenary->HasUnknown0310Entry()) { + if (mercenary && mercenary->HasActiveMercenaryAI()) { AiMessage message = {}; message.type = 3; message.target = actor->render.accountId; - mercenary->SetUnknown0330(reinterpret_cast(&message), 1); + mercenary->SetResMsg2AI(reinterpret_cast(&message), 1); } } else if (g_session.attackMercenaryEnemy != 0 && g_groundMarkAltAid == actor->render.accountId) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); - if (mercenary && mercenary->HasUnknown0310Entry()) { + if (mercenary && mercenary->HasActiveMercenaryAI()) { AiMessage message = {}; message.type = 3; message.target = g_groundMarkAltAid; - mercenary->SetUnknown0318(reinterpret_cast(&message), 1); + mercenary->SetMsg2AI(reinterpret_cast(&message), 1); } g_session.attackMercenaryEnemy = 0; } else { @@ -8239,13 +8239,13 @@ void CGameMode::ProcessActorClick(int& handled, ActorPickInfo* pick, CGameActor* int& forced = this->forcedAttack; if (attack != 0 && g_session.mercenaryAlive != 0 && g_mouse.buttons[0] == 1 && g_session.IsMercenarySkill(this->skillId)) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); - if (mercenary && mercenary->HasUnknown0310Entry()) { + if (mercenary && mercenary->HasActiveMercenaryAI()) { AiMessage message = {}; message.type = 7; message.level = this->skillUseLevel; message.skill = this->skillId; message.target = actor->render.accountId; - mercenary->SetUnknown0318(reinterpret_cast(&message), 1); + mercenary->SetMsg2AI(reinterpret_cast(&message), 1); } return; } @@ -8254,7 +8254,7 @@ void CGameMode::ProcessActorClick(int& handled, ActorPickInfo* pick, CGameActor* this->SendMsg(MM_SETLOCKONMOUSE, 1, 0, 0, 0); *reinterpret_cast(&this->lastActorIds[0x08]) = targetAid; this->isAutoMoveClickOn = 0; - if (g_session.GetSceneUnknown004C() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { + if (g_session.GetSiegeMode() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { this->RequestPlayerAction(targetAid, 0); forced = 1; } else { @@ -8523,12 +8523,12 @@ int CGameMode::ProcessGroundClick(int result) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { - if (homun && homun->HasUnknown030CEntry()) { + if (homun && homun->HasActiveHomunculusAI()) { AiMessage message = {}; message.type = 1; message.x = column; message.y = row; - homun->SetUnknown0330(reinterpret_cast(&message), 0); + homun->SetResMsg2AI(reinterpret_cast(&message), 0); } return result; } @@ -8537,12 +8537,12 @@ int CGameMode::ProcessGroundClick(int result) { g_session.homunEnemyY = row; g_groundMarkAid = 0; g_session.attackHomunEnemy = 0; - if (homun && homun->HasUnknown030CEntry()) { + if (homun && homun->HasActiveHomunculusAI()) { AiMessage message = {}; message.type = 1; message.x = column; message.y = row; - homun->SetUnknown0318(reinterpret_cast(&message), 0); + homun->SetMsg2AI(reinterpret_cast(&message), 0); } g_session.moveHomunEnemy = 1; return result; @@ -8562,12 +8562,12 @@ int CGameMode::ProcessGroundClick(int result) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { - if (mercenary && mercenary->HasUnknown0310Entry()) { + if (mercenary && mercenary->HasActiveMercenaryAI()) { AiMessage message = {}; message.type = 1; message.x = column; message.y = row; - mercenary->SetUnknown0330(reinterpret_cast(&message), 1); + mercenary->SetResMsg2AI(reinterpret_cast(&message), 1); } return result; } @@ -8576,12 +8576,12 @@ int CGameMode::ProcessGroundClick(int result) { g_session.mercenaryEnemyY = row; g_groundMarkAltAid = 0; g_session.attackMercenaryEnemy = 0; - if (mercenary && mercenary->HasUnknown0310Entry()) { + if (mercenary && mercenary->HasActiveMercenaryAI()) { AiMessage message = {}; message.type = 1; message.x = column; message.y = row; - mercenary->SetUnknown0318(reinterpret_cast(&message), 1); + mercenary->SetMsg2AI(reinterpret_cast(&message), 1); } g_session.moveMercenaryEnemy = 1; return result; @@ -8591,7 +8591,7 @@ int CGameMode::ProcessGroundClick(int result) { g_session.ResetMercenaryStats(); if (reinterpret_cast(this->skillUseType) == 1 && g_session.IsMercenarySkill(this->skillId)) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); - if (mercenary && mercenary->HasUnknown0310Entry()) { + if (mercenary && mercenary->HasActiveMercenaryAI()) { const std::uint32_t state = mercenary->render.state; if (state == 1 || state == 0 || state == 4) { AiMessage message; @@ -8601,7 +8601,7 @@ int CGameMode::ProcessGroundClick(int result) { message.level = this->skillUseLevel; message.skill = this->skillId; message.target = 0; - mercenary->SetUnknown0318(reinterpret_cast(&message), 1); + mercenary->SetMsg2AI(reinterpret_cast(&message), 1); return 1; } } @@ -8613,7 +8613,7 @@ int CGameMode::ProcessGroundClick(int result) { result = 1; if (g_session.IsHomunculusSkill(this->skillId) == 1 && g_session.homunAlive == 1) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); - if (homun && homun->HasUnknown030CEntry() == true) { + if (homun && homun->HasActiveHomunculusAI() == true) { const std::uint32_t state = homun->render.state; if (state == 0 || state == 1 || state == 4) { AiMessage message; @@ -8623,7 +8623,7 @@ int CGameMode::ProcessGroundClick(int result) { message.level = this->skillUseLevel; message.skill = this->skillId; message.target = 0; - homun->SetUnknown0318(reinterpret_cast(&message), 0); + homun->SetMsg2AI(reinterpret_cast(&message), 0); return 1; } } @@ -8687,7 +8687,7 @@ int CGameMode::ProcessGroundClick(int result) { g_windowMgr.UpdateNavigationList(); clickTick = timeGetTime(); - if (HIBYTE(GetAsyncKeyState(VK_SHIFT)) || g_windowMgr.window_027C || this->scene->player->render.state == 6) { + if (HIBYTE(GetAsyncKeyState(VK_SHIFT)) || g_windowMgr.chatRoomWnd || this->scene->player->render.state == 6) { this->scene->player->SendMsg(nullptr, AM_REQ_CHANGE_DIR, 0, column, column >> 31, row, row >> 31, 0, 0, 0, 0, 0, 0, 0, 0); return result; } @@ -8757,7 +8757,7 @@ void CGameMode::Update() { PumpApplicationMessages(); this->ProcessIncomingPackets(); if (Replay::Instance().AdvanceFrame() == 0) { - g_windowMgr.window_4F168->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); + g_windowMgr.replayControlWnd->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); } if (this->running != 0) { @@ -8795,7 +8795,7 @@ void CGameMode::Update() { int y = *reinterpret_cast(actor->destinationAndSpeed); int cellX = x; int cellY = y; - if (g_windowMgr.window_027C == nullptr && this->scene->player->render.state != 6) { + if (g_windowMgr.chatRoomWnd == nullptr && this->scene->player->render.state != 6) { bool reachable = true; if (!this->IsValidCell(x, y)) { reachable = this->GetClosestValidCell(&cellX, &cellY); @@ -8878,7 +8878,7 @@ void CGameMode::Update() { g_actorPickNode.Clear(); this->camera->Render(); this->DrawMiniMap(); - g_windowMgr.CenterSurface0478(); + g_windowMgr.DrawCenteredBackground(); g_windowMgr.DrawWindows(); g_mapInfoMgr->DrawMapName(*GetRenderSystemHolder()->system); if (this->scene->isPKZone != 0 || *reinterpret_cast(&g_session.interactionFlags[0x08]) != 0) { @@ -8889,7 +8889,7 @@ void CGameMode::Update() { this->DrawTimeAttackCountdown(*reinterpret_cast(&g_session.timeAttackState[0x00]), *reinterpret_cast(g_session.timeAttackMode)); } - if (this->drag.source != 0 && (g_windowMgr.window_01EC == nullptr || g_windowMgr.window_01EC->geometry.visible == 0)) { + if (this->drag.source != 0 && (g_windowMgr.itemDropCntWnd == nullptr || g_windowMgr.itemDropCntWnd->geometry.visible == 0)) { if (this->drag.source == 0x1D) { if (g_windowMgr.Window4F250Ready()) { g_windowMgr.MoveTransient(g_mouse.x, g_mouse.y); @@ -9002,11 +9002,11 @@ void CGameMode::ProcessInput() { this->cursorOffsetY = 0.0f; if (handled == 0) { const std::intptr_t mode = reinterpret_cast(this->skillUseType); - g_session.UpdateUnknown1708(mode == 2 || mode == 4); + g_session.UpdateMonsterInfoEnabled(mode == 2 || mode == 4); if (pick) { bool offset; if (this->skillId == 0xE7) { - offset = g_session.IsSkillIdInRange6001(pick->job) && pick->kind == 4; + offset = g_session.IsCompanionJob(pick->job) && pick->kind == 4; } else { int eligible; if (g_session.monsterInfoEnabled && g_session.IsMonsterClass(pick->job)) { @@ -9033,7 +9033,7 @@ void CGameMode::ProcessInput() { ); } - if (this->isPlayerDead == 0 && (this->isOnQuest == 0 || this->scene->player->actorWindows[3] != 0) && !blocker && g_windowMgr.window_0288 == nullptr && + if (this->isPlayerDead == 0 && (this->isOnQuest == 0 || this->scene->player->actorWindows[3] != 0) && !blocker && g_windowMgr.itemStoreWnd == nullptr && !g_windowMgr.LookupWindow(WID_RUNESYSTEMWND)) { handled = this->ProcessGroundClick(this->ProcessMousePick(handled, pick)); this->UpdateHoverNameBalloon(); @@ -9177,7 +9177,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { switch (talkType) { case TT_GUILD_CHAT: - g_windowMgr.SetUnknown04DC(parts[0].c_str()); + g_windowMgr.SetChatInputText(parts[0].c_str()); this->SendMsg(MM_CHAT_GUILD, 0, 0, 0, 0); break; case TT_REQ_WHISPER_PC_EX: @@ -9247,13 +9247,13 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { if (std::strlen(text) <= 1) { break; } - g_windowMgr.SetUnknown04DC(text + 1); + g_windowMgr.SetChatInputText(text + 1); party = 1; } else if (text[0] == '$') { if (std::strlen(text) <= 1) { break; } - g_windowMgr.SetUnknown04DC(text + 1); + g_windowMgr.SetChatInputText(text + 1); alternate = 1; } if (HIBYTE(GetAsyncKeyState(VK_CONTROL))) { @@ -9267,7 +9267,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { if (std::strlen(text) <= 1) { break; } - g_windowMgr.SetUnknown04DC(text + 1); + g_windowMgr.SetChatInputText(text + 1); clan = true; } int clanChat = clan; @@ -9937,7 +9937,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { break; } case TT_CLAN_CHAT: - g_windowMgr.SetUnknown04DC(parts[0].c_str()); + g_windowMgr.SetChatInputText(parts[0].c_str()); this->SendMsg(MM_CHAT_CLAN, 0, 0, 0, 0); break; case TT_SHOW_CASHSHOP_BTN_ON_OFF: { @@ -10214,19 +10214,19 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* if (engaged && g_session.homunAlive != 0 && g_mouse.buttons[1] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); - if (homun && homun->HasUnknown030CEntry()) { + if (homun && homun->HasActiveHomunculusAI()) { AiMessage message = {}; message.type = 3; message.target = actor->render.accountId; - homun->SetUnknown0330(reinterpret_cast(&message), 0); + homun->SetResMsg2AI(reinterpret_cast(&message), 0); } } else if (g_session.attackHomunEnemy != 0 && g_groundMarkAid == actor->render.accountId) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); - if (homun && homun->HasUnknown030CEntry()) { + if (homun && homun->HasActiveHomunculusAI()) { AiMessage message = {}; message.type = 3; message.target = g_groundMarkAid; - homun->SetUnknown0318(reinterpret_cast(&message), 0); + homun->SetMsg2AI(reinterpret_cast(&message), 0); } g_session.attackHomunEnemy = 0; } else { @@ -10242,13 +10242,13 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* if (g_session.homunAlive != 0 && g_mouse.buttons[0] == 1 && g_session.IsHomunculusSkill(this->skillId)) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); - if (homun && homun->HasUnknown030CEntry()) { + if (homun && homun->HasActiveHomunculusAI()) { AiMessage message = {}; message.type = 7; message.level = this->skillUseLevel; message.skill = this->skillId; message.target = actor->render.accountId; - homun->SetUnknown0318(reinterpret_cast(&message), 0); + homun->SetMsg2AI(reinterpret_cast(&message), 0); } return; } @@ -10256,19 +10256,19 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* if (engaged && g_session.mercenaryAlive != 0 && g_mouse.buttons[0] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); - if (mercenary && mercenary->HasUnknown0310Entry()) { + if (mercenary && mercenary->HasActiveMercenaryAI()) { AiMessage message = {}; message.type = 3; message.target = actor->render.accountId; - mercenary->SetUnknown0330(reinterpret_cast(&message), 1); + mercenary->SetResMsg2AI(reinterpret_cast(&message), 1); } } else if (g_session.attackMercenaryEnemy != 0 && g_groundMarkAltAid == actor->render.accountId) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); - if (mercenary && mercenary->HasUnknown0310Entry()) { + if (mercenary && mercenary->HasActiveMercenaryAI()) { AiMessage message = {}; message.type = 3; message.target = g_groundMarkAltAid; - mercenary->SetUnknown0318(reinterpret_cast(&message), 1); + mercenary->SetMsg2AI(reinterpret_cast(&message), 1); } g_session.attackMercenaryEnemy = 0; } else { @@ -10284,13 +10284,13 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* if (attack != 0 && g_session.mercenaryAlive != 0 && g_mouse.buttons[0] == 1 && g_session.IsMercenarySkill(this->skillId)) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); - if (mercenary && mercenary->HasUnknown0310Entry()) { + if (mercenary && mercenary->HasActiveMercenaryAI()) { AiMessage message = {}; message.type = 7; message.level = this->skillUseLevel; message.skill = this->skillId; message.target = actor->render.accountId; - mercenary->SetUnknown0318(reinterpret_cast(&message), 1); + mercenary->SetMsg2AI(reinterpret_cast(&message), 1); } return; } @@ -10300,7 +10300,7 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* this->SendMsg(MM_SETLOCKONMOUSE, 1, 0, 0, 0); *reinterpret_cast(&this->lastActorIds[0x08]) = actor->render.accountId; *reinterpret_cast(&this->lastActorIds[0x0C]) = 0; - if (g_session.GetSceneUnknown004C() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { + if (g_session.GetSiegeMode() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { this->RequestPlayerAction(actor->render.accountId, 0); if (!skillMode) { forced = 1; @@ -10660,7 +10660,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { case 2: { result = 1; int action; - if (g_session.GetSceneUnknown004C()) { + if (g_session.GetSiegeMode()) { switch (pick->job) { case UNT_ICEWALL: case UNT_BLASTMINE: @@ -10832,19 +10832,19 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { if (g_session.homunAlive && g_mouse.buttons[1] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); - if (homun != nullptr && homun->HasUnknown030CEntry()) { + if (homun != nullptr && homun->HasActiveHomunculusAI()) { AiMessage message = {}; message.type = 3; message.target = pick->accountId; - homun->SetUnknown0330(reinterpret_cast(&message), 0); + homun->SetResMsg2AI(reinterpret_cast(&message), 0); } } else if (g_session.attackHomunEnemy != 0 && g_groundMarkAid == pick->accountId) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); - if (homun != nullptr && homun->HasUnknown030CEntry()) { + if (homun != nullptr && homun->HasActiveHomunculusAI()) { AiMessage message = {}; message.type = 3; message.target = g_groundMarkAid; - homun->SetUnknown0318(reinterpret_cast(&message), 0); + homun->SetMsg2AI(reinterpret_cast(&message), 0); } g_session.attackHomunEnemy = 0; } else { @@ -10860,7 +10860,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { if (g_session.homunAlive && g_mouse.buttons[0] == 1 && g_session.IsHomunculusSkill(this->skillId)) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); - if (homun != nullptr && homun->HasUnknown030CEntry()) { + if (homun != nullptr && homun->HasActiveHomunculusAI()) { AiMessage message; message.type = 7; message.x = 0; @@ -10868,7 +10868,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { message.level = this->skillUseLevel; message.skill = this->skillId; message.target = pick->accountId; - homun->SetUnknown0318(reinterpret_cast(&message), 0); + homun->SetMsg2AI(reinterpret_cast(&message), 0); } return result; } @@ -10876,19 +10876,19 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { if (g_session.mercenaryAlive && g_mouse.buttons[0] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); - if (mercenary != nullptr && mercenary->HasUnknown0310Entry()) { + if (mercenary != nullptr && mercenary->HasActiveMercenaryAI()) { AiMessage message = {}; message.type = 3; message.target = pick->accountId; - mercenary->SetUnknown0330(reinterpret_cast(&message), 1); + mercenary->SetResMsg2AI(reinterpret_cast(&message), 1); } } else if (g_session.attackMercenaryEnemy != 0 && g_groundMarkAltAid == pick->accountId) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); - if (mercenary != nullptr && mercenary->HasUnknown0310Entry()) { + if (mercenary != nullptr && mercenary->HasActiveMercenaryAI()) { AiMessage message = {}; message.type = 3; message.target = g_groundMarkAltAid; - mercenary->SetUnknown0318(reinterpret_cast(&message), 1); + mercenary->SetMsg2AI(reinterpret_cast(&message), 1); } g_session.attackMercenaryEnemy = 0; } else { @@ -10904,7 +10904,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { if (attack && g_session.mercenaryAlive && g_mouse.buttons[0] == 1 && g_session.IsMercenarySkill(this->skillId)) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); - if (mercenary != nullptr && mercenary->HasUnknown0310Entry()) { + if (mercenary != nullptr && mercenary->HasActiveMercenaryAI()) { AiMessage message; message.type = 7; message.x = 0; @@ -10912,7 +10912,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { message.level = this->skillUseLevel; message.skill = this->skillId; message.target = pick->accountId; - mercenary->SetUnknown0318(reinterpret_cast(&message), 1); + mercenary->SetMsg2AI(reinterpret_cast(&message), 1); } return result; } @@ -10922,7 +10922,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { *reinterpret_cast(&this->lastActorIds[8]) = pick->accountId; *reinterpret_cast(&this->lastActorIds[4]) = pick->accountId; this->isAutoMoveClickOn = 0; - if (g_session.GetSceneUnknown004C() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { + if (g_session.GetSiegeMode() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { this->RequestPlayerAction(pick->accountId, 0); this->forcedAttack = 1; } else { @@ -10965,7 +10965,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { CGameActor* companion; if (g_session.IsHomunculusSkill(this->skillId) && g_session.homunAlive) { companion = static_cast(this->scene->GetGameActorByAID(homunAid)); - if (companion != nullptr && companion->HasUnknown030CEntry()) { + if (companion != nullptr && companion->HasActiveHomunculusAI()) { AiMessage message; message.type = 7; message.x = 0; @@ -10973,12 +10973,12 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { message.level = this->skillUseLevel; message.skill = this->skillId; message.target = pick->accountId; - companion->SetUnknown0318(reinterpret_cast(&message), index); + companion->SetMsg2AI(reinterpret_cast(&message), index); return result; } } else if (g_session.IsMercenarySkill(this->skillId) && g_session.mercenaryAlive) { companion = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); - if (companion != nullptr && companion->HasUnknown0310Entry()) { + if (companion != nullptr && companion->HasActiveMercenaryAI()) { index = 1; AiMessage message; message.type = 7; @@ -10987,7 +10987,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { message.level = this->skillUseLevel; message.skill = this->skillId; message.target = pick->accountId; - companion->SetUnknown0318(reinterpret_cast(&message), index); + companion->SetMsg2AI(reinterpret_cast(&message), index); return result; } } @@ -11002,7 +11002,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { *reinterpret_cast(&this->lastActorIds[8]) = pick->accountId; *reinterpret_cast(&this->lastActorIds[4]) = pick->accountId; this->isAutoMoveClickOn = 0; - if (g_session.GetSceneUnknown004C() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { + if (g_session.GetSiegeMode() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { this->RequestPlayerAction(pick->accountId, 0); this->forcedAttack = 1; return result; diff --git a/Source/Client/Mode/GameModeEquipWindow.cpp b/Source/Client/Mode/GameModeEquipWindow.cpp index 1d31dbe1b..a8349338c 100644 --- a/Source/Client/Mode/GameModeEquipWindow.cpp +++ b/Source/Client/Mode/GameModeEquipWindow.cpp @@ -16,7 +16,7 @@ EquipWindowLook g_equipWindowLook; // FUNCTION: fn_21743 void CGameMode::ReceiveEquipWindowMicroscope(const unsigned char* packet) { g_session.ResetEquipped(); - g_session.ResetItems3500(); + g_session.ResetAlternateCostumeItems(); const int length = *reinterpret_cast(packet + 2); const int count = static_cast(length - 45) / 37u; @@ -42,7 +42,7 @@ void CGameMode::ReceiveEquipWindowMicroscope(const unsigned char* packet) { if (item.identity[3] != 0) { if (g_session.IsCostumeLocation(item.identity[3])) { - g_session.EquipItem3500(item); + g_session.EquipAlternateCostumeItem(item); } else { g_session.Equip(item); } diff --git a/Source/Client/Mode/GameModeHandlers.cpp b/Source/Client/Mode/GameModeHandlers.cpp index 3241ccab4..316ecd784 100644 --- a/Source/Client/Mode/GameModeHandlers.cpp +++ b/Source/Client/Mode/GameModeHandlers.cpp @@ -682,7 +682,7 @@ void CGameMode::ReceiveItem1718BasicList(const unsigned char* packet) { item.sprite = record.sprite; item.id = -1; item.identified = 1; - g_session.AddItem1718(item, 0); + g_session.AddShopItem(item, 0); } if (UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMSHOPWND)) { @@ -764,7 +764,7 @@ void CGameMode::ReceiveItem1718IndexList(const unsigned char* packet) { item.realPrice = record.realPrice; item.type = owned.identity[0]; item.identified = owned.identified; - g_session.AddItem1718(item, 1); + g_session.AddShopItem(item, 1); } } @@ -815,7 +815,7 @@ void CGameMode::ReceivePetAct(unsigned char* packet) { // OFFSET: 0x00D3CDF0 // FUNCTION: fn_21797 -void CGameMode::NotifyResult2571(int result) { +void CGameMode::NotifyPetEvolutionResult(int result) { switch (result) { case 0: g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_PET_EVOLUTION_FAIL_RECIPE)), 0xFF, 0, 0, 0); @@ -836,7 +836,7 @@ void CGameMode::NotifyResult2571(int result) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_PET_AUTO_FEEDING_ON)), 0xFF, 0, 0, 0); break; case 7: - g_session.ResetUnknown1050(); + g_session.ResetPetEggAndJob(); break; } } @@ -928,8 +928,8 @@ void CGameMode::ReceiveHomunculusInfo(const unsigned char* data) { *reinterpret_cast(g_session.companionSkillPoints) = packet->skillPoints; g_session.InvalidateWindowFrames(); *reinterpret_cast(&g_session.companionTargetState[4]) = packet->attackRange; - if (g_windowMgr.window_03C4) { - g_windowMgr.window_03C4->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.homunculusSkillWnd) { + g_windowMgr.homunculusSkillWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } int& notified = *reinterpret_cast(&g_session.companionTargetState[0]); @@ -985,12 +985,12 @@ void CGameMode::ReceiveHomunculusInfo3(const unsigned char* data) { g_session.RefreshHomunculusInfo(); *reinterpret_cast(g_session.companionSkillPoints) = packet->skillPoints; g_session.InvalidateWindowFrames(); - if (g_windowMgr.window_03C4) { - g_windowMgr.window_03C4->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.homunculusSkillWnd) { + g_windowMgr.homunculusSkillWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } *reinterpret_cast(&g_session.companionTargetState[4]) = packet->attackRange; - if (UIHomunInfoWnd* window = static_cast(g_windowMgr.window_03C0)) { + if (UIHomunInfoWnd* window = static_cast(g_windowMgr.homunInfoWnd)) { window->expBar->FillBackground(0xFFFFFF); window->expBar->SetValues(g_session.m_homunExp, g_session.m_homunMaxExp); window->intimacyBar->SetValues(&g_session.homunHunger, &g_session.homunMaxHunger); @@ -1032,8 +1032,8 @@ void CGameMode::ReceiveHomunculusInfo2(const unsigned char* data) { *reinterpret_cast(g_session.companionSkillPoints) = packet->skillPoints; g_session.InvalidateWindowFrames(); *reinterpret_cast(&g_session.companionTargetState[4]) = packet->attackRange; - if (g_windowMgr.window_03C4) { - g_windowMgr.window_03C4->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.homunculusSkillWnd) { + g_windowMgr.homunculusSkillWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } int& notified = *reinterpret_cast(&g_session.companionTargetState[0]); @@ -1059,10 +1059,10 @@ void CGameMode::ReceiveMinimapMarker(const unsigned char* data) { this->minimapMarkers[packet->key].y = y; this->minimapMarkers[packet->key].effectType = packet->type; this->minimapMarkers[packet->key].questIconId = packet->color; - if (g_windowMgr.window_4F1CC) { + if (g_windowMgr.miniMapWnd) { for (auto it = this->minimapMarkers.begin(); it != this->minimapMarkers.end(); ++it) { if (0 != it->second.questIconId) { - g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_ADD_QUEST_MARK, it->second.effectType, it->second.questIconId, it->second.x, it->second.y); + g_windowMgr.miniMapWnd->SendMsg(nullptr, UM_MINIMAP_ADD_QUEST_MARK, it->second.effectType, it->second.questIconId, it->second.x, it->second.y); } } } @@ -1093,7 +1093,7 @@ void CGameMode::ReceiveBookOpen(const unsigned char* packet) { // OFFSET: 0x00D3DF40 // FUNCTION: fn_21807 -void CGameMode::ReceiveResultNotice00FC(const unsigned char* packet) { +void CGameMode::ReceiveChatRoomEntryFailure(const unsigned char* packet) { this->isWaitingEnterRoom = 0; switch (packet[2]) { @@ -1460,7 +1460,7 @@ void CGameMode::ReceiveNamedResultNotice(const unsigned char* packet) { // OFFSET: 0x00D40360 // FUNCTION: fn_21818 -void CGameMode::ReceiveResultNotice0118(const unsigned char* packet) { +void CGameMode::ReceiveWhisperFilterResult(const unsigned char* packet) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); switch (packet[2]) { case WT_EXCLUDE_WHISPER: @@ -1575,7 +1575,7 @@ void CGameMode::ReceiveSummonHpInit(const unsigned char* buffer) { // FUNCTION: fn_22000 void CGameMode::ReceiveSummonHpUpdate(const unsigned char* buffer) { const SummonHpUpdatePacket* packet = reinterpret_cast(buffer); - if (g_session.FindUnknown078C(packet->summonId) == -1) { + if (g_session.FindSummonMaxHp(packet->summonId) == -1) { return; } @@ -1601,7 +1601,7 @@ void CGameMode::ReceiveClanLeave(const unsigned char* packet) { g_clanInfo->Clear(); this->nameCard.SetValue3(g_session.m_aid, g_clanInfo->m_clanName); if (this->scene->player) { - this->scene->player->SetUnknown0305(0, 0); + this->scene->player->SetSpGauge(0, 0); } g_windowMgr.RefreshClanWnd(); @@ -2159,10 +2159,10 @@ void CGameMode::ReceiveGradeEnchantResult(const unsigned char* packet) { // OFFSET: 0x00D67C20 // FUNCTION: fn_22038 void CGameMode::ReceiveAchievementUpdate( - int unknown01738784, short unknown01738788, int completed, int total, int id, unsigned char achieved, const std::uint32_t* objectives, + int score, short achievementLevel, int completed, int total, int id, unsigned char achieved, const std::uint32_t* objectives, __time32_t completedAt, unsigned char rewarded ) { - const SessionRecord6144 previous = g_session.FindRecord6144(id); + const SessionRecord6144 previous = g_session.FindAchievementRecord(id); if (reinterpret_cast(&previous.completionFlags)[1] == 0 && achieved == 1) { this->achievementBalloonTick = timeGetTime(); if (!this->achievementBalloon) { @@ -2190,8 +2190,8 @@ void CGameMode::ReceiveAchievementUpdate( } } - g_session.achievementScore = unknown01738784; - g_session.achievementLevel = unknown01738788; + g_session.achievementScore = score; + g_session.achievementLevel = achievementLevel; g_session.achievementCompleted = completed; g_session.achievementTotal = total; @@ -2201,14 +2201,14 @@ void CGameMode::ReceiveAchievementUpdate( std::memcpy(record.objectives, objectives, sizeof(record.objectives)); record.completedAt = completedAt; record.rewarded = rewarded; - g_session.UpdateRecord6144(record); + g_session.UpdateAchievementRecord(record); if (UIWindow* window = g_windowMgr.LookupWindow(WID_ACHIEVEMENTWND)) { window->SendMsg(nullptr, UM_REFRESH, id, 0, 0, 0); } g_session.RefreshTrackedAchievement(id); - if (g_session.HasUnknown6178Records() == true) { + if (g_session.HasTrackedAchievements() == true) { if (UIWindow* window = g_windowMgr.EnsureWindow(WID_ACHTRACINGWND)) { window->Invalidate(); } @@ -2226,7 +2226,7 @@ void CGameMode::ReceiveAchievementResult(unsigned char result, int id) { window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } - const int index = g_session.AddUnknown6160(id); + const int index = g_session.AddAchievementJobTitle(id); if (index != -1) { g_session.AddUnknownId(index); } @@ -2267,7 +2267,7 @@ void CGameMode::ReceiveItemReward2(const unsigned char* data) { switch (packet->result) { case 0: g_session.AddStackedItem(reward); - g_session.RemoveItem1710(reward.identity[1], reward.quantity); + g_session.RemoveInventoryItem(reward.identity[1], reward.quantity); g_session.achievementResult = value; g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_FAILED_SEND_MAIL)), 0x64FFFF, 0, 0, 0); break; @@ -2308,7 +2308,7 @@ void CGameMode::ReceiveItemReward(const unsigned char* data) { } item.flags[0] = packet->bound; g_session.AddStackedItem(item); - g_session.RemoveItem1710(packet->index, packet->quantity); + g_session.RemoveInventoryItem(packet->index, packet->quantity); g_session.achievementResult = packet->value; g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_FAILED_SEND_MAIL)), 0x64FFFF, 0, 0, 0); break; @@ -2494,7 +2494,7 @@ void CGameMode::ReceiveBroadcastBalloonNotice(const unsigned char* packet) { // OFFSET: 0x00D65870 // FUNCTION: fn_22003 -void CGameMode::ReceiveUnknownD65870(const unsigned char* packet) { +void CGameMode::ReceivePartyMemberInfoWithCharacterId(const unsigned char* packet) { this->UpdatePartyMemberInfo( reinterpret_cast(packet + 0x2F), *reinterpret_cast(packet + 2), reinterpret_cast(packet + 0x47), *reinterpret_cast(packet + 10), packet[0x16], *reinterpret_cast(packet + 0x0E), @@ -2900,7 +2900,7 @@ void CGameMode::ReceivePendingItem1718List(const unsigned char* packet) { item.type = record->type; item.id = -1; item.identified = 1; - g_session.AddItem1718(item, 0); + g_session.AddShopItem(item, 0); if (g_unknown_015D4818 && g_unknown_015D4818->entry) { Unknown015D4818Values& values = g_unknown_015D4818->entry->values; values.sprite = record->sprite; diff --git a/Source/Client/Mode/GameModeItemLists.cpp b/Source/Client/Mode/GameModeItemLists.cpp index 3a6d37402..c0ecbad48 100644 --- a/Source/Client/Mode/GameModeItemLists.cpp +++ b/Source/Client/Mode/GameModeItemLists.cpp @@ -111,7 +111,7 @@ void CGameMode::ReceiveEquipListPart(unsigned char listType, int count, const un std::memcpy(options, record.options, sizeof(options)); ITEM_INFO item; FillEquipListItem(item, record, options); - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } break; case INVTYPE_INVENTORY: @@ -127,14 +127,14 @@ void CGameMode::ReceiveEquipListPart(unsigned char listType, int count, const un } if (item.identity[3] == 0) { - g_session.AddItem1710(item, 0); + g_session.AddInventoryItem(item, 0); g_session.UpdateInventoryItem(item, 0); } else { char equipped = 1; if (g_session.IsCostumeLocation(item.identity[3])) { - g_session.EquipItem2B50(item, &equipped); + g_session.EquipCostumeItem(item, &equipped); } else { - g_session.EquipUnknown17F0(item, &equipped); + g_session.EquipInventoryItem(item, &equipped); } } @@ -161,7 +161,7 @@ void CGameMode::ReceiveEquipListPart(unsigned char listType, int count, const un std::memcpy(options, record.options, sizeof(options)); ITEM_INFO item; FillEquipListItem(item, record, options); - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } break; } @@ -194,10 +194,10 @@ void CGameMode::ReceiveInventoryStart(const unsigned char* packet) { case INVTYPE_INVENTORY: g_session.ClearInventory(); g_session.ResetEquipment(); - g_session.ResetItems2B50(); + g_session.ResetCostumeItems(); break; case INVTYPE_CART: - g_session.ClearItems1740(); + g_session.ClearMerchantShopItems(); break; } } diff --git a/Source/Client/Mode/GameModeMiniMap.cpp b/Source/Client/Mode/GameModeMiniMap.cpp index 988d46b3c..ddd7bbe34 100644 --- a/Source/Client/Mode/GameModeMiniMap.cpp +++ b/Source/Client/Mode/GameModeMiniMap.cpp @@ -174,15 +174,15 @@ void CGameMode::RemoveMiniMapPing(std::uint32_t id) { // FUNCTION: fn_21253 void CGameMode::DrawMiniMapMembers(const TextureRegion& view) { int index = 0; - if (g_windowMgr.window_4F1CC) { - g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_SET_MARK_COUNT, 0, this->partyPosList.size(), 0, 0); - g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_SET_MARK_COUNT, 1, this->guildPosList.size(), 0, 0); + if (g_windowMgr.miniMapWnd) { + g_windowMgr.miniMapWnd->SendMsg(nullptr, UM_MINIMAP_SET_MARK_COUNT, 0, this->partyPosList.size(), 0, 0); + g_windowMgr.miniMapWnd->SendMsg(nullptr, UM_MINIMAP_SET_MARK_COUNT, 1, this->guildPosList.size(), 0, 0); } for (auto it = this->partyPosList.begin(); it != this->partyPosList.end(); ++it) { this->DrawMiniMapMarker(view, it->second.x, it->second.y, 2, std::string(), 2, it->second.color, false); - if (g_windowMgr.window_4F1CC) { - g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_SET_MARK_POS, 0, index, it->second.x, it->second.y); + if (g_windowMgr.miniMapWnd) { + g_windowMgr.miniMapWnd->SendMsg(nullptr, UM_MINIMAP_SET_MARK_POS, 0, index, it->second.x, it->second.y); } ++index; } @@ -190,8 +190,8 @@ void CGameMode::DrawMiniMapMembers(const TextureRegion& view) { for (auto it = this->guildPosList.begin(); it != this->guildPosList.end(); ++it) { if (this->partyPosList.find(it->first) == this->partyPosList.end()) { this->DrawMiniMapMarker(view, it->second.x, it->second.y, 2, std::string(), 1, it->second.color, false); - if (g_windowMgr.window_4F1CC) { - g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_SET_MARK_POS, 1, index, it->second.x, it->second.y); + if (g_windowMgr.miniMapWnd) { + g_windowMgr.miniMapWnd->SendMsg(nullptr, UM_MINIMAP_SET_MARK_POS, 1, index, it->second.x, it->second.y); } } ++index; @@ -439,10 +439,10 @@ void CGameMode::DrawMiniMapMarker( this->DrawTexture(rect, 0, 0.0999f, 0xFFFFFFFF, g_texMgr.Load(texture.c_str(), 0, false, true, false), region); } else if (kind == 5) { this->DrawTexture(rect, 0, 0.0999f, 0xFFFFFFFF, g_texMgr.Load(texture.c_str(), 0, false, true, false), region); - if (g_windowMgr.window_4F1CC && (s_lastMarkerX != x || s_lastMarkerY != y)) { + if (g_windowMgr.miniMapWnd && (s_lastMarkerX != x || s_lastMarkerY != y)) { s_lastMarkerX = x; s_lastMarkerY = y; - g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_SET_BOSS_POS, x, y, 0, 0); + g_windowMgr.miniMapWnd->SendMsg(nullptr, UM_MINIMAP_SET_BOSS_POS, x, y, 0, 0); } } else if (kind == 1) { this->DrawMiniMapTriangle(static_cast(drawX), static_cast(drawY), static_cast(size + 1), 0xAAFFFFFF); @@ -455,8 +455,8 @@ void CGameMode::DrawMiniMapMarker( border.bottom = rect.bottom + 1; this->DrawTexture(border, 0, 0.0999f, 0x99FFFFFF, g_texMgr.Default(), region); this->DrawTexture(rect, 0, 0.0999f, color, g_texMgr.Default(), region); - if (g_windowMgr.window_4F1CC) { - g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_SET_MARK_POS, x, y, 0, 0); + if (g_windowMgr.miniMapWnd) { + g_windowMgr.miniMapWnd->SendMsg(nullptr, UM_MINIMAP_SET_MARK_POS, x, y, 0, 0); } } else if (kind == 3) { const double arm = size * 4; @@ -484,8 +484,8 @@ void CGameMode::DrawMiniMapMarker( if (s_lastPlayerX != x || s_lastPlayerY != y) { s_lastPlayerX = x; s_lastPlayerY = y; - if (g_windowMgr.window_4F1CC) { - g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_SET_PLAYER_POS, x, y, 0, 0); + if (g_windowMgr.miniMapWnd) { + g_windowMgr.miniMapWnd->SendMsg(nullptr, UM_MINIMAP_SET_PLAYER_POS, x, y, 0, 0); } if (UIWindow* window = reinterpret_cast(g_windowMgr.minimapZoomWnd)) { window->Invalidate(); diff --git a/Source/Client/Mode/GameModeNames.cpp b/Source/Client/Mode/GameModeNames.cpp index fbf3334c1..01b223cf8 100644 --- a/Source/Client/Mode/GameModeNames.cpp +++ b/Source/Client/Mode/GameModeNames.cpp @@ -23,7 +23,7 @@ __declspec(noinline) void TraceSelection(int selection) { // OFFSET: 0x00DDC6F0 // FUNCTION: fn_23368 -ITEM_INFO CSession::GetItem17F0(int index) const { +ITEM_INFO CSession::GetEquippedItemAt(int index) const { if (index == 15) { return LookupClientItemByIdentity(this->m_inventoryItems, this->equippedArrowIndex); } @@ -53,7 +53,7 @@ __declspec(noinline) unsigned char CSession::IsAllyActor(std::uint32_t aid, int // OFFSET: 0x00CD3400 // FUNCTION: fn_21263 -std::uint32_t CGameMode::FindUnknown01AC(std::uint32_t key) { +std::uint32_t CGameMode::FindChatRoomActorId(std::uint32_t key) { const auto found = this->chatRoomActorIds.find(key); if (found != this->chatRoomActorIds.end()) { return found->second; @@ -98,13 +98,13 @@ const CActorNameCard& CGameMode::LookupNameCard(std::uint32_t id) { // OFFSET: 0x00CD3580 // FUNCTION: fn_21267 -const char* CSession::Text8104() const { +const char* CSession::GetDamageSkinAuxiliaryName() const { return this->damageSkinAuxiliaryName.c_str(); } // OFFSET: 0x00CD35A0 // FUNCTION: fn_21268 -const char* CSession::Text80EC() const { +const char* CSession::GetDamageSpriteName() const { return this->damageSpriteName.c_str(); } @@ -114,7 +114,7 @@ const char* CGameMode::DragItemName() { switch (this->drag.source) { case 2: case 24: { - const ITEM_INFO item = g_session.GetItem17F0(this->drag.slot); + const ITEM_INFO item = g_session.GetEquippedItemAt(this->drag.slot); return item.identity[1] > 0 ? item.itemId.c_str() : nullptr; } default: diff --git a/Source/Client/Mode/GameModeNotices.cpp b/Source/Client/Mode/GameModeNotices.cpp index bc90ea41a..e80c05d25 100644 --- a/Source/Client/Mode/GameModeNotices.cpp +++ b/Source/Client/Mode/GameModeNotices.cpp @@ -564,7 +564,7 @@ void CGameMode::StopActorMove(std::uint32_t aid, std::int16_t x, std::int16_t y, // OFFSET: 0x00D69140 // FUNCTION: fn_22044 -void CGameMode::NotifyResult2877(int result) { +void CGameMode::NotifyCaptchaRegistrationResult(int result) { switch (result) { case 0: g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_MACRO_COMPLETE_REGISTER_CAPTCHA)), 0xFF, 0, 0, 0); @@ -623,7 +623,7 @@ refresh: // OFFSET: 0x00D69850 // FUNCTION: fn_22052 -void CGameMode::NotifyResult3562(const unsigned char* packet) { +void CGameMode::NotifyInventoryExpansionResult(const unsigned char* packet) { switch (reinterpret_cast(packet)->value) { case 0: g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_BUY_ONE_AT_A_TIME)), 0xFFFF00, 0, 0, 0); @@ -703,7 +703,7 @@ void CGameMode::ReceiveRouletteResult(const unsigned char* packet) { // OFFSET: 0x00D69FC0 // FUNCTION: fn_22057 -void CGameMode::NotifyResult4013(unsigned char result, unsigned short value) { +void CGameMode::NotifyMacroBlacklistCheckResult(unsigned char result, unsigned short value) { char text[256]; switch (result) { @@ -732,8 +732,8 @@ void CGameMode::NotifyResult4013(unsigned char result, unsigned short value) { // OFFSET: 0x00D6AE70 // FUNCTION: fn_22065 -void CGameMode::NotifyWindow4F258(int result) { - UIWindow* window = g_windowMgr.window_4F258; +void CGameMode::NotifyPrivateAirplaneResult(int result) { + UIWindow* window = g_windowMgr.privateAirplaneWnd; if (!window) { return; } @@ -820,7 +820,7 @@ void CGameMode::ReceiveBasicInfoResult(unsigned char result) { // OFFSET: 0x00D6BD40 // FUNCTION: fn_22075 -void CGameMode::ReceiveUnknown0454Result(const unsigned char* data) { +void CGameMode::ReceiveRodexComposeResult(const unsigned char* data) { const auto* packet = reinterpret_cast(data); switch (packet->value) { @@ -981,7 +981,7 @@ void CGameMode::ReceiveActorEffect347(const unsigned char* data) { // OFFSET: 0x00D6E9D0 // FUNCTION: fn_22109 -void CGameMode::ReceiveUnknown0294Text(const unsigned char* data) { +void CGameMode::ReceiveCoupleName(const unsigned char* data) { std::sprintf(this->coupleName, reinterpret_cast(data + 2)); } @@ -1035,7 +1035,7 @@ void CGameMode::ResizeWindow16(int width, int height) { // OFFSET: 0x00D6EBD0 // FUNCTION: fn_22117 -void CGameMode::ReceiveUnknown7FBC(const unsigned char* data) { +void CGameMode::ReceiveExtraInventorySlots(const unsigned char* data) { const auto* packet = reinterpret_cast(data); if (100 >= packet->value) { @@ -1048,7 +1048,7 @@ void CGameMode::ReceiveUnknown7FBC(const unsigned char* data) { // OFFSET: 0x00D6EC10 // FUNCTION: fn_22118 -void CGameMode::ReceiveNotice1950(const unsigned char*) { +void CGameMode::ReceiveZoneItemRetrievalFailure(const unsigned char*) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_FAILED_GET_ITEM_FROM_ZONEDA)), 0xFF, 0, 0, 0); } @@ -1072,7 +1072,7 @@ void CGameMode::ReceiveActorMessage144(const unsigned char* data) { // OFFSET: 0x00D6EF60 // FUNCTION: fn_22121 -void CGameMode::NotifyResult4138(int result) { +void CGameMode::NotifyGmCheckerResult(int result) { switch (result) { case 0: g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_GAME_SETTINGS_TAB_BASIC)), 0xFF, 0, 0, 0); @@ -1166,7 +1166,7 @@ void CGameMode::ReceivePartyItemPickup(const unsigned char* data) { // OFFSET: 0x00D71660 // FUNCTION: fn_22135 -void CGameMode::NotifyResult3995(unsigned char result) { +void CGameMode::NotifyMacroCheckRemovalResult(unsigned char result) { switch (result) { case 0: g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_MACRO_CHECK_REMOVE_OFF_SUCCESS)), 0xFFFF, 0, 0, 0); @@ -1226,24 +1226,24 @@ void CGameMode::ReceiveActorEffect228(const unsigned char* data) { // OFFSET: 0x00D6FAC0 // FUNCTION: fn_22125 -void CGameMode::ReceiveGuildUnknown0114List(const unsigned char* packet) { +void CGameMode::ReceiveGuildAgitList(const unsigned char* packet) { const auto* header = reinterpret_cast(packet); GuildInfo* guildInfo = &g_guildInfo; - guildInfo->ClearUnknown0114(); + guildInfo->ClearAgitIds(); const int count = header->length - 4; for (int i = 0; i < count; ++i) { unsigned char value; memcpy_s(&value, sizeof(value), packet + sizeof(VariablePacketHeader) + i, sizeof(value)); - guildInfo->AddUnknown0114(value); + guildInfo->AddAgitId(value); } } #pragma pack(push, 1) struct ShortcutPagePayload { /* 0000 */ NormalItemSlot slots[36]; - /* 00FC */ NormalItemSlot slot06EB; - /* 0103 */ NormalItemSlot slot06F2; + /* 00FC */ NormalItemSlot quickSlot; + /* 0103 */ NormalItemSlot alternateQuickSlot; }; struct QuestStateEntry { @@ -1316,9 +1316,9 @@ __declspec(noinline) void ReceiveShortcutPage(int position, const ShortcutPagePa if (0 == bank) { g_session.ClearShortcutSlots(); memcpy_s(g_session.m_shortcutSlots, sizeof(g_session.m_shortcutSlots), payload, sizeof(payload->slots)); - g_session.ClearSlots06EB(); - g_session.quickSlot = payload->slot06EB; - g_session.alternateQuickSlot = payload->slot06F2; + g_session.ClearQuickSlots(); + g_session.quickSlot = payload->quickSlot; + g_session.alternateQuickSlot = payload->alternateQuickSlot; base = g_session.mainShortcutRow; } else if (1 == bank) { g_session.ClearSecondaryShortcutSlots(); @@ -1326,21 +1326,21 @@ __declspec(noinline) void ReceiveShortcutPage(int position, const ShortcutPagePa base = g_session.alternateShortcutRow; } - if (g_windowMgr.window_01E8) { - g_windowMgr.window_01E8->SendMsg(nullptr, UM_ROTATE_SHORTCUT_ROWS, position - base + 4, bank, 0, 0); + if (g_windowMgr.shortCutWnd) { + g_windowMgr.shortCutWnd->SendMsg(nullptr, UM_ROTATE_SHORTCUT_ROWS, position - base + 4, bank, 0, 0); } } // OFFSET: 0x00D18F60 // FUNCTION: fn_21603 void CGameMode::ResendMinimapMarkers() { - if (g_windowMgr.window_4F1CC) { + if (g_windowMgr.miniMapWnd) { for (auto it = this->minimapMarkers.begin(); it != this->minimapMarkers.end(); ++it) { if (0 == it->second.questIconId) { continue; } - g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_ADD_QUEST_MARK, it->second.effectType, it->second.questIconId, it->second.x, it->second.y); + g_windowMgr.miniMapWnd->SendMsg(nullptr, UM_MINIMAP_ADD_QUEST_MARK, it->second.effectType, it->second.questIconId, it->second.x, it->second.y); } } } @@ -1420,7 +1420,7 @@ void CGameMode::ReceiveItem1784List(const unsigned char* data) { } const unsigned int count = (packet->length - 6) / sizeof(Item1784Entry); - g_session.ClearItems1784(9); + g_session.ClearInventoryCategoryItems(9); char name[256]; std::memset(name, 0, sizeof(name)); @@ -1475,7 +1475,7 @@ void CGameMode::ReceiveCardCompositionResult(const unsigned char* data) { } } - g_session.RemoveItem1710(packet->cardIndex, 1); + g_session.RemoveInventoryItem(packet->cardIndex, 1); g_session.UpdateInventoryItem(equip, 1); } break; @@ -1865,7 +1865,7 @@ void CGameMode::ReceiveStorageClose(const AchievementStatePacket* packet) { g_windowMgr.CloseWindow(WID_ITEMSTOREWND); } - g_session.ClearItems1738(); + g_session.ClearCartItems(); g_unknown_01738268 = 0; g_unknown_0173826C = 0; g_unknown_01738270 = 0; @@ -1873,16 +1873,16 @@ void CGameMode::ReceiveStorageClose(const AchievementStatePacket* packet) { // OFFSET: 0x00D6C460 // FUNCTION: fn_22081 -void CGameMode::ReceiveAchievementList(int count, int unknown01738784, short unknown01738788, int completed, int total, const AchievementRecordPacket* packets) { - g_session.achievementScore = unknown01738784; - g_session.achievementLevel = unknown01738788; +void CGameMode::ReceiveAchievementList(int count, int score, short achievementLevel, int completed, int total, const AchievementRecordPacket* packets) { + g_session.achievementScore = score; + g_session.achievementLevel = achievementLevel; g_session.achievementCompleted = completed; g_session.achievementTotal = total; for (int i = 0; i < count; ++i) { - g_session.UpdateRecord6144(packets[i]); + g_session.UpdateAchievementRecord(packets[i]); if (packets[i].rewarded == 1) { - g_session.AddUnknown6160(packets[i].id); + g_session.AddAchievementJobTitle(packets[i].id); } } @@ -2019,7 +2019,7 @@ void CGameMode::ReceiveRodexOpen(const unsigned char* packet) { const auto* open = reinterpret_cast(packet); if (open->result == 1) { if (!g_windowMgr.rodexComposeWnd) { - g_session.RestoreItems5C68(); + g_session.RestoreSelectionItems(); g_session.ClearItemQuantities(); g_windowMgr.EnsureWindow(WID_RODEXCOMPOSEWND); const char* text = open->text; @@ -2123,10 +2123,10 @@ void CGameMode::ReceiveBuyingStoreResult(const BuyingStoreResultPacket* packet) // OFFSET: 0x00D18BA0 // FUNCTION: fn_21600 -void CGameMode::SetActorUnknown02E4(std::uint32_t aid, int value) { +void CGameMode::SetActorGroupMemberVisible(std::uint32_t aid, int value) { CGameActor* actor = static_cast(this->scene->GetGameActorByAID(aid)); if (actor) { - actor->SetUnknown02E4(value); + actor->SetGroupMemberVisible(value); } } @@ -2159,7 +2159,7 @@ void CGameMode::ReceiveItemSlotAddOptions(const unsigned char* data) { } if (packet->itemId == 0) { - g_session.SetUnknown5214(packet->slot); + g_session.SetOtherExchangeMoney(packet->slot); return; } @@ -2190,7 +2190,7 @@ void CGameMode::ReceiveItemSlotAddGrade(const unsigned char* data) { } if (packet->itemId == 0) { - g_session.SetUnknown5214(packet->slot); + g_session.SetOtherExchangeMoney(packet->slot); return; } @@ -2215,16 +2215,16 @@ void CGameMode::ReceiveItemSlotAddGrade(const unsigned char* data) { // OFFSET: 0x00D6D7E0 // FUNCTION: fn_22090 -void CGameMode::ReceiveGuildUnknown0114Change(unsigned char value, std::uint32_t removeAid, std::uint32_t addAid) { +void CGameMode::ReceiveGuildAgitOwnershipChange(unsigned char value, std::uint32_t removeAid, std::uint32_t addAid) { GuildInfo* guildInfo = &g_guildInfo; if (g_session.IsLocalPlayerAid(removeAid) == 1) { - guildInfo->RemoveUnknown0114(value); + guildInfo->RemoveAgitId(value); } else if (g_session.IsLocalPlayerAid(addAid) == 0) { - guildInfo->AddUnknown0114(value); + guildInfo->AddAgitId(value); } - if (g_windowMgr.window_0320) { - g_windowMgr.window_0320->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.guildInfoManageWnd) { + g_windowMgr.guildInfoManageWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } @@ -3051,7 +3051,7 @@ void CGameMode::ReceiveTradeItemFilter(const unsigned char* data) { raw.identified = item.identified; raw.price = 1; raw.realPrice = 2; - g_session.AddItem1718(raw, 1); + g_session.AddShopItem(raw, 1); } UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMSHOPWND2); window->SendMsg(nullptr, UM_SETTITLE, 1, 0, 0, 0); @@ -3076,7 +3076,7 @@ void CGameMode::ReceiveExchangeItemAddAck(const unsigned char* data) { g_session.m_zeny -= exchangeAmount; g_session.RefreshHpSpWindows(); g_session.InvalidateWindowFrames(); - g_session.SetUnknown5210(g_session.exchangeMoney + exchangeAmount); + g_session.SetExchangeMoney(g_session.exchangeMoney + exchangeAmount); } break; case EXITEM_ADD_FAILED_OVERWEIGHT: @@ -3309,7 +3309,7 @@ void CGameMode::ReceiveStorageEquipList(const unsigned char* data) { item.damaged = record->damaged; item.refiningLevel = record->refine; item.expireTime = record->expireTime; - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } g_session.RefreshItem1738Window(); @@ -3337,7 +3337,7 @@ void CGameMode::ReceiveStorageEquipList2(const unsigned char* data) { item.expireTime = record->expireTime; item.bindOnEquip = record->bindOnEquip; item.sprite = record->sprite; - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } g_session.RefreshItem1738Window(); @@ -3371,7 +3371,7 @@ void CGameMode::ReceiveStorageEquipList3(const unsigned char* data) { item.bindOnEquip = record->bindOnEquip; item.sprite = record->sprite; item.flags[0] = (record->flags >> 2) & 1; - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } g_session.RefreshItem1738Window(); @@ -3416,7 +3416,7 @@ void CGameMode::ReceiveStorageEquipList4(const unsigned char* data) { for (int index = 0; index < item.optionCount; ++index) { reinterpret_cast(item.options)[index] = options[index]; } - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } g_session.RefreshItem1738Window(); @@ -3461,7 +3461,7 @@ void CGameMode::ReceiveStorageEquipList5(const unsigned char* data) { for (int index = 0; index < item.optionCount; ++index) { reinterpret_cast(item.options)[index] = options[index]; } - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } g_session.RefreshItem1738Window(); @@ -3493,7 +3493,7 @@ void CGameMode::ReceiveStorageNormalList(const unsigned char* data) { item.flags[0] = (record->flags >> 1) & 1; item.expireTime = record->expireTime; item.refiningLevel = 0; - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } g_session.RefreshItem1738Window(); @@ -3525,7 +3525,7 @@ void CGameMode::ReceiveStorageNormalList2(const unsigned char* data) { item.flags[0] = (record->flags >> 1) & 1; item.expireTime = record->expireTime; item.refiningLevel = 0; - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } g_session.RefreshItem1738Window(); @@ -3823,7 +3823,7 @@ void CGameMode::ReceiveVendingItemList( ) { const auto* records = reinterpret_cast(data); if (own == 1) { - g_session.ClearItems1758(); + g_session.ClearMerchantPurchaseItems(); for (int i = 0; i < count;) { const VendingItemRecord record = records[i]; ITEM_INFO item; @@ -3835,7 +3835,7 @@ void CGameMode::ReceiveVendingItemList( item.identity[1] = i; item.identified = 1; item.SetItemId(record.itemId); - g_session.AddItem1758(item); + g_session.AddMerchantPurchaseItem(item); } UIMerchantItemMyShopWnd* window = dynamic_cast(static_cast(g_windowMgr.EnsureWindow(WID_MERCHANTITEMMYSHOPWND_MODE_1))); @@ -3847,8 +3847,8 @@ void CGameMode::ReceiveVendingItemList( window->SetDuration(duration); } } else { - g_session.ClearItems1748(); - g_session.ClearItems1760(); + g_session.ClearMerchantMirrorItems(); + g_session.ClearMerchantHopeToSellItems(); for (int i = 0; i < count;) { const VendingItemRecord record = records[i]; ITEM_INFO item; @@ -3860,7 +3860,7 @@ void CGameMode::ReceiveVendingItemList( item.identity[1] = i; item.identified = 1; item.SetItemId(record.itemId); - g_session.AddItem1748(item); + g_session.AddMerchantMirrorItem(item); } UIMerchantItemShopWnd* shop = static_cast(g_windowMgr.EnsureWindow(WID_MERCHANTITEMSHOPWND_MODE_1)); @@ -3873,7 +3873,7 @@ void CGameMode::ReceiveVendingItemList( window->SendMsg(nullptr, UM_SETNAID, aid, storeId, 0, 0); UIWindow* list = reinterpret_cast(g_windowMgr.purchaseMirrorItemWnd); if (list) { - g_session.RefreshItems1750(); + g_session.RefreshMerchantMyShopItems(); } else { list = g_windowMgr.EnsureWindow(WID_MERCHANTMIRRORITEMWND_MODE_2); } @@ -3947,12 +3947,12 @@ void CGameMode::ReceiveTraitStatusChangeAck(unsigned char result, unsigned short void CGameMode::ReceiveVendingItemList2(int aid, int storeId, char own, int count, std::uint32_t duration, const unsigned char* data) { const auto* records = reinterpret_cast(data); if (own == 1) { - g_session.ClearItems1758(); + g_session.ClearMerchantPurchaseItems(); for (int i = 0; i < count; ++i) { const VendingItemRecord2 record = records[i]; ITEM_INFO item; FillVendingItem(item, record); - g_session.AddItem1758(item); + g_session.AddMerchantPurchaseItem(item); } UIMerchantItemMyShopWnd* window = dynamic_cast(static_cast(g_windowMgr.EnsureWindow(WID_MERCHANTITEMMYSHOPWND))); @@ -3964,13 +3964,13 @@ void CGameMode::ReceiveVendingItemList2(int aid, int storeId, char own, int coun } this->isOnQuest = 1; } else { - g_session.ClearItems1748(); - g_session.ClearItems1760(); + g_session.ClearMerchantMirrorItems(); + g_session.ClearMerchantHopeToSellItems(); for (int i = 0; i < count; ++i) { const VendingItemRecord2 record = records[i]; ITEM_INFO item; FillVendingItem(item, record); - g_session.AddItem1748(item); + g_session.AddMerchantMirrorItem(item); } UIMerchantItemShopWnd* shop = static_cast(g_windowMgr.EnsureWindow(WID_MERCHANTITEMSHOPWND)); @@ -4351,7 +4351,7 @@ void CGameMode::ReceiveAcceptEnter(const unsigned char* data) { const auto* packet = reinterpret_cast(data); if (Replay::Instance().state == 2) { Replay::Instance().SetState(3); - g_windowMgr.window_4F164->SendMsg(nullptr, UM_SETPOS, 0, 0, 0, 0); + g_windowMgr.replayRecordControlWnd->SendMsg(nullptr, UM_SETPOS, 0, 0, 0, 0); g_windowMgr.CloseWindow(WID_REPLAYRECCONTROLWND); } else if (Replay::Instance().state == 7) { Replay::Instance().SetState(8); @@ -4423,7 +4423,7 @@ void CGameMode::ReceiveRodexMailList(const unsigned char* packet) { mail.title.assign(entry->title, entry->titleLength); mail.sender.assign(entry->sender, std::min(std::strlen(entry->sender), 24)); mail.expiresAt = _time32(nullptr) + entry->expireTime; - if (entry->openType == MAIL_INBOX_NORMAL && !(mail.type & 8) && !g_session.HasUnknown809C(mail.sender)) { + if (entry->openType == MAIL_INBOX_NORMAL && !(mail.type & 8) && !g_session.HasCharacterName(mail.sender)) { mail.isKnownSender = g_session.IsKnownName(mail.sender); } else { mail.isKnownSender = 1; @@ -5626,8 +5626,8 @@ void CGameMode::ReceiveQuestHuntUpdate(const unsigned char* data) { if (!notices.empty()) { this->ShowNoticeBalloon(¬ices); } - if (g_windowMgr.window_0428 != nullptr) { - g_windowMgr.window_0428->Invalidate(); + if (g_windowMgr.questDisplayWnd != nullptr) { + g_windowMgr.questDisplayWnd->Invalidate(); } g_renewQuestMgr->UpdateOngoingQuestInfo(); } @@ -5672,8 +5672,8 @@ void CGameMode::ReceiveQuestHuntUpdate2(const unsigned char* data) { if (!notices.empty()) { this->ShowNoticeBalloon(¬ices); } - if (g_windowMgr.window_0428 != nullptr) { - g_windowMgr.window_0428->Invalidate(); + if (g_windowMgr.questDisplayWnd != nullptr) { + g_windowMgr.questDisplayWnd->Invalidate(); } g_renewQuestMgr->UpdateOngoingQuestInfo(); } @@ -5693,7 +5693,7 @@ void CGameMode::ReceiveRodexMailListAppend(const unsigned char* data) { mail.type = entry->type; mail.expiresAt = _time32(nullptr) + entry->expireTime; mail.sender.assign(entry->sender, (std::min)(std::strlen(entry->sender), static_cast(24))); - if (packet->type == MAIL_INBOX_NORMAL && (mail.type & 8) == MAIL_INBOX_NORMAL && !g_session.HasUnknown809C(mail.sender)) { + if (packet->type == MAIL_INBOX_NORMAL && (mail.type & 8) == MAIL_INBOX_NORMAL && !g_session.HasCharacterName(mail.sender)) { mail.isKnownSender = g_session.IsKnownName(mail.sender); } else { mail.isKnownSender = 1; @@ -6857,7 +6857,7 @@ void CGameMode::ReceiveStatusChangeNotice(const unsigned char* data) { break; case EFST_ON_PUSH_CART: if (packet->aid == g_session.m_aid) { - g_session.SetUnknown5C1C(0); + g_session.SetReplayPacketMode(0); } break; case EFST_HANDICAPSTATE_ICEEXPLO: @@ -7104,7 +7104,7 @@ void CGameMode::ReceiveGuildMemberExpelled(const unsigned char* data) { GuildInfo::Unknown00ECEntry entry; entry.name = name; entry.reason = reason; - guildInfo->AddUnknown00EC(entry); + guildInfo->AddBannedMember(entry); } #pragma pack(push, 1) @@ -7153,7 +7153,7 @@ void CGameMode::ReceiveGuildPositionUpdate(const unsigned char* data) { entry.tax = position.payRate; entry.canStorage = (position.mode >> 8) & 1; entry.ranking = position.ranking; - guildInfo->UpdateUnknown00D4(entry); + guildInfo->UpdatePosition(entry); } g_windowMgr.RefreshGuildWindows(); @@ -7239,7 +7239,7 @@ void CGameMode::ReceiveGuildExpulsion2(const unsigned char* data) { if (this->scene != nullptr && this->scene->player != nullptr) { this->scene->player->SetGdid(0); } - guildInfo->ClearUnknown0114(); + guildInfo->ClearAgitIds(); return; } @@ -7267,7 +7267,7 @@ void CGameMode::ReceiveGuildExpulsion2(const unsigned char* data) { GuildInfo::Unknown00ECEntry entry; entry.name = name.c_str(); entry.reason = reason; - guildInfo->AddUnknown00EC(entry); + guildInfo->AddBannedMember(entry); } // OFFSET: 0x00D4A060 @@ -7377,10 +7377,10 @@ void CGameMode::RefreshInventoryOrEquipItem(std::uint16_t itemId, unsigned char int lookup = 0; int slot = 0; if (item.identity[1] == 0) { - item = g_session.FindItem17F0(itemId, &slot); + item = g_session.FindEquippedItem(itemId, &slot); lookup = 1; if (item.identity[1] == 0) { - item = g_session.FindItem2B50(itemId, &slot); + item = g_session.FindCostumeItem(itemId, &slot); lookup = 2; } } @@ -7396,9 +7396,9 @@ void CGameMode::RefreshInventoryOrEquipItem(std::uint16_t itemId, unsigned char if (lookup == 0) { g_session.UpdateInventoryItem(item, 1); } else if (lookup == 1) { - g_session.SetEquipItem17F0(slot, item); + g_session.SetEquippedItem(slot, item); } else if (lookup == 2) { - g_session.SetEquipItem2B50(slot, item); + g_session.SetCostumeItem(slot, item); } if (UIWindow* window = g_windowMgr.LookupWindow(WID_ITEMCOLLECTIONWND)) { @@ -7414,10 +7414,10 @@ void CGameMode::RefreshInventoryOrEquipItem2(const unsigned char* data) { long long lookup = 0; int slot = 0; if (item.identity[1] == 0) { - item = g_session.FindItem17F0(packet->itemId, &slot); + item = g_session.FindEquippedItem(packet->itemId, &slot); lookup = 1; if (item.identity[1] == 0) { - item = g_session.FindItem2B50(packet->itemId, &slot); + item = g_session.FindCostumeItem(packet->itemId, &slot); lookup = 2; } } @@ -7436,9 +7436,9 @@ void CGameMode::RefreshInventoryOrEquipItem2(const unsigned char* data) { if (lookup == 0) { g_session.UpdateInventoryItem(item, 1); } else if (lookup == 1) { - g_session.SetEquipItem17F0(slot, item); + g_session.SetEquippedItem(slot, item); } else if (lookup == 2) { - g_session.SetEquipItem2B50(slot, item); + g_session.SetCostumeItem(slot, item); } if (UIWindow* window = g_windowMgr.LookupWindow(WID_ITEMCOLLECTIONWND)) { @@ -7665,7 +7665,7 @@ void CGameMode::ProcessWhisper(int unknown_0004, std::string name, std::string t if (std::strcmp(head, notice) != 0) { std::string reply(LookupMessage(MSI_AUTO_MSG2)); reply.append(reinterpret_cast(g_session.autoReplyState[4]).c_str()); - g_windowMgr.SetUnknown04DC(reply.c_str()); + g_windowMgr.SetChatInputText(reply.c_str()); g_modeMgr.gameMode->SendMsg(MM_WHISPERMSG, reinterpret_cast(name.c_str()), 0, 0, 0); } } @@ -7681,7 +7681,7 @@ void CGameMode::ProcessWhisper(int unknown_0004, std::string name, std::string t body = std::move(linked); } if (std::strstr(message.data(), g_whisperItemLinkTag.c_str()) != nullptr) { - body = static_cast(g_windowMgr.window_01C8)->ConvertChat(body); + body = static_cast(g_windowMgr.chatWnd)->ConvertChat(body); header = header + " ] : " + body; } else { header = header + " ] : " + message.data(); @@ -7743,7 +7743,7 @@ void CGameMode::ProcessWhisper(int unknown_0004, std::string name, std::string t if (flag) { if (UIBroadcastBalloon* balloon = this->EnsureBroadcastBalloon()) { if (prefix.find(g_whisperItemLinkTag) != std::string::npos) { - prefix = static_cast(g_windowMgr.window_01C8)->ConvertChat(prefix); + prefix = static_cast(g_windowMgr.chatWnd)->ConvertChat(prefix); } { std::string linked; @@ -7774,7 +7774,7 @@ void CGameMode::ProcessWhisper(int unknown_0004, std::string name, std::string t if (std::strcmp(head, notice) != 0) { std::string reply(LookupMessage(MSI_AUTO_MSG2)); reply.append(reinterpret_cast(g_session.autoReplyState[4]).c_str()); - g_windowMgr.SetUnknown04DC(reply.c_str()); + g_windowMgr.SetChatInputText(reply.c_str()); g_modeMgr.gameMode->SendMsg(MM_WHISPERMSG, reinterpret_cast(name.c_str()), 0, 0, 0); } } @@ -7787,7 +7787,7 @@ void CGameMode::ReceiveStoreResult(unsigned char kind, unsigned char result) { switch (result) { case 0: g_windowMgr.CloseWindow(WID_MERCHANTSHOPMAKEWND); - g_session.ClearItems1768(); + g_session.ClearMerchantPurchaseSavedItems(); break; case 1: case 2: @@ -7801,7 +7801,7 @@ void CGameMode::ReceiveStoreResult(unsigned char kind, unsigned char result) { case 4: case 6: case 7: - g_session.ClearItems1768(); + g_session.ClearMerchantPurchaseSavedItems(); g_windowMgr.CloseWindow(WID_MERCHANTSHOPMAKEWND); break; } @@ -7809,7 +7809,7 @@ void CGameMode::ReceiveStoreResult(unsigned char kind, unsigned char result) { switch (result) { case 0: g_windowMgr.CloseWindow(WID_MERCHANTSHOPMAKEWND_MODE_1); - g_session.ClearItems1768(); + g_session.ClearMerchantPurchaseSavedItems(); break; case 1: case 2: @@ -7824,7 +7824,7 @@ void CGameMode::ReceiveStoreResult(unsigned char kind, unsigned char result) { case 6: case 7: case 8: - g_session.ClearItems1768(); + g_session.ClearMerchantPurchaseSavedItems(); g_windowMgr.CloseWindow(WID_MERCHANTSHOPMAKEWND_MODE_1); g_windowMgr.CloseWindow(WID_MERCHANTMIRRORITEMWND_MODE_1); break; @@ -7844,7 +7844,7 @@ void CGameMode::ReceiveStoreResult(unsigned char kind, unsigned char result) { } if (result == 200) { - g_session.ClearItems1768(); + g_session.ClearMerchantPurchaseSavedItems(); g_windowMgr.CloseWindow(WID_MERCHANTSHOPMAKEWND); g_windowMgr.CloseWindow(WID_MERCHANTSHOPMAKEWND_MODE_1); g_windowMgr.CloseWindow(WID_ITEMWND); diff --git a/Source/Client/Mode/GameModePackets.cpp b/Source/Client/Mode/GameModePackets.cpp index 7b3c6d2fe..3f9b3e615 100644 --- a/Source/Client/Mode/GameModePackets.cpp +++ b/Source/Client/Mode/GameModePackets.cpp @@ -533,7 +533,7 @@ void CGameMode::IgnoreRemovedPacket5(const unsigned char*) { // OFFSET: 0x00D21D00 // FUNCTION: fn_21657 -void CGameMode::ReceiveUnknown05C4Result(const unsigned char* data) { +void CGameMode::ReceiveBossMonsterInfo(const unsigned char* data) { const auto* packet = reinterpret_cast(data); char message[256]; char name[51] = {}; @@ -704,7 +704,7 @@ __declspec(noinline) void CGameMode::ReceiveRentalItemTime(const unsigned char* // OFFSET: 0x00D264E0 // FUNCTION: fn_21679 -void CGameMode::ReceiveUnknownD264E0(const unsigned char* packet) { +void CGameMode::ReceiveNpcDialogEnd(const unsigned char* packet) { if (UIWindow* window = g_windowMgr.sayDialogWnd) { window->SendMsg(nullptr, UM_DISABLENEXTBUTTON, 0, 0, 0, 0); window->SendMsg(nullptr, UM_ENABLECLOSEBUTTON, 0, 0, 0, 0); @@ -884,7 +884,7 @@ void CGameMode::ReceiveItem1738EquipList(const unsigned char* data) { for (int index = 0; index < item.optionCount; ++index) { reinterpret_cast(item.options)[index] = entry.options[index]; } - g_session.AddItem1738(item, 1); + g_session.AddCartItem(item, 1); } g_session.RefreshItem1738Window(); @@ -924,7 +924,7 @@ void CGameMode::ReceiveItem1738EquipListOptions(const unsigned char* data) { for (int index = 0; index < item.optionCount; ++index) { reinterpret_cast(item.options)[index] = entry.options[index]; } - g_session.AddItem1738(item, 1); + g_session.AddCartItem(item, 1); } g_session.RefreshItem1738Window(); @@ -956,7 +956,7 @@ void CGameMode::ReceiveItem1738NormalList(const unsigned char* data) { item.refiningLevel = 0; item.expireTime = record->expireTime; item.flags[0] = (record->flags >> 1) & 1; - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } g_session.RefreshItem1738Window(); @@ -974,7 +974,7 @@ __declspec(noinline) void CGameMode::ReceiveHomunculusProperty64(const unsigned case SP_BASEEXP: g_session.m_homunExp = packet->value; g_session.RefreshHomunculusInfo(); - if (UIHomunInfoWnd* window = static_cast(g_windowMgr.window_03C0)) { + if (UIHomunInfoWnd* window = static_cast(g_windowMgr.homunInfoWnd)) { window->expBar->SetValues(g_session.m_homunExp, g_session.m_homunMaxExp); } break; @@ -1284,7 +1284,7 @@ void CGameMode::ReceivePackageSimulation(const unsigned char* packet) { // OFFSET: 0x00D612A0 // FUNCTION: fn_21979 -__declspec(noinline) void CGameMode::ReceiveUnknownD612A0(const unsigned char* packet) { +__declspec(noinline) void CGameMode::ReceiveMileageInfo(const unsigned char* packet) { UIWindow* window = g_windowMgr.EnsureWindow(WID_MILEAGEWND); if (!window) { return; @@ -1297,7 +1297,7 @@ __declspec(noinline) void CGameMode::ReceiveUnknownD612A0(const unsigned char* p // OFFSET: 0x00D77BF0 // FUNCTION: fn_22152 -__declspec(noinline) void CGameMode::ReceiveUnknownD77BF0(const unsigned char* packet) { +__declspec(noinline) void CGameMode::ReceiveMailboxAvailability(const unsigned char* packet) { if (packet[2] == 1) { if (!g_windowMgr.openMailBoxWnd) { g_windowMgr.EnsureWindow(WID_OPENMAILBOXWND); @@ -1366,7 +1366,7 @@ void CGameMode::IgnoreRemovedPacket7(const unsigned char*) { // OFFSET: 0x00D79420 // FUNCTION: fn_22167 -__declspec(noinline) void CGameMode::ReceiveUnknown173A5BC(const unsigned char* packet) { +__declspec(noinline) void CGameMode::ReceiveOverweightThreshold(const unsigned char* packet) { const int value = *reinterpret_cast(packet + 2); if (value > 0) { g_unknown173A5BC = value; @@ -1375,7 +1375,7 @@ __declspec(noinline) void CGameMode::ReceiveUnknown173A5BC(const unsigned char* // OFFSET: 0x00D7A0B0 // FUNCTION: fn_22186 -__declspec(noinline) void CGameMode::ReceiveUnknown16FC588(const unsigned char* packet) { +__declspec(noinline) void CGameMode::ReceiveNavigationRouteResult(const unsigned char* packet) { const signed char value = *reinterpret_cast(packet + 2); if (value != 1 && value != 2) { g_navigationManager.routeSide = 0; @@ -1426,20 +1426,20 @@ __declspec(noinline) void CGameMode::ReceiveCharViewResult(const unsigned char* // OFFSET: 0x00D89CA0 // FUNCTION: fn_22213 __declspec(noinline) void CGameMode::ResetItemLists(const unsigned char*) { - g_session.ResetItems61B8(); - g_session.ResetItems6B68(); + g_session.ResetSwapCostumeItems(); + g_session.ResetSwapEquippedItems(); } // OFFSET: 0x00D8A1F0 // FUNCTION: fn_22216 __declspec(noinline) void CGameMode::ClearItemLists(const unsigned char* packet) { const std::uint16_t slot = *reinterpret_cast(packet + 2); - g_session.ClearUnknown1710(slot); + g_session.UnflagInventoryItem(slot); this->inventoryChanged = 1; RefreshItemWindows(&g_windowMgr); - g_session.ClearUnknown1740(slot); + g_session.UnflagMerchantShopItem(slot); g_session.RefreshItem1740Window(); - g_session.ClearUnknown1738(slot); + g_session.UnflagCartItem(slot); g_session.RefreshItem1738Window(); } @@ -1589,7 +1589,7 @@ void CGameMode::IgnorePacket478(const unsigned char*) { // OFFSET: 0x00D3A1D0 // FUNCTION: fn_21775 -void CGameMode::ClearUnknown0244(const unsigned char*) { +void CGameMode::ClearMovementRestriction(const unsigned char*) { this->noMove = 0; } @@ -1622,7 +1622,7 @@ void CGameMode::ReceiveZoneServerChange(const char* mapName, std::int16_t x, std // OFFSET: 0x00D272A0 // FUNCTION: fn_21688 __declspec(noinline) void CGameMode::ReceiveActorStatusBlock(const unsigned char* packet) { - g_session.SetUnknown5BC0(*reinterpret_cast(packet + 2)); + g_session.SetElementalGid(*reinterpret_cast(packet + 2)); g_session.elementalHp = *reinterpret_cast(packet + 6); g_session.elementalSp = *reinterpret_cast(packet + 0xE); g_session.elementalMaxHp = *reinterpret_cast(packet + 0xA); @@ -1718,7 +1718,7 @@ __declspec(noinline) void CGameMode::ReceiveItem1740EquipList(const unsigned cha for (int index = 0; index < item.optionCount; ++index) { reinterpret_cast(item.options)[index] = entry.options[index]; } - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } g_session.RefreshItem1740Window(); @@ -1752,7 +1752,7 @@ void CGameMode::ReceiveItem1740EquipListOptions(const unsigned char* packet) { for (int index = 0; index < item.optionCount; ++index) { reinterpret_cast(item.options)[index] = entry.options[index]; } - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } g_session.RefreshItem1740Window(); @@ -1760,7 +1760,7 @@ void CGameMode::ReceiveItem1740EquipListOptions(const unsigned char* packet) { // OFFSET: 0x00D26800 // FUNCTION: fn_21682 -__declspec(noinline) void CGameMode::ReceiveUnknownD26800(const unsigned char* packet) { +__declspec(noinline) void CGameMode::ReceiveEquipmentViewState(const unsigned char* packet) { const unsigned char value = packet[2]; *reinterpret_cast(g_session.equipmentViewState) = value; const char* text = LookupMessage(value != 0 ? 0x54F : 0x54E); @@ -1772,7 +1772,7 @@ __declspec(noinline) void CGameMode::ReceiveUnknownD26800(const unsigned char* p // OFFSET: 0x00D79660 // FUNCTION: fn_22172 -__declspec(noinline) void CGameMode::ReceiveUnknownD79660(const unsigned char* packet) { +__declspec(noinline) void CGameMode::ReceiveDebuffRemovalResult(const unsigned char* packet) { UIWindow* window = g_windowMgr.LookupWindow(WID_DEBUFFREMOVEWND); if (!window) { return; @@ -1799,7 +1799,7 @@ __declspec(noinline) void CGameMode::ReceiveUnknownD79660(const unsigned char* p // OFFSET: 0x00D79E90 // FUNCTION: fn_22183 -__declspec(noinline) void CGameMode::ReceiveUnknownD79E90(std::int16_t result, std::intptr_t value) { +__declspec(noinline) void CGameMode::ReceiveAccountLimitedToolApplyResult(std::int16_t result, std::intptr_t value) { switch (result) { case 0: if (UIWindow* window = g_windowMgr.LookupWindow(WID_ACCOUNTLIMITEDTOOLWND)) { @@ -1947,13 +1947,13 @@ void CGameMode::ReceiveChangeZoneServerWithHost(const unsigned char* packet) { 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)); + ITEM_INFO item = g_session.FindMerchantPurchaseItem(static_cast(itemId)); item.identity[1] = static_cast(itemId); item.quantity = quantity; item.prices[0] = static_cast(field14); UIWindow* window = g_windowMgr.EnsureWindow(WID_MERCHANTITEMLOGWND_MODE_0); window->SendMsg(nullptr, UM_REFRESHITEM, reinterpret_cast(&item), field18, field8, 0); - g_session.RemoveItem1758(item); + g_session.RemoveMerchantPurchaseItem(item); g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice( UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_ITEM_IS_SOLD), item.DisplayName(0).c_str(), quantity).c_str()), 0xFFFF64, 0, 0, 0 @@ -2031,7 +2031,7 @@ __declspec(noinline) void CGameMode::ReceiveItem1740BasicList(const unsigned cha item.damaged = record->damaged; item.refiningLevel = record->refine; item.expireTime = record->expireTime; - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } g_session.RefreshItem1740Window(); @@ -2058,7 +2058,7 @@ __declspec(noinline) void CGameMode::ReceiveItem1740BasicListBind(const unsigned item.expireTime = record->expireTime; item.bindOnEquip = record->bindOnEquip; item.sprite = record->sprite; - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } g_session.RefreshItem1740Window(); @@ -2146,9 +2146,9 @@ void CGameMode::ReceiveShopItemList( ) { CSession* lists = &g_session; if (myShop == 1) { - lists->ClearItems1758(); + lists->ClearMerchantPurchaseItems(); for (ITEM_INFO item : items) { - lists->AddItem1758(item); + lists->AddMerchantPurchaseItem(item); } if (UIMerchantItemMyShopWnd* window = static_cast(g_windowMgr.EnsureWindow(WID_MERCHANTITEMMYSHOPWND))) { @@ -2158,10 +2158,10 @@ void CGameMode::ReceiveShopItemList( window->SetDuration(duration); } } else { - lists->ClearItems1748(); - lists->ClearItems1760(); + lists->ClearMerchantMirrorItems(); + lists->ClearMerchantHopeToSellItems(); for (ITEM_INFO item : items) { - lists->AddItem1748(item); + lists->AddMerchantMirrorItem(item); } if (UIMerchantItemShopWnd* window = static_cast(g_windowMgr.EnsureWindow(WID_MERCHANTITEMSHOPWND))) { @@ -2181,7 +2181,7 @@ void CGameMode::ReceiveShopItemList( // OFFSET: 0x00D79AF0 // FUNCTION: fn_22177 -__declspec(noinline) void CGameMode::ReceivePacket0B2E(short result) { +__declspec(noinline) void CGameMode::ReceiveGuildAgitMoveResult(short result) { switch (result) { case 1: g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_RESULT_BUY_FALSE_MONEY)), 0xff, 0, 0, 0); @@ -2194,7 +2194,7 @@ __declspec(noinline) void CGameMode::ReceivePacket0B2E(short result) { // OFFSET: 0x00D2A1F0 // FUNCTION: fn_21702 -__declspec(noinline) void CGameMode::ReceiveUnknownD2A1F0(const unsigned char* packet) { +__declspec(noinline) void CGameMode::ReceiveBuyingStoreClose(const unsigned char* packet) { switch (*reinterpret_cast(packet + 2)) { case 3: g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); @@ -2475,13 +2475,13 @@ void CGameMode::ApplyActorStatusEffects(std::uint32_t aid, int state, int flag, // OFFSET: 0x00D7B350 // FUNCTION: fn_22201 -__declspec(noinline) void CGameMode::ReceivePacket0AB8(const unsigned char*) { +__declspec(noinline) void CGameMode::ReceivePlayerRouteClear(const unsigned char*) { this->scene->player->SendMsg(nullptr, AM_CLEAR_ROUTE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } // OFFSET: 0x00D78010 // FUNCTION: fn_22156 -__declspec(noinline) void CGameMode::ReceiveUnknownD78010(const unsigned char* packet) { +__declspec(noinline) void CGameMode::ReceiveActorStatusEffects(const unsigned char* packet) { this->ApplyActorStatusEffects( *reinterpret_cast(packet + 2), *reinterpret_cast(packet + 6), @@ -2492,7 +2492,7 @@ __declspec(noinline) void CGameMode::ReceiveUnknownD78010(const unsigned char* p // OFFSET: 0x00D89C60 // FUNCTION: fn_22212 -__declspec(noinline) void CGameMode::ReceiveUnknownD89C60(const unsigned char* packet) { +__declspec(noinline) void CGameMode::ReceivePartyMemberInfoWithoutCharacterId(const unsigned char* packet) { this->UpdatePartyMemberInfo( reinterpret_cast(packet + 0x2B), *reinterpret_cast(packet + 2), @@ -2678,7 +2678,7 @@ __declspec(noinline) void CGameMode::ReceiveActorCharm(const unsigned char* pack // OFFSET: 0x00D79970 // FUNCTION: fn_22175 -__declspec(noinline) void CGameMode::ReceivePacket0A29(int value) { +__declspec(noinline) void CGameMode::ReceiveAntiBotChallenge(int value) { ValuePacket packet; packet.id = 0x0A2A; packet.value = value; @@ -2730,7 +2730,7 @@ __declspec(noinline) void CGameMode::ReceiveActorStateValue(std::uint32_t aid, i return; } - if (actor->UpdateUnknown03E8(value)) { + if (actor->UpdateMaximumValue(value)) { actor->LaunchEffect(0x2a5, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } } @@ -2755,7 +2755,7 @@ __declspec(noinline) void CGameMode::ReceiveChatEntries(unsigned char* data) { // OFFSET: 0x00D7A200 // FUNCTION: fn_22189 -__declspec(noinline) void CGameMode::ReceivePacket0B73(const unsigned char* data) { +__declspec(noinline) void CGameMode::ReceiveSoulEnergy(const unsigned char* data) { const auto* packet = reinterpret_cast(data); CGameActor* actor = static_cast(this->scene->GetGameActorByAidIncludeMe(packet->accountId)); if (!actor) { @@ -2785,8 +2785,8 @@ __declspec(noinline) void CGameMode::ReceivePacket0B73(const unsigned char* data // OFFSET: 0x00D25850 // FUNCTION: fn_21673 -__declspec(noinline) void CGameMode::ReceiveUnknownD25850(const unsigned char* packet) { - g_session.RemoveItem1710(*reinterpret_cast(packet + 2), 1); +__declspec(noinline) void CGameMode::ReceiveItemDeletionNotice(const unsigned char* packet) { + g_session.RemoveInventoryItem(*reinterpret_cast(packet + 2), 1); char number[12]; char text[260]; _itoa(*reinterpret_cast(packet + 4), number, 10); @@ -2799,7 +2799,7 @@ __declspec(noinline) void CGameMode::ReceiveUnknownD25850(const unsigned char* p // OFFSET: 0x00D31A40 // FUNCTION: fn_21735 -__declspec(noinline) void CGameMode::ReceiveUnknownD31A40(const unsigned char* packet) { +__declspec(noinline) void CGameMode::ReceiveItemNameListNotice(const unsigned char* packet) { char text[512]; const unsigned int count = static_cast(*reinterpret_cast(packet + 2) - 4) >> 2; const int* ids = reinterpret_cast(packet + 4); @@ -2849,7 +2849,7 @@ __declspec(noinline) void CGameMode::OpenWindow154() { // OFFSET: 0x00D2D990 // FUNCTION: fn_21722 -__declspec(noinline) void CGameMode::ReceiveUnknownD2D990(const unsigned char*) { +__declspec(noinline) void CGameMode::ReceiveMemorialDungeonError(const unsigned char*) { if (g_windowMgr.memorialDunWnd) { g_windowMgr.CloseWindow(WID_MEMORIALDUNWND); GetRagConnection().Close(); @@ -2861,7 +2861,7 @@ __declspec(noinline) void CGameMode::ReceiveUnknownD2D990(const unsigned char*) // OFFSET: 0x00D4E3F0 // FUNCTION: fn_21876 -void CGameMode::ReceiveUnknownD4E3F0(const unsigned char* packet) { +void CGameMode::ReceiveItemIdentificationList(const unsigned char* packet) { unsigned int count = *reinterpret_cast(packet + 2) - 4; UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMIDENTIFYWND); window->SendMsg(nullptr, UM_CLEAR_ITEM, 0, 0, 0, 0); @@ -2879,7 +2879,7 @@ void CGameMode::ReceiveUnknownD4E3F0(const unsigned char* packet) { // OFFSET: 0x00D4E2A0 // FUNCTION: fn_21875 -void CGameMode::ReceiveUnknownD4E2A0(const unsigned char* packet) { +void CGameMode::ReceiveCardCompositionItemList(const unsigned char* packet) { unsigned int count = *reinterpret_cast(packet + 2) - 4; UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOMPOSITIONWND); window->SendMsg(nullptr, UM_CLEAR_ITEM, 0, 0, 0, 0); @@ -3513,7 +3513,7 @@ __declspec(noinline) void CGameMode::ReceiveItem1740List(const unsigned char* pa item.refiningLevel = 0; item.expireTime = record->expireTime; item.flags[0] = (record->flags >> 1) & 1; - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } g_session.RefreshItem1740Window(); @@ -3556,10 +3556,10 @@ __declspec(noinline) void CGameMode::ReceiveItem1758List(const unsigned char* pa reinterpret_cast(g_windowMgr.buyingShopMakeWnd)->PrintBuyList(); } - g_session.ClearItems1768(); + g_session.ClearMerchantPurchaseSavedItems(); g_windowMgr.CloseWindow(WID_MERCHANTSHOPMAKEWND_MODE_1); g_windowMgr.CloseWindow(WID_MERCHANTMIRRORITEMWND_MODE_1); - g_session.ClearItems1758(); + g_session.ClearMerchantPurchaseItems(); const int count = static_cast(static_cast(*reinterpret_cast(packet + 2)) - 12) / 11u; const Item1758Record* record = reinterpret_cast(packet + 12); @@ -3573,7 +3573,7 @@ __declspec(noinline) void CGameMode::ReceiveItem1758List(const unsigned char* pa item.identity[1] = index + 1; item.identified = 1; item.SetItemId(entry.itemId); - g_session.AddItem1758(item); + g_session.AddMerchantPurchaseItem(item); } UIWindow* window = g_windowMgr.EnsureWindow(WID_MERCHANTITEMMYSHOPWND_MODE_1); @@ -3584,12 +3584,12 @@ __declspec(noinline) void CGameMode::ReceiveItem1758List(const unsigned char* pa // OFFSET: 0x00D50810 // FUNCTION: fn_21886 -void CGameMode::ReceiveUnknownD50810(const unsigned char* packet) { +void CGameMode::ReceiveOpenedVendingItemList(const unsigned char* packet) { if (g_replayAnimationScaling != 0) { g_modeMgr.GetGameMode()->SendMsg(MM_REQ_OPENSTORE, 0, 0, 0, 0); } - g_session.ClearItems1758(); + g_session.ClearMerchantPurchaseItems(); const int count = (*reinterpret_cast(packet + 2) - 8) / sizeof(Item1758StoreRecord); if (count == 0) { @@ -3618,15 +3618,15 @@ void CGameMode::ReceiveUnknownD50810(const unsigned char* packet) { for (int index = 0; index < item.optionCount; ++index) { reinterpret_cast(item.options)[index] = entry.options[index]; } - g_session.AddItem1758(item); + g_session.AddMerchantPurchaseItem(item); } } // OFFSET: 0x00D50590 // FUNCTION: fn_21885 void CGameMode::ReceiveItem1748List(const unsigned char* packet) { - g_session.ClearItems1748(); - g_session.ClearItems1760(); + g_session.ClearMerchantMirrorItems(); + g_session.ClearMerchantHopeToSellItems(); const int count = (*reinterpret_cast(packet + 2) - 0x0C) / sizeof(Item1748Record); for (int i = 0; i < count; ++i) { @@ -3648,7 +3648,7 @@ void CGameMode::ReceiveItem1748List(const unsigned char* packet) { for (int index = 0; index < item.optionCount; ++index) { reinterpret_cast(item.options)[index] = record.options[index]; } - g_session.AddItem1748(item); + g_session.AddMerchantMirrorItem(item); } UIWindow* window = g_windowMgr.EnsureWindow(WID_MERCHANTITEMSHOPWND); @@ -3753,7 +3753,7 @@ void CGameMode::ReceiveItem1718List(const unsigned char* packet) { item.id = -1; item.identified = 1; item.sprite = FindItemDescription(std::atoi(item.itemId)).viewId; - g_session.AddItem1718(item, entry.quantity, static_cast(entry.weight / 10)); + g_session.AddShopItem(item, entry.quantity, static_cast(entry.weight / 10)); } if (UIWindow* window = g_windowMgr.EnsureWindow(WID_PARAITEMSHOPWND)) { @@ -3787,7 +3787,7 @@ void ReceiveTradeItems(int count, const TradeItemRecord* records) { item.identified = 1; item.flags[3] = 1; if (item.quantity > 0) { - g_session.AppendItem1718(item); + g_session.AppendShopItem(item); } } @@ -4056,8 +4056,8 @@ struct BuyingStoreItemRecord { // FUNCTION: fn_21628 void CGameMode::ReceiveBuyingStoreItemList(const unsigned char* packet) { CSession* lists = &g_session; - lists->ClearItems1748(); - lists->ClearItems1760(); + lists->ClearMerchantMirrorItems(); + lists->ClearMerchantHopeToSellItems(); const BuyingStoreItemRecord* record = reinterpret_cast(packet + 16); const unsigned count = (static_cast(*reinterpret_cast(packet + 2)) - 16u) / 11; @@ -4072,7 +4072,7 @@ void CGameMode::ReceiveBuyingStoreItemList(const unsigned char* packet) { item.identified = 1; item.identity[1] = index; item.SetItemId(entry.itemId); - lists->AddItem1748(item); + lists->AddMerchantMirrorItem(item); ++record; } @@ -4087,7 +4087,7 @@ void CGameMode::ReceiveBuyingStoreItemList(const unsigned char* packet) { window = reinterpret_cast(g_windowMgr.purchaseMirrorItemWnd); if (window) { - g_session.RefreshItems1750(); + g_session.RefreshMerchantMyShopItems(); window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } else if ((window = g_windowMgr.EnsureWindow(WID_MERCHANTMIRRORITEMWND_MODE_2)) != nullptr) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -4163,7 +4163,7 @@ void CGameMode::ReceiveFriendList(const unsigned char* packet) { g_session.AddFriend(member); } - g_session.RefreshWindow02C8(); + g_session.RefreshMessengerGroupWindow(); } namespace { @@ -4306,8 +4306,8 @@ void CGameMode::ReceiveStatusBonus(const unsigned char* data) { // OFFSET: 0x00D8A600 // FUNCTION: fn_22220 __declspec(noinline) void CGameMode::ReceiveSwapEquipmentList(const unsigned char* data) { - g_session.ResetItems61B8(); - g_session.ResetItems6B68(); + g_session.ResetSwapCostumeItems(); + g_session.ResetSwapEquippedItems(); const PacketLengthHeader* packet = reinterpret_cast(data); const int count = (packet->length - sizeof(PacketLengthHeader)) / sizeof(SwapEquipmentRecord); @@ -4320,9 +4320,9 @@ __declspec(noinline) void CGameMode::ReceiveSwapEquipmentList(const unsigned cha } if (g_session.IsCostumeLocation(record->location)) { - g_session.EquipItem6B68(item); + g_session.EquipSwapEquipmentItem(item); } else { - g_session.EquipItem61B8(item); + g_session.EquipSwapCostumeItem(item); } } } @@ -4505,8 +4505,8 @@ __declspec(noinline) void CGameMode::ReceiveOpenStore(const unsigned char* packe } else { storeCount = count > 5 ? 5 : count; } - g_session.ClearItems1768(); - if (!g_windowMgr.window_027C && !g_windowMgr.window_0274 && !g_windowMgr.merchantShopMakeWnd) { + g_session.ClearMerchantPurchaseSavedItems(); + if (!g_windowMgr.chatRoomWnd && !g_windowMgr.chatRoomMakeWnd && !g_windowMgr.merchantShopMakeWnd) { if (UIWindow* window = g_windowMgr.EnsureWindow(WID_MERCHANTSHOPMAKEWND_MODE_1)) { static_cast(window)->AddActionButton(); } @@ -4611,8 +4611,8 @@ void CGameMode::ReceiveParChange(unsigned char* data) { g_session.maxHp = packet->value; g_session.RefreshHpSpWindows(); } - if (g_windowMgr.window_02C8) { - g_windowMgr.window_02C8->SendMsg(nullptr, UM_COMMAND, 34, g_session.m_aid, 0, 0); + if (g_windowMgr.messengerGroupWnd) { + g_windowMgr.messengerGroupWnd->SendMsg(nullptr, UM_COMMAND, 34, g_session.m_aid, 0, 0); } break; case SP_SP: @@ -4961,7 +4961,7 @@ void CGameMode::ApplyStatusChange( if (aid == g_session.m_aid) { if (type == EFST_CLAN_INFO) { if (this->scene->player) { - this->scene->player->SetUnknown0305(1, value2); + this->scene->player->SetSpGauge(1, value2); } } else if (type == EFST_POSTDELAY) { ShortcutCooldownRecord timer; @@ -5696,7 +5696,7 @@ void CGameMode::ApplyStatusChange( return; case EFST_ON_PUSH_CART: if (aid == g_session.m_aid) { - g_session.SetUnknown5C1C(value1); + g_session.SetReplayPacketMode(value1); } break; case EFST_FLOWER_LEAF: @@ -6507,7 +6507,7 @@ __declspec(noinline) void CGameMode::ReceiveObjectsDisappear(int count, const st if (this->scene->RemoveItem(aid) == true) { this->SendMsg(MM_DELETEREGISTERPOS, aid, 0, 0, 0); } else if (this->scene->RemoveGroundItem(aid) == true) { - this->RemoveUnknown01A4(aid); + this->RemovePendingItemPickup(aid); } else { this->scene->RemoveSkill(aid); } @@ -6682,8 +6682,8 @@ __declspec(noinline) void CGameMode::OpenBuyingStoreMake(unsigned char slotCount } else { g_session.m_buyingStoreSlotCount = count > 5 ? 5 : count; } - g_session.ClearItems1768(); - if (!g_windowMgr.window_027C && !g_windowMgr.window_0274 && !g_windowMgr.merchantShopMakeWnd) { + g_session.ClearMerchantPurchaseSavedItems(); + if (!g_windowMgr.chatRoomWnd && !g_windowMgr.chatRoomMakeWnd && !g_windowMgr.merchantShopMakeWnd) { g_windowMgr.EnsureWindow(WID_MERCHANTSHOPMAKEWND_MODE_1); if (g_windowMgr.buyingShopMakeWnd) { static_cast(g_windowMgr.buyingShopMakeWnd)->SetItems(0, nullptr); @@ -6713,8 +6713,8 @@ __declspec(noinline) void CGameMode::OpenVendingMake(unsigned char slotCount, in } else { g_session.m_vendingSlotCount = count > 13 ? 13 : count; } - g_session.ClearItems1768(); - if (!g_windowMgr.window_027C && !g_windowMgr.window_0274) { + g_session.ClearMerchantPurchaseSavedItems(); + if (!g_windowMgr.chatRoomWnd && !g_windowMgr.chatRoomMakeWnd) { g_windowMgr.EnsureWindow(WID_MERCHANTSHOPMAKEWND); if (g_windowMgr.merchantShopMakeWnd) { static_cast(g_windowMgr.merchantShopMakeWnd)->SetItems(itemCount, items); @@ -6729,7 +6729,7 @@ __declspec(noinline) void CGameMode::OpenVendingMake(unsigned char slotCount, in // OFFSET: 0x00D799C0 // FUNCTION: fn_22176 __declspec(noinline) void CGameMode::ReceiveAgitNotice(unsigned char agitId, int first, int second) { - if (!g_windowMgr.window_0320) { + if (!g_windowMgr.guildInfoManageWnd) { return; } @@ -6824,7 +6824,7 @@ __declspec(noinline) void CGameMode::ReceiveTakeOffEquipResult(unsigned char res case 0: if (location) { if (g_session.IsCostumeLocation(location)) { - g_session.UnequipItem2B50(location); + g_session.UnequipCostumeItem(location); return; } g_session.UnequipItem(location, identity); @@ -6856,8 +6856,8 @@ void CGameMode::ReceiveHomunculusChange(const unsigned char* packet) { if (actor) { g_session.m_homunJob = actor->GetEffectiveJob(-1); } - if (g_windowMgr.window_03C0) { - g_windowMgr.window_03C0->Invalidate(); + if (g_windowMgr.homunInfoWnd) { + g_windowMgr.homunInfoWnd->Invalidate(); } if (g_session.IsAdminSubMode(3)) { std::sprintf(text, "%d", *reinterpret_cast(packet + 8)); @@ -6870,8 +6870,8 @@ void CGameMode::ReceiveHomunculusChange(const unsigned char* packet) { if (actor) { g_session.m_homunJob = actor->GetEffectiveJob(-1); } - if (g_windowMgr.window_03C0) { - g_windowMgr.window_03C0->Invalidate(); + if (g_windowMgr.homunInfoWnd) { + g_windowMgr.homunInfoWnd->Invalidate(); } if (g_session.IsAdminSubMode(3)) { std::sprintf(text, "Full : %d", *reinterpret_cast(packet + 8)); @@ -6886,8 +6886,8 @@ void CGameMode::ReceiveHomunculusChange(const unsigned char* packet) { g_session.homunAccessory = 0; actor->SetSprJob(actor->GetEffectiveJob(-1)); } - if (g_session.IsHomunAid(*reinterpret_cast(packet + 4)) && g_windowMgr.window_03C0) { - g_windowMgr.window_03C0->Invalidate(); + if (g_session.IsHomunAid(*reinterpret_cast(packet + 4)) && g_windowMgr.homunInfoWnd) { + g_windowMgr.homunInfoWnd->Invalidate(); } } break; @@ -6908,13 +6908,13 @@ __declspec(noinline) void CGameMode::ReceiveItemConsumed(const unsigned char* pa g_session.ResetSlots(); } - g_session.RemoveItem1710( + g_session.RemoveInventoryItem( *reinterpret_cast(packet + 4), *reinterpret_cast(packet + 6) ); *reinterpret_cast(&this->balloonDisplayState[0x18]) = 0; this->inventoryChanged = 1; if (g_session.petJob != -1 && g_session.petEggIndex == *reinterpret_cast(packet + 4)) { - g_session.ResetUnknown1050(); + g_session.ResetPetEggAndJob(); EquipmentProperties::CEquipmentPropertiesMgr* properties = EquipmentProperties::CEquipmentPropertiesMgr::GetInstance(); int itemId = -1; int kind = 0; @@ -6952,7 +6952,7 @@ __declspec(noinline) void CGameMode::ReceiveItemSellResult(const unsigned char* reinterpret_cast(FormatOwnedString(LookupMessage(MSI_BUYINGSTORE_TRADE_SELLCOMPLETE), item.DisplayName(0).c_str(), count, price * count).c_str()), 0xFFFF64, 0, 0, 0 ); - g_session.RemoveItem1710( + g_session.RemoveInventoryItem( *reinterpret_cast(packet + 2), *reinterpret_cast(packet + 4) ); } @@ -7064,7 +7064,7 @@ void CGameMode::ReceiveBuyingStoreOpenResult(const unsigned char* packet) { case 1: g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_BUYINGSTORE_OPEN_FAILED)), 0xFF, 0, 0, 0); - g_session.ClearItems1768(); + g_session.ClearMerchantPurchaseSavedItems(); g_windowMgr.CloseWindow(WID_MERCHANTSHOPMAKEWND_MODE_1); g_windowMgr.CloseWindow(WID_MERCHANTMIRRORITEMWND_MODE_1); break; @@ -7084,7 +7084,7 @@ void CGameMode::ReceiveBuyingStoreOpenResult(const unsigned char* packet) { case 10: g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CONNECT_SNS_FAIL_SEND)), 0xFF, 0, 0, 0); - g_session.ClearItems1768(); + g_session.ClearMerchantPurchaseSavedItems(); g_windowMgr.CloseWindow(WID_MERCHANTSHOPMAKEWND_MODE_1); g_windowMgr.CloseWindow(WID_MERCHANTMIRRORITEMWND_MODE_1); break; @@ -7130,9 +7130,9 @@ __declspec(noinline) void CGameMode::ReceiveTakeOffEquipItemResult(const unsigne switch (*reinterpret_cast(packet + 8)) { case 0: { if (g_session.IsCostumeLocation(*reinterpret_cast(packet + 4))) { - g_session.UnequipItem6B68(item); + g_session.UnequipSwapEquippedItem(item); } else { - g_session.UnequipItem61B8(item); + g_session.UnequipSwapCostumeItem(item); } const char* suffix = LookupMessage(MSI_CHINESE_CHARACTER); g_windowMgr.SendNotice( @@ -7143,9 +7143,9 @@ __declspec(noinline) void CGameMode::ReceiveTakeOffEquipItemResult(const unsigne case 1: g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_LAST_LOGIN)), 0xFF, 0, 0, 0); if (g_session.IsCostumeLocation(*reinterpret_cast(packet + 4))) { - g_session.UnequipItem6B68(item); + g_session.UnequipSwapEquippedItem(item); } else { - g_session.UnequipItem61B8(item); + g_session.UnequipSwapCostumeItem(item); } break; } @@ -7292,7 +7292,7 @@ __declspec(noinline) void CGameMode::ReceivePartyItemPickupNotice(const unsigned // FUNCTION: fn_21995 __declspec(noinline) void CGameMode::ReceiveEquipCardChange(const unsigned char* packet) { const EquipSlots slots = g_session.GetEquipSlots(*reinterpret_cast(packet + 2)); - ITEM_INFO item = g_session.GetItem17F0(slots.values[2]); + ITEM_INFO item = g_session.GetEquippedItemAt(slots.values[2]); if (item.identity[1] != 0) { int* cards = reinterpret_cast(item.cards); switch (packet[0xA]) { @@ -7304,7 +7304,7 @@ __declspec(noinline) void CGameMode::ReceiveEquipCardChange(const unsigned char* cards[*reinterpret_cast(packet + 4)] = 0; break; } - g_session.SetEquipItem17F0(slots.values[2], item); + g_session.SetEquippedItem(slots.values[2], item); } } @@ -7312,7 +7312,7 @@ __declspec(noinline) void CGameMode::ReceiveEquipCardChange(const unsigned char* // FUNCTION: fn_21694 void CGameMode::ReceiveEquipWindowMicroscope2(const unsigned char* packet) { g_session.ResetEquipped(); - g_session.ResetItems3500(); + g_session.ResetAlternateCostumeItems(); const int length = *reinterpret_cast(packet + 2); const int count = static_cast(length - 45) / 38u; @@ -7335,7 +7335,7 @@ void CGameMode::ReceiveEquipWindowMicroscope2(const unsigned char* packet) { if (item.identity[3] != 0) { if (g_session.IsCostumeLocation(item.identity[3])) { - g_session.EquipItem3500(item); + g_session.EquipAlternateCostumeItem(item); } else { g_session.Equip(item); } @@ -7362,7 +7362,7 @@ void CGameMode::ReceiveEquipWindowMicroscope2(const unsigned char* packet) { // FUNCTION: fn_21695 void CGameMode::ReceiveEquipWindowMicroscope3(const unsigned char* packet) { g_session.ResetEquipped(); - g_session.ResetItems3500(); + g_session.ResetAlternateCostumeItems(); const int length = *reinterpret_cast(packet + 2); const int count = static_cast(length - 45) / 41u; @@ -7387,7 +7387,7 @@ void CGameMode::ReceiveEquipWindowMicroscope3(const unsigned char* packet) { if (item.identity[3] != 0) { if (g_session.IsCostumeLocation(item.identity[3])) { - g_session.EquipItem3500(item); + g_session.EquipAlternateCostumeItem(item); } else { g_session.Equip(item); } @@ -7965,7 +7965,7 @@ namespace { if (item.identity[3] != 0) { if (g_session.IsCostumeLocation(item.identity[3])) { - g_session.EquipItem3500(item); + g_session.EquipAlternateCostumeItem(item); } else { g_session.Equip(item); } @@ -7992,7 +7992,7 @@ namespace { // FUNCTION: fn_21696 void CGameMode::ReceiveEquipWindowMicroscope4(const unsigned char* packet) { g_session.ResetEquipped(); - g_session.ResetItems3500(); + g_session.ResetAlternateCostumeItems(); const int length = *reinterpret_cast(packet + 2); const int count = static_cast(length - 45) / 67u; @@ -8026,7 +8026,7 @@ void CGameMode::ReceiveEquipWindowMicroscope4(const unsigned char* packet) { // FUNCTION: fn_21697 void CGameMode::ReceiveEquipWindowMicroscope5(const unsigned char* packet) { g_session.ResetEquipped(); - g_session.ResetItems3500(); + g_session.ResetAlternateCostumeItems(); const int length = *reinterpret_cast(packet + 2); const int count = static_cast(length - 47) / 67u; @@ -8061,7 +8061,7 @@ void CGameMode::ReceiveEquipWindowMicroscope5(const unsigned char* packet) { // FUNCTION: fn_21698 void CGameMode::ReceiveEquipWindowMicroscope6(const unsigned char* packet) { g_session.ResetEquipped(); - g_session.ResetItems3500(); + g_session.ResetAlternateCostumeItems(); const int length = *reinterpret_cast(packet + 2); const int count = static_cast(length - 47) / 68u; @@ -8100,14 +8100,14 @@ namespace { } if (item.identity[3] == 0) { - g_session.AddItem1710(item, 0); + g_session.AddInventoryItem(item, 0); g_session.UpdateInventoryItem(item, 0); } else { char equipped = 1; if (g_session.IsCostumeLocation(item.identity[3])) { - g_session.EquipItem2B50(item, &equipped); + g_session.EquipCostumeItem(item, &equipped); } else { - g_session.EquipUnknown17F0(item, &equipped); + g_session.EquipInventoryItem(item, &equipped); } } @@ -8133,7 +8133,7 @@ namespace { void CGameMode::ReceiveInventoryEquipList(const unsigned char* packet) { g_session.RemoveEquipment(); g_session.ResetEquipment(); - g_session.ResetItems2B50(); + g_session.ResetCostumeItems(); const int length = *reinterpret_cast(packet + 2); const int count = static_cast(length - 4) / 41u; @@ -8154,7 +8154,7 @@ void CGameMode::ReceiveInventoryEquipList(const unsigned char* packet) { void CGameMode::ReceiveInventoryEquipList2(const unsigned char* packet) { g_session.RemoveEquipment(); g_session.ResetEquipment(); - g_session.ResetItems2B50(); + g_session.ResetCostumeItems(); const int length = *reinterpret_cast(packet + 2); const int count = static_cast(length - 4) / 67u; @@ -8175,7 +8175,7 @@ void CGameMode::ReceiveInventoryEquipList2(const unsigned char* packet) { void CGameMode::ReceiveInventoryEquipList3(const unsigned char* packet) { g_session.RemoveEquipment(); g_session.ResetEquipment(); - g_session.ResetItems2B50(); + g_session.ResetCostumeItems(); const int length = *reinterpret_cast(packet + 2); const int count = static_cast(length - 4) / 68u; @@ -8293,7 +8293,7 @@ void CGameMode::ReceiveItemPickupAck2(const unsigned char* data) { item.identity[3] = 0x8000; } - g_session.AddItem1710(item, 1); + g_session.AddInventoryItem(item, 1); g_windowMgr.SendNotice( UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), packet->amount).c_str()), 0xFFFF00, 6, 0, 0 ); @@ -8392,7 +8392,7 @@ void CGameMode::ReceiveItemPickupAck3(const unsigned char* data) { item.identity[3] = 0x8000; } - g_session.AddItem1710(item, 1); + g_session.AddInventoryItem(item, 1); g_windowMgr.SendNotice( UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), packet->amount).c_str()), 0xFFFF00, 6, 0, 0 ); @@ -8495,7 +8495,7 @@ void CGameMode::ReceiveItemPickupAck(const unsigned char* data) { item.identity[3] = 0x8000; } - g_session.AddItem1710(item, 1); + g_session.AddInventoryItem(item, 1); g_windowMgr.SendNotice( UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), packet->amount).c_str()), 0xFFFF00, 6, 0, 0 ); @@ -8606,7 +8606,7 @@ void CGameMode::ReceiveItemPickupAck5( item.identity[3] = 0x8000; } - g_session.AddItem1710(item, 1); + g_session.AddInventoryItem(item, 1); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), amount).c_str()), 0xFFFF00, 6, 0, 0); UIWindow* window = g_windowMgr.EnsureWindow(WID_NOTIFYITEMOBTAINWND); @@ -8726,7 +8726,7 @@ void CGameMode::ReceiveItemPickupAck7(const unsigned char* data) { item.identity[3] = 0x8000; } - g_session.AddItem1710(item, 1); + g_session.AddInventoryItem(item, 1); g_windowMgr.SendNotice( UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), packet->amount).c_str()), 0xFFFF00, 6, 0, 0 ); @@ -8840,7 +8840,7 @@ void CGameMode::ReceiveEquipItemDamaged(const unsigned char* packet) { } } else { const EquipSlots slots = g_session.GetEquipSlots(location); - ITEM_INFO item = g_session.GetItem17F0(slots.values[2]); + ITEM_INFO item = g_session.GetEquippedItemAt(slots.values[2]); if (item.identity[1] != 0) { text = FormatOwnedString(LookupMessage(MSI_DAMAGED_EQUIP), item.DisplayName(0).c_str()); } @@ -9081,7 +9081,7 @@ void CGameMode::ReceivePetChangeState(const unsigned char* data) { if (actor) { g_session.petJob = actor->GetEffectiveJob(-1); } - if (UIPetInfoWnd* window = static_cast(g_windowMgr.window_038C)) { + if (UIPetInfoWnd* window = static_cast(g_windowMgr.petInfoWnd)) { window->UpdateFriendlyGauge(); } if (g_session.GetDisplayJob() >= 0xFD2 && g_session.GetDisplayJob() <= 0xFD4 && packet->value < 100 && g_session.petHunger < 30) { @@ -9103,8 +9103,8 @@ void CGameMode::ReceivePetChangeState(const unsigned char* data) { g_session.petJob = actor->GetEffectiveJob(-1); actor->SendMsg(nullptr, AM_UPDATEGAGE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (g_windowMgr.window_038C) { - g_windowMgr.window_038C->Invalidate(); + if (g_windowMgr.petInfoWnd) { + g_windowMgr.petInfoWnd->Invalidate(); } break; case CHANGESTATEPET_ACCESSORY: @@ -9119,19 +9119,19 @@ void CGameMode::ReceivePetChangeState(const unsigned char* data) { g_session.petAccessory = 0; actor->SetSprJob(actor->GetEffectiveJob(-1)); } - if (packet->aid == g_session.petGid && g_windowMgr.window_038C) { - g_windowMgr.window_038C->Invalidate(); + if (packet->aid == g_session.petGid && g_windowMgr.petInfoWnd) { + g_windowMgr.petInfoWnd->Invalidate(); } break; case CHANGESTATEPET_PERFORMANCE: if (actor) { - actor->SetUnknown02C8(packet->value); + actor->SetHealthState(packet->value); actor->SetState(0, 1); } break; case CHANGESTATEPET_UPDATE_EGG: if (packet->value == 0) { - g_session.ResetUnknown1050(); + g_session.ResetPetEggAndJob(); if (UIWindow* window = g_windowMgr.LookupWindow(WID_ITEMWND)) { window->Invalidate(); } @@ -9803,7 +9803,7 @@ void CGameMode::ReceiveItemPickupAck8(const unsigned char* data) { item.grade = 0; item.sprite = packet->look; - g_session.AddItem1710(item, 1); + g_session.AddInventoryItem(item, 1); g_windowMgr.SendNotice( UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), packet->amount).c_str()), 0xFFFF00, 6, 0, 0 ); @@ -9928,7 +9928,7 @@ void CGameMode::ReceiveItemPickupAck9(const unsigned char* data) { item.sprite = packet->look; item.grade = packet->grade; - g_session.AddItem1710(item, 1); + g_session.AddInventoryItem(item, 1); g_windowMgr.SendNotice( UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), packet->amount).c_str()), 0xFFFF00, 6, 0, 0 ); @@ -10037,7 +10037,7 @@ void CGameMode::ReceiveActorChat(const unsigned char* data) { g_forbiddenWords.Mask(text.data(), &masked); } - if (g_windowMgr.window_027C) { + if (g_windowMgr.chatRoomWnd) { g_windowMgr.SendNotice(UIM_PUSH_INTO_CHATROOM, reinterpret_cast(text.data()), 0x222222, 0, 0, 0); } else { if (IsMonsterJob(aid)) { @@ -10376,7 +10376,7 @@ void CGameMode::ReceiveActorDisappear(const unsigned char* data) { this->nameCard.Erase(packet->aid); g_session.EraseUnknownKey(packet->aid); if (g_session.elementalGid == packet->aid) { - g_session.SetUnknown5BC0(-1); + g_session.SetElementalGid(-1); } switch (packet->type) { @@ -10388,8 +10388,8 @@ void CGameMode::ReceiveActorDisappear(const unsigned char* data) { if (this->scene->RemoveItem(packet->aid) == true) { this->SendMsg(MM_DELETEREGISTERPOS, packet->aid, 0, 0, 0); } - if (g_windowMgr.window_02C8) { - g_windowMgr.window_02C8->SendMsg(nullptr, UM_COMMAND, 34, packet->aid, 0, 0); + if (g_windowMgr.messengerGroupWnd) { + g_windowMgr.messengerGroupWnd->SendMsg(nullptr, UM_COMMAND, 34, packet->aid, 0, 0); } break; case CLR_DEAD: { @@ -10400,7 +10400,7 @@ void CGameMode::ReceiveActorDisappear(const unsigned char* data) { } actor->SendMsg(nullptr, AM_WILL_BE_DEAD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); const int job = actor->GetEffectiveJob(-1); - if (g_session.IsMonsterClass(job) || actor->objectType == 9 || g_session.IsSkillIdInRange6001(job) || + if (g_session.IsMonsterClass(job) || actor->objectType == 9 || g_session.IsCompanionJob(job) || actor->GetEffectiveJob(-1) == 0x235) { this->SendMsg(MM_DELETEREGISTERPOS, packet->aid, 0, 0, 0); } @@ -10480,8 +10480,8 @@ void CGameMode::ReceiveActorDisappear(const unsigned char* data) { if (this->scene->RemoveItem(packet->aid) == true) { this->SendMsg(MM_DELETEREGISTERPOS, packet->aid, 0, 0, 0); } - if (g_windowMgr.window_02C8) { - g_windowMgr.window_02C8->SendMsg(nullptr, UM_COMMAND, 34, packet->aid, 0, 0); + if (g_windowMgr.messengerGroupWnd) { + g_windowMgr.messengerGroupWnd->SendMsg(nullptr, UM_COMMAND, 34, packet->aid, 0, 0); } break; default: @@ -11062,7 +11062,7 @@ void CGameMode::ReceiveMapMove(const unsigned char* data) { if (Replay::Instance().state == 2) { Replay::Instance().SetState(3); - g_windowMgr.window_4F164->SendMsg(nullptr, UM_SETPOS, 0, 0, 0, 0); + g_windowMgr.replayRecordControlWnd->SendMsg(nullptr, UM_SETPOS, 0, 0, 0, 0); g_windowMgr.CloseWindow(WID_REPLAYRECCONTROLWND); } else if (Replay::Instance().state == 7) { Replay::Instance().SetState(8); @@ -11081,7 +11081,7 @@ void CGameMode::ReceiveMapMove(const unsigned char* data) { g_modeMgr.Switch(1, mapName.c_str()); static_cast(g_windowMgr.EnsureWindow(WID_WAITWND))->SetMessage(LookupMessage(MSI_PLEASE_BE_PATIENT), 17, 1); g_windowMgr.modalResponse = 185; - g_session.ClearEntryList5BD4(); + g_session.ClearStoreSearchResults(); sameMap = 0; } this->sameMapMove[0] = sameMap; @@ -11093,7 +11093,7 @@ void CGameMode::ReceiveMapMove(const unsigned char* data) { } } - g_session.RestoreItems5C68(); + g_session.RestoreSelectionItems(); g_session.ClearItemQuantities(); } @@ -11206,7 +11206,7 @@ void LaunchSkillCastEffect(CGameMode* mode, CGameActor* source, CGameActor* targ return; } - if (g_session.IsSkillIdInRange6018(target->GetEffectiveJob(-1)) || target->objectType == 9) { + if (g_session.IsHirelingJob(target->GetEffectiveJob(-1)) || target->objectType == 9) { if (mode->scene->isPKZone != 0 || mode->scene->isSiegeMode != 0 || !IsSupportSkill(skillId)) { source->SendMsg(nullptr, AM_SET_TARGET_AID, 0, target->render.accountId, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @@ -11287,7 +11287,7 @@ void CGameMode::ReceiveEquipItemNotice(const unsigned char* data) { return; } - ITEM_INFO item = g_session.FindItem1770(packet->index); + ITEM_INFO item = g_session.FindFilteredInventoryItem(packet->index); if (item.identity[1] > 0) { switch (packet->result) { case 1: @@ -11617,7 +11617,7 @@ void CGameMode::ReceiveParaResultList(const unsigned char* packet) { void CGameMode::ReceiveEquipItemListFlags(const unsigned char* packet) { g_session.RemoveEquipment(); g_session.ResetEquipment(); - g_session.ResetItems2B50(); + g_session.ResetCostumeItems(); const int count = static_cast(*reinterpret_cast(packet + 2) - 4) / 0x25; const unsigned char* record = packet + 4; for (int i = 0; i < count; ++i) { @@ -11642,14 +11642,14 @@ void CGameMode::ReceiveEquipItemListFlags(const unsigned char* packet) { } if (item.identity[3] == 0) { - g_session.AddItem1710(item, 0); + g_session.AddInventoryItem(item, 0); g_session.UpdateInventoryItem(item, 0); } else { char equipped = 1; if (g_session.IsCostumeLocation(item.identity[3])) { - g_session.EquipItem2B50(item, &equipped); + g_session.EquipCostumeItem(item, &equipped); } else { - g_session.EquipUnknown17F0(item, &equipped); + g_session.EquipInventoryItem(item, &equipped); } } record += 0x25; @@ -11685,11 +11685,11 @@ __declspec(noinline) void CGameMode::ReceiveEquipItemList34(const unsigned char* } if (item.identity[3] == 0) { - g_session.AddItem1710(item, 0); + g_session.AddInventoryItem(item, 0); g_session.UpdateInventoryItem(item, 0); } else { char equipped = 1; - g_session.EquipUnknown17F0(item, &equipped); + g_session.EquipInventoryItem(item, &equipped); } record += 0x22; } @@ -11702,7 +11702,7 @@ __declspec(noinline) void CGameMode::ReceiveEquipItemList34(const unsigned char* void CGameMode::ReceiveEquipItemList38(const unsigned char* packet) { g_session.RemoveEquipment(); g_session.ResetEquipment(); - g_session.ResetItems2B50(); + g_session.ResetCostumeItems(); const int count = static_cast(*reinterpret_cast(packet + 2) - 4) / 0x26; const unsigned char* record = packet + 4; for (int i = 0; i < count; ++i) { @@ -11727,14 +11727,14 @@ void CGameMode::ReceiveEquipItemList38(const unsigned char* packet) { } if (item.identity[3] == 0) { - g_session.AddItem1710(item, 0); + g_session.AddInventoryItem(item, 0); g_session.UpdateInventoryItem(item, 0); } else { char equipped = 1; if (g_session.IsCostumeLocation(item.identity[3])) { - g_session.EquipItem2B50(item, &equipped); + g_session.EquipCostumeItem(item, &equipped); } else { - g_session.EquipUnknown17F0(item, &equipped); + g_session.EquipInventoryItem(item, &equipped); } } record += 0x26; @@ -11790,9 +11790,9 @@ void CGameMode::ReceiveEquipItemResult(const unsigned char* packet) { ITEM_DESC description = FindItemDescription(std::atoi(item.itemId.c_str())); item.sprite = description.viewId; if (g_session.IsCostumeLocation(*reinterpret_cast(packet + 4))) { - g_session.EquipItem6B68(item); + g_session.EquipSwapEquipmentItem(item); } else { - g_session.EquipItem61B8(item); + g_session.EquipSwapCostumeItem(item); } const char* suffix = LookupMessage(MSI_BASIC_EXP_MSG_FRA); @@ -12006,7 +12006,7 @@ void CGameMode::SpawnMirrorActor(std::uint32_t aid, std::uint32_t owner, short x entry.aid = aid; entry.cellY = y; entry.job = g_session.GetDisplayJob(); - entry.appearanceVariant = g_session.SyncUnknown0E98(); + entry.appearanceVariant = g_session.GetCurrentSex(); entry.head = g_session.m_head; entry.weapon = *reinterpret_cast(&g_session.weaponAppearance[0x4]); entry.shield = *reinterpret_cast(&g_session.weaponAppearance[0x8]); @@ -12117,10 +12117,10 @@ void CGameMode::ReceiveItem1748List2(const unsigned char* packet) { const std::int32_t value8 = *reinterpret_cast(packet + 8); const std::int32_t value4 = *reinterpret_cast(packet + 4); - g_session.ClearItems1748(); - g_session.ClearItems1760(); + g_session.ClearMerchantMirrorItems(); + g_session.ClearMerchantHopeToSellItems(); for (ITEM_INFO item : items) { - g_session.AddItem1748(item); + g_session.AddMerchantMirrorItem(item); } if (UIWindow* window = g_windowMgr.EnsureWindow(WID_MERCHANTITEMSHOPWND)) { @@ -12179,12 +12179,12 @@ void CGameMode::ReceivePartyMemberLeft(const unsigned char* data) { if (g_windowMgr.memorialDunWnd) { g_windowMgr.CloseWindow(WID_MEMORIALDUNWND); } - g_session.ClearRecords0734(); + g_session.ClearMiniPartyRecords(); } RefreshPartyWindows(&g_session); if (CGameActor* actor = static_cast(this->scene->GetGameActorByAID(packet->aid))) { - actor->SetUnknown02E4(0); + actor->SetGroupMemberVisible(0); } } @@ -12204,7 +12204,7 @@ void CGameMode::ReceiveBroadcast(const unsigned char* packet) { g_forbiddenWords.Mask(text.data(), &masked); } - if (g_windowMgr.window_027C == nullptr) { + if (g_windowMgr.chatRoomWnd == nullptr) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text.data()), 0xFF00, 1, 0, 0); char* message = text.data(); this->scene->player->SendMsg( @@ -12251,7 +12251,7 @@ void CGameMode::ReceiveItem1758StoreList(const unsigned char* packet) { g_modeMgr.GetGameMode()->SendMsg(MM_REQ_OPENSTORE, 0, 0, 0, 0); } - g_session.ClearItems1758(); + g_session.ClearMerchantPurchaseItems(); if (items.size() == 0) { this->SendMsg(MM_RELEASE_QUEST, 0, 0, 0, 0); g_windowMgr.CloseWindow(WID_MERCHANTITEMSHOPWND); @@ -12261,7 +12261,7 @@ void CGameMode::ReceiveItem1758StoreList(const unsigned char* packet) { } for (ITEM_INFO item : items) { - g_session.AddItem1758(item); + g_session.AddMerchantPurchaseItem(item); } } @@ -12404,7 +12404,7 @@ void CGameMode::ReceiveActorStandEntry(const unsigned char* data) { } const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_STANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -12412,7 +12412,7 @@ void CGameMode::ReceiveActorStandEntry(const unsigned char* data) { const short job = packet->job; CGameActor* created; if ((job >= JT_WARPNPC && job < 1000) || (job > 1000 && job < 3999) || static_cast(job - 20021) <= 11978 || - g_session.IsSkillIdInRange6001(job)) { + g_session.IsCompanionJob(job)) { if (g_session.IsHomunAid(packet->aid)) { g_session.homunAlive = 1; } @@ -12439,12 +12439,12 @@ void CGameMode::ReceiveActorStandEntry(const unsigned char* data) { if (actor) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } } } @@ -12498,7 +12498,7 @@ void CGameMode::ReceiveActorStandEntryFont(const unsigned char* data) { } const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_STANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -12506,7 +12506,7 @@ void CGameMode::ReceiveActorStandEntryFont(const unsigned char* data) { const short job = packet->job; CGameActor* created; if ((job >= JT_WARPNPC && job < 1000) || (job > 1000 && job < 3999) || static_cast(job - 20021) <= 11978 || - g_session.IsSkillIdInRange6001(job)) { + g_session.IsCompanionJob(job)) { if (g_session.IsHomunAid(packet->aid)) { g_session.homunAlive = 1; } @@ -12533,13 +12533,13 @@ void CGameMode::ReceiveActorStandEntryFont(const unsigned char* data) { if (actor) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } *reinterpret_cast(actor->render.fontSequenceBytes) = packet->font; if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } } } @@ -12601,7 +12601,7 @@ void CGameMode::ReceiveActorTypedEntry(const unsigned char* data) { } const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_STANDENTRY, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && packet->objectType != 7 && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && packet->objectType != 7 && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -12609,7 +12609,7 @@ void CGameMode::ReceiveActorTypedEntry(const unsigned char* data) { const short job = packet->job; CGameActor* created; if ((job >= JT_WARPNPC && job < 1000) || (job > 1000 && job < 3999) || static_cast(job - 20021) <= 11978 || - g_session.IsSkillIdInRange6001(job) || packet->objectType == 9) { + g_session.IsCompanionJob(job) || packet->objectType == 9) { if (g_session.IsHomunAid(packet->aid)) { g_session.homunAlive = 1; } @@ -12637,7 +12637,7 @@ void CGameMode::ReceiveActorTypedEntry(const unsigned char* data) { if (actor) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && packet->objectType != 7 && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && packet->objectType != 7 && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -12935,7 +12935,7 @@ void CGameMode::ReceiveActorMoveEntryLegacy(const unsigned char* data) { actor = created; if (actor->objectType == 0) { if (this->partyPosList.find(entry.aid) != this->partyPosList.end() || this->guildPosList.find(entry.aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } } else { entry.appearanceVariant = 0; @@ -12962,7 +12962,7 @@ void CGameMode::ReceiveActorMoveEntryLegacy(const unsigned char* data) { g_session.homunAlive = 1; } else if (packet->objectType == 9 && g_session.IsMercenaryAid(packet->aid)) { g_session.mercenaryAlive = 1; - } else if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0 && + } else if (g_session.GetSiegeMode() && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -13069,7 +13069,7 @@ void CGameMode::SpawnMovingActor( actor = created; if (actor->objectType == 0) { if (this->partyPosList.find(entry.aid) != this->partyPosList.end() || this->guildPosList.find(entry.aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } } else if (!((objectType == 1 || objectType == 6 || objectType == 12) && IsPlayerJob(job))) { entry.appearanceVariant = 0; @@ -13096,7 +13096,7 @@ void CGameMode::SpawnMovingActor( g_session.homunAlive = 1; } else if (objectType == 9 && g_session.IsMercenaryAid(aid)) { g_session.mercenaryAlive = 1; - } else if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0 && + } else if (g_session.GetSiegeMode() && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, guildId, guildVersion); } @@ -13206,7 +13206,7 @@ void CGameMode::ReceiveActorMoveEntryOld(const unsigned char* data) { actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -13224,7 +13224,7 @@ void CGameMode::ReceiveActorMoveEntryOld(const unsigned char* data) { } } else { const short job = packet->job; - if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsSkillIdInRange6001(job)) { + if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsCompanionJob(job)) { actor = new CPc; } else { if (g_session.IsHomunAid(packet->aid)) { @@ -13249,12 +13249,12 @@ void CGameMode::ReceiveActorMoveEntryOld(const unsigned char* data) { this->scene->actors.push_back(actor); const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITMOVEENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } if (this->partyPosList.find(entry.aid) != this->partyPosList.end() || this->guildPosList.find(entry.aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } } @@ -13340,7 +13340,7 @@ void CGameMode::ReceiveActorMoveEntryOld2(const unsigned char* data) { actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } - if (g_session.GetSceneUnknown004C() && packet->objectType != 7 && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && packet->objectType != 7 && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -13358,7 +13358,7 @@ void CGameMode::ReceiveActorMoveEntryOld2(const unsigned char* data) { } } else { const short job = packet->job; - if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsSkillIdInRange6001(job) && + if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsCompanionJob(job) && packet->objectType != 9) { actor = new CPc; } else { @@ -13386,12 +13386,12 @@ void CGameMode::ReceiveActorMoveEntryOld2(const unsigned char* data) { this->scene->actors.push_back(actor); const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITMOVEENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && packet->objectType == 7 && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && packet->objectType == 7 && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } if (this->partyPosList.find(entry.aid) != this->partyPosList.end() || this->guildPosList.find(entry.aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } } @@ -13487,7 +13487,7 @@ void CGameMode::ReceiveActorMoveEntryNamed(const unsigned char* data) { actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } - if (g_session.GetSceneUnknown004C() && packet->objectType == 7 && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && packet->objectType == 7 && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -13505,7 +13505,7 @@ void CGameMode::ReceiveActorMoveEntryNamed(const unsigned char* data) { } } else { const short job = packet->job; - if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsSkillIdInRange6001(job) && + if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsCompanionJob(job) && packet->objectType != 9) { actor = new CPc; } else { @@ -13533,12 +13533,12 @@ void CGameMode::ReceiveActorMoveEntryNamed(const unsigned char* data) { actor->SendMsg(nullptr, AM_INITMOVEENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); *reinterpret_cast(actor->render.fontSequenceBytes) = packet->font; actor->characterLevel = packet->level; - if (g_session.GetSceneUnknown004C() && packet->objectType == 7 && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && packet->objectType == 7 && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } if (this->partyPosList.find(entry.aid) != this->partyPosList.end() || this->guildPosList.find(entry.aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } } @@ -13631,7 +13631,7 @@ void CGameMode::ReceiveActorMoveEntryOld0(const unsigned char* data) { } } else { const short job = packet->job; - if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsSkillIdInRange6001(job)) { + if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsCompanionJob(job)) { actor = new CPc; } else { if (g_session.IsHomunAid(packet->aid)) { @@ -13664,7 +13664,7 @@ void CGameMode::ReceiveActorMoveEntryOld0(const unsigned char* data) { } } - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -13935,7 +13935,7 @@ void CGameMode::ReceiveActorStandEntryLegacy(const unsigned char* data) { actor = created; if (packet->objectType == 0) { if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 2, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -13965,7 +13965,7 @@ void CGameMode::ReceiveActorStandEntryLegacy(const unsigned char* data) { g_session.homunAlive = 1; } else if (packet->objectType == 9 && g_session.IsMercenaryAid(packet->aid)) { g_session.mercenaryAlive = 1; - } else if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0 && + } else if (g_session.GetSiegeMode() && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -14100,7 +14100,7 @@ void CGameMode::ReceiveActorStandEntryNamedOld(const unsigned char* data) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 2, 0, 0, 0, 0, 0, 0, 0, 0, 0); if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } this->scene->objects.push_back(actor); this->scene->actors.push_back(actor); @@ -14108,7 +14108,7 @@ void CGameMode::ReceiveActorStandEntryNamedOld(const unsigned char* data) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_STANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0) { + if (g_session.GetSiegeMode() && actor->sceneNameWindow == 0) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } } else { @@ -14134,7 +14134,7 @@ void CGameMode::ReceiveActorStandEntryNamedOld(const unsigned char* data) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_STANDENTRY, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (g_session.IsGuardianJob(packet->job) && g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0) { + if (g_session.IsGuardianJob(packet->job) && g_session.GetSiegeMode() && actor->sceneNameWindow == 0) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -14228,14 +14228,14 @@ void CGameMode::ReceiveActorStandEntryOld(const unsigned char* data) { } } actor->SendMsg(nullptr, AM_STANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } } else { int isPc = 0; const short job = packet->job; - if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsSkillIdInRange6001(job)) { + if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsCompanionJob(job)) { isPc = 1; actor = new CPc; } else { @@ -14263,12 +14263,12 @@ void CGameMode::ReceiveActorStandEntryOld(const unsigned char* data) { if (isPc && !IsAdminAccount(packet->aid) && !StateFlag06(packet->effectState)) { actor->LaunchEffect(0x158, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } } @@ -14353,14 +14353,14 @@ void CGameMode::ReceiveActorStandEntryOld2(const unsigned char* data) { } actor->SendMsg(nullptr, AM_STANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); actor->characterLevel = packet->level; - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } } else { int isPc = 0; const short job = packet->job; - if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsSkillIdInRange6001(job)) { + if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsCompanionJob(job)) { isPc = 1; actor = new CPc; } else { @@ -14389,12 +14389,12 @@ void CGameMode::ReceiveActorStandEntryOld2(const unsigned char* data) { if (isPc && !IsAdminAccount(packet->aid) && !StateFlag06(packet->effectState)) { actor->LaunchEffect(0x158, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } } @@ -14481,14 +14481,14 @@ void CGameMode::ReceiveActorStandEntryOld3(const unsigned char* data) { } } actor->SendMsg(nullptr, AM_STANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } } else { int isPc = 0; const short job = packet->job; - if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsSkillIdInRange6001(job)) { + if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsCompanionJob(job)) { isPc = 1; actor = new CPc; } else { @@ -14520,12 +14520,12 @@ void CGameMode::ReceiveActorStandEntryOld3(const unsigned char* data) { actor->LaunchEffect(0x158, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } } - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } } @@ -14619,7 +14619,7 @@ void CGameMode::ReceiveActorStandEntryOld0(const unsigned char* data) { } else { int isPc = 0; const short job = packet->job; - if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsSkillIdInRange6001(job)) { + if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsCompanionJob(job)) { isPc = 1; actor = new CPc; } else { @@ -14656,7 +14656,7 @@ void CGameMode::ReceiveActorStandEntryOld0(const unsigned char* data) { } } - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -14765,13 +14765,13 @@ void CGameMode::ReceiveActorStateEntryNamedOld(const unsigned char* data) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } } else { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_STANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0) { + if (g_session.GetSiegeMode() && actor->sceneNameWindow == 0) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } } else { @@ -14795,7 +14795,7 @@ void CGameMode::ReceiveActorStateEntryNamedOld(const unsigned char* data) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_STANDENTRY, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (g_session.IsGuardianJob(packet->job) && g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0) { + if (g_session.IsGuardianJob(packet->job) && g_session.GetSiegeMode() && actor->sceneNameWindow == 0) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -14894,13 +14894,13 @@ void CGameMode::ReceiveActorStateEntryOld(const unsigned char* data) { } } actor->SendMsg(nullptr, AM_STANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } } else { const short job = packet->job; - if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsSkillIdInRange6001(job)) { + if ((job < 45 || job > 999) && (job < 1001 || job > 3998) && static_cast(job - 20021) > 11978 && !g_session.IsCompanionJob(job)) { actor = new CPc; } else { if (g_session.IsHomunAid(packet->aid)) { @@ -14925,12 +14925,12 @@ void CGameMode::ReceiveActorStateEntryOld(const unsigned char* data) { this->scene->actors.push_back(actor); if (actor) { actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && + if (g_session.GetSiegeMode() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } } } @@ -15013,7 +15013,7 @@ void CGameMode::SpawnStandingActor( actor = created; if (objectType == 0) { if (this->partyPosList.find(aid) != this->partyPosList.end() || this->guildPosList.find(aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0); } else { @@ -15043,7 +15043,7 @@ void CGameMode::SpawnStandingActor( g_session.homunAlive = 1; } else if (objectType == 9 && g_session.IsMercenaryAid(aid)) { g_session.mercenaryAlive = 1; - } else if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0 && + } else if (g_session.GetSiegeMode() && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, guildId, guildVersion); } @@ -15292,7 +15292,7 @@ void CGameMode::SpawnStateActor( actor = created; if (objectType == 0) { if (this->partyPosList.find(aid) != this->partyPosList.end() || this->guildPosList.find(aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } else { @@ -15324,7 +15324,7 @@ void CGameMode::SpawnStateActor( g_session.homunAlive = 1; } else if (objectType == 9 && g_session.IsMercenaryAid(aid)) { g_session.mercenaryAlive = 1; - } else if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0 && + } else if (g_session.GetSiegeMode() && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, guildId, guildVersion); } @@ -15452,7 +15452,7 @@ void CGameMode::ReceiveColorBroadcast(const unsigned char* data) { BroadcastBalloonMessage balloonMessage{{}, {}, std::chrono::seconds(20), 12, 0x40000000, 0, 0}; balloonMessage.start = std::chrono::system_clock::now(); balloonMessage.fontHeight = *reinterpret_cast(data + 10); - message = static_cast(g_windowMgr.window_01C8)->ConvertChat(message); + message = static_cast(g_windowMgr.chatWnd)->ConvertChat(message); balloonMessage.lines.emplace_back(message, color); balloon->AddMessage(0, balloonMessage); g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); @@ -15565,7 +15565,7 @@ void CGameMode::ReceiveTaggedBroadcast(const unsigned char* data) { ); } - message = static_cast(g_windowMgr.window_01C8)->ConvertChat(message); + message = static_cast(g_windowMgr.chatWnd)->ConvertChat(message); std::string linked; DisplayNavigationLink(linked, message); message = std::move(linked); @@ -15758,7 +15758,7 @@ void CGameMode::ReceiveActorStateEntryLegacy(const unsigned char* data) { actor = created; if (packet->objectType == 0) { if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } else { @@ -15786,7 +15786,7 @@ void CGameMode::ReceiveActorStateEntryLegacy(const unsigned char* data) { g_session.homunAlive = 1; } else if (packet->objectType == 9 && g_session.IsMercenaryAid(packet->aid)) { g_session.mercenaryAlive = 1; - } else if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0 && + } else if (g_session.GetSiegeMode() && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -16015,7 +16015,7 @@ void CGameMode::UpdatePartyMemberInfo( } } else if (member.offline == 1) { this->SendMsg(MM_DELETEPARTYPOS, accountId, 0, 0, 0); - this->SetActorUnknown02E4(accountId, 0); + this->SetActorGroupMemberVisible(accountId, 0); } else { std::string memberMap = member.map; std::string currentMap = this->mapName; @@ -16029,7 +16029,7 @@ void CGameMode::UpdatePartyMemberInfo( if (!sameMap) { this->SendMsg(MM_DELETEPARTYPOS, accountId, 0, 0, 0); } - this->SetActorUnknown02E4(accountId, sameMap); + this->SetActorGroupMemberVisible(accountId, sameMap); } g_session.partyItemDistribute = itemDistribute != 0; @@ -16037,7 +16037,7 @@ void CGameMode::UpdatePartyMemberInfo( g_session.PartyCount(); g_session.AddPartyMember(member); g_windowMgr.NotifyMemberWindows(&member); - this->SetActorUnknown02E4(accountId, 1); + this->SetActorGroupMemberVisible(accountId, 1); } // OFFSET: 0x00D5B940 @@ -16906,10 +16906,10 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t break; case AM_REST: if (sourceAid == g_session.m_aid) { - if (g_windowMgr.window_03C0 != nullptr) { + if (g_windowMgr.homunInfoWnd != nullptr) { g_windowMgr.CloseWindow(WID_HOMUNINFOWND); } - if (g_windowMgr.window_03C4 != nullptr) { + if (g_windowMgr.homunculusSkillWnd != nullptr) { g_windowMgr.CloseWindow(WID_SKILLLISTWND_SKILLTAB_0); } g_session.ClearHomunStatus(); @@ -20326,11 +20326,11 @@ void CGameMode::ProcessIncomingPackets() { const int replayState = Replay::Instance().state; if (replayState == 7) { - g_windowMgr.window_4F168->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + g_windowMgr.replayControlWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } else if (replayState == 2) { Replay::Instance().WriteHeader(12); - if (g_windowMgr.window_4F164) { - g_windowMgr.window_4F164->SendMsg(nullptr, UM_UPDATE_RECORD_TIME, 0, 0, 0, 0); + if (g_windowMgr.replayRecordControlWnd) { + g_windowMgr.replayRecordControlWnd->SendMsg(nullptr, UM_UPDATE_RECORD_TIME, 0, 0, 0, 0); } } @@ -20434,7 +20434,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveExpChange(g_gameModePacketBuffer); break; case ID_ZC_CLOSE_DIALOG: - this->ReceiveUnknownD264E0(g_gameModePacketBuffer); + this->ReceiveNpcDialogEnd(g_gameModePacketBuffer); break; case ID_ZC_MENU_LIST: this->ReceiveWindow17Entries(g_gameModePacketBuffer); @@ -20458,13 +20458,13 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveItem1718Result(g_gameModePacketBuffer); break; case ID_ZC_SETTING_WHISPER_PC: - this->ReceiveResultNotice0118(g_gameModePacketBuffer); + this->ReceiveWhisperFilterResult(g_gameModePacketBuffer); break; case ID_ZC_ROOM_NEWENTRY: this->ReceiveActorMessage32(g_gameModePacketBuffer); break; case ID_ZC_REFUSE_ENTER_ROOM: - this->ReceiveResultNotice00FC(g_gameModePacketBuffer); + this->ReceiveChatRoomEntryFailure(g_gameModePacketBuffer); break; case ID_ZC_ENTER_ROOM: this->ReceiveChatRoomMemberList(g_gameModePacketBuffer); @@ -20519,7 +20519,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveEquipItemNotice(g_gameModePacketBuffer); break; case openvendingType: - this->ReceiveUnknownD50810(g_gameModePacketBuffer); + this->ReceiveOpenedVendingItemList(g_gameModePacketBuffer); break; case ID_ZC_ACTION_FAILURE: this->ReceiveEquipAck(g_gameModePacketBuffer); @@ -20653,7 +20653,7 @@ void CGameMode::ProcessIncomingPackets() { this->Zc_Start_Couple(g_gameModePacketBuffer); break; case ID_ZC_COUPLENAME: - this->ReceiveUnknown0294Text(g_gameModePacketBuffer); + this->ReceiveCoupleName(g_gameModePacketBuffer); break; case ID_ZC_CONGRATULATION: this->ReceiveActorEffect347(g_gameModePacketBuffer); @@ -20713,13 +20713,13 @@ void CGameMode::ProcessIncomingPackets() { this->ReceivePendingResult(g_gameModePacketBuffer); break; case ID_ZC_NPC_SHOWEFST_UPDATE: - this->ReceiveUnknownD78010(g_gameModePacketBuffer); + this->ReceiveActorStatusEffects(g_gameModePacketBuffer); break; case ID_ZC_MSG: this->Zc_Msg(g_gameModePacketBuffer); break; case ID_ZC_BOSS_INFO: - this->ReceiveUnknown05C4Result(g_gameModePacketBuffer); + this->ReceiveBossMonsterInfo(g_gameModePacketBuffer); break; case ID_ZC_READ_BOOK: this->ReceiveBookOpen(g_gameModePacketBuffer); @@ -20737,7 +20737,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveRentalItemTime(g_gameModePacketBuffer); break; case ID_ZC_CASH_ITEM_DELETE: - this->ReceiveUnknownD25850(g_gameModePacketBuffer); + this->ReceiveItemDeletionNotice(g_gameModePacketBuffer); break; case ID_ZC_ITEM_PICKUP_ACK2: this->ReceiveItemPickupAck2(g_gameModePacketBuffer); @@ -20788,7 +20788,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveItemPickupAck3(g_gameModePacketBuffer); break; case 0x2D5: - this->ReceiveUnknownD2D990(g_gameModePacketBuffer); + this->ReceiveMemorialDungeonError(g_gameModePacketBuffer); break; case ID_ZC_EQUIPWIN_MICROSCOPE_02d7: case ID_ZC_EQUIPWIN_MICROSCOPE_0859: @@ -20798,7 +20798,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveFeedOption(g_gameModePacketBuffer); break; case ID_ZC_CONFIG_NOTIFY: - this->ReceiveUnknownD26800(g_gameModePacketBuffer); + this->ReceiveEquipmentViewState(g_gameModePacketBuffer); break; case ID_ZC_BATTLEFIELD_CHAT: this->ReceiveActorBroadcastText(g_gameModePacketBuffer); @@ -20901,7 +20901,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveBuyingStoreItemList(g_gameModePacketBuffer); break; case ID_ZC_FAILED_TRADE_BUYING_STORE_TO_BUYER: - this->ReceiveUnknownD2A1F0(g_gameModePacketBuffer); + this->ReceiveBuyingStoreClose(g_gameModePacketBuffer); break; case ID_ZC_UPDATE_ITEM_FROM_BUYING_STORE: this->ReceiveVendingItemSoldNow(g_gameModePacketBuffer); @@ -20940,7 +20940,7 @@ void CGameMode::ProcessIncomingPackets() { this->ProcessUiMessage(g_gameModePacketBuffer); break; case 0x8B1: - this->ReceiveUnknownD31A40(g_gameModePacketBuffer); + this->ReceiveItemNameListNotice(g_gameModePacketBuffer); break; case 0x8B3: this->ReceiveActorMessage7(g_gameModePacketBuffer); @@ -20962,7 +20962,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveRateInfo(g_gameModePacketBuffer); break; case 0x8CE: - this->ReceiveNotice1950(g_gameModePacketBuffer); + this->ReceiveZoneItemRetrievalFailure(g_gameModePacketBuffer); break; case ID_ZC_SPIRITS_ATTRIBUTE: this->ReceiveActorCharm(g_gameModePacketBuffer); @@ -20995,7 +20995,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveActorStateEntryLegacy(g_gameModePacketBuffer); break; case 0x96B: - this->ReceiveUnknown16FC588(g_gameModePacketBuffer); + this->ReceiveNavigationRouteResult(g_gameModePacketBuffer); break; case ID_ZC_MERGE_ITEM_OPEN: this->ReceiveWindow227Entries(g_gameModePacketBuffer); @@ -21109,10 +21109,10 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveWhisper2(g_gameModePacketBuffer); break; case rodexicon: - this->ReceiveUnknownD77BF0(g_gameModePacketBuffer); + this->ReceiveMailboxAvailability(g_gameModePacketBuffer); break; case rodexwriteresult: - this->ReceiveUnknown0454Result(g_gameModePacketBuffer); + this->ReceiveRodexComposeResult(g_gameModePacketBuffer); break; case rodexnextpage: this->ReceiveRodexMailListAppend(g_gameModePacketBuffer); @@ -21178,7 +21178,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveRodexOpen(g_gameModePacketBuffer); break; case ID_ZC_GOLDPCCAFE_POINT: - this->ReceiveUnknownD612A0(g_gameModePacketBuffer); + this->ReceiveMileageInfo(g_gameModePacketBuffer); break; case ID_ZC_DYNAMICNPC_CREATE_RESULT: this->ReceiveDynamicNpcNotice(g_gameModePacketBuffer); @@ -21223,7 +21223,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveEquipCardChange(g_gameModePacketBuffer); break; case ID_ZC_ADD_MEMBER_TO_GROUP3: - this->ReceiveUnknownD89C60(g_gameModePacketBuffer); + this->ReceivePartyMemberInfoWithoutCharacterId(g_gameModePacketBuffer); break; case 0xa44: this->ReceivePartyInfo2(g_gameModePacketBuffer); @@ -21280,7 +21280,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceivePartyDead(g_gameModePacketBuffer); break; case 0xAB8: - this->ReceivePacket0AB8(g_gameModePacketBuffer); + this->ReceivePlayerRouteClear(g_gameModePacketBuffer); break; case ID_ZC_NOTIFY_MEMBERINFO_TO_GROUPM: this->ReceivePartyJobLevel(g_gameModePacketBuffer); @@ -21310,7 +21310,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveItemDropEntry(g_gameModePacketBuffer); break; case 0xADE: - this->ReceiveUnknown173A5BC(g_gameModePacketBuffer); + this->ReceiveOverweightThreshold(g_gameModePacketBuffer); break; case ID_ZC_ACK_REQNAMEALL_NPC: this->ReceiveActorNameTitle(reinterpret_cast(g_gameModePacketBuffer)); @@ -21319,7 +21319,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveNamedResultNotice(g_gameModePacketBuffer); break; case 0xae4: - this->ReceiveUnknownD65870(g_gameModePacketBuffer); + this->ReceivePartyMemberInfoWithCharacterId(g_gameModePacketBuffer); break; case 0xae5: this->ReceivePartyRoster(g_gameModePacketBuffer); @@ -21355,10 +21355,10 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveExtraInventoryResult(g_gameModePacketBuffer); break; case ID_ZC_ACK_EXTEND_BODYITEM_SIZE: - this->NotifyResult3562(g_gameModePacketBuffer); + this->NotifyInventoryExpansionResult(g_gameModePacketBuffer); break; case ID_ZC_EXTEND_BODYITEM_SIZE: - this->ReceiveUnknown7FBC(g_gameModePacketBuffer); + this->ReceiveExtraInventorySlots(g_gameModePacketBuffer); break; case ID_ZC_USESKILL_ACK: this->ReceiveActorSkillResult(g_gameModePacketBuffer); @@ -21370,7 +21370,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveShortcutPagePacket(g_gameModePacketBuffer); break; case ID_ZC_GUILD_AGIT_INFO: - this->ReceiveGuildUnknown0114List(g_gameModePacketBuffer); + this->ReceiveGuildAgitList(g_gameModePacketBuffer); break; case ID_ZC_PROPERTY_HOMUN_0b2f: this->ReceiveHomunculusInfo2(g_gameModePacketBuffer); @@ -21454,7 +21454,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveSummonHpUpdate(g_gameModePacketBuffer); break; case ID_ZC_SOULENERGY: - this->ReceivePacket0B73(g_gameModePacketBuffer); + this->ReceiveSoulEnergy(g_gameModePacketBuffer); break; case ID_ZC_PC_PURCHASE_ITEMLIST: this->ReceiveItem1718BasicList(g_gameModePacketBuffer); @@ -21517,7 +21517,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveRuneRewardSteps(g_gameModePacketBuffer); break; case 0xC2B: - this->ReceiveUnknownD79660(g_gameModePacketBuffer); + this->ReceiveDebuffRemovalResult(g_gameModePacketBuffer); break; case 0xC2C: this->ReceiveResultNotice4327(g_gameModePacketBuffer); @@ -21654,7 +21654,7 @@ void CGameMode::ProcessIncomingPackets() { this->nameCard.SetName(packet->aid, std::string(packet->name, sizeof(packet->name)).c_str()); if (packet->aid == g_session.petGid) { sprintf(g_session.petName, packet->name); - if (UIPetInfoWnd *window = static_cast(g_windowMgr.window_038C)) { + if (UIPetInfoWnd *window = static_cast(g_windowMgr.petInfoWnd)) { window->nameEdit->SetText(packet->name); } } @@ -21708,7 +21708,7 @@ void CGameMode::ProcessIncomingPackets() { case ID_ZC_ITEM_DISAPPEAR: { const std::uint32_t aid = *reinterpret_cast(g_gameModePacketBuffer + 2); this->scene->RemoveGroundItem(aid); - this->RemoveUnknown01A4(aid); + this->RemovePendingItemPickup(aid); break; } case 0xa3: { @@ -21754,11 +21754,11 @@ void CGameMode::ProcessIncomingPackets() { } if (item.identity[3] == 0) { - g_session.AddItem1710(item, 0); + g_session.AddInventoryItem(item, 0); g_session.UpdateInventoryItem(item, 0); } else { char equipped = 1; - g_session.EquipUnknown17F0(item, &equipped); + g_session.EquipInventoryItem(item, &equipped); } } RefreshItemWindows(&g_windowMgr); @@ -21780,7 +21780,7 @@ void CGameMode::ProcessIncomingPackets() { item.identified = record->identified; item.damaged = 0; item.refiningLevel = 0; - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } g_session.RefreshItem1738Window(); break; @@ -21801,7 +21801,7 @@ void CGameMode::ProcessIncomingPackets() { item.identified = record->identified; item.damaged = record->damaged; item.refiningLevel = record->refine; - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } g_session.RefreshItem1738Window(); break; @@ -21811,7 +21811,7 @@ void CGameMode::ProcessIncomingPackets() { if (packet->result) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->index); if (item.identity[1]) { - g_session.RemoveItem1710(packet->index, item.quantity - packet->amount); + g_session.RemoveInventoryItem(packet->index, item.quantity - packet->amount); if (item.IsAboveItemId600()) { this->scene->player->SendMsg(nullptr, AM_USEITEM_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @@ -21846,7 +21846,7 @@ void CGameMode::ProcessIncomingPackets() { const std::uint16_t location = *reinterpret_cast(packet + 4); if (packet[6] && location) { if (g_session.IsCostumeLocation(location)) { - g_session.UnequipItem2B50(location); + g_session.UnequipCostumeItem(location); } else { g_session.UnequipItem(location, 0); } @@ -21867,7 +21867,7 @@ void CGameMode::ProcessIncomingPackets() { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_DROP_ITEM), item.DisplayName(0).c_str(), amount).c_str()), 0xFFFF00, 6, 0, 0); } - g_session.RemoveItem1710(index, amount); + g_session.RemoveInventoryItem(index, amount); *reinterpret_cast(this->waitingItemThrowAck) = 0; break; } @@ -21954,7 +21954,7 @@ void CGameMode::ProcessIncomingPackets() { item.type = record.type; item.id = -1; item.identified = 1; - g_session.AddItem1718(item, 0); + g_session.AddShopItem(item, 0); } UIWindow *buyWindow = g_windowMgr.EnsureWindow(WID_ITEMSHOPWND); @@ -22056,7 +22056,7 @@ void CGameMode::ProcessIncomingPackets() { if (CRenderObject *actor = this->scene->GetGameActorByAID(this->chatRoomActorIds[roomId])) { actor->SendMsg(nullptr, AM_DELETE_CHAT_TITLE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (g_windowMgr.window_027C && static_cast(g_windowMgr.window_027C)->roomStatus.roomId == static_cast(roomId)) { + if (g_windowMgr.chatRoomWnd && static_cast(g_windowMgr.chatRoomWnd)->roomStatus.roomId == static_cast(roomId)) { g_windowMgr.CloseWindow(WID_CHATROOMWND); g_windowMgr.CloseWindow(WID_CHATROOMCHANGEWND); } @@ -22177,13 +22177,13 @@ void CGameMode::ProcessIncomingPackets() { ITEM_INFO item; item.identity[1] = *reinterpret_cast(g_gameModePacketBuffer + 2); item.quantity = *reinterpret_cast(g_gameModePacketBuffer + 4); - g_session.RemoveItem1738(item); + g_session.RemoveCartItem(item); this->inventoryChanged = 1; break; } case ID_ZC_CLOSE_STORE: g_windowMgr.CloseWindow(WID_ITEMSTOREWND); - g_session.ClearItems1738(); + g_session.ClearCartItems(); break; case ID_ZC_ACK_MAKE_GROUP: g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); @@ -22243,8 +22243,8 @@ void CGameMode::ProcessIncomingPackets() { if (CRenderObject *actor = this->scene->GetGameActorByAID(aid)) { actor->SendMsg(nullptr, AM_UPDATEGAGE, 0, hp, hp >> 31, maxHp, maxHp >> 31, 0, 0, 0, 0, 0, 0, 0, 0); } - if (g_windowMgr.window_02C8) { - g_windowMgr.window_02C8->SendMsg(nullptr, UM_COMMAND, 34, aid, hp, maxHp); + if (g_windowMgr.messengerGroupWnd) { + g_windowMgr.messengerGroupWnd->SendMsg(nullptr, UM_COMMAND, 34, aid, hp, maxHp); } g_windowMgr.NotifyItemWindows(aid, hp, maxHp); break; @@ -22338,7 +22338,7 @@ void CGameMode::ProcessIncomingPackets() { g_windowMgr.equipWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } if (g_session.replayPacketMode <= 0) { - g_session.ClearItems1740(); + g_session.ClearMerchantShopItems(); g_windowMgr.CloseWindow(WID_MERCHANTITEMWND); } } else { @@ -22429,7 +22429,7 @@ void CGameMode::ProcessIncomingPackets() { item.identified = record->identified; item.damaged = record->damaged; item.refiningLevel = record->refine; - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } g_session.RefreshItem1740Window(); break; @@ -22449,7 +22449,7 @@ void CGameMode::ProcessIncomingPackets() { item.identified = record->identified; item.damaged = 0; item.refiningLevel = 0; - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } g_session.RefreshItem1740Window(); break; @@ -22464,19 +22464,19 @@ void CGameMode::ProcessIncomingPackets() { item.damaged = packet[0x0D]; item.refiningLevel = packet[0x0E]; std::memcpy(item.cards, packet + 0x0F, sizeof(item.cards)); - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); break; } case ID_ZC_DELETE_ITEM_FROM_CART: { ITEM_INFO item; item.identity[1] = *reinterpret_cast(g_gameModePacketBuffer + 2); item.quantity = *reinterpret_cast(g_gameModePacketBuffer + 4); - g_session.RemoveItem1740(item); + g_session.RemoveMerchantShopItem(item); this->inventoryChanged = 1; break; } case ID_ZC_CARTOFF: - g_session.ClearItems1740(); + g_session.ClearMerchantShopItems(); g_windowMgr.CloseWindow(WID_MERCHANTITEMWND); break; case ID_ZC_ACK_ADDITEM_TO_CART: @@ -22504,8 +22504,8 @@ void CGameMode::ProcessIncomingPackets() { } else { g_session.m_vendingSlotCount = slots > 13 ? 13 : slots; } - g_session.ClearItems1768(); - if (g_windowMgr.window_027C || g_windowMgr.window_0274) { + g_session.ClearMerchantPurchaseSavedItems(); + if (g_windowMgr.chatRoomWnd || g_windowMgr.chatRoomMakeWnd) { g_windowMgr.Confirm(LookupMessage(MSI_CANT_OPEN_STORE_WHILE_CHAT), 0, true, false, 0, "Message", 280, 120, 0); this->SendMsg(MM_REQ_CLOSESTORE, 0, 0, 0, 0); } else if (UIMerchantShopMakeWnd *window = static_cast(g_windowMgr.EnsureWindow(WID_MERCHANTSHOPMAKEWND))) { @@ -22560,7 +22560,7 @@ void CGameMode::ProcessIncomingPackets() { EquipmentProperties::CEquipmentPropertiesMgr::GetInstance()->UnequipWearable(unequipLocation); } } - g_session.SetUnknown16EC(*reinterpret_cast(g_gameModePacketBuffer + 2)); + g_session.SetEquippedArrowIndex(*reinterpret_cast(g_gameModePacketBuffer + 2)); *reinterpret_cast(&this->equipmentRequestState[0x04]) = timeGetTime() - 2000; break; case ID_ZC_RECOVERY_013d: @@ -22668,8 +22668,8 @@ void CGameMode::ProcessIncomingPackets() { g_session.StoreEmblem(packet + 0x0C, *reinterpret_cast(packet + 2) - 12, guildId, version); if (g_guildInfo.m_guildId == guildId) { this->scene->player->SetGuildInfo(guildId, version); - if (g_windowMgr.window_0320) { - g_windowMgr.window_0320->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.guildInfoManageWnd) { + g_windowMgr.guildInfoManageWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } break; @@ -23018,7 +23018,7 @@ void CGameMode::ProcessIncomingPackets() { g_session.petHunger = *reinterpret_cast(packet + 0x1D); g_session.m_petFriendly = *reinterpret_cast(packet + 0x1F); g_session.petAccessory = *reinterpret_cast(packet + 0x21); - if (UIPetInfoWnd *window = static_cast(g_windowMgr.window_038C)) { + if (UIPetInfoWnd *window = static_cast(g_windowMgr.petInfoWnd)) { window->UpdateFriendlyGauge(); window->nameEdit->SetText(g_session.petName); window->Invalidate(); @@ -23161,7 +23161,7 @@ void CGameMode::ProcessIncomingPackets() { if (g_gameModePacketBuffer[0xE]) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *reinterpret_cast(g_gameModePacketBuffer + 2)); if (item.identity[1]) { - g_session.RemoveItem1710(*reinterpret_cast(g_gameModePacketBuffer + 2), + g_session.RemoveInventoryItem(*reinterpret_cast(g_gameModePacketBuffer + 2), item.quantity - *reinterpret_cast(g_gameModePacketBuffer + 0xC)); if (item.GetItemId() == 607) { this->yggdrasilUsePending = 0; @@ -23274,11 +23274,11 @@ void CGameMode::ProcessIncomingPackets() { this->SendMsg(MM_DELETEGUILDPOS, *reinterpret_cast(g_gameModePacketBuffer + 6), 0, 0, 0); if (CGameActor *actor = static_cast(this->scene->GetGameActorByAID(*reinterpret_cast(g_gameModePacketBuffer + 6)))) { - actor->SetUnknown02E4(0); + actor->SetGroupMemberVisible(0); } } else if (CGameActor *actor = static_cast(this->scene->GetGameActorByAID(*reinterpret_cast(g_gameModePacketBuffer + 6)))) { - actor->SetUnknown02E4(1); + actor->SetGroupMemberVisible(1); } break; case 0x1ee: { @@ -23321,7 +23321,7 @@ void CGameMode::ProcessIncomingPackets() { item.identified = record->identified; item.damaged = 0; item.refiningLevel = 0; - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } g_session.RefreshItem1740Window(); break; @@ -23344,7 +23344,7 @@ void CGameMode::ProcessIncomingPackets() { item.identified = record->identified; item.damaged = 0; item.refiningLevel = 0; - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } g_session.RefreshItem1738Window(); break; @@ -23441,7 +23441,7 @@ void CGameMode::ProcessIncomingPackets() { reinterpret_cast(g_gameModePacketBuffer + 0xB)); if (g_session.SetFriendOffline(*reinterpret_cast(g_gameModePacketBuffer + 2), *reinterpret_cast(g_gameModePacketBuffer + 6), g_gameModePacketBuffer[0xA])) { - g_session.RefreshWindow02C8(); + g_session.RefreshMessengerGroupWindow(); } break; case ID_ZC_REQ_ADD_FRIENDS: { @@ -23463,7 +23463,7 @@ void CGameMode::ProcessIncomingPackets() { break; case 0x20A: if (g_session.RemoveFriendByCharacterId(*reinterpret_cast(g_gameModePacketBuffer + 6))) { - g_session.RefreshWindow02C8(); + g_session.RefreshMessengerGroupWindow(); } break; case ID_ZC_BABYMSG: @@ -23512,7 +23512,7 @@ void CGameMode::ProcessIncomingPackets() { g_windowMgr.equipWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } if (g_session.replayPacketMode <= 0) { - g_session.ClearItems1740(); + g_session.ClearMerchantShopItems(); g_windowMgr.CloseWindow(WID_MERCHANTITEMWND); } } else { @@ -23652,7 +23652,7 @@ void CGameMode::ProcessIncomingPackets() { item.damaged = 0; item.refiningLevel = 0; item.expireTime = entry->expireTime; - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } g_session.RefreshItem1740Window(); break; @@ -23677,7 +23677,7 @@ void CGameMode::ProcessIncomingPackets() { item.damaged = 0; item.refiningLevel = 0; item.expireTime = entry->expireTime; - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } g_session.RefreshItem1738Window(); break; @@ -23744,7 +23744,7 @@ void CGameMode::ProcessIncomingPackets() { const char *job = g_session.GetJobName(*reinterpret_cast(g_gameModePacketBuffer + 0x1A), -1); sprintf(message, LookupMessage(MSI_SEEK_PARTY_SET), *reinterpret_cast(g_gameModePacketBuffer + 0x1E), reinterpret_cast(g_gameModePacketBuffer + 2), job); - if (g_windowMgr.window_027C) { + if (g_windowMgr.chatRoomWnd) { g_windowMgr.SendNotice(UIM_PUSH_INTO_CHATROOM, reinterpret_cast(message), 0x222222, 0, 0, 0); } else if (!g_serviceOptions.Get(114) && !g_serviceOptions.Get(148)) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(message), 0xFFFF00, 1, 0, 0); @@ -24165,8 +24165,8 @@ void CGameMode::ProcessIncomingPackets() { const int maxHp = *reinterpret_cast(g_gameModePacketBuffer + 0xA); actor->SendMsg(nullptr, AM_UPDATEGAGE, 0, hp, hp >> 31, maxHp, maxHp >> 31, 0, 0, 0, 0, 0, 0, 0, 0); } - if (g_windowMgr.window_02C8) { - g_windowMgr.window_02C8->SendMsg(nullptr, UM_COMMAND, 34, *reinterpret_cast(g_gameModePacketBuffer + 2), + if (g_windowMgr.messengerGroupWnd) { + g_windowMgr.messengerGroupWnd->SendMsg(nullptr, UM_COMMAND, 34, *reinterpret_cast(g_gameModePacketBuffer + 2), *reinterpret_cast(g_gameModePacketBuffer + 6), *reinterpret_cast(g_gameModePacketBuffer + 0xA)); } @@ -24260,7 +24260,7 @@ void CGameMode::ProcessIncomingPackets() { const std::uint16_t location = *reinterpret_cast(packet + 4); if (location) { if (g_session.IsCostumeLocation(location)) { - g_session.UnequipItem2B50(location); + g_session.UnequipCostumeItem(location); } else { g_session.UnequipItem(location, 0); } @@ -24327,7 +24327,7 @@ void CGameMode::ProcessIncomingPackets() { ReceiveBuyingStorePurchase(g_gameModePacketBuffer); break; case ID_ZC_PET_EVOLUTION_RESULT: - this->NotifyResult2571(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); + this->NotifyPetEvolutionResult(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); break; case ID_ZC_ADD_EXCHANGE_ITEM3: ReceiveItemSlotOptions(g_gameModePacketBuffer); @@ -24339,7 +24339,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveHpSpRecovery(g_gameModePacketBuffer, 1); break; case 0xA29: - this->ReceivePacket0A29(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); + this->ReceiveAntiBotChallenge(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); break; case ID_ZC_ACK_CHANGE_TITLE: this->ReceiveJobTitle(g_gameModePacketBuffer[0x2], *reinterpret_cast(g_gameModePacketBuffer + 0x3)); @@ -24353,7 +24353,7 @@ void CGameMode::ProcessIncomingPackets() { *reinterpret_cast(g_gameModePacketBuffer + 0x8)); break; case 0xA4A: - this->NotifyWindow4F258(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); + this->NotifyPrivateAirplaneResult(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); break; case 0xA4B: this->RequestLocalMapMove(reinterpret_cast(g_gameModePacketBuffer + 0x2), @@ -24374,7 +24374,7 @@ void CGameMode::ProcessIncomingPackets() { this->NotifyCaptchaRegistered(); break; case ID_ZC_ACK_APPLY_MACRO_DETECTOR: - this->NotifyResult2877(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); + this->NotifyCaptchaRegistrationResult(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); break; case ID_ZC_APPLY_MACRO_DETECTOR: this->BeginCaptchaImage(*reinterpret_cast(g_gameModePacketBuffer + 0x2), @@ -24387,7 +24387,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveMacroDetectorResult(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); break; case 0xA60: - this->NotifyResult3995(g_gameModePacketBuffer[0x2]); + this->NotifyMacroCheckRemovalResult(g_gameModePacketBuffer[0x2]); break; case ID_ZC_ACK_PREVIEW_MACRO_DETECTOR: this->ReceiveCaptchaPreview(*reinterpret_cast(g_gameModePacketBuffer + 0x2), @@ -24446,7 +24446,7 @@ void CGameMode::ProcessIncomingPackets() { this->RefreshItemListWindow(g_gameModePacketBuffer[0x2], g_gameModePacketBuffer[0x3]); break; case 0xB2B: - this->ReceiveGuildUnknown0114Change(g_gameModePacketBuffer[0x2], *reinterpret_cast(g_gameModePacketBuffer + 0x3), + this->ReceiveGuildAgitOwnershipChange(g_gameModePacketBuffer[0x2], *reinterpret_cast(g_gameModePacketBuffer + 0x3), *reinterpret_cast(g_gameModePacketBuffer + 0x7)); break; case ID_ZC_REQ_ACK_AGIT_INVESTMENT: @@ -24454,7 +24454,7 @@ void CGameMode::ProcessIncomingPackets() { *reinterpret_cast(g_gameModePacketBuffer + 0x7)); break; case ID_ZC_REQ_ACK_MOVE_GUILD_AGIT: - this->ReceivePacket0B2E(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); + this->ReceiveGuildAgitMoveResult(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); break; case 0xB30: this->ReceiveObjectsDisappear((static_cast(*reinterpret_cast(g_gameModePacketBuffer + 0x2) - 4) >> 2), @@ -24478,7 +24478,7 @@ void CGameMode::ProcessIncomingPackets() { CloseAccountLimitedTool(); break; case 0xB54: - this->ReceiveUnknownD79E90(*reinterpret_cast(g_gameModePacketBuffer + 0x2), + this->ReceiveAccountLimitedToolApplyResult(*reinterpret_cast(g_gameModePacketBuffer + 0x2), *reinterpret_cast(g_gameModePacketBuffer + 0x4)); break; case ID_ZC_TARGET_SPIRITS: @@ -24554,7 +24554,7 @@ void CGameMode::ProcessIncomingPackets() { this->ShowSpecialPopup(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); break; case 0xBC2: - this->NotifyResult4013(g_gameModePacketBuffer[0x2], *reinterpret_cast(g_gameModePacketBuffer + 0x3)); + this->NotifyMacroBlacklistCheckResult(g_gameModePacketBuffer[0x2], *reinterpret_cast(g_gameModePacketBuffer + 0x3)); break; case 0xBC5: this->ActivateMacroBlackListCheck(g_gameModePacketBuffer[0x2], *reinterpret_cast(g_gameModePacketBuffer + 0x3)); @@ -24579,7 +24579,7 @@ void CGameMode::ProcessIncomingPackets() { this->ReceiveResultNotice(*reinterpret_cast(g_gameModePacketBuffer + 0x4)); break; case ID_ZC_GM_CHECKER: - this->NotifyResult4138(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); + this->NotifyGmCheckerResult(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); break; case 0xC3C: this->ReceiveToggle128(*reinterpret_cast(g_gameModePacketBuffer + 0x2)); @@ -24851,7 +24851,7 @@ void CGameMode::ProcessIncomingPackets() { *reinterpret_cast(g_gameModePacketBuffer + 0x27)); break; case 0xC08: - this->ReceiveUnknownD264E0(g_gameModePacketBuffer); + this->ReceiveNpcDialogEnd(g_gameModePacketBuffer); this->miniMapTooltipId = -1; this->miniMapTooltipText.assign("", 0); g_windowMgr.CloseWindow(WID_ILLUSTWND); @@ -25017,7 +25017,7 @@ void CGameMode::ProcessIncomingPackets() { g_windowMgr.CloseWindow(WID_MERCHANTITEMSHOPWND); g_windowMgr.CloseWindow(WID_MERCHANTITEMPURCHASEWND); g_session.ClearItems1760And1748(); - g_session.ClearItems1758(); + g_session.ClearMerchantPurchaseItems(); g_windowMgr.Confirm(LookupMessage(MSI_SOUNDEFFECT_ITEMSELLWND), 0, true, false, 0, "Message", 280, 120, 0); g_windowMgr.CloseWindow(WID_MERCHANTSHOPMAKEWND); break; @@ -25026,7 +25026,7 @@ void CGameMode::ProcessIncomingPackets() { g_windowMgr.CloseWindow(WID_MERCHANTITEMSHOPWND); g_windowMgr.CloseWindow(WID_MERCHANTITEMPURCHASEWND); g_session.ClearItems1760And1748(); - g_session.ClearItems1758(); + g_session.ClearMerchantPurchaseItems(); g_windowMgr.CloseWindow(WID_MERCHANTSHOPMAKEWND); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CONNECT_SNS_FAIL_SEND)), 0xFF, 0, 0, 0); break; @@ -25058,8 +25058,8 @@ void CGameMode::ProcessIncomingPackets() { } } } - if (g_windowMgr.window_0428) { - g_windowMgr.window_0428->Invalidate(); + if (g_windowMgr.questDisplayWnd) { + g_windowMgr.questDisplayWnd->Invalidate(); } g_renewQuestMgr->UpdateOngoingQuestInfo(); break; @@ -25108,7 +25108,7 @@ void CGameMode::ProcessIncomingPackets() { item.refiningLevel = 0; item.expireTime = record->expireTime; item.flags[0] = (record->flags >> 1) & 1; - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } g_session.RefreshItem1740Window(); break; @@ -25133,7 +25133,7 @@ void CGameMode::ProcessIncomingPackets() { item.refiningLevel = 0; item.expireTime = record->expireTime; item.flags[0] = (record->flags >> 1) & 1; - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } g_session.RefreshItem1738Window(); break; @@ -25159,7 +25159,7 @@ void CGameMode::ProcessIncomingPackets() { item.bindOnEquip = record->bindOnEquip; item.sprite = record->look; item.flags[0] = (record->flags >> 2) & 1; - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } g_session.RefreshItem1740Window(); break; @@ -25186,7 +25186,7 @@ void CGameMode::ProcessIncomingPackets() { item.bindOnEquip = record->bindOnEquip; item.sprite = record->look; item.flags[0] = (record->flags >> 2) & 1; - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } g_session.RefreshItem1738Window(); break; @@ -25231,8 +25231,8 @@ void CGameMode::ProcessIncomingPackets() { g_session.RefreshHomunculusInfo(); *reinterpret_cast(g_session.companionSkillPoints) = *reinterpret_cast(g_gameModePacketBuffer + 0x49); g_session.InvalidateWindowFrames(); - if (g_windowMgr.window_03C4) { - g_windowMgr.window_03C4->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.homunculusSkillWnd) { + g_windowMgr.homunculusSkillWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } reinterpret_cast(g_session.companionTargetState)[1] = *reinterpret_cast(g_gameModePacketBuffer + 0x4B); break; @@ -25273,7 +25273,7 @@ void CGameMode::ProcessIncomingPackets() { item.type = entry[4]; item.id = -1; item.identified = 1; - g_session.AddItem1718(item, *reinterpret_cast(entry + 9), + g_session.AddShopItem(item, *reinterpret_cast(entry + 9), static_cast(*reinterpret_cast(entry + 0xD) / 10)); } UIWindow *window = g_windowMgr.EnsureWindow(WID_PARAITEMSHOPWND); diff --git a/Source/Client/Mode/LoginMode.cpp b/Source/Client/Mode/LoginMode.cpp index 802226fd0..5f1424c35 100644 --- a/Source/Client/Mode/LoginMode.cpp +++ b/Source/Client/Mode/LoginMode.cpp @@ -403,7 +403,7 @@ void CLoginMode::SubD8D4F0(int) { // OFFSET: 0x00D8D500 // FUNCTION: fn_22266 void CLoginMode::SubD8D500(const char* packet) { - UIWindow* window = g_windowMgr.window_03D4; + UIWindow* window = g_windowMgr.newSelectCharWnd; switch (*reinterpret_cast(packet + 2)) { case 0: g_windowMgr.Confirm(LookupMessage(MSI_CHANGE_NAME_SUCCESS), 0, true, false, 0, "Message", 280, 120, 0); @@ -412,7 +412,7 @@ void CLoginMode::SubD8D500(const char* packet) { } return; case 1: - if (g_windowMgr.Confirm(LookupMessage(MSI_ALREADY_CHANGED_NAME), 0, true, true, 0, "Message", 280, 120, 0) == 0xB8 && g_windowMgr.window_03DC) { + if (g_windowMgr.Confirm(LookupMessage(MSI_ALREADY_CHANGED_NAME), 0, true, true, 0, "Message", 280, 120, 0) == 0xB8 && g_windowMgr.changeNameWnd) { g_windowMgr.CloseWindow(WID_CHANGENAMEWND); } return; @@ -425,7 +425,7 @@ void CLoginMode::SubD8D500(const char* packet) { } return; case 3: - if (g_windowMgr.Confirm(LookupMessage(MSI_CHANGE_NAME_FAILURE), 0, true, true, 0, "Message", 280, 120, 0) == 0xB8 && g_windowMgr.window_03DC) { + if (g_windowMgr.Confirm(LookupMessage(MSI_CHANGE_NAME_FAILURE), 0, true, true, 0, "Message", 280, 120, 0) == 0xB8 && g_windowMgr.changeNameWnd) { g_windowMgr.CloseWindow(WID_CHANGENAMEWND); } return; @@ -438,12 +438,12 @@ void CLoginMode::SubD8D500(const char* packet) { } return; case 5: - if (g_windowMgr.Confirm(LookupMessage(MSI_FAILED_RENAME_BELONGS_TO_GUILD), 0, true, true, 0, "Message", 280, 120, 0) == 0xB8 && g_windowMgr.window_03DC) { + if (g_windowMgr.Confirm(LookupMessage(MSI_FAILED_RENAME_BELONGS_TO_GUILD), 0, true, true, 0, "Message", 280, 120, 0) == 0xB8 && g_windowMgr.changeNameWnd) { g_windowMgr.CloseWindow(WID_CHANGENAMEWND); } return; case 6: - if (g_windowMgr.Confirm(LookupMessage(MSI_FAILED_RENAME_BELONGS_TO_PARTY), 0, true, true, 0, "Message", 280, 120, 0) == 0xB8 && g_windowMgr.window_03DC) { + if (g_windowMgr.Confirm(LookupMessage(MSI_FAILED_RENAME_BELONGS_TO_PARTY), 0, true, true, 0, "Message", 280, 120, 0) == 0xB8 && g_windowMgr.changeNameWnd) { g_windowMgr.CloseWindow(WID_CHANGENAMEWND); } return; @@ -472,7 +472,7 @@ void CLoginMode::SubD8D500(const char* packet) { } return; case 10: - if (g_windowMgr.Confirm(LookupMessage(MSI_FAILED_RENAME_UNKOWN), 0, true, true, 0, "Message", 280, 120, 0) == 0xB8 && g_windowMgr.window_03DC) { + if (g_windowMgr.Confirm(LookupMessage(MSI_FAILED_RENAME_UNKOWN), 0, true, true, 0, "Message", 280, 120, 0) == 0xB8 && g_windowMgr.changeNameWnd) { g_windowMgr.CloseWindow(WID_CHANGENAMEWND); } return; @@ -707,7 +707,7 @@ void CLoginMode::SubD8EDC0(int) { // OFFSET: 0x00D8EDD0 // FUNCTION: fn_22277 void CLoginMode::ReceiveCharacterResult(const CharacterResultPacket* packet) { - UIWindow* window = g_windowMgr.window_03D4; + UIWindow* window = g_windowMgr.newSelectCharWnd; int message; switch (packet->result) { case 0: @@ -1016,7 +1016,7 @@ void CLoginMode::OnUpdateEx(int value) { GetRenderSystemHolder()->TestDevice(); g_windowMgr.InvalidateAll(); CBitmapRes* bitmap = reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str()))); - g_windowMgr.SetSurface0478(bitmap); + g_windowMgr.SetBackgroundSurface(bitmap); } if (g_isAppActive == 0 && GetRenderSystemHolder()->IsWindowed()) { @@ -1031,10 +1031,10 @@ void CLoginMode::OnUpdateEx(int value) { g_serviceType == 20) { g_windowMgr.DrawLoginOverlay(); if (this->cursorType == 0) { - g_windowMgr.CenterSurface0478(); + g_windowMgr.DrawCenteredBackground(); } } else { - g_windowMgr.CenterSurface0478(); + g_windowMgr.DrawCenteredBackground(); } g_windowMgr.DrawWindows(); this->DrawCursor(); @@ -1062,14 +1062,14 @@ void CLoginMode::SubD97780(int value) { } if (g_serviceType == 5 || g_serviceType == 7) { if (static_cast(timeGetTime()) > this->otpStarted + 0x3A98) { - if (this->window_6F14 == nullptr) { - this->window_6F14 = g_windowMgr.EnsureWindow(WID_WAITWND); - if (this->window_6F14 == nullptr) { + if (this->waitWnd == nullptr) { + this->waitWnd = g_windowMgr.EnsureWindow(WID_WAITWND); + if (this->waitWnd == nullptr) { break; } } - this->window_6F14->SendMsg(nullptr, UM_ENABLE_CANCEL, 0, 0, 0, 0); - this->window_6F14->Invalidate(); + this->waitWnd->SendMsg(nullptr, UM_ENABLE_CANCEL, 0, 0, 0, 0); + this->waitWnd->Invalidate(); } } break; @@ -1166,7 +1166,7 @@ void CLoginMode::Update() { GetRenderSystemHolder()->TestDevice(); g_windowMgr.InvalidateAll(); CBitmapRes* bitmap = reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str()))); - g_windowMgr.SetSurface0478(bitmap); + g_windowMgr.SetBackgroundSurface(bitmap); } if (g_isAppActive == 0 && GetRenderSystemHolder()->IsWindowed()) { @@ -1181,10 +1181,10 @@ void CLoginMode::Update() { g_serviceType == 20 || g_serviceType == 15) { g_windowMgr.DrawLoginOverlay(); if (this->cursorType == 0) { - g_windowMgr.CenterSurface0478(); + g_windowMgr.DrawCenteredBackground(); } } else { - g_windowMgr.CenterSurface0478(); + g_windowMgr.DrawCenteredBackground(); } g_windowMgr.DrawWindows(); this->DrawCursor(); @@ -1590,8 +1590,8 @@ ConnectionEndpoint g_zoneServerEndpoint; void CLoginMode::ConnectZoneServer(std::uint32_t gid, std::string mapName, std::uint32_t ip, int port, std::string host) { g_session.m_gid = gid; g_modeMgr.gameMode->SendMsg(LMM_SELECT_CHARACTER, static_cast(g_selectedSlotIndex), 0, 0, 0); - if (g_windowMgr.window_03D4) { - g_windowMgr.Schedule(g_windowMgr.window_03D4); + if (g_windowMgr.newSelectCharWnd) { + g_windowMgr.Schedule(g_windowMgr.newSelectCharWnd); } std::string name = mapName; @@ -1827,7 +1827,7 @@ void CLoginMode::Initialize(const char* name) { g_soundMgr->PlayStream("bgm\\01.mp3", 0, false); } this->slotExtension = CharacterSlotExtension(); - g_session.ClearAllItems1784(); + g_session.ClearAllInventoryCategories(); g_entryQueueMgr->ready = 0; g_entryQueueMgr->current = nullptr; g_session.ClearShortcutSlots(); @@ -1898,7 +1898,7 @@ void CLoginMode::Zc_Accept_Enter3(const AcceptEnterPositionPacket* packet) { g_pingLogFirstTick = 0; } - g_session.SetUnknown5C1C(0); + g_session.SetReplayPacketMode(0); g_session.characterNames.clear(); for (unsigned int i = 0; i < 68; ++i) { std::string name = this->characters[i].name; @@ -2239,7 +2239,7 @@ CLoginMode::CLoginMode() : wallpaperName(), noticeCommands(), unknown_6F2C(), ac this->savedInlineCharset = g_inlineCharset; g_inlineCharset = 0; this->selectedAccount = -1; - this->window_6F14 = nullptr; + this->waitWnd = nullptr; this->passwordRetryCount = 0; SecureZeroMemory(this->characters, sizeof(this->characters)); this->receivedCharacterCount = 0; @@ -2631,7 +2631,7 @@ void CLoginMode::PollNetworkStatus() { break; } - if (UIWindow* window = g_windowMgr.window_03D4) { + if (UIWindow* window = g_windowMgr.newSelectCharWnd) { window->SendMsg(nullptr, UM_COMMAND, ID_CHANGE_NAME, 0, 0, 0); } break; @@ -2775,7 +2775,7 @@ void CLoginMode::PollNetworkStatus() { case 0: g_windowMgr.CloseWindow(WID_SECONDPASSWORDINPUTWND); g_windowMgr.Confirm(LookupMessage(MSI_SECOND_PASSWDRD_NOT_AVAILABLE_SUCCESS), 0, true, false, 0, "Message", 280, 120, 0); - static_cast(g_windowMgr.window_03D4)->EnableButtonById(0x1A2); + static_cast(g_windowMgr.newSelectCharWnd)->EnableButtonById(0x1A2); g_session.m_passwordWndMode = 1; break; case 1: @@ -2791,7 +2791,7 @@ void CLoginMode::PollNetworkStatus() { case 0: g_windowMgr.CloseWindow(WID_SECONDPASSWORDINPUTWND); g_windowMgr.Confirm(LookupMessage(MSI_SECOND_PASSWDRD_AVAILABLE_SUCCESS), 0, true, false, 0, "Message", 280, 120, 0); - static_cast(g_windowMgr.window_03D4)->DisableButtonById(0x1A2); + static_cast(g_windowMgr.newSelectCharWnd)->DisableButtonById(0x1A2); break; case 1: g_windowMgr.CloseWindow(WID_SECONDPASSWORDINPUTWND); @@ -3032,8 +3032,8 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, StringFormat(reinterpret_cast(buffer + 8), 10, static_cast(-1), reinterpret_cast(&this->loginCredentials[0x80])); *reinterpret_cast(buffer + 2) = 14; GetRagConnection().Send(*reinterpret_cast(buffer + 2), buffer); - this->window_6F14 = g_windowMgr.EnsureWindow(WID_WAITWND); - static_cast(this->window_6F14)->SetMessage(LookupMessage(MSI_WAITING_RESPONSE_FROM_SERVER), 16, 1); + this->waitWnd = g_windowMgr.EnsureWindow(WID_WAITWND); + static_cast(this->waitWnd)->SetMessage(LookupMessage(MSI_WAITING_RESPONSE_FROM_SERVER), 16, 1); _freea(buffer); } return 0; @@ -3071,8 +3071,8 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, packet.id = 0xAD0; memcpy_s(packet.code, sizeof(packet.code), &this->loginCredentials[0x80], sizeof(packet.code)); GetRagConnection().Send(reinterpret_cast(&GetRagConnection())->FixedLength(packet.id), &packet); - this->window_6F14 = g_windowMgr.EnsureWindow(WID_WAITWND); - static_cast(this->window_6F14)->SetMessage(LookupMessage(MSI_WAITING_RESPONSE_FROM_SERVER), 16, 1); + this->waitWnd = g_windowMgr.EnsureWindow(WID_WAITWND); + static_cast(this->waitWnd)->SetMessage(LookupMessage(MSI_WAITING_RESPONSE_FROM_SERVER), 16, 1); return 0; } case LMM_QUERY_LAST_CHARACTER_INFO: @@ -3714,8 +3714,8 @@ void CLoginMode::OnChangeState(int value) { StringFormat(packet.extra, sizeof(packet.extra), static_cast(-1), extraFormat.Text(), reinterpret_cast(this->loginExtra)); GetRagConnection().Send(sizeof(packet), &packet); this->otpStarted = timeGetTime(); - this->window_6F14 = g_windowMgr.EnsureWindow(WID_WAITWND); - static_cast(this->window_6F14)->SetMessage(LookupMessage(MSI_WAITING_RESPONSE_FROM_SERVER), 16, 1); + this->waitWnd = g_windowMgr.EnsureWindow(WID_WAITWND); + static_cast(this->waitWnd)->SetMessage(LookupMessage(MSI_WAITING_RESPONSE_FROM_SERVER), 16, 1); break; } case 2: @@ -3726,7 +3726,7 @@ void CLoginMode::OnChangeState(int value) { g_guildMgr->m_guilds.clear(); g_emblemDataMgr->RefreshUrls(*g_session.m_hotkeyScript, *g_session.m_hotkeyScript, g_serviceHost, g_servicePort, g_serviceOverrideKey); this->wallpaperName = g_loginWallpaperName; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); if (!g_session.characterRenameEnabled) { if (g_session.m_loginModeFlag == true) { this->otpStarted = timeGetTime(); @@ -3755,7 +3755,7 @@ void CLoginMode::OnChangeState(int value) { case 6: { Replay::Instance().SetState(1); this->wallpaperName = g_loginWallpaperName; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); UISelectServerWnd* window = static_cast(g_windowMgr.EnsureWindow(WID_SELECTSERVERWND)); const std::uint8_t countNameSource[] = {0x39, 0xC2, 0xCA, 0x4E, 0x66, 0x01, 0xB7, 0x2A, 0x25, 0x97}; thread_local EncryptedName countName(countNameSource); @@ -3842,64 +3842,64 @@ void CLoginMode::OnChangeState(int value) { g_session.cartCount = 0; g_session.cartWeight = 0; g_session.petJob = -1; - g_session.SetUnknown16EC(0); + g_session.SetEquippedArrowIndex(0); g_session.guildLeader = 0; g_renewQuestMgr->m_ongoingQuests.clear(); g_session.ClearAchievements(); g_nProtectGameGuardMgr->IncrementCounter(); this->wallpaperName = g_loginWallpaperName; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); g_rodexMailStore->Clear(); if (UINewSelectCharWnd* window = dynamic_cast(static_cast(g_windowMgr.EnsureWindow(WID_NEWSELECTCHARWND)))) { - window->m_unknown13C = false; + window->m_gameStartPending = false; } - g_session.ClearEntryList5BD4(); + g_session.ClearStoreSearchResults(); g_session.ClearPairValues(1, 1, 1); g_windowMgr.CloseWindow(WID_REPLAYRECCONTROLWND); g_windowMgr.CloseWindow(WID_ROULLETTEWND); - g_session.RestoreItems5C68(); + g_session.RestoreSelectionItems(); g_session.ClearItemQuantities(); g_session.ClearInventory(); g_session.ResetEquipment(); - g_session.ResetItems2B50(); - g_session.ClearItems1740(); - g_session.ResetItems61B8(); - g_session.ResetItems6B68(); + g_session.ResetCostumeItems(); + g_session.ClearMerchantShopItems(); + g_session.ResetSwapCostumeItems(); + g_session.ResetSwapEquippedItems(); switch (g_session.m_passwordWndMode) { case 2: g_session.m_passwordInputAlternate = false; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); g_windowMgr.EnsureWindow(WID_SECONDPASSWORDINPUTWND); break; case 3: g_session.m_passwordInputAlternate = false; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); g_windowMgr.EnsureWindow(WID_SECONDPASSWORDINPUTWND); g_windowMgr.secondPasswordInputWnd->SendMsg(nullptr, UM_COMMAND, ID_CHANGE_STORE_PASSWORD, 0, 0, 0); break; case 4: g_session.m_passwordInputAlternate = true; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); g_windowMgr.EnsureWindow(WID_SECONDPASSWORDEDITWND); g_windowMgr.secondPasswordEditWnd->SendMsg(nullptr, UM_COMMAND, ID_CHANGE_STORE_PASSWORD, 0, 0, 0); g_windowMgr.secondPasswordEditWnd->SendMsg(nullptr, UM_COMMAND, ID_OK, 1, 0, 0); break; case 5: g_session.m_passwordInputAlternate = true; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); g_windowMgr.EnsureWindow(WID_SECONDPASSWORDEDITWND); break; } break; case 8: this->wallpaperName = g_loginWallpaperName; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); g_windowMgr.EnsureWindow(WID_NEWMAKECHARWND); break; case 4: { g_playerNameDictionary->Clear(); this->wallpaperName = g_loginWallpaperName; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); if (!std::strstr(g_session.clientVersion, "Dev")) { const std::uint8_t hostSource[] = {0xBA, 0x29, 0xF8, 0xC8, 0x58, 0xE4, 0x88, 0x1E, 0xFF, 0x29, 0xF6, 0x82, 0x57, 0xE6, 0x99, 0x40, 0xBA, 0x75, 0xF4, 0x8A, 0x17, 0xEC, 0x99, 0x15, 0xE7, 0x62, 0xA7, 0xD5, 0x39}; @@ -3970,7 +3970,7 @@ void CLoginMode::OnChangeState(int value) { break; case 5: { this->wallpaperName = g_loginWallpaperName; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); g_session.m_partyBooking.Reset(); GetRagConnection().Close(); this->connectionReady = GetRagConnection().Connect(*reinterpret_cast(&g_charServerEndpoint)); @@ -3999,7 +3999,7 @@ void CLoginMode::OnChangeState(int value) { } case 10: { this->wallpaperName = g_loginWallpaperName; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); MakeCharacterPacket packet; packet.id = 0xA39; std::memcpy(packet.name, g_charInfo.name, sizeof(packet.name)); @@ -4016,7 +4016,7 @@ void CLoginMode::OnChangeState(int value) { } case 11: { this->wallpaperName = g_loginWallpaperName; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); DeleteCharacterPacket packet; packet.id = 0x829; std::strncpy(packet.code, reinterpret_cast(this->billingInfo), sizeof(packet.code)); @@ -4042,7 +4042,7 @@ void CLoginMode::OnChangeState(int value) { } case 9: { this->wallpaperName = g_loginWallpaperName; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); SelectCharacterPacket packet; packet.id = 0x66; packet.slot = static_cast(g_selectedSlotIndex); @@ -4056,7 +4056,7 @@ void CLoginMode::OnChangeState(int value) { g_runeSystemMgr->Reset(); g_session.memorialWindowOpen = 0; this->wallpaperName = g_loginWallpaperName; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); this->connectionReady = GetRagConnection().Connect(g_zoneServerEndpoint); if (!this->connectionReady) { GetRagConnection().Close(); @@ -4090,7 +4090,7 @@ void CLoginMode::OnChangeState(int value) { packet.aid = g_session.m_aid; packet.gid = g_session.m_gid; packet.authCode = account.authCode; - packet.sex = static_cast(g_session.SyncUnknown0E98()); + packet.sex = static_cast(g_session.GetCurrentSex()); GetRagConnection().Send(reinterpret_cast(&GetRagConnection())->FixedLength(packet.packetType), &packet); g_session.SetOption(17, 1, 0); GetRagConnection().SetBlock(1); @@ -4102,9 +4102,9 @@ void CLoginMode::OnChangeState(int value) { g_statusRefreshSuppressed = 0; g_skillTooltipActive = 0; g_session.petJob = -1; - g_session.SetUnknown16EC(0); + g_session.SetEquippedArrowIndex(0); this->wallpaperName = g_loginWallpaperName; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); g_windowMgr.EnsureWindow(WID_SELCHARFORUSERVERWND); break; case 29: { @@ -4119,7 +4119,7 @@ void CLoginMode::OnChangeState(int value) { 0xC5, 0x38, 0xD6, 0x43, 0x81, 0xAA, 0x6D, 0xB8, 0xAB, 0x61, 0xD5, 0x5C, 0x9F, 0xC3}; thread_local EncryptedName wallpaper(wallpaperSource); this->wallpaperName = std::string(wallpaper.Text()); - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); g_windowMgr.EnsureWindow(WID_NOTICECONFIRMWND)->SendMsg(nullptr, UM_SET_TARGET, 10026, 0, 0, 0); break; } @@ -4143,7 +4143,7 @@ void CLoginMode::OnChangeState(int value) { this->SendMsg(LMM_SELECT_REPLAY_DATA, 0, 0, 0, 0); case 27: { this->wallpaperName = g_loginWallpaperName; - g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); + g_windowMgr.SetBackgroundSurface(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); UISelectReplayDataWnd* window = static_cast(g_windowMgr.EnsureWindow(WID_SELECTREPLAYDATAWND)); ReplayFileList::Instance().Refresh(); const int count = static_cast(ReplayFileList::Instance().files.size()); @@ -4169,14 +4169,14 @@ void CLoginMode::OnChangeState(int value) { g_pakRegistry.ApplyAuxiliary(digest, sizeof(digest)); SecureZeroMemory(digest, sizeof(digest)); g_windowMgr.CloseWindow(WID_ROULLETTEWND); - g_session.RestoreItems5C68(); + g_session.RestoreSelectionItems(); g_session.ClearItemQuantities(); g_session.ClearInventory(); g_session.ResetEquipment(); - g_session.ResetItems2B50(); - g_session.ClearItems1740(); - g_session.ResetItems61B8(); - g_session.ResetItems6B68(); + g_session.ResetCostumeItems(); + g_session.ClearMerchantShopItems(); + g_session.ResetSwapCostumeItems(); + g_session.ResetSwapEquippedItems(); Replay::Instance().SetState(6); ReplayHeader header = Replay::Instance().header; g_session.SetPlayerNameKey(reinterpret_cast(header.characterName)); diff --git a/Source/Client/Replay.cpp b/Source/Client/Replay.cpp index 01d521121..deda4ad6c 100644 --- a/Source/Client/Replay.cpp +++ b/Source/Client/Replay.cpp @@ -872,7 +872,7 @@ ReplayFileList& ReplayFileList::Instance() { // OFFSET: 0x00B87110 // FUNCTION: fn_19339 bool Replay::SetHeaderInfo( - std::uint32_t key0, std::uint32_t key1, const char* characterName, const char* mapName, int accountId, int cellX, int cellY, int unknown0078, int service, + std::uint32_t key0, std::uint32_t key1, const char* characterName, const char* mapName, int accountId, int cellX, int cellY, int playerDirection, int service, int serviceType, int unknown0014 ) { if (!characterName || !mapName) { @@ -888,7 +888,7 @@ bool Replay::SetHeaderInfo( this->header.accountId = accountId; this->header.cellX = cellX; this->header.cellY = cellY; - this->header.playerDirection = unknown0078; + this->header.playerDirection = playerDirection; this->header.signature = 0x52414705; this->header.closingSignature = 0x52414705; return true; diff --git a/Source/Client/Replay.h b/Source/Client/Replay.h index 960284737..131f28737 100644 --- a/Source/Client/Replay.h +++ b/Source/Client/Replay.h @@ -149,7 +149,7 @@ public: bool AllowsEvent(int event) const; void Rewind(); bool SetHeaderInfo( - std::uint32_t key0, std::uint32_t key1, const char* characterName, const char* mapName, int accountId, int cellX, int cellY, int unknown0078, int service, + std::uint32_t key0, std::uint32_t key1, const char* characterName, const char* mapName, int accountId, int cellX, int cellY, int playerDirection, int service, int serviceType, int unknown0014 ); void IncreaseSpeed(); diff --git a/Source/Client/Session.cpp b/Source/Client/Session.cpp index ef3d0d59f..efaab40df 100644 --- a/Source/Client/Session.cpp +++ b/Source/Client/Session.cpp @@ -120,7 +120,7 @@ int CSession::MercSkillLevel(int skillId) const { // OFFSET: 0x00E13B00 // FUNCTION: fn_23826 -int CSession::SyncUnknown0E98() { +int CSession::GetCurrentSex() { if (this->cachedSex != this->currentSex) { this->cachedSex = this->currentSex; } @@ -226,7 +226,7 @@ bool CSession::IsSpecialMonsterJob(int job) const { // OFFSET: 0x00E3D320 // FUNCTION: fn_24187 -bool CSession::IsWithinUnknown59C0(int value) const { +bool CSession::IsRestrictedCharacterSlot(int value) const { if (value == -1) { return false; } @@ -236,7 +236,7 @@ bool CSession::IsWithinUnknown59C0(int value) const { // OFFSET: 0x00E3D390 // FUNCTION: fn_24189 -__declspec(noinline) int CSession::HasItem61B8(std::uint32_t id) const { +__declspec(noinline) int CSession::HasSwapEquipmentItem(std::uint32_t id) const { if (id == 0) { return 0; } @@ -285,7 +285,7 @@ char* CSession::ConvertTooltipText(const char* source, char* output) const { // OFFSET: 0x00DDE890 // FUNCTION: fn_23402 -ITEM_INFO CSession::FindItem1768(std::uint32_t id) const { +ITEM_INFO CSession::FindMerchantPurchaseSavedItem(std::uint32_t id) const { for (auto item = this->merchantPurchaseSavedItems.begin(); item != this->merchantPurchaseSavedItems.end(); ++item) { if (item->identity[1] == id) { return *item; @@ -329,7 +329,7 @@ int CSession::GetItem1768Quantity(std::uint32_t id) const { // OFFSET: 0x00DDE9F0 // FUNCTION: fn_23405 -ITEM_INFO CSession::FindItem1740(std::uint32_t id) const { +ITEM_INFO CSession::FindMerchantShopItem(std::uint32_t id) const { for (auto item = this->merchantShopItems.begin(); item != this->merchantShopItems.end(); ++item) { if (item->identity[1] == id) { return *item; @@ -373,7 +373,7 @@ int CSession::GetItem1740Quantity(std::uint32_t id) const { // OFFSET: 0x00DDEB50 // FUNCTION: fn_23408 -ITEM_INFO CSession::FindItem1750(std::uint32_t id) const { +ITEM_INFO CSession::FindMerchantMyShopItem(std::uint32_t id) const { for (auto item = this->merchantMyShopItems.begin(); item != this->merchantMyShopItems.end(); ++item) { if (item->identity[1] == id) { return *item; @@ -417,7 +417,7 @@ int CSession::GetItem1750Quantity(std::uint32_t id) const { // OFFSET: 0x00DDECB0 // FUNCTION: fn_23411 -ITEM_INFO CSession::FindItem1758(std::uint32_t id) const { +ITEM_INFO CSession::FindMerchantPurchaseItem(std::uint32_t id) const { for (const ITEM_INFO& item : this->merchantPurchaseItems) { if (item.identity[1] == id) { return item; @@ -461,7 +461,7 @@ ITEM_INFO CSession::GetItem1758At(int index) const { // OFFSET: 0x00DDEEB0 // FUNCTION: fn_23414 -ITEM_INFO CSession::FindItem1760(std::uint32_t id) const { +ITEM_INFO CSession::FindMerchantHopeToSellItem(std::uint32_t id) const { for (auto item = this->merchantHopeToSellItems.begin(); item != this->merchantHopeToSellItems.end(); ++item) { if (item->identity[1] == id) { return *item; @@ -501,7 +501,7 @@ int CSession::GetItem1760Quantity(std::uint32_t id) const { // OFFSET: 0x00DDF120 // FUNCTION: fn_23419 -ITEM_INFO CSession::FindItem1770(std::uint32_t id) const { +ITEM_INFO CSession::FindFilteredInventoryItem(std::uint32_t id) const { for (auto item = this->filteredInventoryItems.begin(); item != this->filteredInventoryItems.end(); ++item) { if (item->identity[1] == id) { return *item; @@ -544,7 +544,7 @@ ITEM_INFO CSession::GetItem1748At(int index) const { // OFFSET: 0x00DF9C50 // FUNCTION: fn_23563 -bool CSession::HasItem1718(std::uint32_t id) const { +bool CSession::HasShopItemIdentity(std::uint32_t id) const { for (const ITEM_INFO& item : this->shopItems) { if (item.identity[1] == id) { return true; @@ -606,7 +606,7 @@ int CSession::GetItem1760QuantityByItemId(const char* itemId) const { // OFFSET: 0x00DDF2D0 // FUNCTION: fn_23422 -SessionRecord0734 CSession::FindRecord0734(int id) const { +SessionRecord0734 CSession::FindMiniPartyRecord(int id) const { for (const SessionRecord0734& record : this->miniPartyRecords) { if (record.id == id) { return record; @@ -638,7 +638,7 @@ const char* CSession::GetBgmFileName(const char* rswName) { // OFFSET: 0x00DF9CD0 // FUNCTION: fn_23565 -bool CSession::HasItem17D4(int itemId) const { +bool CSession::HasInventorySearchItem(int itemId) const { if (!this->inventoryCategories[10].empty()) { for (std::list::const_iterator item = this->inventoryCategories[10].begin(); item != this->inventoryCategories[10].end(); ++item) { @@ -665,7 +665,7 @@ int CSession::IsFriendName(const char* name) const { // OFFSET: 0x00E1DFB0 // FUNCTION: fn_23889 -int CSession::GetSceneUnknown004C() const { +int CSession::GetSiegeMode() const { return static_cast(g_modeMgr.GetGameMode())->scene->isSiegeMode; } @@ -690,7 +690,7 @@ bool CSession::IsNumberWithCommas(char* text) { // OFFSET: 0x00DDC050 // FUNCTION: fn_23361 -int CSession::FindUnknown0708(int key) const { +int CSession::FindSkillEffectId(int key) const { auto found = this->skillEffectIds.find(key); if (this->skillEffectIds.end() != found) { return found->second; @@ -701,7 +701,7 @@ int CSession::FindUnknown0708(int key) const { // OFFSET: 0x00DDC0A0 // FUNCTION: fn_23362 -int CSession::FindUnknown0700(int key) const { +int CSession::FindSkillFollowEffect(int key) const { auto found = this->skillFollowEffects.find(key); if (this->skillFollowEffects.end() != found) { return found->second; @@ -856,7 +856,7 @@ ITEM_INFO* CSession::GetEquippedItem(const ITEM_INFO* item) { // OFFSET: 0x00DDC580 // FUNCTION: fn_23367 -ITEM_INFO CSession::FindItem2B50(std::uint32_t id, int* index) const { +ITEM_INFO CSession::FindCostumeItem(std::uint32_t id, int* index) const { for (int i = 0; i < 10; ++i) { if (this->costumeItems[i].identity[1] == id) { *index = i; @@ -869,7 +869,7 @@ ITEM_INFO CSession::FindItem2B50(std::uint32_t id, int* index) const { // OFFSET: 0x00DDC7A0 // FUNCTION: fn_23369 -ITEM_INFO CSession::FindItem17F0(std::uint32_t id, int* index) const { +ITEM_INFO CSession::FindEquippedItem(std::uint32_t id, int* index) const { for (int i = 0; i < 10; ++i) { if (this->equippedItems[i].identity[1] == id) { *index = i; @@ -1327,7 +1327,7 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) { message.append(tokenizer[index]); message.append(" "); } - g_windowMgr.SetUnknown04DC(message.c_str()); + g_windowMgr.SetChatInputText(message.c_str()); } return -1; } @@ -1338,7 +1338,7 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) { if (space != std::string::npos) { parts[0] = command.erase(0, space + 1); } else { - g_windowMgr.SetUnknown04DC(LookupMessage(MSI_NOWARPSKILL2)); + g_windowMgr.SetChatInputText(LookupMessage(MSI_NOWARPSKILL2)); } return -1; } @@ -1349,7 +1349,7 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) { if (space != std::string::npos) { parts[0] = command.erase(0, space + 1); } else { - g_windowMgr.SetUnknown04DC(LookupMessage(MSI_PARA_PURCHASE_ITEM_WEIGHT)); + g_windowMgr.SetChatInputText(LookupMessage(MSI_PARA_PURCHASE_ITEM_WEIGHT)); } return -1; } @@ -1507,7 +1507,7 @@ ITEM_INFO CSession::GetItemSlot(int index) const { // OFFSET: 0x00DDFAC0 // FUNCTION: fn_23443 -ITEM_INFO CSession::GetItem21A0(int index) const { +ITEM_INFO CSession::GetAlternateEquippedItemAt(int index) const { if (index == 15) { return ITEM_INFO(0); } @@ -1660,7 +1660,7 @@ const char* CSession::GetMonsterRmaName(int job) const { // OFFSET: 0x00DE08F0 // FUNCTION: fn_23463 -ITEM_INFO CSession::FindItem1730(std::uint32_t id) const { +ITEM_INFO CSession::FindStorageItem(std::uint32_t id) const { for (auto item = this->storageItems.begin(); item != this->storageItems.end(); ++item) { if (item->identity[1] == id) { return *item; @@ -1742,7 +1742,7 @@ const char* CSession::GetHotkeyDescription(int index) const { // OFFSET: 0x00DE0EB0 // FUNCTION: fn_23475 -ITEM_INFO CSession::FindItem1738(std::uint32_t id) const { +ITEM_INFO CSession::FindCartItem(std::uint32_t id) const { for (auto item = this->cartItems.begin(); item != this->cartItems.end(); ++item) { if (item->identity[1] == id) { return *item; @@ -1847,7 +1847,7 @@ bool CSession::IsGuildMemberName(const char* name) const { // OFFSET: 0x00DFA160 // FUNCTION: fn_23571 -bool CSession::IsUnknownName5248(const char* name) const { +bool CSession::IsIndoorMapName(const char* name) const { std::string value(name); const std::size_t position = value.rfind("@"); if (position != std::string::npos && position >= 4) { @@ -1896,7 +1896,7 @@ static_assert(sizeof(PACKET_CZ_USE_SKILL_END) == 4); // OFFSET: 0x00E2ED90 // FUNCTION: fn_24151 -void CSession::AddUnknown7F94(std::uint32_t id) { +void CSession::AddPendingActorName(std::uint32_t id) { this->pendingActorNames.insert(id); } @@ -1922,7 +1922,7 @@ void CSession::ClearNormalItemSlots() { // OFFSET: 0x00E2F540 // FUNCTION: fn_24155 -void CSession::ResetItems6B68() { +void CSession::ResetSwapEquippedItems() { for (int index = 0; index < 10; ++index) { this->swapEquippedItems[index].Reset(); } @@ -1932,7 +1932,7 @@ void CSession::ResetItems6B68() { // OFFSET: 0x00E2F570 // FUNCTION: fn_24156 -void CSession::ResetItems61B8() { +void CSession::ResetSwapCostumeItems() { for (int index = 0; index < 10; ++index) { this->swapCostumeItems[index].Reset(); } @@ -1991,14 +1991,14 @@ std::vector SerializeItems(const std::list& items) { // OFFSET: 0x00E2F9E0 // FUNCTION: fn_24161 -int CSession::GetUnknown8148() const { +int CSession::GetSessionIndex() const { return this->sessionIndex; } // OFFSET: 0x00DFF060 // FUNCTION: fn_23606 -void CSession::RefreshWindow02C8() { - if (UIWindow* window = g_windowMgr.window_02C8) { +void CSession::RefreshMessengerGroupWindow() { + if (UIWindow* window = g_windowMgr.messengerGroupWnd) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } } @@ -2028,14 +2028,14 @@ void CSession::RefreshItem1750Window(int type) { // OFFSET: 0x00DFF120 // FUNCTION: fn_23610 -void CSession::UpdateUnknown1708(int enabled) { +void CSession::UpdateMonsterInfoEnabled(int enabled) { this->monsterInfoEnabled = g_serviceOptions.Get(enabled ? 45 : 46); } // OFFSET: 0x00DFF150 // FUNCTION: fn_23611 void __fastcall RefreshPartyWindows(CSession*) { - if (UIWindow* window = g_windowMgr.window_02C8) { + if (UIWindow* window = g_windowMgr.messengerGroupWnd) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } g_windowMgr.RebuildMiniPartyWindows(); @@ -2044,14 +2044,14 @@ void __fastcall RefreshPartyWindows(CSession*) { // OFFSET: 0x00DFF180 // FUNCTION: fn_23612 void CSession::RefreshItem1738Window() { - if (UIWindow* window = g_windowMgr.window_0288) { + if (UIWindow* window = g_windowMgr.itemStoreWnd) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } } // OFFSET: 0x00DFF1A0 // FUNCTION: fn_23613 -void CSession::EraseRecord0734(int id) { +void CSession::EraseMiniPartyRecord(int id) { for (auto it = this->miniPartyRecords.begin(); it != this->miniPartyRecords.end(); ++it) { if (id == it->id) { this->miniPartyRecords.erase(it); @@ -2100,7 +2100,7 @@ void CSession::SetItem1768Quantity(int index, int quantity) { // OFFSET: 0x00DFF4B0 // FUNCTION: fn_23618 -void CSession::SetUnknown5C1C(int value) { +void CSession::SetReplayPacketMode(int value) { this->replayPacketMode = value; if (UIWindow* window = g_windowMgr.equipWnd) { window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); @@ -2129,7 +2129,7 @@ void CSession::UpdateFriendName(std::uint32_t characterId, const char* name) { // OFFSET: 0x00DFF830 // FUNCTION: fn_23621 -void CSession::SetEquipItem2B50(unsigned int index, const ITEM_INFO& item) { +void CSession::SetCostumeItem(unsigned int index, const ITEM_INFO& item) { if (index <= 9) { this->costumeItems[index] = item; EquipmentProperties::CEquipmentPropertiesMgr::GetInstance()->RefreshWearable(reinterpret_cast(item.identity[3])); @@ -2154,7 +2154,7 @@ void SetMemberFlags(std::uint32_t* flags) { // OFFSET: 0x00DFF8B0 // FUNCTION: fn_23624 -void CSession::SetUnknown16EC(std::uint32_t value) { +void CSession::SetEquippedArrowIndex(std::uint32_t value) { this->equippedArrowIndex = value; this->InvalidateWindowFrames(); @@ -2184,7 +2184,7 @@ void CSession::SetUnknown16EC(std::uint32_t value) { // OFFSET: 0x00DFF9C0 // FUNCTION: fn_23625 -void CSession::SetEquipItem17F0(unsigned int index, const ITEM_INFO& item) { +void CSession::SetEquippedItem(unsigned int index, const ITEM_INFO& item) { if (index <= 9) { this->equippedItems[index] = item; EquipmentProperties::CEquipmentPropertiesMgr::GetInstance()->RefreshWearable(reinterpret_cast(item.identity[3])); @@ -2272,7 +2272,7 @@ void CSession::SetItem1768Unknown0014(int index, std::uint32_t value) { // OFFSET: 0x00DFFC80 // FUNCTION: fn_23631 -void CSession::AddRecord0734(int id, std::uint32_t value) { +void CSession::AddMiniPartyRecord(int id, std::uint32_t value) { SessionRecord0734 record; record.active = 1; record.id = id; @@ -2282,7 +2282,7 @@ void CSession::AddRecord0734(int id, std::uint32_t value) { // OFFSET: 0x00DFFCB0 // FUNCTION: fn_23632 -void CSession::SetUnknown5210(int value) { +void CSession::SetExchangeMoney(int value) { this->exchangeMoney = value; if (UIWindow* window = g_windowMgr.LookupWindow(WID_EXCHANGEUI)) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -2291,7 +2291,7 @@ void CSession::SetUnknown5210(int value) { // OFFSET: 0x00DFFD20 // FUNCTION: fn_23634 -void CSession::SetUnknown5214(int value) { +void CSession::SetOtherExchangeMoney(int value) { this->otherExchangeMoney = value; if (UIWindow* window = g_windowMgr.LookupWindow(WID_EXCHANGEUI)) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -2319,7 +2319,7 @@ void CSession::SetRecord0734Value(int id, std::uint32_t value) { // OFFSET: 0x00E31B20 // FUNCTION: fn_24174 -ITEM_INFO CSession::GetItem6B68(int index) const { +ITEM_INFO CSession::GetSwapEquippedItem(int index) const { if (index == 15) { return ITEM_INFO(0); } @@ -2333,7 +2333,7 @@ ITEM_INFO CSession::GetItem6B68(int index) const { // OFFSET: 0x00E31BB0 // FUNCTION: fn_24175 -ITEM_INFO CSession::GetItem61B8(int index) const { +ITEM_INFO CSession::GetSwapCostumeItem(int index) const { if (index == 15) { return LookupClientItemByIdentity(this->m_inventoryItems, this->swapArrowIndex); } @@ -2383,18 +2383,18 @@ void CSession::RefreshHpSpWindows() { // OFFSET: 0x00DF9460 // FUNCTION: fn_23515 void CSession::RefreshHomunculusInfo() { - if (g_modeMgr.GetGameMode() && g_windowMgr.window_03C0) { - g_windowMgr.window_03C0->Invalidate(); - g_windowMgr.window_03C0->InvalidateChildren(); + if (g_modeMgr.GetGameMode() && g_windowMgr.homunInfoWnd) { + g_windowMgr.homunInfoWnd->Invalidate(); + g_windowMgr.homunInfoWnd->InvalidateChildren(); } } // OFFSET: 0x00DF94D0 // FUNCTION: fn_23517 void CSession::RefreshMercenaryInfo() { - if (g_modeMgr.GetGameMode() && g_windowMgr.window_03C8) { - g_windowMgr.window_03C8->Invalidate(); - g_windowMgr.window_03C8->InvalidateChildren(); + if (g_modeMgr.GetGameMode() && g_windowMgr.mercenaryInfoWnd) { + g_windowMgr.mercenaryInfoWnd->Invalidate(); + g_windowMgr.mercenaryInfoWnd->InvalidateChildren(); } } @@ -2415,7 +2415,7 @@ bool CSession::IsBlankString(const char* text) const { // OFFSET: 0x00DF9AA0 // FUNCTION: fn_23561 -bool CSession::HasNoUnknown1784Items() const { +bool CSession::AreInventoryCategoriesEmpty() const { for (int i = 0; i < 11; ++i) { if (!this->inventoryCategories[i].empty()) { return false; @@ -2440,7 +2440,7 @@ bool CSession::HasItem1740Number(int value) const { // OFFSET: 0x00DFA420 // FUNCTION: fn_23574 -bool CSession::HasUnknown809C(std::string name) { +bool CSession::HasCharacterName(std::string name) { for (std::vector::iterator it = this->characterNames.begin(); it != this->characterNames.end(); ++it) { if (name == *it) { return true; @@ -2485,7 +2485,7 @@ void CSession::FlagInventoryItem(std::uint32_t id) { // OFFSET: 0x00DFC0F0 // FUNCTION: fn_23594 -void CSession::FlagItem1740(std::uint32_t id) { +void CSession::FlagMerchantShopItem(std::uint32_t id) { for (ITEM_INFO& item : this->merchantShopItems) { if (item.identity[1] == id) { item.flags[2] = 1; @@ -2497,7 +2497,7 @@ void CSession::FlagItem1740(std::uint32_t id) { // OFFSET: 0x00DFC130 // FUNCTION: fn_23595 -void CSession::FlagItem1738(std::uint32_t id) { +void CSession::FlagCartItem(std::uint32_t id) { for (ITEM_INFO& item : this->cartItems) { if (item.identity[1] == id) { item.flags[2] = 1; @@ -2509,7 +2509,7 @@ void CSession::FlagItem1738(std::uint32_t id) { // OFFSET: 0x00DFC170 // FUNCTION: fn_23596 -void CSession::CollectItems1750() { +void CSession::CollectFilteredMerchantMyShopItems() { this->merchantMyShopItems.erase(this->merchantMyShopItems.begin(), this->merchantMyShopItems.end()); const int count = static_cast(this->m_inventoryItems.size()); @@ -2526,7 +2526,7 @@ void CSession::CollectItems1750() { // OFFSET: 0x00DFC330 // FUNCTION: fn_23597 -void CSession::RefreshItems1750() { +void CSession::RefreshMerchantMyShopItems() { this->merchantMyShopItems.erase(this->merchantMyShopItems.begin(), this->merchantMyShopItems.end()); const int count = static_cast(this->m_inventoryItems.size()); @@ -2555,7 +2555,7 @@ void CSession::RefreshItems1750() { } const std::uint32_t value = match->prices[0]; - if (value == 0xFFFFFFFF || g_session.HasItem61B8(it->identity[1]) == 1) { + if (value == 0xFFFFFFFF || g_session.HasSwapEquipmentItem(it->identity[1]) == 1) { it = this->merchantMyShopItems.erase(it); continue; } @@ -2586,7 +2586,7 @@ std::uint32_t CSession::GetItemNameColor(const ITEM_INFO& item) const { // OFFSET: 0x00E30720 // FUNCTION: fn_24166 -int CSession::CountItems2B50() const { +int CSession::CountDistinctCostumeItems() const { std::vector itemIds; int count = 0; for (int i = 0; i < 10; ++i) { @@ -2602,7 +2602,7 @@ int CSession::CountItems2B50() const { // OFFSET: 0x00E30830 // FUNCTION: fn_24167 -int CSession::CountItems17F0() const { +int CSession::CountDistinctEquippedItems() const { std::vector itemIds; int count = 0; for (int i = 0; i < 10; ++i) { @@ -2620,8 +2620,8 @@ int CSession::CountItems17F0() const { // FUNCTION: fn_23516 void CSession::RefreshSkillTree() { this->InitializeSkillTree(); - if (g_windowMgr.window_02C4) { - g_windowMgr.window_02C4->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.skillListWnd) { + g_windowMgr.skillListWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } if (g_windowMgr.basicInfoWnd) { @@ -3257,7 +3257,7 @@ void CSession::ClearItemContainers() { // OFFSET: 0x00DF3160 // FUNCTION: fn_23503 -void CSession::ClearEntryList5BD4() { +void CSession::ClearStoreSearchResults() { this->storeSearchResults.clear(); this->storeSearchCount = 0; this->storeSearchPageFlags = 0; diff --git a/Source/Client/Session.h b/Source/Client/Session.h index 01c613ad0..8ffa8e6a8 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -671,11 +671,11 @@ public: void SetShopFlag(int shopId, char flag); void SetShopItem(int shopId, unsigned int index, int itemId, int first, int second); bool AddShopName(std::string name, int shopId); - int SetUnknown8134(int value); - void SetUnknown5BC0(int value); - void ClearUnknown1710(int id); - void ClearUnknown1740(int id); - void ClearUnknown1738(int id); + int SetPlayerSkillMode(int value); + void SetElementalGid(int value); + void UnflagInventoryItem(int id); + void UnflagMerchantShopItem(int id); + void UnflagCartItem(int id); std::uint32_t SyncServerTime(std::uint32_t serverTime); __declspec(noinline) int DefaultRenderBackend(); int RenderSystemResetPolicy(); @@ -690,8 +690,8 @@ public: bool LoadMapPosTable(); bool ScaleMapPositions(); bool LoadFogParameters(); - void SetEquipItem2B50(unsigned int index, const ITEM_INFO& item); - void SetEquipItem17F0(unsigned int index, const ITEM_INFO& item); + void SetCostumeItem(unsigned int index, const ITEM_INFO& item); + void SetEquippedItem(unsigned int index, const ITEM_INFO& item); void ClearHomunStatus(); std::pair* InsertPair(int key, int value); int SetPairValue(int value, int slot); @@ -709,9 +709,9 @@ public: int GetMaxBaseLevel(int job) const; int GetMaxJobLevel(int job) const; bool IsCostumeJob(int job) const; - int GetSceneUnknown004C() const; + int GetSiegeMode() const; int IsPlayerJobId(int job) const; - int WorldUnknown0050() const; + int GetBattleFieldMode() const; bool IsShadowItemType(int type) const; bool IsConsumableItemType(int type) const; bool IsCostumeLocation(int location) const; @@ -723,8 +723,8 @@ public: int GetMapProperty11() const; int GetMapProperty12() const; int GetMapProperty13() const; - bool HasUnknown6178Records() const; - bool HasUnknown6178Record(int id) const; + bool HasTrackedAchievements() const; + bool HasTrackedAchievement(int id) const; int IsBerserkActive() const; int IsTrickDeadActive() const; int HasActiveSkillEffect(int id) const; @@ -753,7 +753,7 @@ public: NormalItemSlot& SkillHotkey(int index) { return reinterpret_cast(reinterpret_cast(this) + offsetof(CSession, quickSlot))[index]; } - void ResetItems2B50(); + void ResetCostumeItems(); void ResetMercenaryStats(); const char* GetPetAccActName(int id); int GetPetFood(int job); @@ -762,7 +762,7 @@ public: void GetPetIllustName(int job, int, char* buffer); int GetPetJobByEggItem(int eggItemId); const char* GetPetString(int id); - int AddUnknown6160(int id); + int AddAchievementJobTitle(int id); bool ToggleTrackedAchievement(int id); void RefreshTrackedAchievement(int id); const char* GetPetTalkName(int job); @@ -775,67 +775,67 @@ public: bool UpdateMercSkill(const CSkillInfo& value, unsigned char notify); void AddUnknownId(int id); EquipSlots GetEquipSlots(int location); - bool EquipUnknown17F0(const ITEM_INFO& item, const char* name); + bool EquipInventoryItem(const ITEM_INFO& item, const char* name); bool UnequipItem(int location, std::uint32_t identity); bool OnItemEquipped(ITEM_INFO& item); - bool EquipItem2B50(const ITEM_INFO& item, const char* name); - bool UnequipItem2B50(int location); - bool EquipItem3500(const ITEM_INFO& item); + bool EquipCostumeItem(const ITEM_INFO& item, const char* name); + bool UnequipCostumeItem(int location); + bool EquipAlternateCostumeItem(const ITEM_INFO& item); void AddStackedItem(ITEM_INFO item); void ReturnStackedItem(int index, int count); void AddItemToFreeSlot(ITEM_INFO item); bool IsListedId(int id, int variant) const; void ClearItemQuantities(); - void ResetItems3500(); - void RestoreItems5C68(); - void ClearSlots06EB(); + void ResetAlternateCostumeItems(); + void RestoreSelectionItems(); + void ClearQuickSlots(); void ClearShortcutSlots(); void ClearSecondaryShortcutSlots(); - void ClearUnknown0420(); + void ClearHotkeySkillLevels(); void EraseUnknownKey(std::int64_t key); - std::int64_t FindUnknown0784(std::int64_t key) const; - std::int64_t FindUnknown078C(std::int64_t key) const; - SessionRecord6144 FindRecord6144(int key) const; - void UpdateRecord6144(const AchievementRecordPacket& packet); - void FindTopRecords6144(int* second, int* first); + std::int64_t FindSummonHp(std::int64_t key) const; + std::int64_t FindSummonMaxHp(std::int64_t key) const; + SessionRecord6144 FindAchievementRecord(int key) const; + void UpdateAchievementRecord(const AchievementRecordPacket& packet); + void FindLatestCompletedAchievements(int* second, int* first); int GetBeginEffectId(int skillId) const; bool IsPartyMember(std::uint32_t aid, bool onlineOnly); bool IsPvpMap(); - ITEM_INFO GetItem2B50(int index) const; - ITEM_INFO GetItem3500(int index) const; - ITEM_INFO GetItem5C68(int index) const; - ITEM_INFO GetItem17F0(int index) const; - ITEM_INFO GetItem6B68(int index) const; - ITEM_INFO GetItem61B8(int index) const; + ITEM_INFO GetCostumeItemAt(int index) const; + ITEM_INFO GetAlternateCostumeItemAt(int index) const; + ITEM_INFO GetSelectionItemAt(int index) const; + ITEM_INFO GetEquippedItemAt(int index) const; + ITEM_INFO GetSwapEquippedItem(int index) const; + ITEM_INFO GetSwapCostumeItem(int index) const; ITEM_INFO FindItemByIdentity(std::uint32_t identity, int location); unsigned char IsAllyActor(std::uint32_t aid, int job); - const char* Text8104() const; - const char* Text80EC() const; - ITEM_INFO FindItem1768(std::uint32_t id) const; + const char* GetDamageSkinAuxiliaryName() const; + const char* GetDamageSpriteName() const; + ITEM_INFO FindMerchantPurchaseSavedItem(std::uint32_t id) const; ITEM_INFO GetItem1768At(int index) const; int GetItem1768Quantity(std::uint32_t id) const; - ITEM_INFO FindItem1740(std::uint32_t id) const; + ITEM_INFO FindMerchantShopItem(std::uint32_t id) const; ITEM_INFO GetItem1740At(int index) const; int GetItem1740Quantity(std::uint32_t id) const; - ITEM_INFO FindItem1750(std::uint32_t id) const; + ITEM_INFO FindMerchantMyShopItem(std::uint32_t id) const; ITEM_INFO GetItem1750At(int index) const; int GetItem1750Quantity(std::uint32_t id) const; - ITEM_INFO FindItem1758(std::uint32_t id) const; + ITEM_INFO FindMerchantPurchaseItem(std::uint32_t id) const; ITEM_INFO FindItem1758ByItemId(int itemId) const; ITEM_INFO GetItem1758At(int index) const; - ITEM_INFO FindItem1760(std::uint32_t id) const; + ITEM_INFO FindMerchantHopeToSellItem(std::uint32_t id) const; ITEM_INFO GetItem1760At(int index) const; int GetItem1760Quantity(std::uint32_t id) const; - ITEM_INFO FindItem1770(std::uint32_t id) const; + ITEM_INFO FindFilteredInventoryItem(std::uint32_t id) const; ITEM_INFO FindItem1760ByItemId(const char* itemId) const; int GetItem1760QuantityByItemId(const char* itemId) const; - SessionRecord0734 FindRecord0734(int id) const; + SessionRecord0734 FindMiniPartyRecord(int id) const; const char* GatName2RswName(const char* gatName); const char* GetBgmFileName(const char* rswName); const char* GetMapDisplayName(const char* mapName); const char* GetPlayerMapDisplayName(); std::uint32_t GetPartyMemberAid(const char* name); - bool HasItem17D4(int itemId) const; + bool HasInventorySearchItem(int itemId) const; int IsFriendName(const char* name) const; bool RemoveFriendByCharacterId(std::uint32_t characterId); void RemovePartyMemberByName(const char* name); @@ -843,18 +843,18 @@ public: bool IsGuildMemberCharacter(std::uint32_t characterId) const; bool IsGuildMemberCharacter(int characterId, char* name) const; bool IsGuildMemberName(const char* name) const; - bool IsUnknownName5248(const char* name) const; + bool IsIndoorMapName(const char* name) const; bool IsKnownName(std::string name) const; long long GetItem1760Total() const; ITEM_INFO GetItem1748At(int index) const; - bool HasItem1718(std::uint32_t id) const; + bool HasShopItemIdentity(std::uint32_t id) const; bool HasExchangeItem(std::uint32_t id) const; - int CountItems5C68() const; - int CountItems2B50() const; - int CountItems17F0() const; + int CountSelectionItems() const; + int CountDistinctCostumeItems() const; + int CountDistinctEquippedItems() const; void SplitDate(__time32_t time, std::uint16_t& year, std::uint16_t& month, std::uint16_t& day) const; int GetDefaultOptionValue(const char* name, int fallback) const; - int FindUnknown0778(int key) const; + int FindActorSkillAnimationValue(int key) const; CSkillInfo AdditionalSkillAt(int index) const; CSkillInfo HomunSkillAt(int index) const; CSkillInfo MercSkillAt(int index) const; @@ -862,7 +862,7 @@ public: void DeleteProhibitionLog(std::uint32_t aid, std::uint32_t minutes); void AddProhibitionLog(std::uint32_t aid, std::uint32_t minutes); void LoadProhibitionLog(); - void ResetUnknown1050(); + void ResetPetEggAndJob(); int ProcessEmotionShortcut(const char* text); int IsAdminSubMode(int subMode); void GetMonsterSkillInfo(const char* monster, int skill, int* action, int* loopType); @@ -874,7 +874,7 @@ public: CSkillInfo LookupSkill(std::uint32_t id); void NotifySkillWindows(); void RemoveSkill(std::uint32_t id); - bool UpdateSkill(const CSkillInfo& value, unsigned char notify, unsigned char updateUnknown000C); + bool UpdateSkill(const CSkillInfo& value, unsigned char notify, unsigned char updateType); bool UpdateAdditionalSkill(const CSkillInfo& value, int unused); int InheritedJob(int job); void WriteOptionFloat(CFile& file, const char* key, float value); @@ -898,7 +898,7 @@ public: bool CheckInterval(long long interval); bool IsPlayerPerformerJob(int job) const; bool IsSpecialMonsterJob(int job) const; - bool IsWithinUnknown59C0(int value) const; + bool IsRestrictedCharacterSlot(int value) const; bool ResetUnknownState(); __declspec(noinline) bool IsSecondJob(int job); void UpdateBodyStyle(int job, int style, int renderJob); @@ -913,67 +913,67 @@ public: int GetPetTargetAid() const; const char* GetJobName(unsigned job, int sex); void InitJobNameTable(); - int SyncUnknown0E98(); + int GetCurrentSex(); void LoadXmlTables(); void LoadExternalSettings(); void ReloadLanguageTables(); - bool AddItem1710(const ITEM_INFO& item, unsigned char refresh); - void AddItem1718(const RawItemBasic& item, int quantity, std::uint16_t unknown_006C); - void AddItem1718(const RawItemBasic& item, int mode); - bool AddItem1768(const ITEM_INFO& item, unsigned char alternate, unsigned char refresh); - bool AddItem1740(const ITEM_INFO& item); - bool AddItem1750(const ITEM_INFO& item, int type, unsigned char refresh); - void AddItem1758(const ITEM_INFO& item); - void AddItem1760(const ITEM_INFO& item); - void AddItem1748(const ITEM_INFO& item); + bool AddInventoryItem(const ITEM_INFO& item, unsigned char refresh); + void AddShopItem(const RawItemBasic& item, int quantity, std::uint16_t unknown_006C); + void AddShopItem(const RawItemBasic& item, int mode); + bool AddMerchantPurchaseSavedItem(const ITEM_INFO& item, unsigned char alternate, unsigned char refresh); + bool AddMerchantShopItem(const ITEM_INFO& item); + bool AddMerchantMyShopItem(const ITEM_INFO& item, int type, unsigned char refresh); + void AddMerchantPurchaseItem(const ITEM_INFO& item); + void AddMerchantHopeToSellItem(const ITEM_INFO& item); + void AddMerchantMirrorItem(const ITEM_INFO& item); bool Equip(const ITEM_INFO& item); - void AppendItem1718(const ITEM_INFO& item); + void AppendShopItem(const ITEM_INFO& item); void MergeItem1718ByName(const ITEM_INFO& item); void MergeItem1720ByName(const ITEM_INFO& item); - void MergeItem1720(const ITEM_INFO& item); - void AddItem1730(const ITEM_INFO& item); - void MergeItem1718(const ITEM_INFO& item); - bool AddItem1738(const ITEM_INFO& item, unsigned char refresh); + void MergePurchaseItem(const ITEM_INFO& item); + void AddStorageItem(const ITEM_INFO& item); + void MergeShopItem(const ITEM_INFO& item); + bool AddCartItem(const ITEM_INFO& item, unsigned char refresh); void RemoveItem1758ByItemId(ITEM_INFO& item); - __declspec(noinline) void RemoveItem1710(std::uint32_t id, int quantity); + __declspec(noinline) void RemoveInventoryItem(std::uint32_t id, int quantity); bool AddExchangeItem(ITEM_INFO item); - bool RemoveItem1768(const ITEM_INFO& item, unsigned char alternate); - bool RemoveItem1740(const ITEM_INFO& item); - bool RemoveItem1750(const ITEM_INFO& item, int type, unsigned char refresh); - void RemoveItem1758(ITEM_INFO& item); - void RemoveItem1760(const ITEM_INFO& item); + bool RemoveMerchantPurchaseSavedItem(const ITEM_INFO& item, unsigned char alternate); + bool RemoveMerchantShopItem(const ITEM_INFO& item); + bool RemoveMerchantMyShopItem(const ITEM_INFO& item, int type, unsigned char refresh); + void RemoveMerchantPurchaseItem(ITEM_INFO& item); + void RemoveMerchantHopeToSellItem(const ITEM_INFO& item); void RemoveItem1718ByItemId(const ITEM_INFO& item); - void RemoveItem1718(const ITEM_INFO& item); + void RemoveShopItem(const ITEM_INFO& item); void RemoveItem1720ByName(const ITEM_INFO& item); - void RemoveItem1720(const ITEM_INFO& item); - void RemoveItem1730(const ITEM_INFO& item); - void ReduceItem1718(const ITEM_INFO& item); - bool RemoveItem1738(const ITEM_INFO& item); + void RemovePurchaseItem(const ITEM_INFO& item); + void RemoveStorageItem(const ITEM_INFO& item); + void ReduceShopItemQuantity(const ITEM_INFO& item); + bool RemoveCartItem(const ITEM_INFO& item); void ClearInventory(); void ClearItems1760And1748(); - void ClearItems1768(); - void ClearItems1740(); - void ClearItems1750(); - void SetItems1750(int count, const short* ids); - void ClearItems1758(); - void ClearItems1760(); - void ClearItems1748(); - void ClearItems1784(int index); + void ClearMerchantPurchaseSavedItems(); + void ClearMerchantShopItems(); + void ClearMerchantMyShopItems(); + void SetMerchantMyShopItems(int count, const short* ids); + void ClearMerchantPurchaseItems(); + void ClearMerchantHopeToSellItems(); + void ClearMerchantMirrorItems(); + void ClearInventoryCategoryItems(int index); void ClearItemSlotQuantities(); void ResetEquipped(); - void ClearItems1720(); - void ClearItems1738(); + void ClearPurchaseItems(); + void ClearCartItems(); void CopyItems1740To1750(); void CopyItems1760To1770(); - std::pair FindItem1750(const ITEM_INFO& item, unsigned char unknown); - void ClearRecords0734(); - void ResetUnknown166C(); + std::pair FindMerchantMyShopItem(const ITEM_INFO& item, unsigned char unknown); + void ClearMiniPartyRecords(); + void ResetStatBonuses(); void ResetHotkeyDescriptions(); int IsDifferentName(const char* name, const char* other); int IsGuildMemberNameDifferent(const char* name); int IsFriendNameDifferent(const char* name); - bool EquipItem6B68(const ITEM_INFO& item); - void ClearAllItems1784(); + bool EquipSwapEquipmentItem(const ITEM_INFO& item); + void ClearAllInventoryCategories(); void UpdateRandomStats(); void ResetEquipment(); void ResetSlots(); @@ -990,7 +990,7 @@ public: int GetList9Size() const; int GetList10Size() const; int GetList11Size() const; - int GetList1788(int index) const; + int GetInventoryCategorySize(int index) const; void KeepEquipment(); void ClearTradeItems(); void RemoveEquipment(); @@ -1048,13 +1048,13 @@ public: return count; } - int IsSkillIdInRange6018(unsigned id) const; - int IsSkillIdInRange6001(unsigned id) const; + int IsHirelingJob(unsigned id) const; + int IsCompanionJob(unsigned id) const; bool IsMonsterClass(int job); int IsPetEgg(int itemId) const; const ActionFrame* GetSyncedFrame(CActRes* baseAct, CActRes* act, unsigned action, int baseFrame, std::uint32_t startTime, int* frame); float GetNpcLocationRadius(int job, bool riding); - void ClearEntryList5BD4(); + void ClearStoreSearchResults(); int GetRidingJob(int job); void InitNpcLocationRadius(); int GetSpriteJob(int job, int costumeJob, bool spriteIndex); @@ -1097,22 +1097,22 @@ public: std::string GetBodySprName(int job, int sex, int costumeJob, int costume); std::string GetRaceBodyResourceName(int type, int raceJob, int job, int sex, int costumeJob); int GetItemDescription40(int id); - std::uint32_t GetUnknown0420(int index); + std::uint32_t GetHotkeySkillLevel(int index); void GetSkillActionInfo(int skillId, int& effectId, int& motion, int variant, int level); void GetSkillActionInfo2(int skillId, int& effectId, int& motion); bool IsNumberWithCommas(char* text); - bool HasNoUnknown1784Items() const; + bool AreInventoryCategoriesEmpty() const; bool HasItem1740Number(int value) const; bool IsRobeDrawOnTop(int action, int frame, bool riding); - int GetUnknown8134() const; - int FindUnknown0708(int key) const; - int FindUnknown0700(int key) const; + int GetPlayerSkillMode() const; + int FindSkillEffectId(int key) const; + int FindSkillFollowEffect(int key) const; const char* GetEnemyHitWaveName(int element); ITEM_INFO* GetEquippedItem(const ITEM_INFO* item); - ITEM_INFO FindItem2B50(std::uint32_t id, int* index) const; - ITEM_INFO FindItem17F0(std::uint32_t id, int* index) const; + ITEM_INFO FindCostumeItem(std::uint32_t id, int* index) const; + ITEM_INFO FindEquippedItem(std::uint32_t id, int* index) const; ITEM_INFO GetExchangeItem(int index) const; - int HasItem61B8(std::uint32_t id) const; + int HasSwapEquipmentItem(std::uint32_t id) const; const std::vector* GetFogParameters(const char* rswName, int* found); std::string GetPlayerHeadSprName(); std::string GetImfName(int job); @@ -1124,12 +1124,12 @@ public: ITEM_INFO* FindInventoryItemByItemId(int itemId, bool identifiedOnly); int GetInventoryItemCount(int itemId) const; ITEM_INFO GetItem1784At(int list, int index) const; - void AddItem1784(const ITEM_INFO& item, int list); + void AddInventoryCategoryItem(const ITEM_INFO& item, int list); int GetCommandId(const char* name) const; int GetTalkType(const char* text, int* talkType, std::string* parts); int GetItem1728Count() const; ITEM_INFO GetItemSlot(int index) const; - ITEM_INFO GetItem21A0(int index) const; + ITEM_INFO GetAlternateEquippedItemAt(int index) const; int GetItem1718QuantityByItemId(const ITEM_INFO& item) const; int GetItem1718QuantityOf(const ITEM_INFO& item) const; std::uint16_t GetItem1718Unknown006CByItemId(const ITEM_INFO& item) const; @@ -1146,36 +1146,36 @@ public: unsigned char GetShopType(int id); bool HasControlCharacter(std::string text); const char* GetMonsterW3dName(int job) const; - ITEM_INFO FindItem1730(std::uint32_t id) const; + ITEM_INFO FindStorageItem(std::uint32_t id) const; ITEM_INFO GetItem1730At(int index) const; int GetItem1730Quantity(std::uint32_t id) const; ITEM_INFO GetItem1718At(int index) const; int GetItem1718Quantity(std::uint32_t id) const; const char* GetHotkeyDescription(int index) const; - ITEM_INFO FindItem1738(std::uint32_t id) const; + ITEM_INFO FindCartItem(std::uint32_t id) const; ITEM_INFO GetItem1738At(int index) const; int GetItem1738Quantity(std::uint32_t id) const; - void AddUnknown7F94(std::uint32_t id); + void AddPendingActorName(std::uint32_t id); void SetShowRankingSchedule(bool show, const void* data); void SetTraitStat(int type, int value); int GetTraitStat(int type); void EndSkillOption(); void ClearNormalItemSlots(); - void ResetItems6B68(); - void ResetItems61B8(); + void ResetSwapEquippedItems(); + void ResetSwapCostumeItems(); void FlagInventoryItem(std::uint32_t id); - void FlagItem1740(std::uint32_t id); - void FlagItem1738(std::uint32_t id); - void CollectItems1750(); - void RefreshItems1750(); + void FlagMerchantShopItem(std::uint32_t id); + void FlagCartItem(std::uint32_t id); + void CollectFilteredMerchantMyShopItems(); + void RefreshMerchantMyShopItems(); bool IsPartyRecommendTarget(std::uint32_t aid); int GetBodyStyle(int job, int style, int renderJob); - int GetUnknown8148() const; - void RefreshWindow02C8(); + int GetSessionIndex() const; + void RefreshMessengerGroupWindow(); void RefreshItem1740Window(); void RefreshItem1750Window(int type); void RefreshItem1768Window(unsigned char alternate, int argument); - void UpdateUnknown1708(int enabled); + void UpdateMonsterInfoEnabled(int enabled); void RefreshItem1738Window(); void RefreshHpSpWindows(); CSession(); @@ -1188,24 +1188,24 @@ public: void InvalidateWindowFrames(); void RefreshSkillTree(); void SetJob(int job); - void EraseRecord0734(int id); + void EraseMiniPartyRecord(int id); void IgnoreText(std::string text); void SaveMiniPartyInfo(); void LoadMiniPartyInfo(); void ClearPartyMembers(); void SetItem1768Quantity(int index, int quantity); - void SetUnknown5C1C(int value); + void SetReplayPacketMode(int value); void UpdateFriendName(std::uint32_t characterId, const char* name); - void UnequipItem6B68(const ITEM_INFO& item); - void UnequipItem61B8(const ITEM_INFO& item); - bool EquipItem61B8(const ITEM_INFO& item); - void SetUnknown7EC8(std::uint32_t value); - void NotifyUnknown7F94Name(std::uint32_t id, const char* name); + void UnequipSwapEquippedItem(const ITEM_INFO& item); + void UnequipSwapCostumeItem(const ITEM_INFO& item); + bool EquipSwapCostumeItem(const ITEM_INFO& item); + void SetSwapArrowIndex(std::uint32_t value); + void ResolvePendingActorName(std::uint32_t id, const char* name); void HiFriends(char* text); void sub_DE4FF0(); std::pair GetShopEntry(unsigned int index, int key); - bool HasUnknown809C(std::string name); - void SetUnknown16EC(std::uint32_t value); + bool HasCharacterName(std::string name); + void SetEquippedArrowIndex(std::uint32_t value); bool IsRequestReady(int requestId); void ClearAchievements(); void SetNavigationPlayerMap(const char* name); @@ -1214,9 +1214,9 @@ public: void UpdateInventoryItem(const ITEM_INFO& item, unsigned char refresh); void SetMercSkillLevel(int skillId, int level); void SetItem1768Unknown0014(int index, std::uint32_t value); - void AddRecord0734(int id, std::uint32_t value); - void SetUnknown5210(int value); - void SetUnknown5214(int value); + void AddMiniPartyRecord(int id, std::uint32_t value); + void SetExchangeMoney(int value); + void SetOtherExchangeMoney(int value); void SetPlayerPosition(int x, int y, int direction); void SetRecord0734Value(int id, std::uint32_t value); void LoadSkillDelayList(int skillId, std::vector>& delays, int& skillFlag); diff --git a/Source/Client/SessionAchievements.cpp b/Source/Client/SessionAchievements.cpp index bc2a083c8..a7fc00993 100644 --- a/Source/Client/SessionAchievements.cpp +++ b/Source/Client/SessionAchievements.cpp @@ -27,8 +27,8 @@ bool JobTitleLess::operator()(int left, int right) const { // OFFSET: 0x00E064C0 // FUNCTION: fn_23736 -int CSession::AddUnknown6160(int id) { - int value = g_achievementMgr->GetUnknown0050(id); +int CSession::AddAchievementJobTitle(int id) { + int value = g_achievementMgr->GetRewardTitleId(id); if (value == -1) { return -1; } diff --git a/Source/Client/SessionPredicates.cpp b/Source/Client/SessionPredicates.cpp index 0c2333aca..1db3de883 100644 --- a/Source/Client/SessionPredicates.cpp +++ b/Source/Client/SessionPredicates.cpp @@ -32,7 +32,7 @@ int CSession::IsState291To303(int state) const { // OFFSET: 0x00E1D700 // FUNCTION: fn_23851 -bool CSession::HasUnknown6178Record(int id) const { +bool CSession::HasTrackedAchievement(int id) const { auto it = this->trackedAchievements.begin(); for (; it != this->trackedAchievements.end(); ++it) { const SessionRecord6178 record = *it; diff --git a/Source/Client/SessionState.cpp b/Source/Client/SessionState.cpp index 6fc907929..3566e0b36 100644 --- a/Source/Client/SessionState.cpp +++ b/Source/Client/SessionState.cpp @@ -200,14 +200,14 @@ bool CSession::IsThirdJobOrHigher(int job) { // OFFSET: 0x00E2ECD0 // FUNCTION: fn_24150 -bool CSession::EquipItem61B8(const ITEM_INFO& item) { +bool CSession::EquipSwapCostumeItem(const ITEM_INFO& item) { const EquipSlots slots = g_session.GetEquipSlots(static_cast(item.identity[3])); int order[3]; order[0] = slots.values[2]; order[1] = slots.values[1]; order[2] = slots.values[0]; if (item.identity[3] == 0x8000) { - g_session.SetUnknown7EC8(item.identity[1]); + g_session.SetSwapArrowIndex(item.identity[1]); } for (int i = 0; i < 3; ++i) { @@ -228,10 +228,10 @@ bool CSession::EquipItem61B8(const ITEM_INFO& item) { // OFFSET: 0x00E3D8A0 // FUNCTION: fn_24192 -void CSession::UnequipItem6B68(const ITEM_INFO& item) { +void CSession::UnequipSwapEquippedItem(const ITEM_INFO& item) { const int location = static_cast(item.identity[3]); if (location == 0x8000) { - this->SetUnknown7EC8(0); + this->SetSwapArrowIndex(0); } else { const EquipSlots slots = g_session.GetEquipSlots(location); if (slots.values[2] < 10) { @@ -256,7 +256,7 @@ void CSession::UnequipItem6B68(const ITEM_INFO& item) { // OFFSET: 0x00E3D960 // FUNCTION: fn_24193 -void CSession::UnequipItem61B8(const ITEM_INFO& item) { +void CSession::UnequipSwapCostumeItem(const ITEM_INFO& item) { const int location = static_cast(item.identity[3]); if (location == 0x8000) { ITEM_INFO equipped = g_session.FindItemByIdentity(item.identity[1], location); @@ -266,7 +266,7 @@ void CSession::UnequipItem61B8(const ITEM_INFO& item) { const std::string text = FormatOwnedString("%s%s", name.c_str(), message); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text.c_str()), 0xFF, 7, 0, 0); } - this->SetUnknown7EC8(0); + this->SetSwapArrowIndex(0); } else { const EquipSlots slots = g_session.GetEquipSlots(location); if (slots.values[2] < 10) { @@ -310,7 +310,7 @@ void CSession::SetJob(int job) { // OFFSET: 0x00E497F0 // FUNCTION: fn_24237 -void CSession::SetUnknown7EC8(std::uint32_t value) { +void CSession::SetSwapArrowIndex(std::uint32_t value) { this->swapArrowIndex = value; this->InvalidateWindowFrames(); @@ -335,12 +335,12 @@ void CSession::SetUnknown7EC8(std::uint32_t value) { // OFFSET: 0x00E49930 // FUNCTION: fn_24238 -void CSession::NotifyUnknown7F94Name(std::uint32_t id, const char* name) { +void CSession::ResolvePendingActorName(std::uint32_t id, const char* name) { if (!name || std::strlen(name) == 0) { return; } - UIWindow* chat = g_windowMgr.window_01C8; + UIWindow* chat = g_windowMgr.chatWnd; if (!chat) { return; } diff --git a/Source/Client/Stove/StoveMgr.cpp b/Source/Client/Stove/StoveMgr.cpp index 5031c83bf..67b8b60c3 100644 --- a/Source/Client/Stove/StoveMgr.cpp +++ b/Source/Client/Stove/StoveMgr.cpp @@ -59,7 +59,7 @@ void CStoveMgr::FetchAllProducts() { Sleep(200); } while (g_stoveWaitingCallback); - g_session.ClearItems1784(9); + g_session.ClearInventoryCategoryItems(9); Stove::PCSDK::IAP::StovePCFetchProductParam categoryParam; categoryParam.SetCategoryId(this->m_environment == 2 ? g_stoveCategoryIdA : g_stoveCategoryIdB); categoryParam.SetPageNumber(1); @@ -88,7 +88,7 @@ void FetchStoveTermsAgreement() { // OFFSET: 0x0063E910 // FUNCTION: fn_45460 void CStoveMgr::FetchCategoryProducts() { - g_session.ClearItems1784(9); + g_session.ClearInventoryCategoryItems(9); Stove::PCSDK::IAP::StovePCFetchProductParam param; param.SetCategoryId(this->m_environment == 2 ? g_stoveCategoryIdA : g_stoveCategoryIdB); param.SetPageNumber(1); @@ -281,7 +281,7 @@ void FetchProductsCallback::operator()(Stove::PCSDK::CallbackResult callbackResu item.quantity = product.GetPurchaseLimitCount(); item.saleData[1] = static_cast(std::chrono::system_clock::to_time_t(std::chrono::system_clock::time_point(std::chrono::milliseconds(product.GetSaleBeginDate())))); item.saleData[2] = static_cast(std::chrono::system_clock::to_time_t(std::chrono::system_clock::time_point(std::chrono::milliseconds(product.GetSaleEndDate())))); - g_session.AddItem1784(item, 9); + g_session.AddInventoryCategoryItem(item, 9); } } } else { @@ -320,7 +320,7 @@ void CategoryProductsCallback::operator()(Stove::PCSDK::CallbackResult callbackR unsigned int count) const { g_stoveWaitingCallback = false; if (callbackResult.GetResult().IsSuccessful()) { - g_session.ClearAllItems1784(); + g_session.ClearAllInventoryCategories(); for (unsigned int index = 0; index < count; ++index) { const Stove::PCSDK::IAP::StovePCProduct& product = products[index]; std::string categoryId = EncodeText(CP_ACP, std::wstring(product.GetCategoryId())); @@ -406,11 +406,11 @@ void CategoryProductsCallback::operator()(Stove::PCSDK::CallbackResult callbackR item.quantity = product.GetPurchaseLimitCount(); item.saleData[1] = static_cast(std::chrono::system_clock::to_time_t(std::chrono::system_clock::time_point(std::chrono::milliseconds(product.GetSaleBeginDate())))); item.saleData[2] = static_cast(std::chrono::system_clock::to_time_t(std::chrono::system_clock::time_point(std::chrono::milliseconds(product.GetSaleEndDate())))); - g_session.AddItem1784(item, 9); + g_session.AddInventoryCategoryItem(item, 9); } } else if (product.GetPurchaseLimitCount() == 0 && product.GetSaleBeginDate() == 0 && product.GetSaleEndDate() == 0) { item.bindOnEquip = static_cast(list); - g_session.AddItem1784(item, list); + g_session.AddInventoryCategoryItem(item, list); } } } else { @@ -499,7 +499,7 @@ void ConfirmPurchaseCallback::operator()(Stove::PCSDK::CallbackResult callbackRe // OFFSET: 0x0063DB80 // FUNCTION: fn_04794 -void CSession::AddItem1784(const ITEM_INFO& item, int list) { +void CSession::AddInventoryCategoryItem(const ITEM_INFO& item, int list) { if (static_cast(list) <= 10) { this->inventoryCategories[list].push_back(item); } diff --git a/Source/Contents/AchievementMgr.cpp b/Source/Contents/AchievementMgr.cpp index 9da1ca777..ae47e7c8f 100644 --- a/Source/Contents/AchievementMgr.cpp +++ b/Source/Contents/AchievementMgr.cpp @@ -71,7 +71,7 @@ bool CAchievementMgr::GetAchievement(AchievementInfo& out, int id) { // OFFSET: 0x0066D720 // FUNCTION: fn_05314 -std::string CAchievementMgr::GetUnknown0068(int id) { +std::string CAchievementMgr::GetIconName(int id) { if (this->achievements.find(id) != this->achievements.end()) { return this->achievements[id].iconName; } @@ -106,7 +106,7 @@ bool CAchievementMgr::GetGroupAchievements(std::map& out, // OFFSET: 0x0066E250 // FUNCTION: fn_05316 -int CAchievementMgr::GetUnknown0048(int id) { +int CAchievementMgr::GetPoints(int id) { if (this->achievements.find(id) != this->achievements.end()) { return this->achievements[id].points; } @@ -115,7 +115,7 @@ int CAchievementMgr::GetUnknown0048(int id) { // OFFSET: 0x0066E2A0 // FUNCTION: fn_05317 -std::string CAchievementMgr::GetUnknown0018(int id) { +std::string CAchievementMgr::GetSummaryText(int id) { if (this->achievements.find(id) != this->achievements.end()) { return this->achievements[id].summaryText; } @@ -124,7 +124,7 @@ std::string CAchievementMgr::GetUnknown0018(int id) { // OFFSET: 0x0066E460 // FUNCTION: fn_05318 -int CAchievementMgr::GetUnknown0050(int id) { +int CAchievementMgr::GetRewardTitleId(int id) { if (this->achievements.find(id) != this->achievements.end()) { return this->achievements[id].rewardTitleId; } @@ -151,7 +151,7 @@ namespace { // INLINED bool IsAchievementCompleted(int id) { - const SessionRecord6144 record = g_session.FindRecord6144(id); + const SessionRecord6144 record = g_session.FindAchievementRecord(id); return static_cast(record.completionFlags >> 8) == 1; } @@ -277,13 +277,13 @@ bool CAchievementMgr::LoadAchievementInfo() { // OFFSET: 0x0066ED90 // FUNCTION: fn_05323 -std::pair CAchievementMgr::InsertAchieveInfo(int id, std::string title, std::string unknown0018, std::string unknown0030, int unknown0048) { +std::pair CAchievementMgr::InsertAchieveInfo(int id, std::string title, std::string unknown0018, std::string description, int points) { if (this->achievements.find(id) != this->achievements.end()) { const std::string message = FormatOwnedString("duplicate achievement info [%d]", id); return std::make_pair(false, message); } - if (this->achievements.insert(std::pair(id, AchievementInfo(title, unknown0018, unknown0030, unknown0048))).second) { + if (this->achievements.insert(std::pair(id, AchievementInfo(title, unknown0018, description, points))).second) { return std::make_pair(true, "good"); } @@ -415,9 +415,9 @@ int CAchievementMgr::L_InsertAchieveInfo(lua_State* state) { const int id = static_cast(lua_tonumber(state, -5)); const std::string title = lua_tostring(state, -4); const std::string unknown0018 = lua_tostring(state, -3); - const std::string unknown0030 = lua_tostring(state, -2); + const std::string description = lua_tostring(state, -2); const std::pair result = - g_achievementMgr->InsertAchieveInfo(id, title, unknown0018, unknown0030, static_cast(lua_tonumber(state, -1))); + g_achievementMgr->InsertAchieveInfo(id, title, unknown0018, description, static_cast(lua_tonumber(state, -1))); if (!result.first) { lua_pushboolean(state, 0); lua_pushstring(state, FormatString("InsertAchieveInfo : %s", result.second.c_str())); diff --git a/Source/Contents/AchievementMgr.h b/Source/Contents/AchievementMgr.h index 8027b0861..3579d09bd 100644 --- a/Source/Contents/AchievementMgr.h +++ b/Source/Contents/AchievementMgr.h @@ -26,8 +26,8 @@ struct AchievementInfo { AchievementInfo() { } // INLINED - AchievementInfo(std::string title, std::string unknown0018, std::string unknown0030, int unknown0048) - : title(title), summaryText(unknown0018), description(unknown0030), points(unknown0048) { + AchievementInfo(std::string title, std::string unknown0018, std::string description, int points) + : title(title), summaryText(unknown0018), description(description), points(points) { } /* 0000 */ std::string title; @@ -65,15 +65,15 @@ public: /* 0014 */ std::map> groups; bool GetAchievement(AchievementInfo& out, int id); - std::string GetUnknown0068(int id); + std::string GetIconName(int id); bool GetGroupAchievements(std::map& out, int group, int index); - int GetUnknown0048(int id); - std::string GetUnknown0018(int id); - int GetUnknown0050(int id); + int GetPoints(int id); + std::string GetSummaryText(int id); + int GetRewardTitleId(int id); int GetAchievementCount(int group, int index); int GetCompletedCount(int group, int index); bool FindTab(int id, int& group, int& index); - std::pair InsertAchieveInfo(int id, std::string title, std::string unknown0018, std::string unknown0030, int unknown0048); + std::pair InsertAchieveInfo(int id, std::string title, std::string unknown0018, std::string description, int points); std::pair InsertAchieveResource(int id, std::string text, int unknown0018, int unknown001C); std::pair InsertAchieveRewardBuff(int id, int value); std::pair InsertAchieveRewardItem(int id, int value); diff --git a/Source/Contents/Actors/CharacterRender.cpp b/Source/Contents/Actors/CharacterRender.cpp index cea961959..570a7c1d0 100644 --- a/Source/Contents/Actors/CharacterRender.cpp +++ b/Source/Contents/Actors/CharacterRender.cpp @@ -45,10 +45,10 @@ struct CharacterRenderDrawItem { // OFFSET: 0x0080D2A0 // FUNCTION: fn_10099 -CCharacterRender::CCharacterRender(int unknown0068, int unknown006C) +CCharacterRender::CCharacterRender(int width, int renderHeight) : headJob(0), lowerHeadgear(0), upperHeadgear(0), middleHeadgear(0), lowerHeadgearLocation(0), upperHeadgearLocation(0), middleHeadgearLocation(0), madogearType(0), riding(0), bodyCostume(0), viewportOffsetX(0), viewportOffsetY(80.0f), bodyBlend(-1), - bodyCellX(-1), bodyCellY(-1), viewportWidth(unknown0068), viewportHeight(unknown006C), cameraDistance(400.0f), cameraPitch(-45.0f), + bodyCellX(-1), bodyCellY(-1), viewportWidth(width), viewportHeight(renderHeight), cameraDistance(400.0f), cameraPitch(-45.0f), cameraYaw(0.0f), unknown_007C(0.0f), unknown_0080(0.0f), unknown_0084(0.0f), cameraUpX(0.0f), cameraUpY(1.0f), cameraUpZ(0), screenX(0), screenY(0), robe(0), isHelmRobe(0) { this->positionX = 0; diff --git a/Source/Contents/Actors/CharacterRender.h b/Source/Contents/Actors/CharacterRender.h index 735758dc6..ffd75e450 100644 --- a/Source/Contents/Actors/CharacterRender.h +++ b/Source/Contents/Actors/CharacterRender.h @@ -17,7 +17,7 @@ struct tagRECT; class CCharacterRender { public: - CCharacterRender(int unknown0068, int unknown006C); + CCharacterRender(int width, int renderHeight); virtual ~CCharacterRender(); void RenderRobe( diff --git a/Source/Contents/Actors/EffectActors.h b/Source/Contents/Actors/EffectActors.h index fb1c57e82..543375127 100644 --- a/Source/Contents/Actors/EffectActors.h +++ b/Source/Contents/Actors/EffectActors.h @@ -35,7 +35,7 @@ public: CMasterChaser(); ~CMasterChaser() override; - void ClearUnknown0138(); + void ClearChaseState(); /* 0138 */ std::uint32_t chaseState; /* 013C */ std::uint32_t unknown_013C; diff --git a/Source/Contents/Actors/GameActor.cpp b/Source/Contents/Actors/GameActor.cpp index e45b7c516..cff4745d9 100644 --- a/Source/Contents/Actors/GameActor.cpp +++ b/Source/Contents/Actors/GameActor.cpp @@ -357,7 +357,7 @@ bool CGameActor::ProcessState() { mode->SendMsg(MM_DELETEREGISTERPOS, static_cast(this->render.accountId), 0, 0, 0); const int job = this->GetEffectiveJob(-1); if ((job > 31 && job < 1000) || g_session.IsMonsterClass(job) || this->objectType == 9 || - g_session.IsSkillIdInRange6001(job)) { + g_session.IsCompanionJob(job)) { this->MakeCorpse(); return false; } @@ -653,8 +653,8 @@ void CGameActor::ReleaseAttachments() { } this->msgEffectList.clear(); - if (g_session.GetSceneUnknown004C() && this->sceneNameWindow) { - static_cast(g_modeMgr.GetGameMode())->RemoveUnknown0604(this->sceneNameWindow); + if (g_session.GetSiegeMode() && this->sceneNameWindow) { + static_cast(g_modeMgr.GetGameMode())->RemoveNotificationWindow(this->sceneNameWindow); g_windowMgr.Schedule(reinterpret_cast(this->sceneNameWindow)); this->sceneNameWindow = 0; } @@ -1091,7 +1091,7 @@ int CGameActor::GetGaugeMaximum() { // OFFSET: 0x00CADB30 // FUNCTION: fn_21060 -void CGameActor::ResetUnknown03B8() { +void CGameActor::ResetTransformJobs() { this->transformJobs[0] = -1; this->transformJobs[1] = -1; this->transformJobs[2] = -1; @@ -1116,7 +1116,7 @@ bool CGameActor::HasPendingDamage() { // OFFSET: 0x00CADCF0 // FUNCTION: fn_21067 -bool CGameActor::UpdateUnknown03E8(std::int64_t value) { +bool CGameActor::UpdateMaximumValue(std::int64_t value) { bool result = false; if (this->maximumValue < value) { result = true; @@ -1183,7 +1183,7 @@ void __stdcall CreateHallucinationPc( // OFFSET: 0x00AA20D0 // FUNCTION: fn_17210 -bool CGameActor::HasUnknown0310Entry() { +bool CGameActor::HasActiveMercenaryAI() { const int* entry = reinterpret_cast(this->merAI); return entry && entry[1] != 0; } diff --git a/Source/Contents/Actors/GameActor.h b/Source/Contents/Actors/GameActor.h index 897b1c76f..5b2b84fd5 100644 --- a/Source/Contents/Actors/GameActor.h +++ b/Source/Contents/Actors/GameActor.h @@ -209,9 +209,9 @@ public: virtual void SetGuildInfo(int guildId, int version); virtual int GetGdid(); virtual float* GetMsg2AI(int index); - virtual void SetUnknown0318(const float* value, int index); + virtual void SetMsg2AI(const float* value, int index); virtual float* GetResMsg2AI(int index); - virtual void SetUnknown0330(const float* value, int index); + virtual void SetResMsg2AI(const float* value, int index); virtual int GetMonsterTransformJob(); virtual int GetMadogearType(); virtual void SetMadogearType(int value); @@ -221,12 +221,12 @@ public: virtual float* GetExtent(float* extent) const; virtual void SetSex(int value); - void SetUnknown0305(unsigned char value, int extra); - void RaiseUnknown03C8(int value); - void SetUnknown02E4(int value); - void SetUnknown02C8(int value); - void SetUnknown0260(int value); - void ApplyPendingUnknown0408(); + void SetSpGauge(unsigned char value, int extra); + void RaiseTransformPriority(int value); + void SetGroupMemberVisible(int value); + void SetHealthState(int value); + void SetSexBit(int value); + void ApplySavedShapeShift(); void ApplyNatureProtection(); void UpdateMaxLevelAura(); void SetActorJob(int job); @@ -238,17 +238,17 @@ public: void SetStatusStates(int bodyState, std::uint32_t stateFlags, int effectState, bool notify); void PlayGroundSkillEffect(int sender, const int* skill, int argument3, int argument4); void ShowPartyMemberEffect(std::uint32_t accountId); - int GetUnknown0404Job() const; - void SetUnknown03B8(int value, int slot); + int GetShapeShiftJob() const; + void SetTransformJob(int value, int slot); void SetTetraBall(int index, int on, int value); bool IsSkillWithoutAction(int skillId); - bool HasUnknown030CEntry(); - bool HasUnknown0310Entry(); + bool HasActiveHomunculusAI(); + bool HasActiveMercenaryAI(); void SetCharm(int type, int count); __declspec(noinline) int ActionBase(int state); - void SetUnknown03C4(int value); - void SetUnknown0404(int value); - void SetUnknown008C(const std::uint32_t* value); + void SetMonsterTransformJob(int value); + void SetShapeShift(int value); + void SetMotionTintState(const std::uint32_t* value); bool FindRoute(int startX, int startY, int fractionX, int fractionY, int destX, int destY, int speed); std::string GetShapeShiftName(); int MountType(); @@ -259,17 +259,17 @@ public: void SetEffectState(int effectId, bool on); void SetEffectInstance(int effectId, int instance, bool on); void ResetJobEffects(); - void ClearUnknown037C(int value); + void ClearStatusEffectInstance(int value); void SpawnDamageDigits(int unused, int damage, std::uint32_t color, int type); __declspec(noinline) int WeaponActionBase(int weaponType); - int GetUnknown0404(); + int GetShapeShift(); int MountHeightOffset(); void ResetState(); void UpdateGaugePositions(); void UpdateHpGauge(); void UpdateStateEffects(); void ReleaseAttachments(); - void ClearUnknown0188(); + void ClearSiegeNameWindow(); void RefreshGuildEmblemWindow(); void NotifyCellMove(const float* x, const float* z); void ProcessViewCheck(); @@ -286,9 +286,9 @@ public: float GetElapsedFrames(); int GetGaugeCurrent(); int GetGaugeMaximum(); - void ResetUnknown03B8(); + void ResetTransformJobs(); bool HasPendingDamage(); - bool UpdateUnknown03E8(std::int64_t value); + bool UpdateMaximumValue(std::int64_t value); int IsPlayerClass(int job); bool UpdateFadeOut(); }; diff --git a/Source/Contents/Actors/GameObject.cpp b/Source/Contents/Actors/GameObject.cpp index 572561137..d6faa0dbd 100644 --- a/Source/Contents/Actors/GameObject.cpp +++ b/Source/Contents/Actors/GameObject.cpp @@ -194,7 +194,7 @@ int CGameActor::Get8Dir(float angle) { if ((IsPlayerJob(this->GetEffectiveJob(-1)) && (this->render.animation == 0 || this->render.animation == 8 || this->render.animation == 16)) || (this->GetEffectiveJob(-1) > 45 && this->GetEffectiveJob(-1) < 1000 && this->render.animation == 0) || - (g_session.IsSkillIdInRange6018(this->GetEffectiveJob(-1)) && + (g_session.IsHirelingJob(this->GetEffectiveJob(-1)) && (this->render.animation == 0 || this->render.animation == 8 || this->render.animation == 16))) { if (relative < 22.5f || relative > 337.5f) { return 0; @@ -916,7 +916,7 @@ void CRenderObject::SendValueMessage(int value, CGameObject* target) { // OFFSET: 0x00CB4070 // FUNCTION: fn_21110 -void CGameActor::ApplyPendingUnknown0408() { +void CGameActor::ApplySavedShapeShift() { const int pending = this->savedShapeShift; this->shapeShift = pending; this->savedShapeShift = 0; @@ -1230,7 +1230,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, this->hitTargetAid = b; break; case AM_MAKE_NUMBER: { - if ((g_session.GetSceneUnknown004C() != 0 || g_session.WorldUnknown0050() != 0) && g_session.IsAdminSubMode(7) == 0) { + if ((g_session.GetSiegeMode() != 0 || g_session.GetBattleFieldMode() != 0) && g_session.IsAdminSubMode(7) == 0) { break; } if ((static_cast(c) << 32 | static_cast(b)) == -29999) { @@ -1567,20 +1567,20 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, break; case AM_WILL_BE_DEAD: if (g_session.IsHomunAid(this->render.accountId)) { - if (g_windowMgr.window_03C0 != nullptr) { + if (g_windowMgr.homunInfoWnd != nullptr) { g_windowMgr.CloseWindow(WID_HOMUNINFOWND); } - if (g_windowMgr.window_03C4 != nullptr) { + if (g_windowMgr.homunculusSkillWnd != nullptr) { g_windowMgr.CloseWindow(WID_SKILLLISTWND_SKILLTAB_0); } g_session.ClearHomunStatus(); g_session.homunAlive = 0; } if (g_session.IsMercenaryAid(this->render.accountId)) { - if (g_windowMgr.window_03C8 != nullptr) { + if (g_windowMgr.mercenaryInfoWnd != nullptr) { g_windowMgr.CloseWindow(WID_MERINFOWND); } - if (g_windowMgr.window_03CC != nullptr) { + if (g_windowMgr.mercenarySkillWnd != nullptr) { g_windowMgr.CloseWindow(WID_SKILLLISTWND_SKILLTAB_1); } g_session.ResetMercenaryStats(); @@ -2178,8 +2178,8 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, break; case AM_CHAT: { std::string text(reinterpret_cast(b)); - if (g_windowMgr.window_01C8 != nullptr) { - text = static_cast(g_windowMgr.window_01C8)->ConvertChat(std::string(reinterpret_cast(b))); + if (g_windowMgr.chatWnd != nullptr) { + text = static_cast(g_windowMgr.chatWnd)->ConvertChat(std::string(reinterpret_cast(b))); } std::string linked; DisplayNavigationLink(linked, text); @@ -3282,9 +3282,9 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, break; } if ((static_cast(e) << 32 | static_cast(d)) != 0) { - this->SetUnknown03B8(f, slot); + this->SetTransformJob(f, slot); } else { - this->SetUnknown03B8(-1, slot); + this->SetTransformJob(-1, slot); if (this->render.state == 3) { this->SetAction(this->WeaponActionBase(3), 4, 1); } diff --git a/Source/Contents/Actors/MercenaryAI.cpp b/Source/Contents/Actors/MercenaryAI.cpp index 599da32c1..a61989f72 100644 --- a/Source/Contents/Actors/MercenaryAI.cpp +++ b/Source/Contents/Actors/MercenaryAI.cpp @@ -724,7 +724,7 @@ int AiMercenaryGetV(lua_State* state) { if (!actor) { result = -1.0; } else { - if (g_session.IsSkillIdInRange6018(actor->GetEffectiveJob(-1))) { + if (g_session.IsHirelingJob(actor->GetEffectiveJob(-1))) { result = actor->GetEffectiveJob(-1) % 6017 + 1.0; } else { result = 1.0; @@ -900,7 +900,7 @@ int AiGetMsg(lua_State* state) { } message.type = 0; - actor->SetUnknown0318(reinterpret_cast(&message), index); + actor->SetMsg2AI(reinterpret_cast(&message), index); return 1; } @@ -951,7 +951,7 @@ int AiGetResMsg(lua_State* state) { } message.type = 0; - actor->SetUnknown0330(reinterpret_cast(&message), index); + actor->SetResMsg2AI(reinterpret_cast(&message), index); return 1; } diff --git a/Source/Contents/Actors/Pc.h b/Source/Contents/Actors/Pc.h index 13663898b..54f236357 100644 --- a/Source/Contents/Actors/Pc.h +++ b/Source/Contents/Actors/Pc.h @@ -103,7 +103,7 @@ public: void DrawBody(int argument, int layer, const float* position, float x, float y, float distanceScale, float scale, float depth); void RenderOverlaySprite(const float* matrix, int); void UpdateGaugeWindow(); - void DrawLayers(const float* matrix, int unknown0030, char unknown0034); + void DrawLayers(const float* matrix, int unknown0030, char blendVariant); float* GetExtent(float* extent) const override; diff --git a/Source/Contents/Actors/Player.cpp b/Source/Contents/Actors/Player.cpp index 7f60f8f55..254a52b9a 100644 --- a/Source/Contents/Actors/Player.cpp +++ b/Source/Contents/Actors/Player.cpp @@ -225,7 +225,7 @@ void CPc::SetBodyCostume(int first, int second) { if (static_cast(second) != 0) { int job; if (this->IsShapeShifted()) { - job = this->GetUnknown0404Job(); + job = this->GetShapeShiftJob(); } else { job = this->GetEffectiveJob(-1); } @@ -812,7 +812,7 @@ void CPc::AddMsgEffect(CGameObject* effect) { // OFFSET: 0x00DA8180 // FUNCTION: fn_22564 void CPc::SetSex(int value) { - this->SetUnknown0260(value); + this->SetSexBit(value); this->SetSprActFull( this->appearanceJob, this->sex, this->head, this->weapon, this->secondaryWeapon, this->accessory, this->accessory2, this->accessory3, this->shield, this->headPalette, this->render.bodyPalette @@ -886,7 +886,7 @@ void CPc::RenderBodyOutline(int layer, const float* position, float x, float y, } } - this->RaiseUnknown03C8((box[3] - box[1]) / 4); + this->RaiseTransformPriority((box[3] - box[1]) / 4); quad.image = image; quad.color = color; if (this->render.unknown_0130[0] == 1) { @@ -2041,7 +2041,7 @@ void CPc::DrawBody(int, int layer, const float* position, float x, float y, floa } } - this->RaiseUnknown03C8((box[3] - box[1]) / 4); + this->RaiseTransformPriority((box[3] - box[1]) / 4); if (this->render.unknown_0130[0] == 1) { quad.color = quad.color & 0xFFFFFF | 0x46000000; } @@ -2350,9 +2350,9 @@ void CPc::Render(int argument) { // OFFSET: 0x00DAD8C0 // FUNCTION: fn_22599 -void CPc::DrawLayers(const float* matrix, int unknown0030, char unknown0034) { +void CPc::DrawLayers(const float* matrix, int unknown0030, char blendVariant) { SpriteLayerRenderer renderer(this); - renderer.Render(matrix, unknown0030, unknown0034); + renderer.Render(matrix, unknown0030, blendVariant); } // OFFSET: 0x00DABF50 @@ -2383,7 +2383,7 @@ void CPc::UpdateGaugeWindow() { // FUNCTION: fn_22635 void CPc::SetSprActFull(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh) { this->appearanceJob = first; - this->SetUnknown0260(second); + this->SetSexBit(second); this->head = third; this->weapon = fourth; this->secondaryWeapon = fifth; @@ -2429,7 +2429,7 @@ void CPc::SetSprActFull(int first, int second, int third, int fourth, int fifth, // FUNCTION: fn_22633 void CPc::SetSprAct2(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh) { this->appearanceJob = first; - this->SetUnknown0260(second); + this->SetSexBit(second); this->head = third; this->weapon = fourth; this->secondaryWeapon = fifth; @@ -2457,7 +2457,7 @@ void CPc::SetSprAct2(int first, int second, int third, int fourth, int fifth, in job = 0x1e; } else if (this->HasShapeShift()) { applyJob = false; - this->SetSprJob(this->GetUnknown0404Job()); + this->SetSprJob(this->GetShapeShiftJob()); } else if (this->isRiding != 0) { job = g_session.GetRidingJob(first); } @@ -2617,7 +2617,7 @@ __declspec(noinline) void CPlayer::UpdateMsgEffect(bool show) { // OFFSET: 0x00DB0FC0 // FUNCTION: fn_22634 void CGrannyPc::SetSprActFull(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh) { - this->SetUnknown0260(second); + this->SetSexBit(second); this->head = third; this->weapon = fourth; this->accessory = sixth; @@ -3077,8 +3077,8 @@ void CPlayer::UpdatePendingAction() { if (mode->IsWithinRange(column, row, targetX, targetY, 1)) { this->SendMsg(nullptr, AM_REQ_CHANGE_DIR, 0, targetX, targetX >> 31, targetY, targetY >> 31, 0, 0, 0, 0, 0, 0, 0, 0); - if (!mode->HasUnknown01A4(this->proceedTargetGid)) { - mode->PushUnknown01A4(this->proceedTargetGid); + if (!mode->HasPendingItemPickup(this->proceedTargetGid)) { + mode->AddPendingItemPickup(this->proceedTargetGid); mode->SendMsg(MM_ITEMPICKUP, this->proceedTargetGid, 0, 0, 0); } break; @@ -4313,7 +4313,7 @@ void CPlayer::Initialize() { *reinterpret_cast(&this->destinationAndSpeed[4]) = *reinterpret_cast(&g_session.healthPoints[0]); this->render.isCharacter = 1; - this->SetUnknown0260(g_session.SyncUnknown0E98()); + this->SetSexBit(g_session.GetCurrentSex()); const int bodyState = this->bodyState; const std::uint32_t stateFlags = this->stateFlags; @@ -4324,7 +4324,7 @@ void CPlayer::Initialize() { this->SetMadogearType(g_session.madogearType); this->SetBodyCostume(g_session.m_bodyCostume, 0); this->SetSprAct2( - g_session.GetDisplayJob(), g_session.SyncUnknown0E98(), g_session.m_head, *reinterpret_cast(&g_session.weaponAppearance[0x4]), + g_session.GetDisplayJob(), g_session.GetCurrentSex(), g_session.m_head, *reinterpret_cast(&g_session.weaponAppearance[0x4]), *reinterpret_cast(&g_session.weaponAppearance[0x8]), *reinterpret_cast(&g_session.accessoryAppearance[0x0]), *reinterpret_cast(&g_session.accessoryAppearance[0x4]), *reinterpret_cast(&g_session.accessoryAppearance[0x8]), g_session.m_headPalette, g_session.m_bodyStyle, g_session.m_jobFlags @@ -4349,7 +4349,7 @@ void CPlayer::Initialize() { this->msgEffect = nullptr; this->objectType = 0; - this->SetUnknown0404(g_session.GetUnknown8134()); + this->SetShapeShift(g_session.GetPlayerSkillMode()); } // OFFSET: 0x00DB4290 @@ -4492,9 +4492,9 @@ void CPc::SetState(int state, int resetPosition) { } bool weaponAllowed; - if (this->GetUnknown0404() == 1) { + if (this->GetShapeShift() == 1) { weaponAllowed = false; - } else if (this->GetUnknown0404() == 2) { + } else if (this->GetShapeShift() == 2) { weaponAllowed = true; } else { weaponAllowed = IsJobWeaponAllowed( @@ -4811,7 +4811,7 @@ void CPc::SendMsg( entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->healthState); + this->SetHealthState(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); this->SetPropensityInfo(entry->honor, entry->virtue); switch (entry->state) { @@ -4850,7 +4850,7 @@ void CPc::SendMsg( ); this->SetSprRobe(entry->robe, 0); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->healthState); + this->SetHealthState(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); this->SetPropensityInfo(entry->honor, entry->virtue); this->pkState = entry->pkState; @@ -4907,7 +4907,7 @@ void CPc::SendMsg( entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->healthState); + this->SetHealthState(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); this->SetPropensityInfo(entry->honor, entry->virtue); switch (entry->state) { @@ -4953,7 +4953,7 @@ void CPc::SendMsg( ); this->SetSprRobe(entry->robe, 0); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->healthState); + this->SetHealthState(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); this->SetPropensityInfo(entry->honor, entry->virtue); switch (entry->state) { @@ -4989,7 +4989,7 @@ void CPc::SendMsg( entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->healthState); + this->SetHealthState(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); this->SetPropensityInfo(entry->honor, entry->virtue); mode->CellCenter(entry->startX, entry->startY, this->render.position.x, this->render.position.z); @@ -5022,7 +5022,7 @@ void CPc::SendMsg( ); this->SetSprRobe(entry->robe, 0); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->healthState); + this->SetHealthState(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); this->SetPropensityInfo(entry->honor, entry->virtue); mode->CellCenter(entry->startX, entry->startY, this->render.position.x, this->render.position.z); @@ -5055,7 +5055,7 @@ void CPc::SendMsg( entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->healthState); + this->SetHealthState(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); this->SetPropensityInfo(entry->honor, entry->virtue); if (this->FindRoute(entry->startX, entry->startY, entry->startSubX, entry->startSubY, entry->destX, entry->destY, entry->speed)) { @@ -5082,7 +5082,7 @@ void CPc::SendMsg( ); this->SetSprRobe(entry->robe, 0); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->healthState); + this->SetHealthState(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); this->SetPropensityInfo(entry->honor, entry->virtue); if (this->FindRoute(entry->startX, entry->startY, entry->startSubX, entry->startSubY, entry->destX, entry->destY, entry->speed)) { @@ -5233,7 +5233,7 @@ void CGrannyPc::SendMsg( entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->healthState); + this->SetHealthState(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); this->SetPropensityInfo(entry->honor, entry->virtue); switch (entry->state) { @@ -5270,7 +5270,7 @@ void CGrannyPc::SendMsg( entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->healthState); + this->SetHealthState(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); this->SetPropensityInfo(entry->honor, entry->virtue); switch (entry->state) { @@ -5322,7 +5322,7 @@ void CGrannyPc::SendMsg( entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->healthState); + this->SetHealthState(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); this->SetPropensityInfo(entry->honor, entry->virtue); switch (entry->state) { @@ -5357,7 +5357,7 @@ void CGrannyPc::SendMsg( entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->healthState); + this->SetHealthState(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); this->SetPropensityInfo(entry->honor, entry->virtue); mode->CellCenter(entry->startX, entry->startY, this->render.position.x, this->render.position.z); @@ -5391,7 +5391,7 @@ void CGrannyPc::SendMsg( entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->healthState); + this->SetHealthState(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); this->SetPropensityInfo(entry->honor, entry->virtue); mode->CellCenter(entry->startX, entry->startY, this->render.position.x, this->render.position.z); @@ -5423,7 +5423,7 @@ void CGrannyPc::SendMsg( entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->healthState); + this->SetHealthState(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); this->SetPropensityInfo(entry->honor, entry->virtue); if (this->FindRoute(entry->startX, entry->startY, entry->startSubX, entry->startSubY, entry->destX, entry->destY, entry->speed)) { diff --git a/Source/Contents/Actors/RenderObject.cpp b/Source/Contents/Actors/RenderObject.cpp index d6f8f3433..68feca412 100644 --- a/Source/Contents/Actors/RenderObject.cpp +++ b/Source/Contents/Actors/RenderObject.cpp @@ -483,7 +483,7 @@ void CRenderObject::SetRenderInfo(const float*, float, float) { // OFFSET: 0x00CC2DA0 // FUNCTION: fn_21146 -__declspec(noinline) void CGameActor::SetUnknown0260(int value) { +__declspec(noinline) void CGameActor::SetSexBit(int value) { this->sex = value & 1; } @@ -589,14 +589,14 @@ void CRenderObject::ModifyArgb(int alpha, int red, int green, int blue) { // OFFSET: 0x00CC1C20 // FUNCTION: fn_21125 -void CGameActor::SetUnknown0305(unsigned char value, int extra) { +void CGameActor::SetSpGauge(unsigned char value, int extra) { this->hasSp = value; this->spGaugeValue = extra; } // OFFSET: 0x00CC1D20 // FUNCTION: fn_21127 -void CGameActor::RaiseUnknown03C8(int value) { +void CGameActor::RaiseTransformPriority(int value) { if (value <= 0 || this->transformPriority < value) { this->transformPriority = value; } @@ -669,7 +669,7 @@ void CRenderObject::SetFrameSequence( // OFFSET: 0x00CC2050 // FUNCTION: fn_21134 -void CGameActor::SetUnknown02E4(int value) { +void CGameActor::SetGroupMemberVisible(int value) { this->isGroupMemberVisible = value; } @@ -687,7 +687,7 @@ void CRenderObject::SetAnimationSpeed(float speed) { // OFFSET: 0x00CC2810 // FUNCTION: fn_21142 -void CGameActor::SetUnknown02C8(int value) { +void CGameActor::SetHealthState(int value) { this->healthState = value; } @@ -868,7 +868,7 @@ void CGameActor::SetImfFileName() { // OFFSET: 0x00CC27C0 // FUNCTION: fn_21141 -void CGameActor::SetUnknown0318(const float* value, int index) { +void CGameActor::SetMsg2AI(const float* value, int index) { if (index == 0) { std::memcpy(this->homunMsg, value, sizeof(this->homunMsg)); } else if (index == 1) { @@ -885,14 +885,14 @@ void CGameActor::SetRenderInfo(const float* bounds, float x, float y) { float depth = 0.0f; if ((g_pickModifierKey != 0) == (g_pickInvert != 0)) { - if (g_session.GetSceneUnknown004C() != 0) { + if (g_session.GetSiegeMode() != 0) { if (IsPlayerJob(this->GetEffectiveJob(-1))) { depth = g_session.IsLocalPlayerAid(this->GetGdid()) != 0 ? 100.0f : 400.0f; } else if (g_session.IsNpcJob(this->GetEffectiveJob(-1))) { depth = 200.0f; } else if (g_session.IsMonsterClass(this->GetEffectiveJob(-1))) { depth = this->objectType == 7 ? 50.0f : 400.0f; - } else if (g_session.IsSkillIdInRange6001(this->GetEffectiveJob(-1)) != 0) { + } else if (g_session.IsCompanionJob(this->GetEffectiveJob(-1)) != 0) { depth = 200.0f; } } else { @@ -902,19 +902,19 @@ void CGameActor::SetRenderInfo(const float* bounds, float x, float y) { depth = 200.0f; } else if (g_session.IsMonsterClass(this->GetEffectiveJob(-1))) { depth = this->objectType == 7 ? 50.0f : 400.0f; - } else if (g_session.IsSkillIdInRange6001(this->GetEffectiveJob(-1)) != 0) { + } else if (g_session.IsCompanionJob(this->GetEffectiveJob(-1)) != 0) { depth = 200.0f; } } } else { - if (g_session.GetSceneUnknown004C() != 0) { + if (g_session.GetSiegeMode() != 0) { if (IsPlayerJob(this->GetEffectiveJob(-1))) { depth = g_session.IsLocalPlayerAid(this->GetGdid()) != 0 ? 400.0f : 100.0f; } else if (g_session.IsNpcJob(this->GetEffectiveJob(-1))) { depth = 100.0f; } else if (g_session.IsMonsterClass(this->GetEffectiveJob(-1))) { depth = this->objectType == 7 ? 50.0f : 200.0f; - } else if (g_session.IsSkillIdInRange6001(this->GetEffectiveJob(-1)) != 0) { + } else if (g_session.IsCompanionJob(this->GetEffectiveJob(-1)) != 0) { depth = 200.0f; } } else { @@ -924,7 +924,7 @@ void CGameActor::SetRenderInfo(const float* bounds, float x, float y) { depth = 100.0f; } else if (g_session.IsMonsterClass(this->GetEffectiveJob(-1))) { depth = this->objectType == 7 ? 50.0f : 200.0f; - } else if (g_session.IsSkillIdInRange6001(this->GetEffectiveJob(-1)) != 0) { + } else if (g_session.IsCompanionJob(this->GetEffectiveJob(-1)) != 0) { depth = 200.0f; } } @@ -958,7 +958,7 @@ void CGameActor::SetRenderInfo(const float* bounds, float x, float y) { if (this->objectType == 7) { info->kind = 3; } else { - info->kind = g_session.IsSkillIdInRange6001(this->GetEffectiveJob(-1)) != 0 ? 4 : 0; + info->kind = g_session.IsCompanionJob(this->GetEffectiveJob(-1)) != 0 ? 4 : 0; } switch (this->objectType) { case 9: @@ -1245,7 +1245,7 @@ void CGameActor::PlayGroundSkillEffect(int sender, const int* skill, int argumen // OFFSET: 0x00CC2D50 // FUNCTION: fn_21145 -void CGameActor::SetUnknown0330(const float* value, int index) { +void CGameActor::SetResMsg2AI(const float* value, int index) { if (index == 0) { std::memcpy(this->homunResMsg, value, sizeof(this->homunResMsg)); } else if (index == 1) { @@ -2069,7 +2069,7 @@ int CGameActor::GetShield() { // OFFSET: 0x005A1280 // FUNCTION: fn_03042 void CGameActor::SetSex(int value) { - this->SetUnknown0260(value); + this->SetSexBit(value); } // OFFSET: 0x005A1290 @@ -2794,7 +2794,7 @@ void CCharacterNpc::SendMsg( // OFFSET: 0x00CAC760 // FUNCTION: fn_21044 -int CGameActor::GetUnknown0404Job() const { +int CGameActor::GetShapeShiftJob() const { switch (this->shapeShift) { case 1: return 0x1104; @@ -2807,7 +2807,7 @@ int CGameActor::GetUnknown0404Job() const { // OFFSET: 0x00CC1D40 // FUNCTION: fn_21128 -void CGameActor::SetUnknown03B8(int value, int slot) { +void CGameActor::SetTransformJob(int value, int slot) { this->transformPriority = 0; if (this->render.accountId == g_session.m_aid) { g_session.SetPairValue(value, slot); @@ -2829,7 +2829,7 @@ void CGameActor::SetUnknown03B8(int value, int slot) { if (g_session.IsCostumeJob(this->GetEffectiveJob(-1)) == true || this->shapeShift == 0) { job = this->GetEffectiveJob(-1); } else { - job = this->GetUnknown0404Job(); + job = this->GetShapeShiftJob(); } this->SetBodyPaletteName(); @@ -2913,13 +2913,13 @@ void CGameActor::SetTetraBall(int index, int on, int value) { // OFFSET: 0x00CC40C0 // FUNCTION: fn_21157 -void CGameActor::SetUnknown0404(int value) { +void CGameActor::SetShapeShift(int value) { this->shapeShift = value; } // OFFSET: 0x00CC3DE0 // FUNCTION: fn_21155 -void CGameActor::SetUnknown008C(const std::uint32_t* value) { +void CGameActor::SetMotionTintState(const std::uint32_t* value) { this->render.motionStartTime = value[0]; this->render.savedTintColor = value[1]; this->render.targetTintColor = value[2]; @@ -2933,7 +2933,7 @@ void CGameActor::UnRegisterPos() { // OFFSET: 0x00CC1E30 // FUNCTION: fn_21129 -void CGameActor::SetUnknown03C4(int value) { +void CGameActor::SetMonsterTransformJob(int value) { this->transformPriority = 0; this->monsterTransformJob = value; if (value > 0) { @@ -3250,7 +3250,7 @@ void CGameActor::ResetJobEffects() { // OFFSET: 0x00CAB020 // FUNCTION: fn_21024 -__declspec(noinline) void CGameActor::ClearUnknown037C(int value) { +__declspec(noinline) void CGameActor::ClearStatusEffectInstance(int value) { if (this->statusEffects[1] == value) { this->statusEffects[1] = 0; } else if (this->statusEffects[0] == value) { @@ -3438,7 +3438,7 @@ int CGameActor::MountHeightOffset() { // OFFSET: 0x00CABD30 // FUNCTION: fn_21036 -int CGameActor::GetUnknown0404() { +int CGameActor::GetShapeShift() { return this->shapeShift; } @@ -3469,7 +3469,7 @@ C3dGrannyGameActor::C3dGrannyGameActor(const char* name) { // FUNCTION: fn_21189 void C3dGrannyGameActor::SetSprAct(int job, int value, int) { this->SetActorJob(job); - this->SetUnknown0260(value); + this->SetSexBit(value); this->model = static_cast(ResourceMgr::Instance().Load(this->name)); this->instance = GrannyInstantiateModel(this->model->model); for (int mesh = 0; mesh < this->model->instance->meshCount; ++mesh) { @@ -4580,9 +4580,9 @@ void CGameActor::SetActorJob(int job) { // OFFSET: 0x00CAAFD0 // FUNCTION: fn_21023 -void CGameActor::ClearUnknown0188() { - if (g_session.GetSceneUnknown004C() != 0 && this->sceneNameWindow != 0) { - static_cast(g_modeMgr.GetGameMode())->RemoveUnknown0604(this->sceneNameWindow); +void CGameActor::ClearSiegeNameWindow() { + if (g_session.GetSiegeMode() != 0 && this->sceneNameWindow != 0) { + static_cast(g_modeMgr.GetGameMode())->RemoveNotificationWindow(this->sceneNameWindow); g_windowMgr.Schedule(reinterpret_cast(this->sceneNameWindow)); this->sceneNameWindow = 0; } @@ -4591,7 +4591,7 @@ void CGameActor::ClearUnknown0188() { // OFFSET: 0x00CAE5E0 // FUNCTION: fn_21075 void CGameActor::RefreshGuildEmblemWindow() { - if (g_session.GetSceneUnknown004C() == 0) { + if (g_session.GetSiegeMode() == 0) { return; } if (g_session.m_aid == this->render.accountId) { @@ -4790,7 +4790,7 @@ void CGameActor::SpawnDamageDigits(int, int damage, std::uint32_t color, int typ for (auto it = this->msgEffectList.begin(); it != this->msgEffectList.end();) { CMsgEffect* effect = static_cast(*it); if (effect->m_type == 22) { - this->ClearUnknown037C(reinterpret_cast(effect)); + this->ClearStatusEffectInstance(reinterpret_cast(effect)); effect->SendMsg(this, AM_MASTER_DEAD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); it = this->msgEffectList.erase(it); static_cast(g_modeMgr.GetGameMode())->scene->RemoveObject(effect); @@ -4896,7 +4896,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef this->SendMsg(nullptr, AM_DELETE_WOLF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } if (!g_session.IsGuildMemberAccount(this->render.accountId)) { - this->ClearUnknown0188(); + this->ClearSiegeNameWindow(); } if (this->actorTitleWindow) { g_windowMgr.Schedule(reinterpret_cast(this->actorTitleWindow)); @@ -4951,7 +4951,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef this->SendMsg(nullptr, AM_DELETE_WOLF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } if (!g_session.IsGuildMemberAccount(this->render.accountId)) { - this->ClearUnknown0188(); + this->ClearSiegeNameWindow(); } if (this->actorTitleWindow) { g_windowMgr.Schedule(reinterpret_cast(this->actorTitleWindow)); @@ -5039,7 +5039,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef this->SendMsg(nullptr, AM_DELETE_WOLF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } if (!g_session.IsGuildMemberAccount(this->render.accountId)) { - this->ClearUnknown0188(); + this->ClearSiegeNameWindow(); } if (this->actorTitleWindow) { g_windowMgr.Schedule(reinterpret_cast(this->actorTitleWindow)); @@ -5408,8 +5408,8 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i case ABC_FROM_THE_ABYSS_ATK: case NPC_BO_THROWROCK: case NPC_BO_WOODEN_ATTACK: - effect = g_session.FindUnknown0708(skillId); - followEffect = g_session.FindUnknown0700(skillId); + effect = g_session.FindSkillEffectId(skillId); + followEffect = g_session.FindSkillFollowEffect(skillId); break; } @@ -5542,8 +5542,8 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i return; } - const int hitEffect = g_session.FindUnknown0708(skillId); - int followEffect = g_session.FindUnknown0700(skillId); + const int hitEffect = g_session.FindSkillEffectId(skillId); + int followEffect = g_session.FindSkillFollowEffect(skillId); if (followEffect == 186) { switch (level) { case 2: @@ -5752,7 +5752,7 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i switch (skillId) { case MO_TRIPLEATTACK: this->SetSequenceInterval(4); - this->SetFrameSequence(0x58, 0, 7, 0x58, 7, 1, g_session.FindUnknown0778(this->render.accountId), 0); + this->SetFrameSequence(0x58, 0, 7, 0x58, 7, 1, g_session.FindActorSkillAnimationValue(this->render.accountId), 0); break; case MO_INVESTIGATE: case MO_FINGEROFFENSIVE: @@ -5774,14 +5774,14 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i } break; case MO_CHAINCOMBO: - this->SetFrameSequence(0x60, 5, 5, 0x60, 5, 1, g_session.FindUnknown0778(this->render.accountId), 0); + this->SetFrameSequence(0x60, 5, 5, 0x60, 5, 1, g_session.FindActorSkillAnimationValue(this->render.accountId), 0); static_cast(target)->LaunchEffect(0x106, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); this->LaunchEffect(0x107, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); static_cast(target)->LaunchEffect(0x111, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); break; case MO_COMBOFINISH: this->SetSequenceInterval(6); - this->SetFrameSequence(0x60, 1, 2, 0x60, 2, 1, g_session.FindUnknown0778(this->render.accountId), 0); + this->SetFrameSequence(0x60, 1, 2, 0x60, 2, 1, g_session.FindActorSkillAnimationValue(this->render.accountId), 0); static_cast(g_modeMgr.GetGameMode())->SendMsg(MM_QUAKE, 0, 0, 0, 0); g_soundMgr->PlayWave("effect\\mon_맹룡과강.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); this->LaunchEffect(0x107, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); @@ -5795,7 +5795,7 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i break; case CH_TIGERFIST: this->SetSequenceInterval(6); - this->SetFrameSequence(0x60, 4, 4, 0x60, 4, 1, g_session.FindUnknown0778(this->render.accountId), 0); + this->SetFrameSequence(0x60, 4, 4, 0x60, 4, 1, g_session.FindActorSkillAnimationValue(this->render.accountId), 0); static_cast(g_modeMgr.GetGameMode())->SendMsg(MM_QUAKE, 0, 0, 0, 0); this->LaunchEffect(0x179, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); this->LaunchEffect(0x107, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); @@ -5811,16 +5811,16 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i } case SR_DRAGONCOMBO: this->SetSequenceInterval(6); - this->SetFrameSequence(0x60, 4, 4, 0x60, 4, 1, g_session.FindUnknown0778(this->render.accountId), 0); + this->SetFrameSequence(0x60, 4, 4, 0x60, 4, 1, g_session.FindActorSkillAnimationValue(this->render.accountId), 0); break; case SR_SKYNETBLOW: case SR_TIGERCANNON: this->SetSequenceInterval(6); - this->SetFrameSequence(0x60, 5, 5, 0x60, 5, 1, g_session.FindUnknown0778(this->render.accountId), 0); + this->SetFrameSequence(0x60, 5, 5, 0x60, 5, 1, g_session.FindActorSkillAnimationValue(this->render.accountId), 0); break; case SR_EARTHSHAKER: this->SetSequenceInterval(6); - this->SetFrameSequence(0x60, 1, 2, 0x60, 2, 1, g_session.FindUnknown0778(this->render.accountId), 0); + this->SetFrameSequence(0x60, 1, 2, 0x60, 2, 1, g_session.FindActorSkillAnimationValue(this->render.accountId), 0); if (!this->HasId(0x378)) { static_cast(g_modeMgr.GetGameMode())->SendMsg(MM_QUAKE, 0, 0, 0, 0); g_soundMgr->PlayWave("effect\\SR_EARTHSHAKER.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); @@ -5830,7 +5830,7 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i break; case SR_FALLENEMPIRE: this->SetSequenceInterval(6); - this->SetFrameSequence(0x60, 3, 3, 0x60, 3, 1, g_session.FindUnknown0778(this->render.accountId), 0); + this->SetFrameSequence(0x60, 3, 3, 0x60, 3, 1, g_session.FindActorSkillAnimationValue(this->render.accountId), 0); static_cast(g_modeMgr.GetGameMode())->SendMsg(MM_QUAKE, 0, 0, 0, 0); g_soundMgr->PlayWave("effect\\SR_FALLENEMPIRE.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); g_effectMgr->Spawn(target->render.accountId, 0x622, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); @@ -5926,7 +5926,7 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i break; case ABC_DEFT_STAB: message.hitEffect = -1; - message.effectId = g_session.FindUnknown0700(skillId); + message.effectId = g_session.FindSkillFollowEffect(skillId); message.action = action; break; case AG_SOUL_VC_STRIKE: @@ -5950,7 +5950,7 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i case MH_TWISTER_CUTTER: case MH_ABSOLUTE_ZEPHYR: case MH_BLAZING_AND_FURIOUS: - message.effectId = g_session.FindUnknown0700(skillId); + message.effectId = g_session.FindSkillFollowEffect(skillId); message.action = action; break; case TK_STORMKICK: diff --git a/Source/Contents/Actors/Skill.cpp b/Source/Contents/Actors/Skill.cpp index 5accda007..c0bb75936 100644 --- a/Source/Contents/Actors/Skill.cpp +++ b/Source/Contents/Actors/Skill.cpp @@ -424,7 +424,7 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int case EM_VENOM_SWAMP: case EM_CONFLAGRATION: case MH_BLAST_FORGE: - effectId = g_session.FindUnknown0700(skillId); + effectId = g_session.FindSkillFollowEffect(skillId); break; case WH_DEEPBLINDTRAP: effectId = 0x753; diff --git a/Source/Contents/CashEmotionMgr.cpp b/Source/Contents/CashEmotionMgr.cpp index 2165636a2..464c92ffc 100644 --- a/Source/Contents/CashEmotionMgr.cpp +++ b/Source/Contents/CashEmotionMgr.cpp @@ -2019,7 +2019,7 @@ __declspec(noinline) void UICashEmotionListChildWnd_Search::AddResults(char type // OFFSET: 0x007C5B10 // FUNCTION: fn_09382 __declspec(noinline) void UICashEmotionListChildWnd_Search::Refresh(const char* filter) { - g_windowMgr.ClearWindow01B8(); + g_windowMgr.ClearPreviousMouseWnd(); this->m_items.clear(); this->Clear(); this->horizontalBar = nullptr; diff --git a/Source/Contents/ClientItemLists.cpp b/Source/Contents/ClientItemLists.cpp index 90b20147b..332a515d4 100644 --- a/Source/Contents/ClientItemLists.cpp +++ b/Source/Contents/ClientItemLists.cpp @@ -230,14 +230,14 @@ void __fastcall RefreshItemWindows(UIWindowMgr* mgr) { if (mgr->itemWnd) { reinterpret_cast(mgr->itemWnd)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - if (mgr->window_01E8) { - mgr->window_01E8->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (mgr->shortCutWnd) { + mgr->shortCutWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } if (UIWindow* window = mgr->LookupWindow(WID_QUIKSLOTWND)) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - if (mgr->window_4F260) { - mgr->window_4F260->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (mgr->barterMarketWnd) { + mgr->barterMarketWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } } @@ -271,7 +271,7 @@ void CGameMode::ReceiveItem1738Add(const unsigned char* data) { reinterpret_cast(item.options)[index] = options[index]; } item.grade = 0; - g_session.AddItem1738(item, 1); + g_session.AddCartItem(item, 1); } struct ItemAddSlotPacket { @@ -307,7 +307,7 @@ void ReceiveItemSlot(const unsigned char* data) { } if (packet.itemId == 0) { - g_session.SetUnknown5214(packet.slot); + g_session.SetOtherExchangeMoney(packet.slot); return; } @@ -336,7 +336,7 @@ void ReceiveItemSlotOptions(const unsigned char* data) { } if (packet.itemId == 0) { - g_session.SetUnknown5214(packet.slot); + g_session.SetOtherExchangeMoney(packet.slot); return; } @@ -379,7 +379,7 @@ void ReceiveFriendAddResult(const unsigned char* data) { member.characterId = packet->characterId; member.offline = 0; g_session.AddFriend(member); - g_session.RefreshWindow02C8(); + g_session.RefreshMessengerGroupWindow(); return; } case FRIEND_ADD_FALSE: @@ -430,7 +430,7 @@ void CGameMode::ReceiveItem1740Add(const unsigned char* data) { reinterpret_cast(item.options)[index] = options[index]; } item.grade = 0; - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } // OFFSET: 0x00D1FF70 @@ -453,7 +453,7 @@ void CGameMode::ReceiveItem1740AddOptions(const unsigned char* data) { reinterpret_cast(item.options)[index] = options[index]; } item.grade = 0; - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } // OFFSET: 0x00D20180 @@ -476,7 +476,7 @@ void CGameMode::ReceiveItem1740AddGrade(const unsigned char* data) { reinterpret_cast(item.options)[index] = options[index]; } item.grade = packet.grade; - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } // OFFSET: 0x00D204B0 @@ -499,7 +499,7 @@ void CGameMode::ReceiveItem1738AddOptions(const unsigned char* data) { reinterpret_cast(item.options)[index] = options[index]; } item.grade = 0; - g_session.AddItem1738(item, 1); + g_session.AddCartItem(item, 1); } // OFFSET: 0x00D206C0 @@ -522,7 +522,7 @@ void CGameMode::ReceiveItem1738AddGrade(const unsigned char* data) { reinterpret_cast(item.options)[index] = options[index]; } item.grade = packet.grade; - g_session.AddItem1738(item, 1); + g_session.AddCartItem(item, 1); } namespace { @@ -597,7 +597,7 @@ void CGameMode::ReceiveEquipItemList(const unsigned char* packet) { std::memcpy(options, record.options, sizeof(options)); ITEM_INFO item; FillEquipItemListItem(item, record, options); - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); } break; case INVTYPE_INVENTORY: @@ -613,14 +613,14 @@ void CGameMode::ReceiveEquipItemList(const unsigned char* packet) { } if (item.identity[3] == 0) { - g_session.AddItem1710(item, 0); + g_session.AddInventoryItem(item, 0); g_session.UpdateInventoryItem(item, 0); } else { char equipped = 1; if (g_session.IsCostumeLocation(item.identity[3])) { - g_session.EquipItem2B50(item, &equipped); + g_session.EquipCostumeItem(item, &equipped); } else { - g_session.EquipUnknown17F0(item, &equipped); + g_session.EquipInventoryItem(item, &equipped); } } @@ -647,7 +647,7 @@ void CGameMode::ReceiveEquipItemList(const unsigned char* packet) { std::memcpy(options, record.options, sizeof(options)); ITEM_INFO item; FillEquipItemListItem(item, record, options); - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); } break; } @@ -676,11 +676,11 @@ void CGameMode::ReceiveItemListPart(unsigned char listType, int count, const uns g_session.UpdateInventoryItem(item, 0); break; case INVTYPE_CART: - g_session.AddItem1740(item); + g_session.AddMerchantShopItem(item); break; case INVTYPE_STORAGE: case INVTYPE_GUILD_STORAGE: - g_session.AddItem1738(item, 0); + g_session.AddCartItem(item, 0); break; } } @@ -696,7 +696,7 @@ void CGameMode::RefreshItemListWindow(unsigned char listType, bool partial) { switch (listType) { case INVTYPE_STORAGE: case INVTYPE_GUILD_STORAGE: - if (UIWindow* window = g_windowMgr.window_0288) { + if (UIWindow* window = g_windowMgr.itemStoreWnd) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); reinterpret_cast(window)[0x190] = 1; } @@ -736,7 +736,7 @@ __declspec(noinline) EquipSlots EquipSlotDecoder::Decode(int mask) const { // OFFSET: 0x00DD7030 // FUNCTION: fn_23282 -__declspec(noinline) bool CSession::AddItem1710(const ITEM_INFO& item, unsigned char refresh) { +__declspec(noinline) bool CSession::AddInventoryItem(const ITEM_INFO& item, unsigned char refresh) { for (ITEM_INFO& value : this->m_inventoryItems) { if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; @@ -758,7 +758,7 @@ __declspec(noinline) bool CSession::AddItem1710(const ITEM_INFO& item, unsigned // OFFSET: 0x00DD7210 // FUNCTION: fn_23284 -bool CSession::AddItem1768(const ITEM_INFO& item, unsigned char alternate, unsigned char refresh) { +bool CSession::AddMerchantPurchaseSavedItem(const ITEM_INFO& item, unsigned char alternate, unsigned char refresh) { for (ITEM_INFO& value : this->merchantPurchaseSavedItems) { if (value.identity[1] == item.identity[1]) { if (!alternate) { @@ -785,7 +785,7 @@ bool CSession::AddItem1768(const ITEM_INFO& item, unsigned char alternate, unsig // OFFSET: 0x00DD72C0 // FUNCTION: fn_23285 -bool CSession::AddItem1740(const ITEM_INFO& item) { +bool CSession::AddMerchantShopItem(const ITEM_INFO& item) { for (ITEM_INFO& value : this->merchantShopItems) { if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; @@ -805,7 +805,7 @@ bool CSession::AddItem1740(const ITEM_INFO& item) { // OFFSET: 0x00DD7350 // FUNCTION: fn_23286 -bool CSession::AddItem1750(const ITEM_INFO& item, int type, unsigned char refresh) { +bool CSession::AddMerchantMyShopItem(const ITEM_INFO& item, int type, unsigned char refresh) { for (ITEM_INFO& value : this->merchantMyShopItems) { if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; @@ -841,7 +841,7 @@ bool CSession::AddItem1750(const ITEM_INFO& item, int type, unsigned char refres // OFFSET: 0x00DD7420 // FUNCTION: fn_23287 -void CSession::AddItem1758(const ITEM_INFO& item) { +void CSession::AddMerchantPurchaseItem(const ITEM_INFO& item) { for (ITEM_INFO& value : this->merchantPurchaseItems) { if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; @@ -854,7 +854,7 @@ void CSession::AddItem1758(const ITEM_INFO& item) { // OFFSET: 0x00DD7470 // FUNCTION: fn_23288 -void CSession::AddItem1760(const ITEM_INFO& item) { +void CSession::AddMerchantHopeToSellItem(const ITEM_INFO& item) { for (ITEM_INFO& value : this->merchantHopeToSellItems) { if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; @@ -867,7 +867,7 @@ void CSession::AddItem1760(const ITEM_INFO& item) { // OFFSET: 0x00DD74C0 // FUNCTION: fn_23289 -void CSession::AddItem1748(const ITEM_INFO& item) { +void CSession::AddMerchantMirrorItem(const ITEM_INFO& item) { for (ITEM_INFO& value : this->merchantMirrorItems) { if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; @@ -901,7 +901,7 @@ bool CSession::Equip(const ITEM_INFO& item) { // OFFSET: 0x00DD75C0 // FUNCTION: fn_23291 -void CSession::AddItem1718(const RawItemBasic& item, int quantity, std::uint16_t unknown_006C) { +void CSession::AddShopItem(const RawItemBasic& item, int quantity, std::uint16_t unknown_006C) { ITEM_INFO value; value.AssignBasic(item); value.quantity = quantity; @@ -914,7 +914,7 @@ void CSession::AddItem1718(const RawItemBasic& item, int quantity, std::uint16_t // OFFSET: 0x00DD76C0 // FUNCTION: fn_23292 -void CSession::AppendItem1718(const ITEM_INFO& item) { +void CSession::AppendShopItem(const ITEM_INFO& item) { this->shopItems.push_back(item); } @@ -946,7 +946,7 @@ void CSession::MergeItem1720ByName(const ITEM_INFO& item) { // OFFSET: 0x00DD77F0 // FUNCTION: fn_23295 -void CSession::MergeItem1720(const ITEM_INFO& item) { +void CSession::MergePurchaseItem(const ITEM_INFO& item) { for (ITEM_INFO& value : this->purchaseItems) { const bool same = item.flags[3] ? value.identity[1] == item.identity[1] : value.itemId == item.itemId; if (same) { @@ -960,7 +960,7 @@ void CSession::MergeItem1720(const ITEM_INFO& item) { // OFFSET: 0x00DD7890 // FUNCTION: fn_23296 -void CSession::AddItem1730(const ITEM_INFO& item) { +void CSession::AddStorageItem(const ITEM_INFO& item) { const ITEM_INFO owned = LookupClientItemByIdentity(this->m_inventoryItems, item.identity[1]); if (owned.identity[1] > 0) { for (ITEM_INFO& value : this->storageItems) { @@ -981,7 +981,7 @@ void CSession::AddItem1730(const ITEM_INFO& item) { // OFFSET: 0x00DD7970 // FUNCTION: fn_23297 -void CSession::AddItem1718(const RawItemBasic& item, int mode) { +void CSession::AddShopItem(const RawItemBasic& item, int mode) { if (mode != 0) { const ITEM_INFO owned = LookupClientItemByIdentity(this->m_inventoryItems, item.id); if (owned.identity[1] != 0) { @@ -1004,7 +1004,7 @@ void CSession::AddItem1718(const RawItemBasic& item, int mode) { // OFFSET: 0x00DD7B30 // FUNCTION: fn_23298 -void CSession::MergeItem1718(const ITEM_INFO& item) { +void CSession::MergeShopItem(const ITEM_INFO& item) { for (ITEM_INFO& value : this->shopItems) { if (value.identity[1] == item.identity[1]) { if (value.quantity != -1) { @@ -1019,7 +1019,7 @@ void CSession::MergeItem1718(const ITEM_INFO& item) { // OFFSET: 0x00DD7B80 // FUNCTION: fn_23299 -bool CSession::AddItem1738(const ITEM_INFO& item, unsigned char refresh) { +bool CSession::AddCartItem(const ITEM_INFO& item, unsigned char refresh) { if (g_replayAnimationScaling && !Replay::Instance().header.options.Get(ReplayRecordOption::Item)) { return true; } @@ -1027,23 +1027,23 @@ bool CSession::AddItem1738(const ITEM_INFO& item, unsigned char refresh) { for (ITEM_INFO& value : this->cartItems) { if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; - if (refresh && g_windowMgr.window_0288) { - g_windowMgr.window_0288->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (refresh && g_windowMgr.itemStoreWnd) { + g_windowMgr.itemStoreWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } return false; } } this->cartItems.push_back(item); - if (refresh && g_windowMgr.window_0288) { - g_windowMgr.window_0288->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (refresh && g_windowMgr.itemStoreWnd) { + g_windowMgr.itemStoreWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } return true; } // OFFSET: 0x00DD6D70 // FUNCTION: fn_23280 -bool CSession::EquipUnknown17F0(const ITEM_INFO& item, const char* name) { +bool CSession::EquipInventoryItem(const ITEM_INFO& item, const char* name) { const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); const int order[3] = {slots.values[2], slots.values[1], slots.values[0]}; @@ -1075,7 +1075,7 @@ bool CSession::OnItemEquipped(ITEM_INFO& item) { if (g_session.IsCostumeLocation(item.identity[3])) { char name[1] = ""; - g_session.EquipItem2B50(item, name); + g_session.EquipCostumeItem(item, name); } else { const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); const int order[3] = {slots.values[2], slots.values[1], slots.values[0]}; @@ -1098,7 +1098,7 @@ bool CSession::OnItemEquipped(ITEM_INFO& item) { } if (item.identity[3] != 0x8000) { - this->RemoveItem1710(item.identity[1], 1); + this->RemoveInventoryItem(item.identity[1], 1); } if (UIWindow* window = reinterpret_cast(g_windowMgr.itemParamChangeDisplayWnd)) { window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); @@ -1260,49 +1260,49 @@ void CSession::ClearItems1760And1748() { // OFFSET: 0x00DD8900 // FUNCTION: fn_23315 -void CSession::ClearItems1768() { +void CSession::ClearMerchantPurchaseSavedItems() { this->merchantPurchaseSavedItems.erase(this->merchantPurchaseSavedItems.begin(), this->merchantPurchaseSavedItems.end()); } // OFFSET: 0x00DD8920 // FUNCTION: fn_23316 -void CSession::ClearItems1740() { +void CSession::ClearMerchantShopItems() { this->merchantShopItems.erase(this->merchantShopItems.begin(), this->merchantShopItems.end()); } // OFFSET: 0x00DD8940 // FUNCTION: fn_23317 -__declspec(noinline) void CSession::ClearItems1750() { +__declspec(noinline) void CSession::ClearMerchantMyShopItems() { this->merchantMyShopItems.erase(this->merchantMyShopItems.begin(), this->merchantMyShopItems.end()); } // OFFSET: 0x00DD8960 // FUNCTION: fn_23318 -void CSession::ClearItems1758() { +void CSession::ClearMerchantPurchaseItems() { this->merchantPurchaseItems.erase(this->merchantPurchaseItems.begin(), this->merchantPurchaseItems.end()); } // OFFSET: 0x00DD8980 // FUNCTION: fn_23319 -void CSession::ClearItems1760() { +void CSession::ClearMerchantHopeToSellItems() { this->merchantHopeToSellItems.erase(this->merchantHopeToSellItems.begin(), this->merchantHopeToSellItems.end()); } // OFFSET: 0x00DD89A0 // FUNCTION: fn_23320 -void CSession::ClearItems1748() { +void CSession::ClearMerchantMirrorItems() { this->merchantMirrorItems.erase(this->merchantMirrorItems.begin(), this->merchantMirrorItems.end()); } // OFFSET: 0x00DD89C0 // FUNCTION: fn_23321 -void CSession::ClearRecords0734() { +void CSession::ClearMiniPartyRecords() { this->miniPartyRecords.clear(); } // OFFSET: 0x00DD8A20 // FUNCTION: fn_23322 -void CSession::ClearItems1784(int index) { +void CSession::ClearInventoryCategoryItems(int index) { if (index >= 0 && static_cast(index) < 11) { this->inventoryCategories[index].erase(this->inventoryCategories[index].begin(), this->inventoryCategories[index].end()); } @@ -1347,7 +1347,7 @@ void CSession::ClearPartyMembers() { // OFFSET: 0x00DD8BD0 // FUNCTION: fn_23326 -void CSession::ResetUnknown166C() { +void CSession::ResetStatBonuses() { this->strengthBonus = 0; this->dexterityBonus = 0; this->luckBonus = 0; @@ -1358,7 +1358,7 @@ void CSession::ResetUnknown166C() { // OFFSET: 0x00DD8C10 // FUNCTION: fn_23327 -void CSession::ClearItems1720() { +void CSession::ClearPurchaseItems() { this->purchaseItems.erase(this->purchaseItems.begin(), this->purchaseItems.end()); } @@ -1372,7 +1372,7 @@ void CSession::ResetHotkeyDescriptions() { // OFFSET: 0x00DD8CA0 // FUNCTION: fn_23329 -void CSession::ClearItems1738() { +void CSession::ClearCartItems() { this->cartItems.erase(this->cartItems.begin(), this->cartItems.end()); } @@ -1398,7 +1398,7 @@ void CSession::CopyItems1760To1770() { // OFFSET: 0x00DD8EA0 // FUNCTION: fn_23332 -std::pair CSession::FindItem1750(const ITEM_INFO& item, unsigned char) { +std::pair CSession::FindMerchantMyShopItem(const ITEM_INFO& item, unsigned char) { auto found = this->merchantMyShopItems.begin(); for (; found != this->merchantMyShopItems.end(); ++found) { @@ -1501,7 +1501,7 @@ void CSession::RemoveItem1758ByItemId(ITEM_INFO& item) { // OFFSET: 0x00DDA510 // FUNCTION: fn_23339 -void CSession::RemoveItem1710(std::uint32_t id, int quantity) { +void CSession::RemoveInventoryItem(std::uint32_t id, int quantity) { for (auto it = this->m_inventoryItems.begin(); it != this->m_inventoryItems.end(); ++it) { if (it->identity[1] == id) { if (it->quantity <= quantity) { @@ -1531,7 +1531,7 @@ void CSession::RefreshItem1768Window(unsigned char alternate, int argument) { // OFFSET: 0x00DDA5A0 // FUNCTION: fn_23340 -bool CSession::RemoveItem1768(const ITEM_INFO& item, unsigned char alternate) { +bool CSession::RemoveMerchantPurchaseSavedItem(const ITEM_INFO& item, unsigned char alternate) { int index = 0; for (auto it = this->merchantPurchaseSavedItems.begin(); it != this->merchantPurchaseSavedItems.end(); ++it, ++index) { if (it->identity[1] == item.identity[1]) { @@ -1556,7 +1556,7 @@ bool CSession::RemoveItem1768(const ITEM_INFO& item, unsigned char alternate) { // OFFSET: 0x00DDA690 // FUNCTION: fn_23341 -bool CSession::RemoveItem1740(const ITEM_INFO& item) { +bool CSession::RemoveMerchantShopItem(const ITEM_INFO& item) { for (auto it = this->merchantShopItems.begin(); it != this->merchantShopItems.end(); ++it) { if (it->identity[1] == item.identity[1]) { it->quantity -= item.quantity; @@ -1583,7 +1583,7 @@ bool CSession::RemoveItem1740(const ITEM_INFO& item) { // OFFSET: 0x00DDA8B0 // FUNCTION: fn_23343 -void CSession::RemoveItem1758(ITEM_INFO& item) { +void CSession::RemoveMerchantPurchaseItem(ITEM_INFO& item) { for (auto it = this->merchantPurchaseItems.begin(); it != this->merchantPurchaseItems.end(); ++it) { if (it->identity[1] == item.identity[1]) { item.itemId = it->itemId; @@ -1598,7 +1598,7 @@ void CSession::RemoveItem1758(ITEM_INFO& item) { // OFFSET: 0x00DDA920 // FUNCTION: fn_23344 -void CSession::RemoveItem1760(const ITEM_INFO& item) { +void CSession::RemoveMerchantHopeToSellItem(const ITEM_INFO& item) { for (auto it = this->merchantHopeToSellItems.begin(); it != this->merchantHopeToSellItems.end(); ++it) { if (it->identity[1] == item.identity[1]) { it->quantity -= item.quantity; @@ -1629,7 +1629,7 @@ void CSession::RemoveItem1718ByItemId(const ITEM_INFO& item) { // OFFSET: 0x00DDAA50 // FUNCTION: fn_23346 -void CSession::RemoveItem1718(const ITEM_INFO& item) { +void CSession::RemoveShopItem(const ITEM_INFO& item) { for (auto it = this->shopItems.begin(); it != this->shopItems.end(); ++it) { if (it->identity[1] == item.identity[1]) { if (it->quantity != -1) { @@ -1659,7 +1659,7 @@ void CSession::RemoveItem1720ByName(const ITEM_INFO& item) { // OFFSET: 0x00DDAC40 // FUNCTION: fn_23349 -void CSession::RemoveItem1730(const ITEM_INFO& item) { +void CSession::RemoveStorageItem(const ITEM_INFO& item) { for (auto it = this->storageItems.begin(); it != this->storageItems.end(); ++it) { if (it->identity[1] == item.identity[1]) { it->quantity -= item.quantity; @@ -1673,7 +1673,7 @@ void CSession::RemoveItem1730(const ITEM_INFO& item) { // OFFSET: 0x00DDAC90 // FUNCTION: fn_23350 -void CSession::ReduceItem1718(const ITEM_INFO& item) { +void CSession::ReduceShopItemQuantity(const ITEM_INFO& item) { for (auto it = this->shopItems.begin(); it != this->shopItems.end(); ++it) { if (it->identity[1] == item.identity[1]) { it->quantity -= item.quantity; @@ -1687,7 +1687,7 @@ void CSession::ReduceItem1718(const ITEM_INFO& item) { // OFFSET: 0x00DDACE0 // FUNCTION: fn_23351 -bool CSession::RemoveItem1738(const ITEM_INFO& item) { +bool CSession::RemoveCartItem(const ITEM_INFO& item) { for (auto it = this->cartItems.begin(); it != this->cartItems.end(); ++it) { if (it->identity[1] == item.identity[1]) { it->quantity -= item.quantity; @@ -1700,13 +1700,13 @@ bool CSession::RemoveItem1738(const ITEM_INFO& item) { break; } } - if (UIWindow* window = g_windowMgr.window_0288) { + if (UIWindow* window = g_windowMgr.itemStoreWnd) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } return true; } } - if (UIWindow* window = g_windowMgr.window_0288) { + if (UIWindow* window = g_windowMgr.itemStoreWnd) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } return false; @@ -1714,7 +1714,7 @@ bool CSession::RemoveItem1738(const ITEM_INFO& item) { // OFFSET: 0x00E2EC10 // FUNCTION: fn_24149 -bool CSession::EquipItem6B68(const ITEM_INFO& item) { +bool CSession::EquipSwapEquipmentItem(const ITEM_INFO& item) { const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); const int order[3] = {slots.values[2], slots.values[1], slots.values[0]}; @@ -1756,9 +1756,9 @@ ITEM_INFO CSession::FindItemByIdentity(std::uint32_t identity, int location) { const int slot = order[index]; if (slot != -1) { if (this->IsCostumeLocation(location)) { - item = this->GetItem2B50(slot); + item = this->GetCostumeItemAt(slot); } else { - item = this->GetItem17F0(slot); + item = this->GetEquippedItemAt(slot); } if (item.identity[1] == identity) { break; @@ -1775,8 +1775,8 @@ ITEM_INFO CSession::FindItemByIdentity(std::uint32_t identity, int location) { // OFFSET: 0x00E49F40 // FUNCTION: fn_24247 -void CSession::SetItems1750(int count, const short* ids) { - this->ClearItems1750(); +void CSession::SetMerchantMyShopItems(int count, const short* ids) { + this->ClearMerchantMyShopItems(); for (int i = 0; i < count; ++i) { const ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, ids[i]); if (item.identity[1] > 0) { @@ -1824,7 +1824,7 @@ bool CSession::AddExchangeItem(ITEM_INFO item) { return false; } - this->RemoveItem1710(item.identity[1], item.quantity); + this->RemoveInventoryItem(item.identity[1], item.quantity); ITEM_INFO added = item; int index = 0; diff --git a/Source/Contents/ClientState.cpp b/Source/Contents/ClientState.cpp index 6998a0932..4383cb922 100644 --- a/Source/Contents/ClientState.cpp +++ b/Source/Contents/ClientState.cpp @@ -935,7 +935,7 @@ std::uint32_t CSession::ReadReplayShortcuts(const std::vector& da offset += header.bytes; break; case 7101: - g_session.ClearSlots06EB(); + g_session.ClearQuickSlots(); std::memcpy(&this->quickSlot, data.data() + offset, header.bytes); offset += header.bytes; break; @@ -1014,7 +1014,7 @@ void RequestBasicInfoRefresh() { // OFFSET: 0x00E49290 // FUNCTION: fn_24232 -void CSession::SetUnknown5BC0(int value) { +void CSession::SetElementalGid(int value) { this->elementalGid = value; UIWindow* window = g_windowMgr.LookupWindow(WID_SKILLDELAYINFO); if (window != nullptr) { diff --git a/Source/Contents/ClientTiming.cpp b/Source/Contents/ClientTiming.cpp index 98a597ec0..6b8a30328 100644 --- a/Source/Contents/ClientTiming.cpp +++ b/Source/Contents/ClientTiming.cpp @@ -755,20 +755,20 @@ void CSession::LoadRobeAlpha() { // OFFSET: 0x00E010B0 // FUNCTION: fn_23646 -int CSession::SetUnknown8134(int value) { +int CSession::SetPlayerSkillMode(int value) { this->playerSkillMode = value; return value; } // OFFSET: 0x00DDBB50 // FUNCTION: fn_23359 -int CSession::GetUnknown8134() const { +int CSession::GetPlayerSkillMode() const { return this->playerSkillMode; } // OFFSET: 0x00E01670 // FUNCTION: fn_23647 -void CSession::ClearUnknown1710(int id) { +void CSession::UnflagInventoryItem(int id) { for (ITEM_INFO& entry : this->m_inventoryItems) { if (entry.identity[1] == static_cast(id)) { entry.flags[2] = 0; @@ -779,7 +779,7 @@ void CSession::ClearUnknown1710(int id) { // OFFSET: 0x00E016A0 // FUNCTION: fn_23648 -void CSession::ClearUnknown1740(int id) { +void CSession::UnflagMerchantShopItem(int id) { for (ITEM_INFO& entry : this->merchantShopItems) { if (entry.identity[1] == static_cast(id)) { entry.flags[2] = 0; @@ -790,7 +790,7 @@ void CSession::ClearUnknown1740(int id) { // OFFSET: 0x00E016D0 // FUNCTION: fn_23649 -void CSession::ClearUnknown1738(int id) { +void CSession::UnflagCartItem(int id) { for (ITEM_INFO& entry : this->cartItems) { if (entry.identity[1] == static_cast(id)) { entry.flags[2] = 0; @@ -835,17 +835,17 @@ void CSession::LoadDamageSkinSettings() { } const char* resourceName = nullptr; - const char* name80EC = nullptr; - const char* name8104 = nullptr; - g_session.m_hotkeyScript->Call("GetDamageResourceName", "d>sss", this->m_damageSkinIndex, &resourceName, &name80EC, &name8104); + const char* damageSpriteName = nullptr; + const char* damageSkinAuxiliaryName = nullptr; + g_session.m_hotkeyScript->Call("GetDamageResourceName", "d>sss", this->m_damageSkinIndex, &resourceName, &damageSpriteName, &damageSkinAuxiliaryName); if (resourceName) { this->m_damageResourceName = resourceName; } - if (name80EC) { - this->damageSpriteName = name80EC; + if (damageSpriteName) { + this->damageSpriteName = damageSpriteName; } - if (name8104) { - this->damageSkinAuxiliaryName = name8104; + if (damageSkinAuxiliaryName) { + this->damageSkinAuxiliaryName = damageSkinAuxiliaryName; } g_session.m_hotkeyScript->Call("GetDamageMillionUnit", "d>d", this->m_damageSkinIndex, &this->m_damageMillionUnit); } diff --git a/Source/Contents/Emblems/EmblemCache.cpp b/Source/Contents/Emblems/EmblemCache.cpp index 22938f952..ba723044c 100644 --- a/Source/Contents/Emblems/EmblemCache.cpp +++ b/Source/Contents/Emblems/EmblemCache.cpp @@ -131,7 +131,7 @@ void CGuildMgr::UpdateEmblemRequests( // FUNCTION: fn_05180 void CGuildMgr::RefreshEmblem(std::uint32_t guild) { if (g_modeMgr.GetGameMode()) { - static_cast(g_modeMgr.GetGameMode())->NotifyUnknown0604(guild); + static_cast(g_modeMgr.GetGameMode())->RefreshNotificationWindows(guild); } UIWindow* window = g_windowMgr.LookupWindow(WID_GUILDINFOMANAGEWND); diff --git a/Source/Contents/EnchantMgr.cpp b/Source/Contents/EnchantMgr.cpp index 2961cbf00..795ef29e6 100644 --- a/Source/Contents/EnchantMgr.cpp +++ b/Source/Contents/EnchantMgr.cpp @@ -59,7 +59,7 @@ CEnchantMgr::CEnchantMgr() { m_request.group = 0; m_request.index = -1; m_request.slot = -1; - m_unknown_0030 = true; + m_inputBlocked = true; } // INLINED @@ -74,7 +74,7 @@ void CEnchantMgr::SendCloseEnchant() { packet.packetType = 0xBA0; CRagConnection& connection = GetRagConnection(); connection.Send(g_packetLengths.FixedLength(packet.packetType), &packet); - m_unknown_0030 = true; + m_inputBlocked = true; } // OFFSET: 0x00683BC0 @@ -88,7 +88,7 @@ void CEnchantMgr::OpenEnchant(uint64_t group) { CUIEnchantUI* window = static_cast(g_windowMgr.EnsureWindow(WID_ENCHANTUI)); if (window) { window->SetEnchantGroup(group); - this->m_unknown_0030 = false; + this->m_inputBlocked = false; } } } @@ -157,7 +157,7 @@ void CEnchantMgr::HandleEnchantResult(int messageId, int itemId) { } g_windowMgr.CloseWindow(WID_ENCHANTUI); - this->m_unknown_0030 = false; + this->m_inputBlocked = false; } // OFFSET: 0x00683C20 @@ -176,7 +176,7 @@ void CEnchantMgr::RequestPerfectEnchant(uint64_t group, int16_t index, int16_t s CRagConnection& connection = GetRagConnection(); connection.Send(g_packetLengths.FixedLength(packet.packetType), &packet); m_request = EnchantRequest{0xB9C, group, index, slot}; - m_unknown_0030 = true; + m_inputBlocked = true; } // OFFSET: 0x00683D10 @@ -194,7 +194,7 @@ void CEnchantMgr::RequestRandomEnchant(uint64_t group, int16_t index, int16_t sl CRagConnection& connection = GetRagConnection(); connection.Send(g_packetLengths.FixedLength(packet.packetType), &packet); m_request = EnchantRequest{0xB9B, group, index, slot}; - m_unknown_0030 = true; + m_inputBlocked = true; } // OFFSET: 0x00683E00 @@ -212,7 +212,7 @@ void CEnchantMgr::RequestResetEnchant(uint64_t group, int16_t index) { CRagConnection& connection = GetRagConnection(); connection.Send(g_packetLengths.FixedLength(packet.packetType), &packet); m_request = EnchantRequest{0xB9E, group, index, -1}; - m_unknown_0030 = true; + m_inputBlocked = true; } // OFFSET: 0x00683EF0 @@ -232,7 +232,7 @@ void CEnchantMgr::RequestUpgradePerfectEnchant(uint64_t group, int16_t index, in CRagConnection& connection = GetRagConnection(); connection.Send(g_packetLengths.FixedLength(packet.packetType), &packet); m_request = EnchantRequest{0xBF1, group, index, slot}; - m_unknown_0030 = true; + m_inputBlocked = true; } // OFFSET: 0x00683FF0 @@ -251,7 +251,7 @@ void CEnchantMgr::RequestUpgradeEnchant(uint64_t group, int16_t index, int16_t s CRagConnection& connection = GetRagConnection(); connection.Send(g_packetLengths.FixedLength(packet.packetType), &packet); m_request = EnchantRequest{0xB9D, group, index, slot}; - m_unknown_0030 = true; + m_inputBlocked = true; } // OFFSET: 0x006840E0 @@ -270,7 +270,7 @@ void CEnchantMgr::RequestUpgradeRandomEnchant(uint64_t group, int16_t index, int CRagConnection& connection = GetRagConnection(); connection.Send(g_packetLengths.FixedLength(packet.packetType), &packet); m_request = EnchantRequest{0xBF0, group, index, slot}; - m_unknown_0030 = true; + m_inputBlocked = true; } // OFFSET: 0x00686BF0 diff --git a/Source/Contents/EnchantMgr.h b/Source/Contents/EnchantMgr.h index aab986067..3780a8f39 100644 --- a/Source/Contents/EnchantMgr.h +++ b/Source/Contents/EnchantMgr.h @@ -60,10 +60,10 @@ class CEnchantMgr : public Singleton { public: /* 0004 */ std::map m_enchants; /* 000C */ CLuaInstance m_lua; - /* 0014 */ int32_t m_unknown_0014; + /* 0014 */ int32_t m_requestAlignmentPadding; /* 0018 */ EnchantRequest m_request; - /* 0030 */ bool m_unknown_0030; - /* 0031 */ uint8_t m_unknown_0031[7]; + /* 0030 */ bool m_inputBlocked; + /* 0031 */ uint8_t m_tailPadding[7]; CEnchantMgr(); virtual ~CEnchantMgr(); @@ -133,13 +133,13 @@ static_assert(offsetof(EnchantInfo, options) == 0x60); static_assert(sizeof(CEnchantMgr) == 0x38); static_assert(offsetof(CEnchantMgr, m_enchants) == 0x04); static_assert(offsetof(CEnchantMgr, m_lua) == 0x0C); -static_assert(offsetof(CEnchantMgr, m_unknown_0014) == 0x14); +static_assert(offsetof(CEnchantMgr, m_requestAlignmentPadding) == 0x14); static_assert(sizeof(EnchantRequest) == 0x18); static_assert(offsetof(EnchantRequest, group) == 0x08); static_assert(offsetof(EnchantRequest, index) == 0x10); static_assert(offsetof(EnchantRequest, slot) == 0x12); static_assert(offsetof(CEnchantMgr, m_request) == 0x18); -static_assert(offsetof(CEnchantMgr, m_unknown_0030) == 0x30); +static_assert(offsetof(CEnchantMgr, m_inputBlocked) == 0x30); #endif #endif diff --git a/Source/Contents/GuildInfo.cpp b/Source/Contents/GuildInfo.cpp index 561be5945..c4d1b406b 100644 --- a/Source/Contents/GuildInfo.cpp +++ b/Source/Contents/GuildInfo.cpp @@ -21,7 +21,7 @@ GuildInfo::GuildInfo() { // OFFSET: 0x00AE40C0 // FUNCTION: fn_18029 -void GuildInfo::AddUnknown00EC(const Unknown00ECEntry& entry) { +void GuildInfo::AddBannedMember(const Unknown00ECEntry& entry) { this->bannedMembers.push_back(entry); g_windowMgr.RefreshGuildWindows(); } @@ -40,7 +40,7 @@ void GuildInfo::ChangeMemberPosition(int aid, int cid, int position) { // OFFSET: 0x00AE4230 // FUNCTION: fn_18031 -void GuildInfo::ClearUnknown0114() { +void GuildInfo::ClearAgitIds() { this->agitIds.clear(); } @@ -52,7 +52,7 @@ void GuildInfo::ClearMembers() { // OFFSET: 0x00AE4270 // FUNCTION: fn_18033 -void GuildInfo::RemoveUnknown0114(int value) { +void GuildInfo::RemoveAgitId(int value) { for (auto it = this->agitIds.begin(); it != this->agitIds.end(); ++it) { if (*it == value) { this->agitIds.erase(it); @@ -86,7 +86,7 @@ int GuildInfo::GetMemberAccountId(const char* name) { // OFFSET: 0x00AE43E0 // FUNCTION: fn_18036 -int GuildInfo::GetUnknown0114(int index) { +int GuildInfo::GetAgitId(int index) { return this->agitIds[index]; } @@ -104,7 +104,7 @@ int GuildInfo::CountRelatedGuilds(int unknown_0004) { // OFFSET: 0x00AE46C0 // FUNCTION: fn_18038 -int GuildInfo::GetUnknown0114Count() { +int GuildInfo::GetAgitCount() { return static_cast(this->agitIds.size()); } @@ -299,7 +299,7 @@ void GuildInfo::SetMasterCharacterId(int characterId) { // OFFSET: 0x00AE5090 // FUNCTION: fn_18048 -void GuildInfo::UpdateUnknown00D4(Unknown00D4Entry entry) { +void GuildInfo::UpdatePosition(Unknown00D4Entry entry) { for (auto it = this->positions.begin(); it != this->positions.end(); ++it) { if (it->positionId == entry.positionId) { *it = entry; @@ -310,7 +310,7 @@ void GuildInfo::UpdateUnknown00D4(Unknown00D4Entry entry) { // OFFSET: 0x00AE3F40 // FUNCTION: fn_18027 -void GuildInfo::AddUnknown0114(int value) { +void GuildInfo::AddAgitId(int value) { const auto found = std::find_if(this->agitIds.begin(), this->agitIds.end(), [value](int entry) { return value == entry; }); if (found != this->agitIds.end()) { diff --git a/Source/Contents/GuildInfo.h b/Source/Contents/GuildInfo.h index cdef706f4..9bbc765d4 100644 --- a/Source/Contents/GuildInfo.h +++ b/Source/Contents/GuildInfo.h @@ -97,14 +97,14 @@ public: GuildInfo(); void ChangeMemberPosition(int aid, int cid, int position); - void ClearUnknown0114(); + void ClearAgitIds(); void ClearMembers(); - void RemoveUnknown0114(int value); + void RemoveAgitId(int value); void RemoveRelatedGuild(int unknown_0000, int unknown_0004); int GetMemberAccountId(const char* name); - int GetUnknown0114(int index); + int GetAgitId(int index); int CountRelatedGuilds(int unknown_0004); - int GetUnknown0114Count(); + int GetAgitCount(); void Init(); bool HasRelatedGuild(int unknown_0000); void UpdateMemberExpRatios(); @@ -112,10 +112,10 @@ public: void UpdateMemberStatus(int accountId, int online, int characterId, short unknown_002C, short unknown_0020, short unknown_0024); void SetMemberOnline(int accountId, int online); void SetMasterCharacterId(int characterId); - void UpdateUnknown00D4(Unknown00D4Entry entry); - void AddUnknown0114(int value); + void UpdatePosition(Unknown00D4Entry entry); + void AddAgitId(int value); void AddMember(const Member& member); - void AddUnknown00EC(const Unknown00ECEntry& entry); + void AddBannedMember(const Unknown00ECEntry& entry); int DeleteMemberByCharacterId(int characterId); void UpdateCharacterName(int characterId, const char* name); }; diff --git a/Source/Contents/HeadResources.cpp b/Source/Contents/HeadResources.cpp index 5671be8dc..52a6687ef 100644 --- a/Source/Contents/HeadResources.cpp +++ b/Source/Contents/HeadResources.cpp @@ -286,7 +286,7 @@ std::string CSession::GetHeadActName(int job, int sex, int* head) { // FUNCTION: fn_23374 std::string CSession::GetPlayerHeadActName() { EquipmentResourceMgr* const mgr = g_equipmentResourceMgr; - return mgr->GetHeadName(0, this->GetDisplayJob(), this->SyncUnknown0E98(), &this->m_head); + return mgr->GetHeadName(0, this->GetDisplayJob(), this->GetCurrentSex(), &this->m_head); } // OFFSET: 0x00DDCEF0 @@ -311,7 +311,7 @@ std::string CSession::GetHeadSprName(int job, int sex, int* head) { // FUNCTION: fn_23378 std::string CSession::GetPlayerHeadSprName() { EquipmentResourceMgr* resources = g_equipmentResourceMgr; - const int sex = this->SyncUnknown0E98(); + const int sex = this->GetCurrentSex(); const int job = this->GetDisplayJob(); return resources->GetHeadName(1, job, sex, &this->m_head); } diff --git a/Source/Contents/Items/ItemInfo.cpp b/Source/Contents/Items/ItemInfo.cpp index 5460c7768..5ba3cc442 100644 --- a/Source/Contents/Items/ItemInfo.cpp +++ b/Source/Contents/Items/ItemInfo.cpp @@ -690,7 +690,7 @@ int ReadItemArray(ITEM_INFO* items, int offset, int size, const std::vectormerchantMyShopItems.begin(); it != this->merchantMyShopItems.end(); ++it) { if (it->identity[1] == item.identity[1]) { if (type != 0) { @@ -735,7 +735,7 @@ bool CSession::RemoveItem1750(const ITEM_INFO& item, int type, unsigned char ref // OFFSET: 0x00DDAB30 // FUNCTION: fn_23348 -void CSession::RemoveItem1720(const ITEM_INFO& item) { +void CSession::RemovePurchaseItem(const ITEM_INFO& item) { const bool hasFlag = item.flags[3] != 0; for (auto it = this->purchaseItems.begin(); it != this->purchaseItems.end(); ++it) { const bool same = hasFlag ? it->identity[1] == item.identity[1] : it->itemId == item.itemId; diff --git a/Source/Contents/Jobs/JobInheritance.cpp b/Source/Contents/Jobs/JobInheritance.cpp index 194afae55..fc7f01c6f 100644 --- a/Source/Contents/Jobs/JobInheritance.cpp +++ b/Source/Contents/Jobs/JobInheritance.cpp @@ -1347,7 +1347,7 @@ int CSession::GetPetTargetAid() const { // OFFSET: 0x00E1D950 // FUNCTION: fn_23854 -int CSession::WorldUnknown0050() const { +int CSession::GetBattleFieldMode() const { return static_cast(g_modeMgr.GetGameMode())->scene->isBattleFieldMode; } @@ -1481,7 +1481,7 @@ bool CSession::IsMiscItemType(int type) const { // OFFSET: 0x00E1DBA0 // FUNCTION: fn_23870 -bool CSession::HasUnknown6178Records() const { +bool CSession::HasTrackedAchievements() const { return this->trackedAchievements.size() != 0; } @@ -1845,9 +1845,9 @@ void CEquipmentPropertiesMgr::RemoveWearable(const int& location) { // OFFSET: 0x00E24B30 // FUNCTION: fn_23899 -bool CSession::UnequipItem2B50(int location) { +bool CSession::UnequipCostumeItem(int location) { if (location == 0x8000) { - this->SetUnknown16EC(0); + this->SetEquippedArrowIndex(0); } else { const EquipSlots slots = g_session.GetEquipSlots(location); if (slots.values[2] < 10) { @@ -1858,7 +1858,7 @@ bool CSession::UnequipItem2B50(int location) { const std::string text = FormatOwnedString("%s%s", name.c_str(), message); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text.c_str()), 0xFF, 7, 0, 0); item.identity[3] = 0; - this->AddItem1710(item, 1); + this->AddInventoryItem(item, 1); item.Reset(); } if (slots.values[1] != -1 && slots.values[1] < 10) { diff --git a/Source/Contents/Jobs/JobNames.cpp b/Source/Contents/Jobs/JobNames.cpp index fc03d3b44..001bc6133 100644 --- a/Source/Contents/Jobs/JobNames.cpp +++ b/Source/Contents/Jobs/JobNames.cpp @@ -329,7 +329,7 @@ const char* CSession::GetJobName(unsigned job, int sex) { const unsigned base = JobNames::BaseJob(job); if (sex == -1) { - sex = this->SyncUnknown0E98(); + sex = this->GetCurrentSex(); } if (sex == 0) { diff --git a/Source/Contents/Messenger/ClientMessenger.cpp b/Source/Contents/Messenger/ClientMessenger.cpp index a53e49c22..5e0b1b044 100644 --- a/Source/Contents/Messenger/ClientMessenger.cpp +++ b/Source/Contents/Messenger/ClientMessenger.cpp @@ -347,17 +347,17 @@ namespace EquipmentProperties { virtual ~CEquipmentPropertiesMgr(); void Clear(); void SetWindow(UIWindow* window); - const int& GetUnknown0134(const int& key); - int GetUnknown001C(); + const int& GetConstantValue(const int& key); + int GetCurrentEquipment(); CEquipmentWearable* FindProperty1(const int& key); - CEquipmentInfo* FindUnknown0094(const int& key); + CEquipmentInfo* FindEquipmentInfo(const int& key); CLuaInstance& GetScript(); - EquipmentPropertyDefinition* GetUnknown0174(const int& key); - std::list* FindUnknown0114(const int& key); - std::unordered_map& GetUnknown019C(); - bool HasUnknown0194(const std::uint64_t& key); + EquipmentPropertyDefinition* FindRandomOptionDefinition(const int& key); + std::list* FindSkillGroup(const int& key); + std::unordered_map& GetDisplayValues(); + bool HasFunctionPair(const std::uint64_t& key); EquipmentPropertyDefinition* FindDefinition(const std::uint64_t& key); - int GetUnknown01BC(const int& first, const int& second, const unsigned int& third); + int GetRefiningBonus(const int& first, const int& second, const unsigned int& third); __declspec(noinline) void SetCurrentEquipment(CEquipment* equipment); void RefreshPretend(); __declspec(noinline) void RefreshShop(); @@ -372,7 +372,7 @@ namespace EquipmentProperties { void RemoveExpansion(const int& kind, const int& itemId); void RefreshExpansion(const int& kind, const int& itemId); void RefreshWearable(const int& key); - int GetUnknown01DC(const int& first, const int& second, const int& third); + int GetGradeBonus(const int& first, const int& second, const int& third); void LoadADSkill(); void LoadCombiitem(); void LoadEnumVar(); @@ -734,7 +734,7 @@ void EquipmentProperties::CEquipment::AddProperty(const std::string& name, const EquipmentPropertyDefinition* definition = CEquipmentPropertiesMgr::GetInstance()->FindDefinition(nameKey); if (definition == nullptr) { - CEquipmentPropertiesMgr::GetInstance()->HasUnknown0194(nameKey); + CEquipmentPropertiesMgr::GetInstance()->HasFunctionPair(nameKey); return; } @@ -936,7 +936,7 @@ void EquipmentProperties::CEquipmentWearable::Load(bool force) { } if (!g_session.IsCostumeLocation(this->m_type) && this->m_info != nullptr) { - const ITEM_INFO equipped = g_session.GetItem17F0(this->inventoryIndex); + const ITEM_INFO equipped = g_session.GetEquippedItemAt(this->inventoryIndex); if (equipped.identity[1] > 0) { const int key = this->GetValue(2); const int level = equipped.refiningLevel; @@ -944,19 +944,19 @@ void EquipmentProperties::CEquipmentWearable::Load(bool force) { switch (this->m_info->kind) { case 2: case 3: { - const int bonus = CEquipmentPropertiesMgr::GetInstance()->GetUnknown01BC(1, key, level); + const int bonus = CEquipmentPropertiesMgr::GetInstance()->GetRefiningBonus(1, key, level); if (bonus != 0) { - const int rate = CEquipmentPropertiesMgr::GetInstance()->GetUnknown01DC(1, equipped.grade, 1); + const int rate = CEquipmentPropertiesMgr::GetInstance()->GetGradeBonus(1, equipped.grade, 1); this->AddProperty(std::format("AddExtParam arg1:0 arg2:{0}", 0x29), "AddExtParam", -1, static_cast(static_cast(rate * bonus) / 10.0f + static_cast(bonus)), -1); if (this->m_info->kind == 2) { - const int magicRate = CEquipmentPropertiesMgr::GetInstance()->GetUnknown01DC(1, equipped.grade, 2); + const int magicRate = CEquipmentPropertiesMgr::GetInstance()->GetGradeBonus(1, equipped.grade, 2); this->AddProperty(std::format("AddExtParam arg1:0 arg2:{0}", 0xC8), "AddExtParam", -1, static_cast(static_cast(magicRate * bonus) / 10.0f + static_cast(bonus)), -1); } } - const int defense = CEquipmentPropertiesMgr::GetInstance()->GetUnknown01BC(2, key, level); + const int defense = CEquipmentPropertiesMgr::GetInstance()->GetRefiningBonus(2, key, level); if (defense != 0) { this->AddProperty(std::format("AddExtParam arg1:0 arg2:{0}", 0xF2), "AddExtParam", -1, defense, -1); this->AddProperty(std::format("AddExtParam arg1:0 arg2:{0}", 0xF3), "AddExtParam", -1, defense, -1); @@ -964,12 +964,12 @@ void EquipmentProperties::CEquipmentWearable::Load(bool force) { break; } case 1: { - const int attack = CEquipmentPropertiesMgr::GetInstance()->GetUnknown01BC(3, key, level); + const int attack = CEquipmentPropertiesMgr::GetInstance()->GetRefiningBonus(3, key, level); if (attack != 0) { this->AddProperty(std::format("AddExtParam arg1:0 arg2:{0}", 0x2D), "AddExtParam", -1, attack, -1); } - const int resist = CEquipmentPropertiesMgr::GetInstance()->GetUnknown01BC(4, key, level); + const int resist = CEquipmentPropertiesMgr::GetInstance()->GetRefiningBonus(4, key, level); if (resist != 0) { this->AddProperty(std::format("AddExtParam arg1:0 arg2:{0}", 0xF4), "AddExtParam", -1, resist, -1); this->AddProperty(std::format("AddExtParam arg1:0 arg2:{0}", 0xF5), "AddExtParam", -1, resist, -1); @@ -1161,7 +1161,7 @@ std::string EquipmentProperties::CEquipmentProperties2Dim::Describe(bool detaile } switch (hash) { case 0xA2AF91ED: { - const int& skillId = CEquipmentPropertiesMgr::GetInstance()->GetUnknown0134(entry->first); + const int& skillId = CEquipmentPropertiesMgr::GetInstance()->GetConstantValue(entry->first); if (skillId == 0) { continue; } @@ -1173,7 +1173,7 @@ std::string EquipmentProperties::CEquipmentProperties2Dim::Describe(bool detaile } case 0x8F918611: if (entry->first != 0) { - std::list* skills = CEquipmentPropertiesMgr::GetInstance()->FindUnknown0114(entry->first); + std::list* skills = CEquipmentPropertiesMgr::GetInstance()->FindSkillGroup(entry->first); if (skills == nullptr) { failed = true; continue; @@ -1304,7 +1304,7 @@ void EquipmentPropertyStore::RemoveDuplicateNames() { // OFFSET: 0x006AC2A0 // FUNCTION: fn_06172 -const int& EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown0134(const int& key) { +const int& EquipmentProperties::CEquipmentPropertiesMgr::GetConstantValue(const int& key) { auto found = this->constantValues.find(key); if (this->constantValues.end() == found) { return key; @@ -1314,7 +1314,7 @@ const int& EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown0134(const in // OFFSET: 0x006AC3B0 // FUNCTION: fn_06174 -int EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown001C() { +int EquipmentProperties::CEquipmentPropertiesMgr::GetCurrentEquipment() { return this->currentEquipment; } @@ -1330,7 +1330,7 @@ EquipmentProperties::CEquipmentWearable* EquipmentProperties::CEquipmentProperti // OFFSET: 0x006AC440 // FUNCTION: fn_06176 -EquipmentProperties::CEquipmentInfo* EquipmentProperties::CEquipmentPropertiesMgr::FindUnknown0094(const int& key) { +EquipmentProperties::CEquipmentInfo* EquipmentProperties::CEquipmentPropertiesMgr::FindEquipmentInfo(const int& key) { auto found = this->equipmentInfo.find(key); if (this->equipmentInfo.end() == found) { return nullptr; @@ -1973,7 +1973,7 @@ int GetNormalThirdJob(int job) { // OFFSET: 0x006AD500 // FUNCTION: fn_06184 -EquipmentPropertyDefinition* EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown0174(const int& key) { +EquipmentPropertyDefinition* EquipmentProperties::CEquipmentPropertiesMgr::FindRandomOptionDefinition(const int& key) { auto found = this->randomOptionDefinitions.find(key); if (this->randomOptionDefinitions.end() == found) { return nullptr; @@ -2072,7 +2072,7 @@ int GetEquipLocationIndex(const int& mask) { // OFFSET: 0x006AD880 // FUNCTION: fn_06187 -std::list* EquipmentProperties::CEquipmentPropertiesMgr::FindUnknown0114(const int& key) { +std::list* EquipmentProperties::CEquipmentPropertiesMgr::FindSkillGroup(const int& key) { auto found = this->skillGroups.find(key); if (found == this->skillGroups.end()) { return nullptr; @@ -2082,13 +2082,13 @@ std::list* EquipmentProperties::CEquipmentPropertiesMgr::FindUnkno // OFFSET: 0x006AD900 // FUNCTION: fn_06188 -std::unordered_map& EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown019C() { +std::unordered_map& EquipmentProperties::CEquipmentPropertiesMgr::GetDisplayValues() { return this->displayValues; } // OFFSET: 0x006B0120 // FUNCTION: fn_06190 -bool EquipmentProperties::CEquipmentPropertiesMgr::HasUnknown0194(const std::uint64_t& key) { +bool EquipmentProperties::CEquipmentPropertiesMgr::HasFunctionPair(const std::uint64_t& key) { return this->functionPairs.contains(key); } @@ -4076,7 +4076,7 @@ EquipmentPropertyDefinition* EquipmentProperties::CEquipmentPropertiesMgr::FindD // OFFSET: 0x006AD580 // FUNCTION: fn_06185 -int EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown01BC(const int& first, const int& second, const unsigned int& third) { +int EquipmentProperties::CEquipmentPropertiesMgr::GetRefiningBonus(const int& first, const int& second, const unsigned int& third) { auto outer = this->levelRates.find(first); if (this->levelRates.end() == outer) { return 0; @@ -5255,8 +5255,8 @@ void CGameMode::NotifyItemBounds() { if (this->itemWindow) { this->itemWindow->Invalidate(); } - if (g_windowMgr.window_02C8) { - g_windowMgr.window_02C8->SendMsg(nullptr, UM_COMMAND, 34, g_session.m_aid, 0, 0); + if (g_windowMgr.messengerGroupWnd) { + g_windowMgr.messengerGroupWnd->SendMsg(nullptr, UM_COMMAND, 34, g_session.m_aid, 0, 0); } g_windowMgr.NotifyItemWindows(g_session.m_aid, g_session.hp, g_session.maxHp); } @@ -5499,7 +5499,7 @@ bool CGameMode::IsRegisterCell(int x, int y) { // OFFSET: 0x00CD7560 // FUNCTION: fn_21294 -bool CGameMode::HasUnknown01A4(int value) { +bool CGameMode::HasPendingItemPickup(int value) { for (int entry : this->pickupReqItemNaidList) { if (entry == value) { return true; @@ -5646,7 +5646,7 @@ int CSession::GetList7Size() const { // OFFSET: 0x00DDF920 // FUNCTION: fn_23435 -int CSession::GetList1788(int index) const { +int CSession::GetInventoryCategorySize(int index) const { if (index < 0) { return 0; } @@ -5682,7 +5682,7 @@ int CSession::GetList5Size() const { // OFFSET: 0x00DD8380 // FUNCTION: fn_23305 -void CSession::ClearAllItems1784() { +void CSession::ClearAllInventoryCategories() { for (int index = 0; index < 11; ++index) { std::list& items = this->inventoryCategories[index]; items.erase(items.begin(), items.end()); @@ -5959,8 +5959,8 @@ UIWindow* UIWindowMgr::FindItemWindow(int accountId) { // OFFSET: 0x00AA64D0 // FUNCTION: fn_17230 void UIWindowMgr::NotifyMemberWindows(const MessengerMember* target) { - if (this->window_02C8) { - this->window_02C8->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (this->messengerGroupWnd) { + this->messengerGroupWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } for (UIWindow* window : this->snapExcluded) { bool matches; @@ -5996,7 +5996,7 @@ int GetEquipGrade(lua_State* state) { if (args[0] != 0) { const int mask = GetEquipLocationMask(args[0]); const EquipSlots slots = g_session.GetEquipSlots(mask); - const ITEM_INFO item = g_session.IsCostumeLocation(mask) ? g_session.GetItem2B50(slots.values[2]) : g_session.GetItem17F0(slots.values[2]); + const ITEM_INFO item = g_session.IsCostumeLocation(mask) ? g_session.GetCostumeItemAt(slots.values[2]) : g_session.GetEquippedItemAt(slots.values[2]); if (item.identity[1] > 0) { grade = item.grade; } @@ -6023,7 +6023,7 @@ int GetEquipItemId(lua_State* state) { const int mask = GetEquipLocationMask(args[0]); const EquipSlots slots = g_session.GetEquipSlots(mask); - const ITEM_INFO item = g_session.IsCostumeLocation(mask) ? g_session.GetItem2B50(slots.values[2]) : g_session.GetItem17F0(slots.values[2]); + const ITEM_INFO item = g_session.IsCostumeLocation(mask) ? g_session.GetCostumeItemAt(slots.values[2]) : g_session.GetEquippedItemAt(slots.values[2]); int itemId = 0; if (item.identity[1] > 0) { itemId = std::atoi(item.itemId.c_str()); @@ -6050,7 +6050,7 @@ int GetEquipRefine(lua_State* state) { const int mask = GetEquipLocationMask(args[0]); const EquipSlots slots = g_session.GetEquipSlots(mask); - const ITEM_INFO item = g_session.IsCostumeLocation(mask) ? g_session.GetItem2B50(slots.values[2]) : g_session.GetItem17F0(slots.values[2]); + const ITEM_INFO item = g_session.IsCostumeLocation(mask) ? g_session.GetCostumeItemAt(slots.values[2]) : g_session.GetEquippedItemAt(slots.values[2]); int refine = 0; if (item.identity[1] > 0) { refine = item.refiningLevel; @@ -6100,7 +6100,7 @@ void CGameMode::ReceiveShopItemList(const unsigned char* data) { // OFFSET: 0x006AC320 // FUNCTION: fn_06173 -int EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown01DC(const int& first, const int& second, const int& third) { +int EquipmentProperties::CEquipmentPropertiesMgr::GetGradeBonus(const int& first, const int& second, const int& third) { auto outer = this->categoryValues.find(first); if (this->categoryValues.end() != outer) { auto middle = outer->second.find(second); @@ -6129,7 +6129,7 @@ int GetEquipTempValue(lua_State* state) { ++number; } - std::unordered_map values = EquipmentProperties::CEquipmentPropertiesMgr::GetInstance()->GetUnknown019C(); + std::unordered_map values = EquipmentProperties::CEquipmentPropertiesMgr::GetInstance()->GetDisplayValues(); auto found = values.find(args[0]); lua_pushnumber(state, found != values.end() ? found->second.value : 0); return 1; @@ -6150,7 +6150,7 @@ int SetEquipTempValue(lua_State* state) { ++number; } - EquipmentProperties::CEquipmentPropertiesMgr::GetInstance()->GetUnknown019C()[args[0]].value = args[1]; + EquipmentProperties::CEquipmentPropertiesMgr::GetInstance()->GetDisplayValues()[args[0]].value = args[1]; return 0; } @@ -6721,7 +6721,7 @@ static_assert(sizeof(EquipmentItemOption) == 5); EquipmentProperties::CEquipmentWearable::CEquipmentWearable(const ITEM_INFO* item) : CEquipment(), m_active(true) { this->m_id = std::atoi(item->itemId.c_str()); this->m_type = item->identity[3]; - this->m_info = CEquipmentPropertiesMgr::GetInstance()->FindUnknown0094(this->m_id); + this->m_info = CEquipmentPropertiesMgr::GetInstance()->FindEquipmentInfo(this->m_id); this->inventoryIndex = g_session.GetEquipSlots(this->m_type).values[2]; for (int index = 0; index < 4; ++index) { @@ -6737,7 +6737,7 @@ EquipmentProperties::CEquipmentWearable::CEquipmentWearable(const ITEM_INFO* ite EquipmentItemOption option; std::memcpy(&option, item->options + index * sizeof(option), sizeof(option)); const int optionId = option.id; - EquipmentPropertyDefinition* definition = CEquipmentPropertiesMgr::GetInstance()->GetUnknown0174(optionId); + EquipmentPropertyDefinition* definition = CEquipmentPropertiesMgr::GetInstance()->FindRandomOptionDefinition(optionId); if (definition == nullptr || definition->functions.front() == "SetWeaponAttr") { continue; } @@ -6764,7 +6764,7 @@ EquipmentProperties::CEquipmentWearable::CEquipmentWearable(const ITEM_INFO* ite this->m_children.push_back(property); if (optionId == 35) { const int additionalId = 25; - definition = CEquipmentPropertiesMgr::GetInstance()->GetUnknown0174(additionalId); + definition = CEquipmentPropertiesMgr::GetInstance()->FindRandomOptionDefinition(additionalId); if (definition != nullptr) { CEquipmentProperties1Dim* additional = new CEquipmentProperties1Dim(definition); const int negative = -option.value; diff --git a/Source/Contents/Messenger/MessengerMember.cpp b/Source/Contents/Messenger/MessengerMember.cpp index 46a721702..e2f98327c 100644 --- a/Source/Contents/Messenger/MessengerMember.cpp +++ b/Source/Contents/Messenger/MessengerMember.cpp @@ -96,7 +96,7 @@ public: void OnLBtnUp(int argument1, int argument2) override; void MoveGauge(int x, int y); void RemoveGauge(); - void SetUnknown010C(int first, int second); + void SetDragStartPosition(int first, int second); void SetGaugeValues(int current, int maximum); /* 00B4 */ MessengerMember member; @@ -450,7 +450,7 @@ __declspec(noinline) void UIDragMiniPartyWnd::RemoveGauge() { // OFFSET: 0x00738D50 // FUNCTION: fn_07674 -__declspec(noinline) void UIDragMiniPartyWnd::SetUnknown010C(int first, int second) { +__declspec(noinline) void UIDragMiniPartyWnd::SetDragStartPosition(int first, int second) { this->dragStartX = first; this->dragStartY = second; } @@ -687,7 +687,7 @@ __declspec(noinline) void UIMessengerGroupWnd::DropMember(int x, int y, int inde } MessengerMember member = this->MemberAtIndex(index); - SessionRecord0734 record = g_session.FindRecord0734(member.accountId); + SessionRecord0734 record = g_session.FindMiniPartyRecord(member.accountId); UIWindow* window = g_windowMgr.LookupWindow(WID_MENUICONWND); if (record.active != 1) { int top = static_cast(static_cast(g_renderer->viewport.height) * 0.3f); @@ -745,7 +745,7 @@ __declspec(noinline) void UIMessengerGroupWnd::OpenMiniPartyWnd(int cell, const window->m_cell = cell; g_windowMgr.AddMiniPartyWindow(window); window->SendMsg(nullptr, UM_REFRESHITEM, reinterpret_cast(&member), 0, 0, 0); - g_session.AddRecord0734(member.accountId, cell); + g_session.AddMiniPartyRecord(member.accountId, cell); } // OFFSET: 0x0073A540 @@ -964,7 +964,7 @@ void UIMessengerGroupWnd::Paint() { if (this->mode == 1) { MessengerMember entry = this->MemberAtIndex(index); - SessionRecord0734 record = g_session.FindRecord0734(entry.accountId); + SessionRecord0734 record = g_session.FindMiniPartyRecord(entry.accountId); if (record.active == 1) { this->FillRegion(0, top + 2, this->geometry.width, this->rowHeight, 0xFFE8DD); } @@ -1154,7 +1154,7 @@ void UIMessengerGroupWnd::OnLBtnDown(int x, int y) { MessengerMember selectedMember = this->MemberAtIndex(this->selected); if (this->mode == 1 && !g_session.m_lockMouse && !g_windowMgr.HasMiniPartyMember(selectedMember.accountId)) { gameMode->SetDragIds(29, this->selected); - if (!g_windowMgr.window_4F250) { + if (!g_windowMgr.transientWnd) { UIDragMiniPartyWnd* window = new (std::nothrow) UIDragMiniPartyWnd(selectedMember); { window->SetSize(this->geometry.width, this->rowHeight); @@ -1164,7 +1164,7 @@ void UIMessengerGroupWnd::OnLBtnDown(int x, int y) { window->iconIndex = this->iconIndex; window->MoveGauge(47, static_cast(this->rowHeight * 0.76f)); const int itemY = ((this->selected - this->scrollTop * this->columns) / this->columns) * this->rowHeight + 17; - window->SetUnknown010C(x, y - itemY); + window->SetDragStartPosition(x, y - itemY); int index = 0; for (const MessengerMember& entry : this->members) { @@ -1632,7 +1632,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, } case 0x3C: { MessengerMember target = this->MemberAtIndex(this->selected); - if (target.valid && g_session.FindRecord0734(target.accountId).active != 1) { + if (target.valid && g_session.FindMiniPartyRecord(target.accountId).active != 1) { this->OpenMiniPartyWnd(g_windowMgr.FindMiniPartyCell(), target); } return 0; @@ -2040,7 +2040,7 @@ void UIMiniPartyInfoWnd::OnCreate(int width, int) { // OFFSET: 0x00AA24D0 // FUNCTION: fn_17213 void UIWindowMgr::MoveTransient(int x, int y) { - UIDragMiniPartyWnd* transient = static_cast(this->window_4F250); + UIDragMiniPartyWnd* transient = static_cast(this->transientWnd); if (transient && transient->member.valid) { transient->Move(x - transient->dragStartX, y - transient->dragStartY); } @@ -2049,10 +2049,10 @@ void UIWindowMgr::MoveTransient(int x, int y) { // OFFSET: 0x00AA9E90 // FUNCTION: fn_17262 __declspec(noinline) void UIWindowMgr::RetireTransientWindow() { - UIDragMiniPartyWnd* transient = static_cast(this->window_4F250); + UIDragMiniPartyWnd* transient = static_cast(this->transientWnd); if (transient && transient->member.valid) { transient->geometry.state = 1; - this->Schedule(this->window_4F250); - this->window_4F250 = nullptr; + this->Schedule(this->transientWnd); + this->transientWnd = nullptr; } } diff --git a/Source/Contents/Messenger/MessengerWindows.h b/Source/Contents/Messenger/MessengerWindows.h index 39ea744a9..44279e019 100644 --- a/Source/Contents/Messenger/MessengerWindows.h +++ b/Source/Contents/Messenger/MessengerWindows.h @@ -35,7 +35,7 @@ public: void OnLBtnUp(int argument1, int argument2) override; void MoveGauge(int x, int y); void RemoveGauge(); - void SetUnknown010C(int first, int second); + void SetDragStartPosition(int first, int second); void SetGaugeValues(int current, int maximum); /* 00B4 */ MessengerMember member; diff --git a/Source/Contents/NavigationRoute.cpp b/Source/Contents/NavigationRoute.cpp index fa0bd4d87..debb73479 100644 --- a/Source/Contents/NavigationRoute.cpp +++ b/Source/Contents/NavigationRoute.cpp @@ -241,8 +241,8 @@ bool CNavigationManager::BuildRoute(int startX, int startY, int destX, int destY } } - if (g_windowMgr.window_4F174 != nullptr) { - g_windowMgr.window_4F174->Invalidate(); + if (g_windowMgr.navigationWnd != nullptr) { + g_windowMgr.navigationWnd->Invalidate(); } return found; } @@ -688,11 +688,11 @@ bool CNavigationManager::StartNavigation(std::string name, int type, unsigned ch } this->displayMode = 1; - if (g_windowMgr.window_4F174) { + if (g_windowMgr.navigationWnd) { this->hideWindow = false; } - if (g_windowMgr.window_4F174) { - static_cast(g_windowMgr.window_4F174)->RefreshLayout(); + if (g_windowMgr.navigationWnd) { + static_cast(g_windowMgr.navigationWnd)->RefreshLayout(); } else if (!this->hideWindow) { g_windowMgr.EnsureWindow(WID_NAVIGATIONV4WND); } @@ -730,16 +730,16 @@ bool CNavigationManager::SearchNavigation(std::string name, int type, bool flag) g_navigationManager.UpdateSearchResults(); if (!this->hideWindow) { - if (g_windowMgr.window_4F174 == nullptr) { + if (g_windowMgr.navigationWnd == nullptr) { g_windowMgr.EnsureWindow(WID_NAVIGATIONV4WND); } else { - g_windowMgr.window_4F174->SendMsg(nullptr, UM_COMMAND, ID_BASE, 0, 0, 0); + g_windowMgr.navigationWnd->SendMsg(nullptr, UM_COMMAND, ID_BASE, 0, 0, 0); if (g_windowMgr.modal != nullptr) { static_cast(g_windowMgr.modal)->RefreshWorldMapLevels(); } } - g_windowMgr.Promote(g_windowMgr.window_4F174); + g_windowMgr.Promote(g_windowMgr.navigationWnd); } return true; @@ -1178,8 +1178,8 @@ CNavi_Object* CNaviData::FindMobByTitle(std::string title) { // OFFSET: 0x00B9C6B0 // FUNCTION: fn_19621 void CNavigationManager::RefreshSearch() { - if (this->data.Search(this->searchText, this->searchType, this->states) && g_windowMgr.window_4F174) { - static_cast(g_windowMgr.window_4F174)->FillRouteGroups(); + if (this->data.Search(this->searchText, this->searchType, this->states) && g_windowMgr.navigationWnd) { + static_cast(g_windowMgr.navigationWnd)->FillRouteGroups(); } } @@ -1315,13 +1315,13 @@ bool CNavigationManager::SetDestinationMap(std::string mapName, int x, int y) { this->LoadTargetPreview(); g_windowMgr.EnsureWindow(WID_NAVIGATIONV4WND); - if (g_windowMgr.window_4F174) { - UIWindow* window = g_windowMgr.window_4F174; + if (g_windowMgr.navigationWnd) { + UIWindow* window = g_windowMgr.navigationWnd; window->geometry.targetAlpha = 255; window->geometry.alphaStart = timeGetTime(); - static_cast(g_windowMgr.window_4F174)->RefreshLayout(); - static_cast(g_windowMgr.window_4F174)->LayoutWithDetails(); - g_windowMgr.window_4F174->Invalidate(); + static_cast(g_windowMgr.navigationWnd)->RefreshLayout(); + static_cast(g_windowMgr.navigationWnd)->LayoutWithDetails(); + g_windowMgr.navigationWnd->Invalidate(); } if (g_windowMgr.modal) { @@ -1667,8 +1667,8 @@ void CNavigationManager::CancelRoute() { this->displayMode = 0; if (!this->hideWindow) { this->viewMode = 1; - if (g_windowMgr.window_4F174 != nullptr) { - static_cast(g_windowMgr.window_4F174)->RefreshLayout(); + if (g_windowMgr.navigationWnd != nullptr) { + static_cast(g_windowMgr.navigationWnd)->RefreshLayout(); } } g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_NAVIGATION_RS_POSTMAP_SUCCESS)), 0x62B0FF, 0, 0, 0); diff --git a/Source/Contents/NavigationSource.cpp b/Source/Contents/NavigationSource.cpp index a18decdb5..6c4d553ab 100644 --- a/Source/Contents/NavigationSource.cpp +++ b/Source/Contents/NavigationSource.cpp @@ -963,8 +963,8 @@ void CNavigationManager::ResetCurrentTarget() { // FUNCTION: fn_19570 void CNavigationManager::CheckArrival(int cellX, int cellY) { if (this->viewMode == 2) { - if (g_windowMgr.window_4F174 != nullptr) { - g_windowMgr.window_4F174->Invalidate(); + if (g_windowMgr.navigationWnd != nullptr) { + g_windowMgr.navigationWnd->Invalidate(); } if (this->routeFlag) { NaviCell cell; diff --git a/Source/Contents/RenewQuestMgr.cpp b/Source/Contents/RenewQuestMgr.cpp index bb9b7f3d2..4c97af626 100644 --- a/Source/Contents/RenewQuestMgr.cpp +++ b/Source/Contents/RenewQuestMgr.cpp @@ -661,8 +661,8 @@ void CRenewQuestMgr::UpdateOngoingQuestInfo() { // OFFSET: 0x0067B6B0 // FUNCTION: fn_05460 void CRenewQuestMgr::UpdateQuestWindows() { - if (g_windowMgr.window_0428 != nullptr) { - g_windowMgr.window_0428->Invalidate(); + if (g_windowMgr.questDisplayWnd != nullptr) { + g_windowMgr.questDisplayWnd->Invalidate(); } if (auto* window = static_cast(g_windowMgr.LookupWindow(WID_RENEWQUESTUI))) { @@ -781,8 +781,8 @@ void CRenewQuestMgr::ReadOngoingQuests(const char* buffer, unsigned int) { this->AddOngoingQuest(record.questId, info); } - if (g_windowMgr.window_0428 != nullptr) { - g_windowMgr.window_0428->Invalidate(); + if (g_windowMgr.questDisplayWnd != nullptr) { + g_windowMgr.questDisplayWnd->Invalidate(); } if (auto* window = static_cast(g_windowMgr.LookupWindow(WID_RENEWQUESTUI))) { diff --git a/Source/Contents/Schedule/CheckGDISchedule.cpp b/Source/Contents/Schedule/CheckGDISchedule.cpp index 668eafc61..becc17b29 100644 --- a/Source/Contents/Schedule/CheckGDISchedule.cpp +++ b/Source/Contents/Schedule/CheckGDISchedule.cpp @@ -48,7 +48,7 @@ perform_check: return; } - g_timeScheduler->m_unknown_000D = true; + g_timeScheduler->m_processingStopped = true; if (roll == 2) { g_windowMgr.Confirm(LookupMessage(MSI_NPGAMEMON_XP_COMPATIBILITY), 0, true, false, 0, "Message", 280, 120, 0); diff --git a/Source/Contents/Schedule/TimeScheduler.cpp b/Source/Contents/Schedule/TimeScheduler.cpp index 7905a9d46..838765bff 100644 --- a/Source/Contents/Schedule/TimeScheduler.cpp +++ b/Source/Contents/Schedule/TimeScheduler.cpp @@ -11,7 +11,7 @@ CTimeScheduler* g_timeScheduler; // INLINED CTimeScheduler::CTimeScheduler() { this->m_initialized = this->Init(); - this->m_unknown_000D = false; + this->m_processingStopped = false; } // INLINED @@ -22,7 +22,7 @@ CTimeScheduler::~CTimeScheduler() { } } this->m_schedules.clear(); - this->m_unknown_000D = false; + this->m_processingStopped = false; } // OFFSET: 0x00BA91E0 @@ -92,7 +92,7 @@ void CTimeScheduler::RemoveAllSchedules() { } } this->m_schedules.clear(); - this->m_unknown_000D = false; + this->m_processingStopped = false; } // OFFSET: 0x00BA9430 @@ -118,7 +118,7 @@ CSchedule* CTimeScheduler::AddSchedule(CSchedule* schedule) { // OFFSET: 0x00BA9550 // FUNCTION: fn_19738 void CTimeScheduler::Process() { - if (this->m_unknown_000D) { + if (this->m_processingStopped) { return; } diff --git a/Source/Contents/Schedule/TimeScheduler.h b/Source/Contents/Schedule/TimeScheduler.h index ecfad9ae8..7dc5e0eb6 100644 --- a/Source/Contents/Schedule/TimeScheduler.h +++ b/Source/Contents/Schedule/TimeScheduler.h @@ -12,7 +12,7 @@ class CTimeScheduler { public: /* 0004 */ std::list m_schedules; /* 000C */ bool m_initialized; - /* 000D */ bool m_unknown_000D; + /* 000D */ bool m_processingStopped; CTimeScheduler(); virtual ~CTimeScheduler(); @@ -34,7 +34,7 @@ public: static_assert(sizeof(CTimeScheduler) == 0x10); static_assert(offsetof(CTimeScheduler, m_schedules) == 0x04); static_assert(offsetof(CTimeScheduler, m_initialized) == 0x0C); -static_assert(offsetof(CTimeScheduler, m_unknown_000D) == 0x0D); +static_assert(offsetof(CTimeScheduler, m_processingStopped) == 0x0D); #endif extern CTimeScheduler* g_timeScheduler; diff --git a/Source/Contents/Skills/ClientSkills.cpp b/Source/Contents/Skills/ClientSkills.cpp index 58e0f6daf..506f8d374 100644 --- a/Source/Contents/Skills/ClientSkills.cpp +++ b/Source/Contents/Skills/ClientSkills.cpp @@ -179,12 +179,12 @@ CSkillInfo CSession::LookupSkill(std::uint32_t id) { // OFFSET: 0x00E25240 // FUNCTION: fn_23904 void CSession::NotifySkillWindows() { - if (g_windowMgr.window_02C4) { - g_windowMgr.window_02C4->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.skillListWnd) { + g_windowMgr.skillListWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - if (g_windowMgr.window_01E8) { - g_windowMgr.window_01E8->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.shortCutWnd) { + g_windowMgr.shortCutWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } if (UIWindow* window = g_windowMgr.LookupWindow(WID_QUIKSLOTWND)) { @@ -213,20 +213,20 @@ void CSession::RemoveSkill(std::uint32_t id) { // OFFSET: 0x00E07540 // FUNCTION: fn_23746 -bool CSession::UpdateSkill(const CSkillInfo& value, unsigned char notify, unsigned char updateUnknown000C) { +bool CSession::UpdateSkill(const CSkillInfo& value, unsigned char notify, unsigned char updateType) { { CSkillInfo snapshot(value); - const auto update = [](CSkillInfo& target, const CSkillInfo& source, bool copy000C, bool copy0030) { + const auto update = [](CSkillInfo& target, const CSkillInfo& source, bool copyType, bool copyLearnedLevel) { target.level = source.level; std::memcpy(&target.spCost, &source.spCost, sizeof(target.spCost)); std::memcpy(&target.range, &source.range, sizeof(target.range)); std::memcpy(&target.upgradable, &source.upgradable, sizeof(target.upgradable)); - if (copy000C) { + if (copyType) { std::memcpy(&target.type, &source.type, sizeof(target.type)); } - if (copy0030) { + if (copyLearnedLevel) { target.learnedLevel = source.learnedLevel; } @@ -262,7 +262,7 @@ bool CSession::UpdateSkill(const CSkillInfo& value, unsigned char notify, unsign std::memcpy(&existing->range, &value.range, sizeof(existing->range)); std::memcpy(&existing->upgradable, &value.upgradable, sizeof(existing->upgradable)); - if (updateUnknown000C == 1) { + if (updateType == 1) { std::memcpy(&existing->type, &value.type, sizeof(existing->type)); } @@ -366,7 +366,7 @@ void CSession::AddUnknownId(int id) { // OFFSET: 0x00E07470 // FUNCTION: fn_23744 -bool CSession::EquipItem3500(const ITEM_INFO& item) { +bool CSession::EquipAlternateCostumeItem(const ITEM_INFO& item) { const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); const int order[3] = {slots.values[2], slots.values[1], slots.values[0]}; @@ -448,7 +448,7 @@ void CSession::ClearItemQuantities() { // OFFSET: 0x00E082D0 // FUNCTION: fn_23755 -void CSession::ResetItems3500() { +void CSession::ResetAlternateCostumeItems() { for (int index = 0; index < 10; ++index) { this->alternateCostumeItems[index].Reset(); } @@ -456,7 +456,7 @@ void CSession::ResetItems3500() { // OFFSET: 0x00E08300 // FUNCTION: fn_23756 -void CSession::ClearSlots06EB() { +void CSession::ClearQuickSlots() { this->quickSlot.enabled = 0; this->quickSlot.itemId = 0; this->quickSlot.value = 0; @@ -483,7 +483,7 @@ void CSession::ClearSecondaryShortcutSlots() { // OFFSET: 0x00E08380 // FUNCTION: fn_23759 -void CSession::ClearUnknown0420() { +void CSession::ClearHotkeySkillLevels() { for (int index = 0; index < 36; ++index) { this->hotkeySkillLevels[index] = 0; } @@ -550,7 +550,7 @@ void CSession::DeleteProhibitionLog(std::uint32_t aid, std::uint32_t minutes) { // OFFSET: 0x00E08690 // FUNCTION: fn_23764 -std::int64_t CSession::FindUnknown0784(std::int64_t key) const { +std::int64_t CSession::FindSummonHp(std::int64_t key) const { auto found = this->summonHp.lower_bound(key); if (found == this->summonHp.end() || key < found->first) { return -1; @@ -561,7 +561,7 @@ std::int64_t CSession::FindUnknown0784(std::int64_t key) const { // OFFSET: 0x00E086F0 // FUNCTION: fn_23765 -std::int64_t CSession::FindUnknown078C(std::int64_t key) const { +std::int64_t CSession::FindSummonMaxHp(std::int64_t key) const { auto found = this->summonMaxHp.lower_bound(key); if (found == this->summonMaxHp.end() || key < found->first) { return -1; @@ -572,7 +572,7 @@ std::int64_t CSession::FindUnknown078C(std::int64_t key) const { // OFFSET: 0x00E08750 // FUNCTION: fn_23766 -SessionRecord6144 CSession::FindRecord6144(int key) const { +SessionRecord6144 CSession::FindAchievementRecord(int key) const { auto found = this->achievements.find(key); if (found != this->achievements.end()) { return found->second; @@ -583,7 +583,7 @@ SessionRecord6144 CSession::FindRecord6144(int key) const { // OFFSET: 0x00E06FD0 // FUNCTION: fn_23738 -void CSession::UpdateRecord6144(const AchievementRecordPacket& packet) { +void CSession::UpdateAchievementRecord(const AchievementRecordPacket& packet) { auto found = this->achievements.find(packet.id); if (found != this->achievements.end()) { SessionRecord6144& record = found->second; @@ -629,7 +629,7 @@ const char* CSession::DecodePlayerName() const { // OFFSET: 0x00E08EE0 // FUNCTION: fn_23773 -ITEM_INFO CSession::GetItem2B50(int index) const { +ITEM_INFO CSession::GetCostumeItemAt(int index) const { if (index == 15) { return ITEM_INFO(0); } @@ -643,7 +643,7 @@ ITEM_INFO CSession::GetItem2B50(int index) const { // OFFSET: 0x00E08F70 // FUNCTION: fn_23774 -int CSession::CountItems5C68() const { +int CSession::CountSelectionItems() const { int count = 0; for (int index = 0; index < 5; ++index) { if (this->selectionItems[index].quantity != 0) { @@ -675,7 +675,7 @@ int CSession::GetDefaultOptionValue(const char* name, int fallback) const { // OFFSET: 0x00E094B0 // FUNCTION: fn_23777 -int CSession::FindUnknown0778(int key) const { +int CSession::FindActorSkillAnimationValue(int key) const { for (const std::pair& entry : this->keyValues) { if (key == entry.first) { return entry.second; @@ -726,30 +726,30 @@ CSkillInfo CSession::HomunSkillAt(int index) const { // OFFSET: 0x00E251C0 // FUNCTION: fn_23902 __declspec(noinline) void CSession::NotifyHomunSkillWindows() { - if (g_windowMgr.window_03C4) { - g_windowMgr.window_03C4->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.homunculusSkillWnd) { + g_windowMgr.homunculusSkillWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - if (g_windowMgr.window_01E8) { - g_windowMgr.window_01E8->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.shortCutWnd) { + g_windowMgr.shortCutWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } } // OFFSET: 0x00E25200 // FUNCTION: fn_23903 __declspec(noinline) void CSession::NotifyMercSkillWindows() { - if (g_windowMgr.window_03CC) { - g_windowMgr.window_03CC->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.mercenarySkillWnd) { + g_windowMgr.mercenarySkillWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - if (g_windowMgr.window_01E8) { - g_windowMgr.window_01E8->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.shortCutWnd) { + g_windowMgr.shortCutWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } } // OFFSET: 0x00E08260 // FUNCTION: fn_23753 -void CSession::ResetItems2B50() { +void CSession::ResetCostumeItems() { for (int index = 0; index < 10; ++index) { this->costumeItems[index].Reset(); } @@ -911,12 +911,12 @@ int CSession::ProcessEmotionShortcut(const char* text) { // OFFSET: 0x00E08190 // FUNCTION: fn_23751 -void CSession::RestoreItems5C68() { +void CSession::RestoreSelectionItems() { bool restored = false; for (int index = 0; index < 5; ++index) { if (this->selectionItems[index].quantity != 0) { restored = true; - g_session.AddItem1710(this->selectionItems[index], 0); + g_session.AddInventoryItem(this->selectionItems[index], 0); } } @@ -932,7 +932,7 @@ void CSession::ReturnStackedItem(int index, int count) { const int quantity = this->selectionItems[slot].quantity; if (quantity != 0 && this->selectionItems[slot].identity[1] == index) { this->selectionItems[slot].quantity = count; - g_session.AddItem1710(this->selectionItems[slot], 0); + g_session.AddInventoryItem(this->selectionItems[slot], 0); this->selectionItems[slot].quantity = quantity - count; RefreshItemWindows(&g_windowMgr); break; @@ -957,7 +957,7 @@ public: // OFFSET: 0x00E07150 // FUNCTION: fn_23739 -bool CSession::EquipItem2B50(const ITEM_INFO& item, const char* name) { +bool CSession::EquipCostumeItem(const ITEM_INFO& item, const char* name) { const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); const int order[3] = {slots.values[2], slots.values[1], slots.values[0]}; @@ -984,7 +984,7 @@ bool CSession::EquipItem2B50(const ITEM_INFO& item, const char* name) { // OFFSET: 0x00E09900 // FUNCTION: fn_23785 -ITEM_INFO CSession::GetItem5C68(int index) const { +ITEM_INFO CSession::GetSelectionItemAt(int index) const { return this->selectionItems[index]; } @@ -1009,7 +1009,7 @@ CSkillInfo CSession::MercSkillAt(int index) const { // OFFSET: 0x00E0AAD0 // FUNCTION: fn_23802 -ITEM_INFO CSession::GetItem3500(int index) const { +ITEM_INFO CSession::GetAlternateCostumeItemAt(int index) const { if (index == 15) { return ITEM_INFO(0); } @@ -1023,7 +1023,7 @@ ITEM_INFO CSession::GetItem3500(int index) const { // OFFSET: 0x00E13000 // FUNCTION: fn_23822 -void CSession::FindTopRecords6144(int* second, int* first) { +void CSession::FindLatestCompletedAchievements(int* second, int* first) { int bestValue = -1; int secondValue; for (auto it = this->achievements.begin(); it != this->achievements.end(); ++it) { @@ -1091,7 +1091,7 @@ void CSession::ClearPairValues(unsigned char clearThird, unsigned char clearSeco // OFFSET: 0x00E19B90 // FUNCTION: fn_23846 -void CSession::ResetUnknown1050() { +void CSession::ResetPetEggAndJob() { g_session.petEggIndex = -1; g_session.petJob = -1; } diff --git a/Source/Contents/Skills/PlayerSkillBundle.cpp b/Source/Contents/Skills/PlayerSkillBundle.cpp index 01ac2b750..5233d2e08 100644 --- a/Source/Contents/Skills/PlayerSkillBundle.cpp +++ b/Source/Contents/Skills/PlayerSkillBundle.cpp @@ -71,7 +71,7 @@ __declspec(noinline) std::uint32_t ResolveSkillId(std::uint32_t id); // OFFSET: 0x00CACF20 // FUNCTION: fn_21049 std::uint32_t ResolveSkillId(std::uint32_t id) { - if (g_session.GetUnknown8134() != 1 || (id != 6578 && id != 6579)) { + if (g_session.GetPlayerSkillMode() != 1 || (id != 6578 && id != 6579)) { return id; } diff --git a/Source/Contents/Skills/SkillActionAlitea.cpp b/Source/Contents/Skills/SkillActionAlitea.cpp index cfc3658b5..7481f7624 100644 --- a/Source/Contents/Skills/SkillActionAlitea.cpp +++ b/Source/Contents/Skills/SkillActionAlitea.cpp @@ -558,13 +558,13 @@ int CSkillAction_Thundering::GetSkillAttackMotion() { // OFFSET: 0x005A5E10 // FUNCTION: fn_03168 bool CSkillAction_DamageWereRaptorForm::IsInForm(CGameActor* actor) { - return actor->GetUnknown0404() == 2; + return actor->GetShapeShift() == 2; } // OFFSET: 0x005A5E30 // FUNCTION: fn_03169 bool CSkillAction_DamageWereWolfForm::IsInForm(CGameActor* actor) { - return actor->GetUnknown0404() == 1; + return actor->GetShapeShift() == 1; } // OFFSET: 0x005A5E90 @@ -699,10 +699,10 @@ void CEfstAction_AnimalForm::ResetAnimalForm(CRenderObject* actor) { CGameActor* gameActor = static_cast(actor); if (g_session.m_aid == actor->render.accountId) { - g_session.SetUnknown8134(0); + g_session.SetPlayerSkillMode(0); } - gameActor->SetUnknown0404(0); - gameActor->SetSprJob(gameActor->GetUnknown0404Job()); + gameActor->SetShapeShift(0); + gameActor->SetSprJob(gameActor->GetShapeShiftJob()); EffectLists* effects = g_effectMgr; effects->Spawn(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { const char bytes[] = {'\xC5', '\x62', '\x23', '\xB8', '\x59', '\x89', '\x2B'}; @@ -718,11 +718,11 @@ void CEfstAction_AnimalForm::ApplyAnimalForm(CRenderObject* actor, int form) { if (actor) { CGameActor* gameActor = static_cast(actor); if (g_session.m_aid == actor->render.accountId) { - g_session.SetUnknown8134(form); + g_session.SetPlayerSkillMode(form); } - gameActor->SetUnknown0404(form); - gameActor->SetSprJob(gameActor->GetUnknown0404Job()); + gameActor->SetShapeShift(form); + gameActor->SetSprJob(gameActor->GetShapeShiftJob()); } } @@ -769,7 +769,7 @@ void CSkillAction_AT_PULSE_OF_MADNESS::OnSkillCast(int level, CGameActor* source // OFFSET: 0x005A6A00 // FUNCTION: fn_03192 void CSkillAction_AT_PULSE_OF_MADNESS::OnSkillEffect(int level, CGameActor* source, CGameActor* target) { - if (source && source->GetUnknown0404() != 0) { + if (source && source->GetShapeShift() != 0) { this->IsInForm(source); } diff --git a/Source/Contents/Skills/SkillActionDruid.cpp b/Source/Contents/Skills/SkillActionDruid.cpp index 3f89299ee..be7362c69 100644 --- a/Source/Contents/Skills/SkillActionDruid.cpp +++ b/Source/Contents/Skills/SkillActionDruid.cpp @@ -759,7 +759,7 @@ void CEfstAction_NATURE_PROTECTION::OnEfstBegin(int efstId, int value, int argum // FUNCTION: fn_04513 void CEfstAction_NATURE_PROTECTION::OnEfstEnd(int efstId, int argument2, int argument3, int argument4, CRenderObject* actor) { if (actor) { - static_cast(actor)->ApplyPendingUnknown0408(); + static_cast(actor)->ApplySavedShapeShift(); } CEfstAction_BasicAction::OnEfstEnd(efstId, argument2, argument3, argument4, actor); } diff --git a/Source/Contents/Skills/SkillActionInfo.cpp b/Source/Contents/Skills/SkillActionInfo.cpp index 91cf946fb..19c3cdfce 100644 --- a/Source/Contents/Skills/SkillActionInfo.cpp +++ b/Source/Contents/Skills/SkillActionInfo.cpp @@ -40,7 +40,7 @@ int CSession::GetItemDescription40(int id) { // OFFSET: 0x00E13C10 // FUNCTION: fn_23829 -std::uint32_t CSession::GetUnknown0420(int index) { +std::uint32_t CSession::GetHotkeySkillLevel(int index) { return this->hotkeySkillLevels[index]; } diff --git a/Source/Contents/Sound/SoundMaker.cpp b/Source/Contents/Sound/SoundMaker.cpp index 803585853..6b7c7633e 100644 --- a/Source/Contents/Sound/SoundMaker.cpp +++ b/Source/Contents/Sound/SoundMaker.cpp @@ -72,10 +72,10 @@ CHalluNPC::CHalluNPC(CGameActor* source) { this->render.visible = 1; this->render.visibilityOptions[0] = 0; this->render.motionStartTime = timeGetTime(); - this->SetUnknown0260(source->sex); + this->SetSexBit(source->sex); this->SetActorJob(source->GetEffectiveJob(-1)); this->isRiding = source->isRiding; - this->SetUnknown03C4(source->GetMonsterTransformJob()); + this->SetMonsterTransformJob(source->GetMonsterTransformJob()); this->render.position = source->render.position; this->render.distanceScale = source->render.distanceScale; this->render.spriteOffsetX = source->render.spriteOffsetX; @@ -106,10 +106,10 @@ CHalluPlant::CHalluPlant() { this->render.visible = 1; this->render.visibilityOptions[0] = 0; this->render.motionStartTime = timeGetTime(); - this->SetUnknown0260(0); + this->SetSexBit(0); this->SetActorJob(1079); this->isRiding = 0; - this->SetUnknown03C4(-1); + this->SetMonsterTransformJob(-1); this->render.position.x = 0.0f; this->render.position.y = 0.0f; this->render.position.z = 0.0f; @@ -441,7 +441,7 @@ void Nullsub502() { // OFFSET: 0x00DA2E00 // FUNCTION: fn_22395 -void CMasterChaser::ClearUnknown0138() { +void CMasterChaser::ClearChaseState() { this->chaseState = 0; } @@ -798,8 +798,8 @@ void CNpc::SendMsg( } case 13: { static_cast(this->playerGaugeWindow)->SetFirstValues( - [this] { return g_session.FindUnknown0784(this->render.accountId); }, - [this] { return g_session.FindUnknown078C(this->render.accountId); } + [this] { return g_session.FindSummonHp(this->render.accountId); }, + [this] { return g_session.FindSummonMaxHp(this->render.accountId); } ); this->playerGaugeWindow->SetSize(60, 5); static_cast(this->playerGaugeWindow)->actorKind = 13; @@ -807,8 +807,8 @@ void CNpc::SendMsg( } case 14: { static_cast(this->playerGaugeWindow)->SetFirstValues( - [this] { return g_session.FindUnknown0784(this->render.accountId); }, - [this] { return g_session.FindUnknown078C(this->render.accountId); } + [this] { return g_session.FindSummonHp(this->render.accountId); }, + [this] { return g_session.FindSummonMaxHp(this->render.accountId); } ); this->playerGaugeWindow->SetSize(60, 5); static_cast(this->playerGaugeWindow)->actorKind = 14; @@ -909,7 +909,7 @@ void CSoundMaker::SendMsg( void CNpc::SetSprAct(int job, int value, int) { char name[64]; this->SetActorJob(job); - this->SetUnknown0260(value); + this->SetSexBit(value); this->render.bodyPalette = 0; if (g_session.IsGuildMemberCharacter(this->GetEffectiveJob(-1), name)) { this->render.bodyPalette = 1; @@ -1181,11 +1181,11 @@ CHalluPC2::CHalluPC2(CPc* source) { this->render.visible = 1; this->render.visibilityOptions[0] = 0; this->render.motionStartTime = timeGetTime(); - this->SetUnknown0260(source->sex); + this->SetSexBit(source->sex); this->SetActorJob(source->GetEffectiveJob(-1)); - this->SetUnknown0404(source->GetUnknown0404()); + this->SetShapeShift(source->GetShapeShift()); this->SetRiding(source->isRiding); - this->SetUnknown03C4(source->GetMonsterTransformJob()); + this->SetMonsterTransformJob(source->GetMonsterTransformJob()); this->render.position = source->render.position; this->render.distanceScale = source->render.distanceScale; this->render.spriteOffsetX = source->render.spriteOffsetX; @@ -1226,11 +1226,11 @@ CBlurPC::CBlurPC(CPc* source) { this->render.visible = 1; this->render.visibilityOptions[0] = 0; this->render.motionStartTime = timeGetTime(); - this->SetUnknown0260(source->sex); + this->SetSexBit(source->sex); this->SetActorJob(source->GetEffectiveJob(-1)); - this->SetUnknown0404(source->GetUnknown0404()); + this->SetShapeShift(source->GetShapeShift()); this->SetRiding(source->isRiding); - this->SetUnknown03C4(source->GetMonsterTransformJob()); + this->SetMonsterTransformJob(source->GetMonsterTransformJob()); this->render.position = source->render.position; this->render.distanceScale = source->render.distanceScale; this->render.spriteOffsetX = source->render.spriteOffsetX; @@ -1270,11 +1270,11 @@ CHalluPC::CHalluPC(CPc* source) { this->render.visible = 1; this->render.visibilityOptions[0] = 0; this->render.motionStartTime = timeGetTime(); - this->SetUnknown0260(source->sex); + this->SetSexBit(source->sex); this->SetActorJob(source->GetEffectiveJob(-1)); - this->SetUnknown0404(source->GetUnknown0404()); + this->SetShapeShift(source->GetShapeShift()); this->SetRiding(source->isRiding); - this->SetUnknown03C4(source->GetMonsterTransformJob()); + this->SetMonsterTransformJob(source->GetMonsterTransformJob()); this->render.position = source->render.position; this->render.distanceScale = source->render.distanceScale; this->render.spriteOffsetX = source->render.spriteOffsetX; diff --git a/Source/Contents/Sound/SoundMgr.h b/Source/Contents/Sound/SoundMgr.h index d0270a9e8..1b7b3ebfa 100644 --- a/Source/Contents/Sound/SoundMgr.h +++ b/Source/Contents/Sound/SoundMgr.h @@ -59,7 +59,7 @@ public: /* 00E0 */ int targetVolume = 100; /* 00E4 */ int streamVolume = 100; /* 00E8 */ int sampleVolume = 100; - /* 00EC */ int unknown250 = 250; + /* 00EC */ int volumeMaxDist = 250; /* 00F0 */ int unknown40 = 40; /* 00F4 */ int rate = 0; /* 00F8 */ int bits = 0; @@ -103,7 +103,7 @@ static_assert(offsetof(CSoundMgr, samples) == 0x020); static_assert(offsetof(CSoundMgr, targetVolume) == 0x0E0); static_assert(offsetof(CSoundMgr, streamVolume) == 0x0E4); static_assert(offsetof(CSoundMgr, sampleVolume) == 0x0E8); -static_assert(offsetof(CSoundMgr, unknown250) == 0x0EC); +static_assert(offsetof(CSoundMgr, volumeMaxDist) == 0x0EC); static_assert(offsetof(CSoundMgr, unknown40) == 0x0F0); static_assert(offsetof(CSoundMgr, rate) == 0x0F4); static_assert(offsetof(CSoundMgr, bits) == 0x0F8); diff --git a/Source/Contents/SpriteLayerDrawing.cpp b/Source/Contents/SpriteLayerDrawing.cpp index aaca89bcc..0822fce93 100644 --- a/Source/Contents/SpriteLayerDrawing.cpp +++ b/Source/Contents/SpriteLayerDrawing.cpp @@ -25,14 +25,14 @@ // OFFSET: 0x0063F500 // FUNCTION: fn_04807 -void SpriteLayerRenderer::Render(const float* matrix, int unknown0030, char unknown0034) { +void SpriteLayerRenderer::Render(const float* matrix, int unknown0030, char blendVariant) { if (!this->pc) { return; } std::memcpy(this->matrix, matrix, sizeof(this->matrix)); this->blendMode = unknown0030; - this->blendVariant = unknown0034; + this->blendVariant = blendVariant; this->layerShift = 0; this->swingX = 0; this->swingY = 0; diff --git a/Source/Contents/SpriteLayerDrawing.h b/Source/Contents/SpriteLayerDrawing.h index e57edcf3e..2c87915c1 100644 --- a/Source/Contents/SpriteLayerDrawing.h +++ b/Source/Contents/SpriteLayerDrawing.h @@ -43,7 +43,7 @@ public: explicit SpriteLayerRenderer(CPc* pc) : pc(pc), position(), depthScale(1.0f), depthBias(0.0f) { } - void Render(const float* matrix, int unknown0030, char unknown0034); + void Render(const float* matrix, int unknown0030, char blendVariant); void QueueQuad(int layer, const SpriteQuad* quad, const std::uint32_t* palette, int blend); void DrawLayerOutlines(std::uint32_t color); void DrawRobe(bool drawOnTop); diff --git a/Source/Contents/Store/MCStoreInfoBackup.cpp b/Source/Contents/Store/MCStoreInfoBackup.cpp index 60112def1..14dbdf751 100644 --- a/Source/Contents/Store/MCStoreInfoBackup.cpp +++ b/Source/Contents/Store/MCStoreInfoBackup.cpp @@ -37,7 +37,7 @@ int CMCStoreInfoBackup::Restore(unsigned char wholeItem, int maximum) { auto saved = this->items.begin(); while (saved != this->items.end() && examined < maximum) { - std::pair found = lists.FindItem1750(*saved, wholeItem); + std::pair found = lists.FindMerchantMyShopItem(*saved, wholeItem); if (!found.first) { saved = this->items.erase(saved); @@ -47,8 +47,8 @@ int CMCStoreInfoBackup::Restore(unsigned char wholeItem, int maximum) { } if (found.second.identity[1] != 0) { - lists.AddItem1768(found.second, wholeItem, 0); - lists.RemoveItem1750(found.second, wholeItem, 0); + lists.AddMerchantPurchaseSavedItem(found.second, wholeItem, 0); + lists.RemoveMerchantMyShopItem(found.second, wholeItem, 0); } ++saved; diff --git a/Source/Contents/TableMng.cpp b/Source/Contents/TableMng.cpp index d5793e465..c3d3a302b 100644 --- a/Source/Contents/TableMng.cpp +++ b/Source/Contents/TableMng.cpp @@ -145,67 +145,67 @@ bool CTableMng::ReadEntryQueueXls(void* excelPtr) { if (cell == nullptr) { goto fail_row; } - info->value020C = cell->GetInteger(); + info->minLevel = cell->GetInteger(); cell = sheet->Cell(row, 4); if (cell == nullptr) { goto fail_row; } - info->value0210 = cell->GetInteger(); + info->maxLevel = cell->GetInteger(); cell = sheet->Cell(row, 5); if (cell == nullptr) { goto fail_row; } - info->flag0214 = static_cast(cell->GetInteger()); + info->queueFlagA = static_cast(cell->GetInteger()); cell = sheet->Cell(row, 6); if (cell == nullptr) { goto fail_row; } - info->flag0215 = static_cast(cell->GetInteger()); + info->queueFlagB = static_cast(cell->GetInteger()); cell = sheet->Cell(row, 7); if (cell == nullptr) { goto fail_row; } - info->flag0216 = static_cast(cell->GetInteger()); + info->queueFlagC = static_cast(cell->GetInteger()); cell = sheet->Cell(row, 8); if (cell == nullptr) { goto fail_row; } - info->flag0217 = static_cast(cell->GetInteger()); + info->queueFlagD = static_cast(cell->GetInteger()); cell = sheet->Cell(row, 9); if (cell == nullptr) { goto fail_row; } - info->flag0218 = static_cast(cell->GetInteger()); + info->limitType = static_cast(cell->GetInteger()); cell = sheet->Cell(row, 10); if (cell == nullptr) { goto fail_row; } - info->value021C = cell->GetInteger(); + info->limitValue = cell->GetInteger(); cell = sheet->Cell(row, 11); if (cell == nullptr) { goto fail_row; } - info->value0220 = cell->GetInteger(); + info->limitValueEnd = cell->GetInteger(); cell = sheet->Cell(row, 12); if (cell == nullptr) { goto fail_row; } if (cell->Type() == 3) { - strcpy_s(info->text0224, sizeof(info->text0224), cell->GetString()); + strcpy_s(info->detailsText, sizeof(info->detailsText), cell->GetString()); } else if (cell->Type() == 4) { wchar_t wbuf[260]; memset(wbuf, 0, sizeof(wbuf)); wcscpy_s(wbuf, 260, cell->GetWString()); - WideCharToMultiByte(CP_ACP, 0, wbuf, -1, info->text0224, sizeof(info->text0224), nullptr, nullptr); + WideCharToMultiByte(CP_ACP, 0, wbuf, -1, info->detailsText, sizeof(info->detailsText), nullptr, nullptr); } cell = sheet->Cell(row, 13); @@ -213,12 +213,12 @@ bool CTableMng::ReadEntryQueueXls(void* excelPtr) { goto fail_row; } if (cell->Type() == 3) { - strcpy_s(info->text0328, sizeof(info->text0328), cell->GetString()); + strcpy_s(info->rulesText, sizeof(info->rulesText), cell->GetString()); } else if (cell->Type() == 4) { wchar_t wbuf[260]; memset(wbuf, 0, sizeof(wbuf)); wcscpy_s(wbuf, 260, cell->GetWString()); - WideCharToMultiByte(CP_ACP, 0, wbuf, -1, info->text0328, sizeof(info->text0328), nullptr, nullptr); + WideCharToMultiByte(CP_ACP, 0, wbuf, -1, info->rulesText, sizeof(info->rulesText), nullptr, nullptr); } cell = sheet->Cell(row, 14); @@ -226,12 +226,12 @@ bool CTableMng::ReadEntryQueueXls(void* excelPtr) { goto fail_row; } if (cell->Type() == 3) { - strcpy_s(info->text042C, sizeof(info->text042C), cell->GetString()); + strcpy_s(info->rewardText, sizeof(info->rewardText), cell->GetString()); } else if (cell->Type() == 4) { wchar_t wbuf[260]; memset(wbuf, 0, sizeof(wbuf)); wcscpy_s(wbuf, 260, cell->GetWString()); - WideCharToMultiByte(CP_ACP, 0, wbuf, -1, info->text042C, sizeof(info->text042C), nullptr, nullptr); + WideCharToMultiByte(CP_ACP, 0, wbuf, -1, info->rewardText, sizeof(info->rewardText), nullptr, nullptr); } cell = sheet->Cell(row, 15); @@ -239,12 +239,12 @@ bool CTableMng::ReadEntryQueueXls(void* excelPtr) { goto fail_row; } if (cell->Type() == 3) { - strcpy_s(info->text0530, sizeof(info->text0530), cell->GetString()); + strcpy_s(info->extraText, sizeof(info->extraText), cell->GetString()); } else if (cell->Type() == 4) { wchar_t wbuf[260]; memset(wbuf, 0, sizeof(wbuf)); wcscpy_s(wbuf, 260, cell->GetWString()); - WideCharToMultiByte(CP_ACP, 0, wbuf, -1, info->text0530, sizeof(info->text0530), nullptr, nullptr); + WideCharToMultiByte(CP_ACP, 0, wbuf, -1, info->extraText, sizeof(info->extraText), nullptr, nullptr); } cell = sheet->Cell(row, 16); @@ -252,12 +252,12 @@ bool CTableMng::ReadEntryQueueXls(void* excelPtr) { goto fail_row; } if (cell->Type() == 3) { - strcpy_s(info->text0634, sizeof(info->text0634), cell->GetString()); + strcpy_s(info->bitmapName, sizeof(info->bitmapName), cell->GetString()); } else if (cell->Type() == 4) { wchar_t wbuf[260]; memset(wbuf, 0, sizeof(wbuf)); wcscpy_s(wbuf, 260, cell->GetWString()); - WideCharToMultiByte(CP_ACP, 0, wbuf, -1, info->text0634, sizeof(info->text0634), nullptr, nullptr); + WideCharToMultiByte(CP_ACP, 0, wbuf, -1, info->bitmapName, sizeof(info->bitmapName), nullptr, nullptr); } if (this->m_entryQueue.find(info->id) != this->m_entryQueue.end()) { @@ -300,20 +300,20 @@ bool CTableMng::ReadEntryQueueBinary() { ReadFile(file, &info->id, 4, &bytesRead, nullptr); ReadFile(file, info->name, 0x104, &bytesRead, nullptr); ReadFile(file, info->description, 0x104, &bytesRead, nullptr); - ReadFile(file, &info->value020C, 4, &bytesRead, nullptr); - ReadFile(file, &info->value0210, 4, &bytesRead, nullptr); - ReadFile(file, &info->flag0214, 1, &bytesRead, nullptr); - ReadFile(file, &info->flag0215, 1, &bytesRead, nullptr); - ReadFile(file, &info->flag0216, 1, &bytesRead, nullptr); - ReadFile(file, &info->flag0217, 1, &bytesRead, nullptr); - ReadFile(file, &info->flag0218, 1, &bytesRead, nullptr); - ReadFile(file, &info->value021C, 4, &bytesRead, nullptr); - ReadFile(file, &info->value0220, 4, &bytesRead, nullptr); - ReadFile(file, info->text0224, 0x104, &bytesRead, nullptr); - ReadFile(file, info->text0328, 0x104, &bytesRead, nullptr); - ReadFile(file, info->text042C, 0x104, &bytesRead, nullptr); - ReadFile(file, info->text0530, 0x104, &bytesRead, nullptr); - ReadFile(file, info->text0634, 0x104, &bytesRead, nullptr); + ReadFile(file, &info->minLevel, 4, &bytesRead, nullptr); + ReadFile(file, &info->maxLevel, 4, &bytesRead, nullptr); + ReadFile(file, &info->queueFlagA, 1, &bytesRead, nullptr); + ReadFile(file, &info->queueFlagB, 1, &bytesRead, nullptr); + ReadFile(file, &info->queueFlagC, 1, &bytesRead, nullptr); + ReadFile(file, &info->queueFlagD, 1, &bytesRead, nullptr); + ReadFile(file, &info->limitType, 1, &bytesRead, nullptr); + ReadFile(file, &info->limitValue, 4, &bytesRead, nullptr); + ReadFile(file, &info->limitValueEnd, 4, &bytesRead, nullptr); + ReadFile(file, info->detailsText, 0x104, &bytesRead, nullptr); + ReadFile(file, info->rulesText, 0x104, &bytesRead, nullptr); + ReadFile(file, info->rewardText, 0x104, &bytesRead, nullptr); + ReadFile(file, info->extraText, 0x104, &bytesRead, nullptr); + ReadFile(file, info->bitmapName, 0x104, &bytesRead, nullptr); this->m_entryQueue.insert(std::pair(info->id, info)); } @@ -407,54 +407,54 @@ bool CTableMng::WriteEntryQueueXls() { cell = sheet2->Cell(row, 3); if (cell != nullptr) { - cell->SetInteger(info->value020C); + cell->SetInteger(info->minLevel); } cell = sheet2->Cell(row, 4); if (cell != nullptr) { - cell->SetInteger(info->value0210); + cell->SetInteger(info->maxLevel); } cell = sheet2->Cell(row, 5); if (cell != nullptr) { - cell->SetInteger(info->flag0214); + cell->SetInteger(info->queueFlagA); } cell = sheet2->Cell(row, 6); if (cell != nullptr) { - cell->SetInteger(info->flag0215); + cell->SetInteger(info->queueFlagB); } cell = sheet2->Cell(row, 7); if (cell != nullptr) { - cell->SetInteger(info->flag0216); + cell->SetInteger(info->queueFlagC); } cell = sheet2->Cell(row, 8); if (cell != nullptr) { - cell->SetInteger(info->flag0217); + cell->SetInteger(info->queueFlagD); } cell = sheet2->Cell(row, 9); if (cell != nullptr) { - cell->SetInteger(info->flag0218); + cell->SetInteger(info->limitType); } cell = sheet2->Cell(row, 10); if (cell != nullptr) { - cell->SetInteger(info->value021C); + cell->SetInteger(info->limitValue); } cell = sheet2->Cell(row, 11); if (cell != nullptr) { - cell->SetInteger(info->value0220); + cell->SetInteger(info->limitValueEnd); } cell = sheet2->Cell(row, 12); if (cell != nullptr) { wchar_t wbuf[260]; memset(wbuf, 0, sizeof(wbuf)); - MultiByteToWideChar(CP_ACP, 0, info->text0224, -1, wbuf, 260); + MultiByteToWideChar(CP_ACP, 0, info->detailsText, -1, wbuf, 260); cell->SetWString(wbuf); } @@ -462,7 +462,7 @@ bool CTableMng::WriteEntryQueueXls() { if (cell != nullptr) { wchar_t wbuf[260]; memset(wbuf, 0, sizeof(wbuf)); - MultiByteToWideChar(CP_ACP, 0, info->text0328, -1, wbuf, 260); + MultiByteToWideChar(CP_ACP, 0, info->rulesText, -1, wbuf, 260); cell->SetWString(wbuf); } @@ -470,7 +470,7 @@ bool CTableMng::WriteEntryQueueXls() { if (cell != nullptr) { wchar_t wbuf[260]; memset(wbuf, 0, sizeof(wbuf)); - MultiByteToWideChar(CP_ACP, 0, info->text042C, -1, wbuf, 260); + MultiByteToWideChar(CP_ACP, 0, info->rewardText, -1, wbuf, 260); cell->SetWString(wbuf); } @@ -478,7 +478,7 @@ bool CTableMng::WriteEntryQueueXls() { if (cell != nullptr) { wchar_t wbuf[260]; memset(wbuf, 0, sizeof(wbuf)); - MultiByteToWideChar(CP_ACP, 0, info->text0530, -1, wbuf, 260); + MultiByteToWideChar(CP_ACP, 0, info->extraText, -1, wbuf, 260); cell->SetWString(wbuf); } @@ -486,7 +486,7 @@ bool CTableMng::WriteEntryQueueXls() { if (cell != nullptr) { wchar_t wbuf[260]; memset(wbuf, 0, sizeof(wbuf)); - MultiByteToWideChar(CP_ACP, 0, info->text0634, -1, wbuf, 260); + MultiByteToWideChar(CP_ACP, 0, info->bitmapName, -1, wbuf, 260); cell->SetWString(wbuf); } } diff --git a/Source/Contents/TableMng.h b/Source/Contents/TableMng.h index 506ea9d65..4a3777e59 100644 --- a/Source/Contents/TableMng.h +++ b/Source/Contents/TableMng.h @@ -7,20 +7,20 @@ struct EntryQueueInfo { /* 0000 */ unsigned int id; /* 0004 */ char name[260]; /* 0108 */ char description[260]; - /* 020C */ int value020C; - /* 0210 */ int value0210; - /* 0214 */ unsigned char flag0214; - /* 0215 */ unsigned char flag0215; - /* 0216 */ unsigned char flag0216; - /* 0217 */ unsigned char flag0217; - /* 0218 */ unsigned char flag0218; - /* 021C */ int value021C; - /* 0220 */ int value0220; - /* 0224 */ char text0224[260]; - /* 0328 */ char text0328[260]; - /* 042C */ char text042C[260]; - /* 0530 */ char text0530[260]; - /* 0634 */ char text0634[260]; + /* 020C */ int minLevel; + /* 0210 */ int maxLevel; + /* 0214 */ unsigned char queueFlagA; + /* 0215 */ unsigned char queueFlagB; + /* 0216 */ unsigned char queueFlagC; + /* 0217 */ unsigned char queueFlagD; + /* 0218 */ unsigned char limitType; + /* 021C */ int limitValue; + /* 0220 */ int limitValueEnd; + /* 0224 */ char detailsText[260]; + /* 0328 */ char rulesText[260]; + /* 042C */ char rewardText[260]; + /* 0530 */ char extraText[260]; + /* 0634 */ char bitmapName[260]; }; // VTABLE: vt_01823 diff --git a/Source/Contents/UserData/AccountLinkedUserDataMgr.cpp b/Source/Contents/UserData/AccountLinkedUserDataMgr.cpp index bff4761b4..7681a324d 100644 --- a/Source/Contents/UserData/AccountLinkedUserDataMgr.cpp +++ b/Source/Contents/UserData/AccountLinkedUserDataMgr.cpp @@ -57,7 +57,7 @@ namespace { } // INLINED - const char* UnknownAccountName() { + const char* DefaultAccountName() { const std::uint8_t source[] = {0x6A, 0x5F, 0xA6, 0x89, 0x82, 0x02, 0x03, 0x1D}; return DecryptText<0x1D6D75EDE7CD311FULL>(source); } @@ -69,7 +69,7 @@ CAccountLinkedUserDataMgr* g_accountLinkedUserDataMgr; // INLINED CAccountLinkedUserDataMgr::CAccountLinkedUserDataMgr() - : m_accountId(0), m_accountName(UnknownAccountName()), m_loaded(false), m_pendingLoads(0), m_saveUrl(""), m_loadUrl("") { + : m_accountId(0), m_accountName(DefaultAccountName()), m_loaded(false), m_pendingLoads(0), m_saveUrl(""), m_loadUrl("") { this->m_enabled = true; } diff --git a/Source/Contents/World/SkyBox.cpp b/Source/Contents/World/SkyBox.cpp index 25f14efd1..416eac3e1 100644 --- a/Source/Contents/World/SkyBox.cpp +++ b/Source/Contents/World/SkyBox.cpp @@ -49,7 +49,7 @@ CSkyCube::CSkyCube() { this->m_vertices[7].y = 650.0f; this->m_vertices[7].z = -1250.0f; this->m_vertices[7].diffuse = 0xFFFFFFFF; - this->m_unknown_0140 = 0; + this->m_loopRotationY = 0; this->m_vertices[8].x = -1250.0f; this->m_vertices[8].y = -350.0f; this->m_vertices[8].z = 1240.0f; diff --git a/Source/Contents/World/SkyBox.h b/Source/Contents/World/SkyBox.h index b45ef75a8..c19e26e6a 100644 --- a/Source/Contents/World/SkyBox.h +++ b/Source/Contents/World/SkyBox.h @@ -70,7 +70,7 @@ public: CSkyCube(); /* 0000 */ SkyCubeVertex m_vertices[10]; - /* 0140 */ int m_unknown_0140; + /* 0140 */ int m_loopRotationY; /* 0144 */ CLensFlare m_flare; }; @@ -87,7 +87,7 @@ public: /* 0000 */ CRes* m_model; /* 0004 */ C3dActor* m_actor; - /* 0008 */ int m_unknown_0008; + /* 0008 */ int m_loopRotationX; /* 000C */ CLensFlare m_flare; }; diff --git a/Source/Contents/World/WorldModelLoading.cpp b/Source/Contents/World/WorldModelLoading.cpp index 360244b09..44345f76f 100644 --- a/Source/Contents/World/WorldModelLoading.cpp +++ b/Source/Contents/World/WorldModelLoading.cpp @@ -241,7 +241,7 @@ void CWorld::InitWorld() { lastPercent = percent; lastNoticeTime = now; g_windowMgr.SendNotice(UIM_LOADINGPERCENT, percent, 0, 0, 0, 0); - g_windowMgr.CenterSurface0478(); + g_windowMgr.DrawCenteredBackground(); g_windowMgr.DrawWindows(); if (g_renderer->Draw()) { g_renderer->Present(0); diff --git a/Source/Contents/World/WorldObjects.cpp b/Source/Contents/World/WorldObjects.cpp index 6b8af9532..bfc530f84 100644 --- a/Source/Contents/World/WorldObjects.cpp +++ b/Source/Contents/World/WorldObjects.cpp @@ -574,7 +574,7 @@ void CGameMode::ShowGuildEmblem(CGameActor* actor, int guildId, int unused) { window->SendMsg(nullptr, UM_SETINFO, actor->render.accountId, guildId, 0, 0); g_windowMgr.AddRenderedFront(window); actor->sceneNameWindow = reinterpret_cast(window); - this->AddUnknown0604(window); + this->AddNotificationWindow(window); } // OFFSET: 0x00CD8950 @@ -645,7 +645,7 @@ void CGameMode::OpenActorMenu(const ActorPickInfo* pick, int handled) { } const bool isAdmin = IsAdminAccount(g_session.m_aid); - if (pick == nullptr || handled != 0 || g_mouse.buttons[1] != 3 || g_windowMgr.window_0288 != nullptr) { + if (pick == nullptr || handled != 0 || g_mouse.buttons[1] != 3 || g_windowMgr.itemStoreWnd != nullptr) { return; } @@ -653,7 +653,7 @@ void CGameMode::OpenActorMenu(const ActorPickInfo* pick, int handled) { char text[256]; const int job = pick->job; CGameActor* actor = nullptr; - if ((job >= 45 && job < 1000) || g_session.IsMonsterClass(job) || g_session.IsSkillIdInRange6001(job) || + if ((job >= 45 && job < 1000) || g_session.IsMonsterClass(job) || g_session.IsCompanionJob(job) || pick->kind == 4) { actor = static_cast(this->scene->GetGameActorByAID(pick->accountId)); } @@ -1017,26 +1017,26 @@ CMsgEffect* CGameMode::SpawnMsgEffect(int effectId, const vector3d* position, st type = 10; break; case MAKETYPE_ANGELUS_EFFECT: - names[0] = FormatOwnedString("%s.spr", g_session.Text80EC()); - names[1] = FormatOwnedString("%s.act", g_session.Text80EC()); + names[0] = FormatOwnedString("%s.spr", g_session.GetDamageSpriteName()); + names[1] = FormatOwnedString("%s.act", g_session.GetDamageSpriteName()); animation = 1; type = 11; break; case MAKETYPE_CRUSIS_EFFECT: - names[0] = FormatOwnedString("%s.spr", g_session.Text80EC()); - names[1] = FormatOwnedString("%s.act", g_session.Text80EC()); + names[0] = FormatOwnedString("%s.spr", g_session.GetDamageSpriteName()); + names[1] = FormatOwnedString("%s.act", g_session.GetDamageSpriteName()); animation = 2; type = 12; break; case MAKETYPE_CRITICAL_EFFECT: - names[0] = FormatOwnedString("%s.spr", g_session.Text80EC()); - names[1] = FormatOwnedString("%s.act", g_session.Text80EC()); + names[0] = FormatOwnedString("%s.spr", g_session.GetDamageSpriteName()); + names[1] = FormatOwnedString("%s.act", g_session.GetDamageSpriteName()); animation = 2; type = 15; break; case MAKETYPE_LUCKY_EFFECT: - names[0] = FormatOwnedString("%s.spr", g_session.Text80EC()); - names[1] = FormatOwnedString("%s.act", g_session.Text80EC()); + names[0] = FormatOwnedString("%s.spr", g_session.GetDamageSpriteName()); + names[1] = FormatOwnedString("%s.act", g_session.GetDamageSpriteName()); animation = 3; type = 17; break; @@ -1066,8 +1066,8 @@ CMsgEffect* CGameMode::SpawnMsgEffect(int effectId, const vector3d* position, st type = 3; break; case MAKETYPE_GUARD_EFFECT: - names[0] = FormatOwnedString("%s.spr", g_session.Text80EC()); - names[1] = FormatOwnedString("%s.act", g_session.Text80EC()); + names[0] = FormatOwnedString("%s.spr", g_session.GetDamageSpriteName()); + names[1] = FormatOwnedString("%s.act", g_session.GetDamageSpriteName()); animation = 1; type = 24; break; @@ -1077,11 +1077,11 @@ CMsgEffect* CGameMode::SpawnMsgEffect(int effectId, const vector3d* position, st type = 3; break; case MAKETYPE_BLUE_EFFECT: - names[0] = FormatOwnedString("%s.spr", g_session.Text8104()); + names[0] = FormatOwnedString("%s.spr", g_session.GetDamageSkinAuxiliaryName()); if (g_session.m_damageSkinIndex == 0) { names[1] = "이팩트\\msg.act"; } else { - names[1] = FormatOwnedString("%s.act", g_session.Text8104()); + names[1] = FormatOwnedString("%s.act", g_session.GetDamageSkinAuxiliaryName()); } animation = 2; type = 25; diff --git a/Source/Network/ActorNamePacket.cpp b/Source/Network/ActorNamePacket.cpp index 066e36dc1..783fffe62 100644 --- a/Source/Network/ActorNamePacket.cpp +++ b/Source/Network/ActorNamePacket.cpp @@ -27,7 +27,7 @@ void CGameMode::ReceiveActorNameTitle(const ActorNameTitlePacket* packet) { if (packet->actorId == g_session.petGid) { std::sprintf(g_session.petName, packet->name); - if (UIPetInfoWnd* window = static_cast(g_windowMgr.window_038C)) { + if (UIPetInfoWnd* window = static_cast(g_windowMgr.petInfoWnd)) { window->nameEdit->SetText(packet->name); } } diff --git a/Source/Network/Packets/SkillUpdatePacket.cpp b/Source/Network/Packets/SkillUpdatePacket.cpp index 2382c1fa6..9a94b0e6d 100644 --- a/Source/Network/Packets/SkillUpdatePacket.cpp +++ b/Source/Network/Packets/SkillUpdatePacket.cpp @@ -62,16 +62,16 @@ void CGameMode::ApplySkillUpdatePacket(const void* packet) { // OFFSET: 0x00D06AF0 // FUNCTION: fn_21577 void CGameMode::ReceiveLearnedSkill( - std::uint16_t id, std::int16_t level, int unknown000C, std::uint8_t unknown0018, std::int16_t unknown0014, std::int16_t unknown001C, std::int16_t unknown0030 + std::uint16_t id, std::int16_t level, int type, std::uint8_t upgradable, std::int16_t spCost, std::int16_t range, std::int16_t unknown0030 ) { CSkillInfo value; - value.type = unknown000C; + value.type = type; value.id = id; value.level = level; - value.upgradable = unknown0018; + value.upgradable = upgradable; value.name = value.IdName(*g_session.m_hotkeyScript); - value.spCost = unknown0014; - value.range = unknown001C; + value.spCost = spCost; + value.range = range; value.learnedLevel = unknown0030; value.apCost = value.UseApAmount(*g_session.m_hotkeyScript, level); @@ -112,11 +112,11 @@ void CGameMode::ApplyAdditionalSkillPacket(const void* packet) { g_session.m_guildSkillPoint = Read(bytes + 4); g_session.InvalidateWindowFrames(); - if (g_windowMgr.window_032C) { - g_windowMgr.window_032C->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.guildSkillWnd) { + g_windowMgr.guildSkillWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - if (g_windowMgr.window_01E8) { - g_windowMgr.window_01E8->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.shortCutWnd) { + g_windowMgr.shortCutWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } } diff --git a/Source/Render/DX9/SurfaceDX9.cpp b/Source/Render/DX9/SurfaceDX9.cpp index 1fdfd8dda..3f5c61c8a 100644 --- a/Source/Render/DX9/SurfaceDX9.cpp +++ b/Source/Render/DX9/SurfaceDX9.cpp @@ -33,7 +33,7 @@ namespace { // OFFSET: 0x00570D70 // FUNCTION: fn_02441 - std::uint16_t Color1555(std::uint32_t color) { + std::uint16_t PackColorA1R5G5B5(std::uint32_t color) { return ((color >> 16) & 0x8000) | ((color & 255) >> 3) | ((color >> 6) & 0x3E0) | ((color >> 9) & 0x7C00); } @@ -177,7 +177,7 @@ void CSurfaceDX9::Upload(int x, int y, int width, int height, const std::uint32_ break; case D3DFMT_X1R5G5B5: case D3DFMT_A1R5G5B5: - value = Color1555(color); + value = PackColorA1R5G5B5(color); break; case D3DFMT_A4R4G4B4: value = ((color >> 16) & 0xF000) | ((color & 255) >> 4) | ((color >> 8) & 0xF0) | ((color >> 12) & 0xF00); diff --git a/Source/Render/DX9/TextureDX9.cpp b/Source/Render/DX9/TextureDX9.cpp index 30848ec60..6b60b4ad3 100644 --- a/Source/Render/DX9/TextureDX9.cpp +++ b/Source/Render/DX9/TextureDX9.cpp @@ -14,7 +14,7 @@ namespace { // OFFSET: 0x00573170 // FUNCTION: fn_02487 - std::uint16_t Color4444(std::uint32_t color) { + std::uint16_t PackArgb4444(std::uint32_t color) { return ((color >> 16) & 0xF000) | ((color >> 12) & 0xF00) | ((color >> 8) & 0xF0) | ((color >> 4) & 0xF); } @@ -32,7 +32,7 @@ namespace { case D3DFMT_A1R5G5B5: return ((color >> 16) & 0x8000) | ((color & 255) >> 3) | ((color >> 6) & 0x3E0) | ((color >> 9) & 0x7C00); case D3DFMT_A4R4G4B4: - return Color4444(color); + return PackArgb4444(color); default: return 0; } diff --git a/Source/Render/Renderer.cpp b/Source/Render/Renderer.cpp index 1c301a7b8..51670aed1 100644 --- a/Source/Render/Renderer.cpp +++ b/Source/Render/Renderer.cpp @@ -168,7 +168,7 @@ timer: DrawActionSprite(system, 100, 200, action, sprite, 1, 0, static_cast(scale), 0.0f, 0xFFFFFFFF, 0x201); } - if (g_session.WorldUnknown0050() == 1) { + if (g_session.GetBattleFieldMode() == 1) { this->DrawBattleFieldIcon(system); } diff --git a/Source/Script/LuaScript.cpp b/Source/Script/LuaScript.cpp index 1fca4a5cd..c94505f8a 100644 --- a/Source/Script/LuaScript.cpp +++ b/Source/Script/LuaScript.cpp @@ -694,39 +694,39 @@ int AddEntryQueue(lua_State* state) { const int id = static_cast(luaL_checknumber(state, 1)); std::string name = luaL_checkstring(state, 2); std::string displayName = luaL_checkstring(state, 3); - const int value020C = static_cast(luaL_checknumber(state, 4)); - const int value0210 = static_cast(luaL_checknumber(state, 5)); - const int value0214 = static_cast(luaL_checknumber(state, 6)); - const int value0215 = static_cast(luaL_checknumber(state, 7)); - const int value0216 = static_cast(luaL_checknumber(state, 8)); - const int value0217 = static_cast(luaL_checknumber(state, 9)); - const int value0218 = static_cast(luaL_checknumber(state, 10)); - const int value021C = static_cast(luaL_checknumber(state, 11)); - const int value0220 = static_cast(luaL_checknumber(state, 12)); - std::string text0224 = luaL_checkstring(state, 13); - std::string text0328 = luaL_checkstring(state, 14); - std::string text042C = luaL_checkstring(state, 15); - std::string text0530 = luaL_checkstring(state, 16); - std::string text0634 = luaL_checkstring(state, 17); + const int minLevel = static_cast(luaL_checknumber(state, 4)); + const int maxLevel = static_cast(luaL_checknumber(state, 5)); + const int queueFlagA = static_cast(luaL_checknumber(state, 6)); + const int queueFlagB = static_cast(luaL_checknumber(state, 7)); + const int queueFlagC = static_cast(luaL_checknumber(state, 8)); + const int queueFlagD = static_cast(luaL_checknumber(state, 9)); + const int limitType = static_cast(luaL_checknumber(state, 10)); + const int limitValue = static_cast(luaL_checknumber(state, 11)); + const int limitValueEnd = static_cast(luaL_checknumber(state, 12)); + std::string detailsText = luaL_checkstring(state, 13); + std::string rulesText = luaL_checkstring(state, 14); + std::string rewardText = luaL_checkstring(state, 15); + std::string extraText = luaL_checkstring(state, 16); + std::string bitmapName = luaL_checkstring(state, 17); EntryQueueInfo* info = new EntryQueueInfo; info->id = id; strcpy_s(info->name, sizeof(info->name), name.c_str()); strcpy_s(info->displayName, sizeof(info->displayName), displayName.c_str()); - info->minLevel = value020C; - info->maxLevel = value0210; - info->queueFlagA = static_cast(value0214); - info->queueFlagB = static_cast(value0215); - info->queueFlagC = static_cast(value0216); - info->queueFlagD = static_cast(value0217); - info->limitType = static_cast(value0218); - info->limitValue = value021C; - info->limitValueEnd = value0220; - strcpy_s(info->description, sizeof(info->description), text0224.c_str()); - strcpy_s(info->rulesText, sizeof(info->rulesText), text0328.c_str()); - strcpy_s(info->rewardText, sizeof(info->rewardText), text042C.c_str()); - strcpy_s(info->extraText, sizeof(info->extraText), text0530.c_str()); - strcpy_s(info->bitmapName, sizeof(info->bitmapName), text0634.c_str()); + info->minLevel = minLevel; + info->maxLevel = maxLevel; + info->queueFlagA = static_cast(queueFlagA); + info->queueFlagB = static_cast(queueFlagB); + info->queueFlagC = static_cast(queueFlagC); + info->queueFlagD = static_cast(queueFlagD); + info->limitType = static_cast(limitType); + info->limitValue = limitValue; + info->limitValueEnd = limitValueEnd; + strcpy_s(info->description, sizeof(info->description), detailsText.c_str()); + strcpy_s(info->rulesText, sizeof(info->rulesText), rulesText.c_str()); + strcpy_s(info->rewardText, sizeof(info->rewardText), rewardText.c_str()); + strcpy_s(info->extraText, sizeof(info->extraText), extraText.c_str()); + strcpy_s(info->bitmapName, sizeof(info->bitmapName), bitmapName.c_str()); g_entryQueueList.insert(std::make_pair(id, info)); return 0; @@ -1299,7 +1299,7 @@ int UIWindowMgr::GetHotkeyBehavior() { if (this->modifierKey == VK_SHIFT && !g_windowMgr.inputSuggestionsEnabled) { UIWindow* parent = this->hoverWindow ? this->hoverWindow->parent : nullptr; - if (!parent || parent == this->window_01C8 || parent->geometry.visible == 0) { + if (!parent || parent == this->chatWnd || parent->geometry.visible == 0) { const int count = HotkeyCount(*g_session.m_hotkeyScript, 0); for (int index = 0; index < count; ++index) { const HotkeyInfo hotkey = GetHotkeyInfo(*g_session.m_hotkeyScript, 0, index); diff --git a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp index 2483ea94f..dcbe3d7e5 100644 --- a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp +++ b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp @@ -2124,7 +2124,7 @@ ITEM_INFO UIItemParamChangeDisplayWnd::FindEquippedItem(int location) { } for (int index = 0; index < 8; ++index) { - ITEM_INFO item = g_session.GetItem17F0(index); + ITEM_INFO item = g_session.GetEquippedItemAt(index); if (item.identity[1] > 0 && item.quantity == 1 && (item.identity[2] & location) != 0) { return item; } @@ -2231,7 +2231,7 @@ void UIExchangeWnd::DragAndDrop(int x, int y, std::intptr_t value) { } g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 5, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 5, 0, 0, 0); return; } @@ -2260,11 +2260,11 @@ void UIEquipWnd::DragAndDrop(int x, int y, std::intptr_t value) { break; case 17: fromStorage = true; - item = g_session.GetItem61B8(drag->slot); + item = g_session.GetSwapCostumeItem(drag->slot); break; case 18: fromStorage = true; - item = g_session.GetItem6B68(drag->slot); + item = g_session.GetSwapEquippedItem(drag->slot); break; } @@ -2309,14 +2309,14 @@ void UInCashWnd::DragAndDrop(int x, int y, std::intptr_t value) { } g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 20, quantity, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 20, quantity, 0, 0); return; } break; case 6: if (x > 444) { g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 19, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 19, 0, 0, 0); return; } break; @@ -2587,7 +2587,7 @@ void UIItemParamChangeDisplayWnd::SumEquippedStats() { int locations = 0; for (int index = 0; index < 8; ++index) { - ITEM_INFO item = g_session.GetItem17F0(index); + ITEM_INFO item = g_session.GetEquippedItemAt(index); if (item.identity[1] > 0 && item.quantity == 1) { const ITEM_DESC& description = FindItemDescription(std::atoi(item.itemId.c_str())); const bool duplicate = (description.descriptionFlags & locations) != 0; @@ -2651,8 +2651,8 @@ void UIExchangeWnd::CancelInput() { g_windowMgr.SetFocus(nullptr); this->zenyEdit->Move(129, 500); this->zenyEdit = nullptr; - if (g_windowMgr.window_01C8) { - g_windowMgr.window_01C8->SendMsg(nullptr, UM_GET_EDIT_FOCUS, 0, 0, 0, 0); + if (g_windowMgr.chatWnd) { + g_windowMgr.chatWnd->SendMsg(nullptr, UM_GET_EDIT_FOCUS, 0, 0, 0, 0); } } this->Invalidate(); @@ -2771,7 +2771,7 @@ int UIItemCompositionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a std::vector packet(header.length, 0); std::memcpy(packet.data(), records + position, header.length); position += header.length; - static_cast(g_modeMgr.GetGameMode())->ReceiveUnknownD4E2A0(packet.data()); + static_cast(g_modeMgr.GetGameMode())->ReceiveCardCompositionItemList(packet.data()); break; } default: @@ -2869,7 +2869,7 @@ int UIItemIdentifyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s std::vector packet(header.length, 0); std::memcpy(packet.data(), records + position, header.length); position += header.length; - static_cast(g_modeMgr.GetGameMode())->ReceiveUnknownD4E3F0(packet.data()); + static_cast(g_modeMgr.GetGameMode())->ReceiveItemIdentificationList(packet.data()); break; } default: @@ -3202,12 +3202,12 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int } g_session.m_damageSkinMode = this->damageSkinMode; const char* resourceName = nullptr; - const char* name80EC = nullptr; - const char* name8104 = nullptr; - g_session.m_hotkeyScript->Call("GetDamageResourceName", "d>sss", this->m_hoverSlot, &resourceName, &name80EC, &name8104); + const char* damageSpriteName = nullptr; + const char* damageSkinAuxiliaryName = nullptr; + g_session.m_hotkeyScript->Call("GetDamageResourceName", "d>sss", this->m_hoverSlot, &resourceName, &damageSpriteName, &damageSkinAuxiliaryName); g_session.m_damageResourceName = resourceName; - g_session.damageSpriteName = name80EC; - g_session.damageSkinAuxiliaryName = name8104; + g_session.damageSpriteName = damageSpriteName; + g_session.damageSkinAuxiliaryName = damageSkinAuxiliaryName; int millionUnit = 0; g_session.m_hotkeyScript->Call("GetDamageMillionUnit", "d>d", this->m_hoverSlot, &millionUnit); g_session.m_damageMillionUnit = millionUnit; @@ -3274,13 +3274,13 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int if (a == 575) { if (this->m_page == 1) { UIBitmapButton* button = this->unequipButton; - button->SetDisabled(g_session.CountItems2B50() == 0); + button->SetDisabled(g_session.CountDistinctCostumeItems() == 0); button->Invalidate(); return 0; } if (this->m_page == 0) { UIBitmapButton* button = this->unequipButton; - button->SetDisabled(g_session.CountItems17F0() == 0); + button->SetDisabled(g_session.CountDistinctEquippedItems() == 0); button->Invalidate(); return 0; } @@ -4651,7 +4651,7 @@ int UIWhisperWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i int talkType; const int offset = g_session.GetTalkType(text, &talkType, parts); if (offset != -1) { - g_windowMgr.SetUnknown04DC(&text[offset]); + g_windowMgr.SetChatInputText(&text[offset]); } if (talkType == 24) { @@ -4665,9 +4665,9 @@ int UIWhisperWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i } if (this->m_edit->links.size() != 0) { - g_windowMgr.SetUnknown04DC(this->m_edit->LinkedText().c_str()); + g_windowMgr.SetChatInputText(this->m_edit->LinkedText().c_str()); } else if (this->m_edit->itemTags != nullptr) { - g_windowMgr.SetUnknown04DC(this->m_edit->itemTags->linkedText.c_str()); + g_windowMgr.SetChatInputText(this->m_edit->itemTags->linkedText.c_str()); } else { g_windowMgr.chatInputText.assign(text, std::strlen(text)); } @@ -6281,7 +6281,7 @@ void UInCashWnd::OnCreate(int width, int height) { this->m_otherItems.clear(); this->m_pageCount = 1; this->m_page = 1; - g_session.ClearItems1784(10); + g_session.ClearInventoryCategoryItems(10); this->SendMsg(this, UM_REFRESH, 0, 0, 0, 0); this->AddCloseButton("Alt+X", 0); @@ -6456,7 +6456,7 @@ int UInCashWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, } case UM_REFRESH_PAGES: - this->m_pageCount = (g_session.GetList1788(this->m_tab) + 7) / 8; + this->m_pageCount = (g_session.GetInventoryCategorySize(this->m_tab) + 7) / 8; if (this->m_pageCount < 1) { this->m_pageCount = 1; } @@ -6502,7 +6502,7 @@ int UInCashWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, case UM_REFRESH: { this->items.clear(); - const int count = g_session.GetList1788(this->m_tab); + const int count = g_session.GetInventoryCategorySize(this->m_tab); for (int index = 0; index < count; ++index) { ITEM_INFO item = g_session.GetItem1784At(this->m_tab, index); if (item.identity[1] != 0 && (this->m_tab != 8 || item.bindOnEquip != 0xFFFF)) { @@ -6517,7 +6517,7 @@ int UInCashWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, switch (argument1) { case 386: this->m_totalPrice = 0; - g_session.ClearItems1720(); + g_session.ClearPurchaseItems(); this->m_otherItems.clear(); this->m_firstOther = 0; this->m_otherScroll->SetPosition(0); @@ -6589,18 +6589,18 @@ int UInCashWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, case 365: { std::string query(this->m_searchEdit->Text()); if (query.size() != 0) { - g_session.ClearItems1784(10); + g_session.ClearInventoryCategoryItems(10); for (int list = 0; list < 9; ++list) { - const int count = g_session.GetList1788(list); + const int count = g_session.GetInventoryCategorySize(list); for (int index = 0; index < count; ++index) { ITEM_INFO item = g_session.GetItem1784At(list, index); std::string name(item.displayName); - if (name.find(query) != std::string::npos && !g_session.HasItem17D4(std::atoi(item.itemId.c_str()))) { + if (name.find(query) != std::string::npos && !g_session.HasInventorySearchItem(std::atoi(item.itemId.c_str()))) { g_session.inventoryCategories[10].push_back(item); } } } - if (g_session.GetList1788(10) == 0) { + if (g_session.GetInventoryCategorySize(10) == 0) { g_windowMgr.Confirm(LookupMessage(MSI_NOTHING_SEARCH_ITEM), 0, true, false, 0, "Message", 280, 120, 0); } this->m_searchEdit->SetText(""); @@ -6867,9 +6867,9 @@ ITEM_INFO UIEquipWnd::GetSlotItem(int slot) { if (this->m_page == 1) { if (this->m_viewOther == 0) { - return g_session.GetItem2B50(slot); + return g_session.GetCostumeItemAt(slot); } - return g_session.GetItem3500(slot); + return g_session.GetAlternateCostumeItemAt(slot); } if (this->m_page != 0) { @@ -6877,9 +6877,9 @@ ITEM_INFO UIEquipWnd::GetSlotItem(int slot) { } if (this->m_viewOther == 0) { - return g_session.GetItem17F0(slot); + return g_session.GetEquippedItemAt(slot); } - return g_session.GetItem21A0(slot); + return g_session.GetAlternateEquippedItemAt(slot); } // OFFSET: 0x008D8580 @@ -7125,7 +7125,7 @@ ITEM_INFO UInCashWnd::ItemAt(int x, int y) { for (int row = 0; row < 4; ++row) { if (y >= top && y <= top + this->m_rowHeight) { int index = row + (this->m_page - 1) * 8; - int count = lists.GetList1788(this->m_tab); + int count = lists.GetInventoryCategorySize(this->m_tab); if (this->m_tab == 8) { count = static_cast(this->items.size()); } @@ -7148,7 +7148,7 @@ ITEM_INFO UInCashWnd::ItemAt(int x, int y) { for (int row = 0; row < 4; ++row) { if (y >= top && y <= top + this->m_rowHeight) { int index = this->m_page * 8 - 4 + row; - int count = lists.GetList1788(this->m_tab); + int count = lists.GetInventoryCategorySize(this->m_tab); if (this->m_tab == 8) { count = static_cast(this->items.size()); } @@ -9930,7 +9930,7 @@ void UILoadingWnd::OnCreate(int, int) { } ResourceMgr::Instance().Load(Resolve(name)); - g_windowMgr.SetSurface0478(static_cast(ResourceMgr::Instance().Load(Resolve(name)))); + g_windowMgr.SetBackgroundSurface(static_cast(ResourceMgr::Instance().Load(Resolve(name)))); } // OFFSET: 0x008C8A50 // FUNCTION: fn_11966 @@ -9960,14 +9960,14 @@ void UIEquipWnd::DrawEquipSlots() { ITEM_INFO item; if (this->m_page == 1) { if (this->m_viewOther == 0) { - item = g_session.GetItem2B50(slot); + item = g_session.GetCostumeItemAt(slot); } else { - item = g_session.GetItem3500(slot); + item = g_session.GetAlternateCostumeItemAt(slot); } } else if (this->m_viewOther == 0) { - item = g_session.GetItem17F0(slot); + item = g_session.GetEquippedItemAt(slot); } else { - item = g_session.GetItem21A0(slot); + item = g_session.GetAlternateEquippedItemAt(slot); } if (item.identity[1] == 0) { @@ -11593,7 +11593,7 @@ void UIEquipWnd::RefreshLook() { if (m_viewOther == 0) { appearance[0] = g_session.GetDisplayJob(); - appearance[1] = g_session.SyncUnknown0E98(); + appearance[1] = g_session.GetCurrentSex(); appearance[2] = g_session.m_head; appearance[6] = g_session.m_bodyStyle; appearance[7] = g_session.m_headPalette; diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.cpp b/Source/UI/AdventureGuide/UIAdventureGuide.cpp index c4f8e4e3f..89533c476 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.cpp +++ b/Source/UI/AdventureGuide/UIAdventureGuide.cpp @@ -3000,7 +3000,7 @@ void CUIMonster::SearchNavigation() { g_navigationManager.SetViewMode(1); g_navigationManager.ClearSavedTarget(); g_windowMgr.CloseWindow(WID_NAVIGATIONRUIDEWND); - static_cast(g_windowMgr.window_4F174)->RefreshLayout(); + static_cast(g_windowMgr.navigationWnd)->RefreshLayout(); g_windowMgr.Promote(g_windowMgr.LookupWindow(WID_NAVIGATIONV4WND)); } else { g_windowMgr.EnsureWindow(WID_NAVIGATIONV4WND); diff --git a/Source/UI/Buttons/UITextButton.cpp b/Source/UI/Buttons/UITextButton.cpp index 2adb9290c..8ef410c4b 100644 --- a/Source/UI/Buttons/UITextButton.cpp +++ b/Source/UI/Buttons/UITextButton.cpp @@ -3026,7 +3026,7 @@ void UIBasicSkillCtrl::OnRBtnDown(int x, int y) { // FUNCTION: fn_11576 void UISlotBmpButton::SetSlot(int slot, int fallback) { this->m_slot = slot; - this->m_inRange = g_session.IsWithinUnknown59C0(slot == -1 ? fallback : slot); + this->m_inRange = g_session.IsRestrictedCharacterSlot(slot == -1 ? fallback : slot); if (this->m_slot < 0) { this->icon->Show(0); return; diff --git a/Source/UI/CashShop/UICashShopWnd.cpp b/Source/UI/CashShop/UICashShopWnd.cpp index fc31297a6..0cecba980 100644 --- a/Source/UI/CashShop/UICashShopWnd.cpp +++ b/Source/UI/CashShop/UICashShopWnd.cpp @@ -141,8 +141,8 @@ void UICashShopWnd::DragAndDrop(int x, int y, std::intptr_t value) { } g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - if (g_windowMgr.window_01EC != nullptr) { - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 20, drag->quantity, 0, 0); + if (g_windowMgr.itemDropCntWnd != nullptr) { + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 20, drag->quantity, 0, 0); } } @@ -166,8 +166,8 @@ void UICashShopWnd_Cart::DragAndDrop(int x, int y, std::intptr_t value) { } g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - if (g_windowMgr.window_01EC != nullptr) { - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 19, 0, 0, 0); + if (g_windowMgr.itemDropCntWnd != nullptr) { + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 19, 0, 0, 0); } } @@ -807,7 +807,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument case UM_REFRESHITEM: this->m_items.clear(); - for (int index = 0; index < lists.GetList1788(this->m_selectedTab); ++index) { + for (int index = 0; index < lists.GetInventoryCategorySize(this->m_selectedTab); ++index) { ITEM_INFO item = g_session.GetItem1784At(this->m_selectedTab, index); if (item.identity[1] != 0) { this->m_items.push_back(item); @@ -950,7 +950,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument } if (g_session.characterRenameEnabled) { - const int owned = lists.GetList0Size() + g_session.CountItems17F0() + g_session.CountItems2B50(); + const int owned = lists.GetList0Size() + g_session.CountDistinctEquippedItems() + g_session.CountDistinctCostumeItems(); if (g_session.m_weight > g_session.m_maxWeight * 0.7f || cartItems.front().quantity + owned > g_session.extraInventorySlots + 100) { g_windowMgr.Confirm(LookupMessage(MSI_ANOTHER_WORKING), 0, true, false, 0, "Message", 0x118, 0x78, 0); return 0; @@ -1019,24 +1019,24 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument case ID_SEARCH: { std::string query(this->m_searchEdit->Text()); if (query.size() != 0 && strcmp(query.c_str(), LookupMessage(MSI_CASHSHOP_CASH_POINT)) != 0) { - itemLists.ClearItems1784(10); + itemLists.ClearInventoryCategoryItems(10); for (int list = 0; list < 11; ++list) { if (list == 10 || list == 8 || list == 9) { continue; } - for (int index = 0; index < lists.GetList1788(list); ++index) { + for (int index = 0; index < lists.GetInventoryCategorySize(list); ++index) { ITEM_INFO item = g_session.GetItem1784At(list, index); std::string name(item.displayName); - if (name.find(query) != std::string::npos && !g_session.HasItem17D4(atoi(item.itemId.c_str()))) { + if (name.find(query) != std::string::npos && !g_session.HasInventorySearchItem(atoi(item.itemId.c_str()))) { g_session.inventoryCategories[10].push_back(item); } } } - if (lists.GetList1788(10) > 0) { + if (lists.GetInventoryCategorySize(10) > 0) { this->m_items.clear(); - for (int index = 0; index < lists.GetList1788(10); ++index) { + for (int index = 0; index < lists.GetInventoryCategorySize(10); ++index) { this->m_items.push_back(g_session.GetItem1784At(10, index)); } diff --git a/Source/UI/Chat/UINewChatWnd.cpp b/Source/UI/Chat/UINewChatWnd.cpp index ade279cf3..925f6a672 100644 --- a/Source/UI/Chat/UINewChatWnd.cpp +++ b/Source/UI/Chat/UINewChatWnd.cpp @@ -498,7 +498,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i } } if (offset != -1) { - g_windowMgr.SetUnknown04DC(buffer + offset); + g_windowMgr.SetChatInputText(buffer + offset); } g_modeMgr.gameMode->SendMsg(MM_PROCESS_TALK_TYPE, talkType, reinterpret_cast(parts), 0, 0); return 0; diff --git a/Source/UI/Chat/UINewChatWnd.h b/Source/UI/Chat/UINewChatWnd.h index f7d1401b0..97d08619b 100644 --- a/Source/UI/Chat/UINewChatWnd.h +++ b/Source/UI/Chat/UINewChatWnd.h @@ -72,7 +72,7 @@ public: // INLINED inline UINewChatWnd* ChatWindow() { - return static_cast(g_windowMgr.window_01C8); + return static_cast(g_windowMgr.chatWnd); } #endif diff --git a/Source/UI/Dialogs/UIEditctrlWnd.cpp b/Source/UI/Dialogs/UIEditctrlWnd.cpp index 5ea728e7c..a3e366f6c 100644 --- a/Source/UI/Dialogs/UIEditctrlWnd.cpp +++ b/Source/UI/Dialogs/UIEditctrlWnd.cpp @@ -260,8 +260,8 @@ int UIEditctrlWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument text = FormatOwnedString(g_miniMapMemoLineFormat, g_windowMgr.miniMapClickX, g_windowMgr.miniMapClickY, this->edit->Text()); std::fwrite(text.c_str(), text.size(), 1, file); std::fclose(file); - if (g_windowMgr.window_4F1CC) { - static_cast(g_windowMgr.window_4F1CC)->LoadMemos(); + if (g_windowMgr.miniMapWnd) { + static_cast(g_windowMgr.miniMapWnd)->LoadMemos(); } g_windowMgr.CloseWindow(WID_EDITCTRLWND); } diff --git a/Source/UI/Edit/UIEditCtrl.cpp b/Source/UI/Edit/UIEditCtrl.cpp index 89bd6f908..203e7552c 100644 --- a/Source/UI/Edit/UIEditCtrl.cpp +++ b/Source/UI/Edit/UIEditCtrl.cpp @@ -729,7 +729,7 @@ void UIWhisperEditCtrl::AddHistory() { // OFFSET: 0x0086A550 // FUNCTION: fn_10977 void UIEditCtrl::MoveCandidateWindow(int x) { - UIWindow* window = g_windowMgr.window_03A4; + UIWindow* window = g_windowMgr.candidateWnd; if (window == nullptr) { return; } @@ -752,7 +752,7 @@ void UIEditCtrl::MoveCandidateWindow(int x) { // OFFSET: 0x0086A5E0 // FUNCTION: fn_10978 void UIEditCtrl::MoveReadingWindow(int x) { - UIWindow* window = g_windowMgr.window_03AC; + UIWindow* window = g_windowMgr.keyStrokeWnd; if (window == nullptr) { return; } @@ -1001,7 +1001,7 @@ void UIItemStoreSubWnd::DragAndDrop(int x, int y, std::intptr_t value) { } g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 7, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 7, 0, 0, 0); } // OFFSET: 0x00972630 @@ -1050,7 +1050,7 @@ void UIItemStoreWnd::DragAndDrop(int x, int y, std::intptr_t value) { } g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 7, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 7, 0, 0, 0); } // OFFSET: 0x009727F0 @@ -1087,7 +1087,7 @@ void UIItemWnd::DragAndDrop(int x, int y, std::intptr_t value) { } g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 6, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 6, 0, 0, 0); return; case 14: { UIWindow* target = reinterpret_cast(g_windowMgr.makeTargetProcessWnd); @@ -1219,7 +1219,7 @@ void UIItemWnd::OnRBtnDown(int x, int y) { return; } - if (g_windowMgr.window_0288) { + if (g_windowMgr.itemStoreWnd) { if (mode->inventoryChanged) { mode->inventoryChanged = 0; mode->SendMsg(MM_ADD_ITEM_TO_STORE, static_cast(item.identity[1]), item.quantity, 0, 0); @@ -1324,7 +1324,7 @@ void UIMerchantItemWnd::OnRBtnDown(int x, int y) { if (HIBYTE(GetAsyncKeyState(VK_MENU))) { if (!g_windowMgr.LookupWindow(WID_EXCHANGEUI) && !g_windowMgr.merchantShopMakeWnd) { - if (g_windowMgr.window_0288) { + if (g_windowMgr.itemStoreWnd) { if (mode->bossAlarmAndCopyNameFlags[2]) { mode->bossAlarmAndCopyNameFlags[2] = 0; mode->SendMsg(MM_MOVE_ITEM_FROM_CART_TO_STORE, static_cast(item.identity[1]), item.quantity, 0, 0); @@ -1354,11 +1354,11 @@ void UIMerchantMirrorItemWnd::OnRBtnDown(int x, int y) { if (HIBYTE(GetAsyncKeyState(VK_MENU))) { if (g_windowMgr.merchantShopMakeWnd) { - item = g_session.FindItem1750(item.identity[1]); + item = g_session.FindMerchantMyShopItem(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 11, item, item.quantity, -1); reinterpret_cast(g_windowMgr.merchantShopMakeWnd)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); } else if (g_windowMgr.buyingShopMakeWnd) { - item = g_session.FindItem1750(item.identity[1]); + item = g_session.FindMerchantMyShopItem(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 20, item, item.quantity, -1); reinterpret_cast(g_windowMgr.buyingShopMakeWnd)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); } @@ -1489,7 +1489,7 @@ int UIMerchantItemMyShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_ if (this->shopOpen == 0) { g_session.m_storeInfoBackup.Save(this->buyingShop); } - g_session.ClearItems1758(); + g_session.ClearMerchantPurchaseItems(); return 0; } @@ -2015,7 +2015,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st } if (mode->drag.source == 6) { if (g_session.GetItem1738Quantity(mode->drag.id) != 0) { - const int owned = g_session.FindItem1738(mode->drag.id).quantity; + const int owned = g_session.FindCartItem(mode->drag.id).quantity; if (owned != 0) { mode->drag.quantity = quantity <= owned ? quantity : owned; } @@ -2025,7 +2025,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st break; } if (g_session.GetItem1740Quantity(mode->drag.id) != 0) { - const int owned = g_session.FindItem1740(mode->drag.id).quantity; + const int owned = g_session.FindMerchantShopItem(mode->drag.id).quantity; if (owned != 0) { mode->drag.quantity = quantity <= owned ? quantity : owned; } @@ -2041,7 +2041,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st case 7: { int owned = 0; if (mode->drag.source == 9) { - const ITEM_INFO item = g_session.FindItem1740(mode->drag.id); + const ITEM_INFO item = g_session.FindMerchantShopItem(mode->drag.id); if (item.identity[1] != 0) { owned = item.quantity; } @@ -2058,7 +2058,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st quantity = 1; } mode->drag.quantity = quantity <= owned ? quantity : owned; - window = g_windowMgr.window_0288; + window = g_windowMgr.itemStoreWnd; goto notify; } case 8: { @@ -2069,7 +2069,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st owned = item.quantity; } } else if (mode->drag.source == 6) { - const ITEM_INFO item = g_session.FindItem1738(mode->drag.id); + const ITEM_INFO item = g_session.FindCartItem(mode->drag.id); if (item.identity[1] != 0) { owned = item.quantity; } @@ -2091,7 +2091,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st break; } int owned = 0; - const ITEM_INFO item = g_session.FindItem1750(mode->drag.id); + const ITEM_INFO item = g_session.FindMerchantMyShopItem(mode->drag.id); if (item.identity[1] != 0) { owned = item.quantity; } @@ -2110,7 +2110,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st break; } int owned = 0; - const ITEM_INFO item = g_session.FindItem1768(mode->drag.id); + const ITEM_INFO item = g_session.FindMerchantPurchaseSavedItem(mode->drag.id); if (item.identity[1] != 0) { owned = item.quantity; } @@ -2165,7 +2165,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st break; } int owned = 0; - const ITEM_INFO item = g_session.FindItem1750(mode->drag.id); + const ITEM_INFO item = g_session.FindMerchantMyShopItem(mode->drag.id); if (item.identity[1] != 0) { owned = item.quantity; } @@ -2184,7 +2184,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st break; } int owned = 0; - const ITEM_INFO item = g_session.FindItem1760(mode->drag.id); + const ITEM_INFO item = g_session.FindMerchantHopeToSellItem(mode->drag.id); if (item.identity[1] != 0) { owned = item.quantity; } @@ -2467,7 +2467,7 @@ void UIMerchantShopMakeWnd::OnCreate(int width, int height) { this->m_message0 = 184; if (Replay::Instance().state != 6) { - g_session.ClearItems1768(); + g_session.ClearMerchantPurchaseSavedItems(); } if (this->mode == 0) { @@ -2504,12 +2504,12 @@ void UIMerchantShopMakeWnd::OnRBtnDown(int x, int y) { if (HIBYTE(GetAsyncKeyState(VK_MENU))) { if (g_windowMgr.merchantMirrorItemWnd) { - item = g_session.FindItem1768(item.identity[1]); + item = g_session.FindMerchantPurchaseSavedItem(item.identity[1]); gameMode->drag.BeginItem(g_windowMgr, 10, item, item.quantity, -1); reinterpret_cast(g_windowMgr.merchantMirrorItemWnd)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); g_windowMgr.SetFocus(nullptr); } else if (g_windowMgr.buyingShopMirrorItemWnd) { - item = g_session.FindItem1768(item.identity[1]); + item = g_session.FindMerchantPurchaseSavedItem(item.identity[1]); gameMode->drag.BeginItem(g_windowMgr, 19, item, item.quantity, -1); reinterpret_cast(g_windowMgr.buyingShopMirrorItemWnd)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); } @@ -3744,7 +3744,7 @@ void UIMerchantShopMakeWnd::SetItems(int count, const short* ids) { if (this->mode == 1) { window = reinterpret_cast(g_windowMgr.buyingShopMirrorItemWnd); } else { - g_session.SetItems1750(count, ids); + g_session.SetMerchantMyShopItems(count, ids); window = reinterpret_cast(g_windowMgr.merchantMirrorItemWnd); } @@ -4116,7 +4116,7 @@ void UIItemPurchaseWnd::DragAndDrop(int x, int y, std::intptr_t value) { return; default: g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 1, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 1, 0, 0, 0); return; } } @@ -4137,7 +4137,7 @@ void UIItemSellWnd2::DragAndDrop(int x, int y, std::intptr_t value) { if (drag->source == 3) { if (drag->quantity != 1 && g_windowMgr.dragAllItems == 0) { g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 16, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 16, 0, 0, 0); } else { this->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); } @@ -4159,7 +4159,7 @@ void UIItemSellWnd::DragAndDrop(int x, int y, std::intptr_t value) { if (drag->source == 3) { if (drag->quantity != 1 && g_windowMgr.dragAllItems == 0) { g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 2, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 2, 0, 0, 0); } else { this->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); } @@ -4188,7 +4188,7 @@ void UIMerchantItemShopWnd::DragAndDrop(int x, int y, std::intptr_t value) { } g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 11, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 11, 0, 0, 0); } // OFFSET: 0x00972C00 @@ -4220,7 +4220,7 @@ void UIMerchantItemWnd::DragAndDrop(int x, int y, std::intptr_t value) { } g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 8, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 8, 0, 0, 0); } // OFFSET: 0x0097BC00 @@ -4883,9 +4883,9 @@ void UIMerchantMirrorItemWnd::OnCreate(int width, int height) { this->columns = (width - 40) / 32; this->visibleRows = (height - 38) / 32; if (this->mode == 1) { - g_session.CollectItems1750(); + g_session.CollectFilteredMerchantMyShopItems(); } else if (this->mode == 2) { - g_session.RefreshItems1750(); + g_session.RefreshMerchantMyShopItems(); } else if (Replay::Instance().state != 6) { g_session.CopyItems1740To1750(); } @@ -4990,7 +4990,7 @@ void UIItemShopWnd2::DragAndDrop(int x, int y, std::intptr_t value) { } g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 15, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 15, 0, 0, 0); return; default: g_modeMgr.GetGameMode()->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); @@ -5019,7 +5019,7 @@ void UIItemShopWnd::DragAndDrop(int x, int y, std::intptr_t value) { } g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 3, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 3, 0, 0, 0); return; case 5: if (this->sellMode == 0) { @@ -5032,7 +5032,7 @@ void UIItemShopWnd::DragAndDrop(int x, int y, std::intptr_t value) { } g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 4, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 4, 0, 0, 0); return; default: g_modeMgr.GetGameMode()->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); @@ -5072,7 +5072,7 @@ void UIMerchantItemPurchaseWnd::DragAndDrop(int x, int y, std::intptr_t value) { return; default: g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 12, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 12, 0, 0, 0); return; } } @@ -5080,7 +5080,7 @@ void UIMerchantItemPurchaseWnd::DragAndDrop(int x, int y, std::intptr_t value) { if (drag->source == 22) { if (drag->quantity > 1) { g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 17, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 17, 0, 0, 0); return; } @@ -5111,11 +5111,11 @@ void UIMerchantMirrorItemWnd::DragAndDrop(int x, int y, std::intptr_t value) { g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); if (this->mode == 2) { - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 18, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 18, 0, 0, 0); return; } - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 10, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 10, 0, 0, 0); return; case 19: this->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); @@ -5143,7 +5143,7 @@ void UIMerchantShopMakeWnd::DragAndDrop(int x, int y, std::intptr_t value) { } g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 9, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 9, 0, 0, 0); return; case 20: this->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); @@ -6197,18 +6197,18 @@ int UIMerchantMirrorItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_ switch (drag.source) { case 10: if (g_session.GetItem1768Quantity(drag.id)) { - lists->AddItem1750(item, 0, 1); - lists->RemoveItem1768(item, 0); + lists->AddMerchantMyShopItem(item, 0, 1); + lists->RemoveMerchantPurchaseSavedItem(item, 0); } break; case 19: - if (lists->AddItem1750(item, this->mode, 1)) { - lists->RemoveItem1768(item, this->mode != 0); + if (lists->AddMerchantMyShopItem(item, this->mode, 1)) { + lists->RemoveMerchantPurchaseSavedItem(item, this->mode != 0); } break; case 21: - lists->AddItem1750(item, this->mode, 1); - lists->RemoveItem1760(item); + lists->AddMerchantMyShopItem(item, this->mode, 1); + lists->RemoveMerchantHopeToSellItem(item); if (g_windowMgr.buyingShopPurchaseWnd) { reinterpret_cast(g_windowMgr.buyingShopPurchaseWnd)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -6313,10 +6313,10 @@ int UIItemSellWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: ModeDragState& drag = mode->drag; ITEM_INFO item; item.Assign(reinterpret_cast(drag)); - if (g_session.HasItem1718(drag.id)) { + if (g_session.HasShopItemIdentity(drag.id)) { CSession* lists = &g_session; - lists->AddItem1730(item); - lists->ReduceItem1718(item); + lists->AddStorageItem(item); + lists->ReduceShopItemQuantity(item); if (g_windowMgr.itemShopWnd2) { g_windowMgr.itemShopWnd2->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -6512,15 +6512,15 @@ int UIMerchantItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intpt g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_OVER_OR_LOW_MONEY)), 255, 0, 0, 0); } else { - g_session.AddItem1760(item); - g_session.RemoveItem1750(item, 2, 1); + g_session.AddMerchantHopeToSellItem(item); + g_session.RemoveMerchantMyShopItem(item, 2, 1); this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); if (g_windowMgr.purchaseMirrorItemWnd) { reinterpret_cast(g_windowMgr.purchaseMirrorItemWnd)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } } } else if (g_session.m_zeny >= static_cast(price) * item.quantity + pending) { - g_session.AddItem1760(item); + g_session.AddMerchantHopeToSellItem(item); this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } else { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); @@ -6682,7 +6682,7 @@ int UIMerchantItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t if (this->buyingShop == 0) { ITEM_INFO item; item.Assign(reinterpret_cast(mode->drag)); - g_session.RemoveItem1760(item); + g_session.RemoveMerchantHopeToSellItem(item); if (g_windowMgr.merchantItemPurchaseWnd) { reinterpret_cast(g_windowMgr.merchantItemPurchaseWnd)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -7000,7 +7000,7 @@ void UIItemSellWnd2::OnLBtnDown(int x, int y) { if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1730(item.identity[1]); + item = g_session.FindStorageItem(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 5, item, item.quantity, -1); } } @@ -7035,7 +7035,7 @@ void UIItemSellWnd::OnLBtnDown(int x, int y) { if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1730(item.identity[1]); + item = g_session.FindStorageItem(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 5, item, item.quantity, -1); } } @@ -7113,7 +7113,7 @@ void UIItemStoreFindWnd::OnLBtnDown(int x, int y) { if (item.identity[1] > 0 && item.flags[2] == 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1738(item.identity[1]); + item = g_session.FindCartItem(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 6, item, item.quantity, -1); } } @@ -7129,7 +7129,7 @@ void UIItemStoreSubWnd::OnLBtnDown(int x, int y) { if (item.identity[1] > 0 && item.flags[2] == 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1738(item.identity[1]); + item = g_session.FindCartItem(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 6, item, item.quantity, -1); } } @@ -7149,7 +7149,7 @@ void UIItemStoreWnd::OnLBtnDown(int x, int y) { if (item.identity[1] > 0 && item.flags[2] == 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1738(item.identity[1]); + item = g_session.FindCartItem(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 6, item, item.quantity, -1); } } @@ -7196,7 +7196,7 @@ void UIMerchantMirrorItemWnd::OnLBtnDown(int x, int y) { if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1750(item.identity[1]); + item = g_session.FindMerchantMyShopItem(item.identity[1]); mode->drag.BeginItem( g_windowMgr, this->mode == 1 ? 20 : this->mode == 2 ? 22 : 11, item, item.quantity, -1 ); @@ -7219,7 +7219,7 @@ void UIMerchantShopMakeWnd::OnLBtnDown(int x, int y) { if (item.identity[1] > 0) { CGameMode* gameMode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1768(item.identity[1]); + item = g_session.FindMerchantPurchaseSavedItem(item.identity[1]); gameMode->drag.BeginItem(g_windowMgr, this->mode != 0 ? 19 : 10, item, item.quantity, -1); } } @@ -8058,7 +8058,7 @@ UIMerchantItemPurchaseWnd::UIMerchantItemPurchaseWnd(int value) : UIItemBaseWnd( this->merchantId = 0; this->saved = nullptr; this->hovered = -1; - g_session.ClearItems1760(); + g_session.ClearMerchantHopeToSellItems(); this->nonItemHeight = 0; } @@ -8147,8 +8147,8 @@ int UIItemShopWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: ITEM_INFO item; item.Assign(reinterpret_cast(mode->drag)); CSession* lists = &g_session; - lists->MergeItem1718(item); - lists->RemoveItem1730(item); + lists->MergeShopItem(item); + lists->RemoveStorageItem(item); if (g_windowMgr.itemSellWnd2) { g_windowMgr.itemSellWnd2->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -8259,8 +8259,8 @@ int UIItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: ITEM_INFO item; item.Assign(reinterpret_cast(mode->drag)); CSession* lists = &g_session; - lists->MergeItem1718(item); - lists->RemoveItem1730(item); + lists->MergeShopItem(item); + lists->RemoveStorageItem(item); if (g_windowMgr.itemSellWnd) { g_windowMgr.itemSellWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -10604,7 +10604,7 @@ void UIMerchantItemWnd::OnLBtnDown(int x, int y) { if (item.identity[1] > 0 && !g_windowMgr.merchantShopMakeWnd && item.flags[2] == 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1740(item.identity[1]); + item = g_session.FindMerchantShopItem(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 9, item, item.quantity, -1); if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { @@ -10824,10 +10824,10 @@ int UIItemSellWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: ModeDragState& drag = mode->drag; ITEM_INFO item; item.Assign(reinterpret_cast(drag)); - if (g_session.HasItem1718(drag.id)) { + if (g_session.HasShopItemIdentity(drag.id)) { CSession* lists = &g_session; - lists->AddItem1730(item); - lists->ReduceItem1718(item); + lists->AddStorageItem(item); + lists->ReduceShopItemQuantity(item); if (g_windowMgr.itemShopWnd) { g_windowMgr.itemShopWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -11057,7 +11057,7 @@ void UIItemWnd::Paint() { ); } - if (g_session.HasItem61B8(it->identity[1])) { + if (g_session.HasSwapEquipmentItem(it->identity[1])) { CTexture* background = g_texMgr.Load("유저인터페이스\\swap_equipment\\bg_change.bmp", 0, false, true, false); if (background) { this->geometry.surface->DrawScaledSurface( @@ -11078,7 +11078,7 @@ void UIItemWnd::Paint() { } } - const int count = g_session.GetList0Size() + g_session.CountItems17F0() + g_session.CountItems2B50(); + const int count = g_session.GetList0Size() + g_session.CountDistinctEquippedItems() + g_session.CountDistinctCostumeItems(); const std::uint32_t color = count >= g_session.extraInventorySlots + 100 ? 0xFF : 0x232323; this->DrawTextAt(35, this->geometry.height - 15, FormatOwnedString("%d", count).c_str(), 0, 0, 11, color, 0, 0); const int width = this->TextWidth(FormatOwnedString("%d", count).c_str(), 0, 0, 11, 0, 0); @@ -11367,10 +11367,10 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t item.Assign(reinterpret_cast(mode->drag)); if (mode->drag.source == 20) { if (g_session.GetList11Size() < this->slotCount) { - if (!g_session.AddItem1768(item, 1, 1)) { + if (!g_session.AddMerchantPurchaseSavedItem(item, 1, 1)) { g_windowMgr.Confirm(LookupMessage(MSI_BUYINGSTORE_MAKEWND_DUPLICATEITEM), 0, true, false, 0, "Message", 280, 120, 0); } else { - g_session.RemoveItem1750(item, 1, 1); + g_session.RemoveMerchantMyShopItem(item, 1, 1); } } int index = std::min(std::max(g_session.GetList11Size() - 1, 0), 4); @@ -11402,13 +11402,13 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t quantity = g_session.GetItem1768Quantity(mode->drag.id); } if (quantity != 0) { - g_session.AddItem1768(item, 0, 1); - g_session.RemoveItem1750(item, 0, 1); + g_session.AddMerchantPurchaseSavedItem(item, 0, 1); + g_session.RemoveMerchantMyShopItem(item, 0, 1); } int index = g_session.GetList11Size() - 1; bool fresh = true; std::string price; - ITEM_INFO owned = g_session.FindItem1768(mode->drag.id); + ITEM_INFO owned = g_session.FindMerchantPurchaseSavedItem(mode->drag.id); if (owned.identity[1] != 0) { index = 0; for (const ITEM_INFO& old : this->items) { @@ -11584,7 +11584,7 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_SWAP_EQUIPITEM_EQUIPMENTSET)), 0xFF, 0, 0, 0); break; } - if (g_windowMgr.window_027C || g_windowMgr.window_0274) { + if (g_windowMgr.chatRoomWnd || g_windowMgr.chatRoomMakeWnd) { g_windowMgr.Confirm(LookupMessage(MSI_CANT_OPEN_STORE_WHILE_CHAT), 0, true, false, 0, "Message", 280, 120, 0); if (this->itemsSet == 1) { g_modeMgr.GetGameMode()->SendMsg(this->mode == 1 ? MM_CANCEL_BUYING_STORE_MAKE : MM_CANCEL_VENDING_MAKE, 0, 0, 0, 0); diff --git a/Source/UI/Enchant/UIEnchantUI.cpp b/Source/UI/Enchant/UIEnchantUI.cpp index b21c47f40..2512dbb94 100644 --- a/Source/UI/Enchant/UIEnchantUI.cpp +++ b/Source/UI/Enchant/UIEnchantUI.cpp @@ -1405,7 +1405,7 @@ void CUIUpgradeRandom::RequestEnchant() { // OFFSET: 0x00A08110 // FUNCTION: fn_15017 bool CUIEnchantUI::CanHitTest() { - return !CEnchantMgr::GetInstance()->m_unknown_0030; + return !CEnchantMgr::GetInstance()->m_inputBlocked; } // OFFSET: 0x009F6D40 @@ -1454,7 +1454,7 @@ void CUIEnchantUI::SetEnchantGroup(uint64_t group) { for (int itemId : this->enchantInfo->targetItems) { const std::vector indices = g_session.FindInventoryIndicesByItemId(itemId, 1); for (int index : indices) { - if (g_session.HasItem61B8(index)) { + if (g_session.HasSwapEquipmentItem(index)) { continue; } const ITEM_INFO target = LookupClientItemByIdentity(g_session.m_inventoryItems, index); diff --git a/Source/UI/Exchange/UIExchangeUI.cpp b/Source/UI/Exchange/UIExchangeUI.cpp index e989af02f..86635c03d 100644 --- a/Source/UI/Exchange/UIExchangeUI.cpp +++ b/Source/UI/Exchange/UIExchangeUI.cpp @@ -305,8 +305,8 @@ void CUIExchangeUI::DragAndDrop(int x, int y, std::intptr_t value) { this->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); } else { g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - if (g_windowMgr.window_01EC != nullptr) { - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 5, 0, 0, 0); + if (g_windowMgr.itemDropCntWnd != nullptr) { + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 5, 0, 0, 0); } } } else { diff --git a/Source/UI/Guild/UIAgitWnd.cpp b/Source/UI/Guild/UIAgitWnd.cpp index 4bd38abb3..06781a7e9 100644 --- a/Source/UI/Guild/UIAgitWnd.cpp +++ b/Source/UI/Guild/UIAgitWnd.cpp @@ -152,13 +152,13 @@ int UIListBoxAgitMenu::SendMsg(UIWindow* sender, int message, std::intptr_t a, s switch (a) { case 0: { - if (g_session.GetSceneUnknown004C() == 1) { + if (g_session.GetSiegeMode() == 1) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_TOOLTIP_OF_OPTIONOFF_BTN)), 0xFF, 0, 0, 0); return 0; } GuildInfo* guildInfo = &g_guildInfo; - uint16_t agitId = static_cast(guildInfo->GetUnknown0114(this->m_agitIndex)); + uint16_t agitId = static_cast(guildInfo->GetAgitId(this->m_agitIndex)); char* agitName = nullptr; g_session.m_hotkeyScript->Call("get_agit_name", "d>s", agitId, &agitName); @@ -183,7 +183,7 @@ int UIListBoxAgitMenu::SendMsg(UIWindow* sender, int message, std::intptr_t a, s case 1: { CMode* mode = g_modeMgr.GetGameMode(); GuildInfo* guildInfo = &g_guildInfo; - uint16_t agitId = static_cast(guildInfo->GetUnknown0114(this->m_agitIndex)); + uint16_t agitId = static_cast(guildInfo->GetAgitId(this->m_agitIndex)); mode->SendMsg(MM_REQ_AGIT_INVESTMENT, agitId, 0, 0, 0); break; } diff --git a/Source/UI/Guild/UIGuildWnd.cpp b/Source/UI/Guild/UIGuildWnd.cpp index 05e493606..e4c6037ba 100644 --- a/Source/UI/Guild/UIGuildWnd.cpp +++ b/Source/UI/Guild/UIGuildWnd.cpp @@ -1048,10 +1048,10 @@ void UIGuildInfoManageWnd::OnRBtnUp(int x, int y) { // FUNCTION: fn_13052 void UIGuildInfoManageWnd::RefreshAgitList() { this->m_agitList->Clear(); - const int count = g_guildInfo.GetUnknown0114Count(); + const int count = g_guildInfo.GetAgitCount(); if (count != 0) { for (int index = 0; index < count; ++index) { - const int agitId = g_guildInfo.GetUnknown0114(index); + const int agitId = g_guildInfo.GetAgitId(index); char* agitName = nullptr; g_session.m_hotkeyScript->Call("get_agit_name", "d>s", agitId, &agitName); if (strnlen(agitName, 256) != 0) { diff --git a/Source/UI/Item/UIParaItemShopWnd.cpp b/Source/UI/Item/UIParaItemShopWnd.cpp index 33e27860c..00007524b 100644 --- a/Source/UI/Item/UIParaItemShopWnd.cpp +++ b/Source/UI/Item/UIParaItemShopWnd.cpp @@ -357,8 +357,8 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_GUILD_STORAGE_ITEM_COUNT)), 255, 0, 0, 0); } else { if (item.flags[3] == 1) { - g_session.RemoveItem1718(item); - g_session.MergeItem1720(item); + g_session.RemoveShopItem(item); + g_session.MergePurchaseItem(item); } else { g_session.RemoveItem1718ByItemId(item); g_session.MergeItem1720ByName(item); @@ -513,8 +513,8 @@ int UIParaItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s item.Assign(reinterpret_cast(mode->drag)); CSession* lists = &g_session; if (item.flags[3] == 1) { - lists->RemoveItem1720(item); - lists->MergeItem1718(item); + lists->RemovePurchaseItem(item); + lists->MergeShopItem(item); } else { lists->RemoveItem1720ByName(item); lists->MergeItem1718ByName(item); diff --git a/Source/UI/Items/MergeItemWnd.cpp b/Source/UI/Items/MergeItemWnd.cpp index c38c61ebb..fc1107ab8 100644 --- a/Source/UI/Items/MergeItemWnd.cpp +++ b/Source/UI/Items/MergeItemWnd.cpp @@ -345,9 +345,9 @@ int CMergeItemWnd::SendMsg(UIWindow*, int message, std::intptr_t argument1, std: } case UM_REFRESH: { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, argument1); - g_session.RemoveItem1710(item.identity[1], item.quantity); + g_session.RemoveInventoryItem(item.identity[1], item.quantity); item.quantity = argument2; - g_session.AddItem1710(item, 1); + g_session.AddInventoryItem(item, 1); break; } case UM_COMMAND: diff --git a/Source/UI/Items/UIMakeTargetProcessWnd.cpp b/Source/UI/Items/UIMakeTargetProcessWnd.cpp index 4d94bd4a7..ba28f0f20 100644 --- a/Source/UI/Items/UIMakeTargetProcessWnd.cpp +++ b/Source/UI/Items/UIMakeTargetProcessWnd.cpp @@ -56,7 +56,7 @@ void UIMakeTargetProcessWnd::DragAndDrop(int x, int y, std::intptr_t value) { if (item.identity[1] != 0 && item.IsForgeMaterial() && (!hasElementalStone || !item.IsElementalStone())) { this->materials[emptySlot] = item; this->materials[emptySlot].quantity = 1; - g_session.RemoveItem1710(item.identity[1], 1); + g_session.RemoveInventoryItem(item.identity[1], 1); if (g_windowMgr.itemWnd) { reinterpret_cast(g_windowMgr.itemWnd)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -186,7 +186,7 @@ int UIMakeTargetProcessWnd::SendMsg(UIWindow* sender, int message, std::intptr_t for (int index = 2; index >= 0; --index) { ITEM_INFO& material = this->materials[index]; if (material.identity[1] > 0 && material.itemId == name) { - g_session.AddItem1710(material, 1); + g_session.AddInventoryItem(material, 1); material.Reset(); this->Invalidate(); return 0; @@ -212,7 +212,7 @@ int UIMakeTargetProcessWnd::SendMsg(UIWindow* sender, int message, std::intptr_t for (int index = 0; index < 3; ++index) { if (this->materials[index].identity[1] > 0) { restored = true; - g_session.AddItem1710(this->materials[index], 0); + g_session.AddInventoryItem(this->materials[index], 0); } } diff --git a/Source/UI/Items/UISwapEquipmentWnd.cpp b/Source/UI/Items/UISwapEquipmentWnd.cpp index 5ee97245b..143fb8f18 100644 --- a/Source/UI/Items/UISwapEquipmentWnd.cpp +++ b/Source/UI/Items/UISwapEquipmentWnd.cpp @@ -68,11 +68,11 @@ void UISwapEquipmentWnd::DragAndDrop(int x, int y, std::intptr_t value) { break; case 2: equipped = 1; - item = g_session.GetItem17F0(drag->slot); + item = g_session.GetEquippedItemAt(drag->slot); break; case 24: equipped = 1; - item = g_session.GetItem2B50(drag->slot); + item = g_session.GetCostumeItemAt(drag->slot); break; } @@ -111,9 +111,9 @@ void UISwapEquipmentWnd::DrawEquipmentSlots() { if (item.identity[1] == 0) { fromSwap = false; if (this->equipmentPage == 2) { - item = g_session.GetItem2B50(slot); + item = g_session.GetCostumeItemAt(slot); } else { - item = g_session.GetItem17F0(slot); + item = g_session.GetEquippedItemAt(slot); } } @@ -280,11 +280,11 @@ ITEM_INFO UISwapEquipmentWnd::GetSlotItem(int slot) { } if (this->equipmentPage == 2) { - ITEM_INFO item = g_session.GetItem6B68(slot); + ITEM_INFO item = g_session.GetSwapEquippedItem(slot); return item.identity[1] > 0 ? item : ITEM_INFO(0); } - ITEM_INFO item = g_session.GetItem61B8(slot); + ITEM_INFO item = g_session.GetSwapCostumeItem(slot); return item.identity[1] > 0 ? item : ITEM_INFO(0); } @@ -348,7 +348,7 @@ void UISwapEquipmentWnd::Paint() { this, this->geometry.width / 2 + 1, this->geometry.height - 53, - g_session.SyncUnknown0E98(), + g_session.GetCurrentSex(), static_cast(g_session.m_job), g_session.m_job, static_cast(g_session.m_bodyCostume), diff --git a/Source/UI/Lists/UIDropDownBox.cpp b/Source/UI/Lists/UIDropDownBox.cpp index 08abba0a6..1c0f59241 100644 --- a/Source/UI/Lists/UIDropDownBox.cpp +++ b/Source/UI/Lists/UIDropDownBox.cpp @@ -64,7 +64,7 @@ void CUIDropDownBox::Paint() { // OFFSET: 0x00AA27B0 // FUNCTION: fn_17217 void UIWindowMgr::ShowDropDown(UIWindow* owner, UIWindow* child, int x, int y) { - CUIDropDownBox*& popup = reinterpret_cast(this->window_0A30); + CUIDropDownBox*& popup = reinterpret_cast(this->dropDownBoxWnd); if (popup && popup->geometry.visible != 0) { popup->Detach(); popup->Show(0); @@ -90,7 +90,7 @@ void UIWindowMgr::ShowDropDown(UIWindow* owner, UIWindow* child, int x, int y) { // OFFSET: 0x00A8C750 // FUNCTION: fn_17133 bool UIWindowMgr::CloseDropDown() { - CUIDropDownBox* popup = static_cast(this->window_0A30); + CUIDropDownBox* popup = static_cast(this->dropDownBoxWnd); if (!popup || popup->geometry.visible == 0) { return false; } diff --git a/Source/UI/Lists/UIScrollBar.cpp b/Source/UI/Lists/UIScrollBar.cpp index 84666cf9d..ff8a22b18 100644 --- a/Source/UI/Lists/UIScrollBar.cpp +++ b/Source/UI/Lists/UIScrollBar.cpp @@ -1969,7 +1969,7 @@ std::string UIChatHisBox::RenderItemLinks(const char* lineText, std::string& sou std::uint32_t creator[2]; std::memcpy(creator, item.cards + 8, sizeof(creator)); button->tipId = creator[0] + (creator[1] << 16); - g_session.AddUnknown7F94(button->tipId); + g_session.AddPendingActorName(button->tipId); } this->AddChild(button); diff --git a/Source/UI/Menu/UIMenuIconWnd.cpp b/Source/UI/Menu/UIMenuIconWnd.cpp index a7e90ecb8..e74e19861 100644 --- a/Source/UI/Menu/UIMenuIconWnd.cpp +++ b/Source/UI/Menu/UIMenuIconWnd.cpp @@ -409,8 +409,8 @@ int UIMenuIconWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument this->ToggleWindow(140); break; case 430: - if (g_windowMgr.window_4F174) { - g_windowMgr.window_4F174->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); + if (g_windowMgr.navigationWnd) { + g_windowMgr.navigationWnd->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); } else { g_windowMgr.EnsureWindow(WID_NAVIGATIONV4WND); } diff --git a/Source/UI/MiniPartyManager.cpp b/Source/UI/MiniPartyManager.cpp index aee1bfffe..522e58f67 100644 --- a/Source/UI/MiniPartyManager.cpp +++ b/Source/UI/MiniPartyManager.cpp @@ -86,24 +86,24 @@ void UIWindowMgr::AddMiniPartyWindow(UIWindow* window) { void UIWindowMgr::RebuildMiniPartyWindows() { for (auto entry = this->snapExcluded.begin(); entry != this->snapExcluded.end();) { UIWindow* window = *entry; - if (window == this->window_03D4) { - this->window_03D4 = nullptr; + if (window == this->newSelectCharWnd) { + this->newSelectCharWnd = nullptr; } - if (window == this->window_03D8) { - this->window_03D8 = nullptr; + if (window == this->selCharForUServerWnd) { + this->selCharForUServerWnd = nullptr; } - if (window == this->window_03DC) { - this->window_03DC = nullptr; + if (window == this->changeNameWnd) { + this->changeNameWnd = nullptr; } - if (window == this->window_01B8) { - this->window_01B8 = nullptr; + if (window == this->previousMouseWnd) { + this->previousMouseWnd = nullptr; } - if (window == this->window_4F2AC) { - this->window_4F2AC = nullptr; + if (window == this->waitDBSaveWnd) { + this->waitDBSaveWnd = nullptr; } this->retired.push_back(window); @@ -119,7 +119,7 @@ void UIWindowMgr::RebuildMiniPartyWindows() { continue; } - const SessionRecord0734 record = g_session.FindRecord0734(member.accountId); + const SessionRecord0734 record = g_session.FindMiniPartyRecord(member.accountId); if (record.active == 0) { continue; } @@ -127,7 +127,7 @@ void UIWindowMgr::RebuildMiniPartyWindows() { records.push_back(record); } - g_session.ClearRecords0734(); + g_session.ClearMiniPartyRecords(); for (const SessionRecord0734& record : records) { MessengerMember member = g_session.PartyByAccount(record.id); @@ -140,7 +140,7 @@ void UIWindowMgr::RebuildMiniPartyWindows() { window->m_cell = record.cell; this->AddMiniPartyWindow(window); window->SendMsg(nullptr, UM_REFRESHITEM, reinterpret_cast(&member), 0, 0, 0); - g_session.AddRecord0734(record.id, record.cell); + g_session.AddMiniPartyRecord(record.id, record.cell); UIWindow* drag = this->menuWnd; if (drag != nullptr && *reinterpret_cast(reinterpret_cast(drag) + 0xB4) == 301 && @@ -153,7 +153,7 @@ void UIWindowMgr::RebuildMiniPartyWindows() { } if (this->Window4F250Ready()) { - this->Promote(this->window_4F250); + this->Promote(this->transientWnd); } this->Promote(this->menuWnd); diff --git a/Source/UI/Quest/UIQuestDisplay.cpp b/Source/UI/Quest/UIQuestDisplay.cpp index cb0cb3b36..65044131d 100644 --- a/Source/UI/Quest/UIQuestDisplay.cpp +++ b/Source/UI/Quest/UIQuestDisplay.cpp @@ -72,8 +72,8 @@ void UIQuestDisplay::Paint() { description = static_cast(DisplayTipBoxTextTag(description)); description = static_cast(DisplayItemTextTag(description)); description = static_cast(RemoveTextLinkInfo(description)); - if (g_windowMgr.window_01C8) { - description = static_cast(g_windowMgr.window_01C8)->ConvertChat(description); + if (g_windowMgr.chatWnd) { + description = static_cast(g_windowMgr.chatWnd)->ConvertChat(description); } std::string navigation; DisplayNavigationLink(navigation, description); @@ -120,8 +120,8 @@ void UIQuestDisplay::Paint() { description = static_cast(DisplayTipBoxTextTag(description)); description = static_cast(DisplayItemTextTag(description)); description = static_cast(RemoveTextLinkInfo(description)); - if (g_windowMgr.window_01C8) { - description = static_cast(g_windowMgr.window_01C8)->ConvertChat(description); + if (g_windowMgr.chatWnd) { + description = static_cast(g_windowMgr.chatWnd)->ConvertChat(description); } std::string huntNavigation; DisplayNavigationLink(huntNavigation, description); diff --git a/Source/UI/Quest/UIRenewQuestWnd.cpp b/Source/UI/Quest/UIRenewQuestWnd.cpp index 2f0ba6c88..42d8ebb35 100644 --- a/Source/UI/Quest/UIRenewQuestWnd.cpp +++ b/Source/UI/Quest/UIRenewQuestWnd.cpp @@ -722,10 +722,10 @@ void UIRenewQuestWnd::OnCreate(int, int) { this->AddChild(this->m_tabs); this->m_tabs->SendMsg(this, UM_SETSTATE, this->m_tab, 0, 0, 0); - if (!g_windowMgr.window_0428) { + if (!g_windowMgr.questDisplayWnd) { g_windowMgr.EnsureWindow(WID_QUESTDISPLAY); } - this->m_optionCheckBox = this->AddStyledCheckBox(213, 10, 12, LookupMessage(MSI_QUEST_DISPLAY_ONOFF), 38, 447, g_windowMgr.window_0428->geometry.visible != 0, nullptr, 12, 0x212121, "유저인터페이스\\renew_questui\\checkbox_on.bmp", + this->m_optionCheckBox = this->AddStyledCheckBox(213, 10, 12, LookupMessage(MSI_QUEST_DISPLAY_ONOFF), 38, 447, g_windowMgr.questDisplayWnd->geometry.visible != 0, nullptr, 12, 0x212121, "유저인터페이스\\renew_questui\\checkbox_on.bmp", "유저인터페이스\\renew_questui\\checkbox_off.bmp" ); @@ -1070,8 +1070,8 @@ int UIRenewQuestWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume g_windowMgr.CloseWindow(WID_RENEWQUESTWND); return 0; case ID_CHECK: - if (g_windowMgr.window_0428) { - g_windowMgr.window_0428->Show(argument2); + if (g_windowMgr.questDisplayWnd) { + g_windowMgr.questDisplayWnd->Show(argument2); return 0; } break; @@ -1097,8 +1097,8 @@ int UIRenewQuestWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume } else if (checkMessage == 0) { g_renewQuestMgr->SetOngoingSimpleView(questId, argument2 != 0); g_renewQuestMgr->SaveOngoingSimpleViewList(); - if (g_windowMgr.window_0428) { - g_windowMgr.window_0428->Invalidate(); + if (g_windowMgr.questDisplayWnd) { + g_windowMgr.questDisplayWnd->Invalidate(); return 0; } } else { diff --git a/Source/UI/Rodex/UIRodexComposeWnd.cpp b/Source/UI/Rodex/UIRodexComposeWnd.cpp index aae7c5a7e..8e4561bd7 100644 --- a/Source/UI/Rodex/UIRodexComposeWnd.cpp +++ b/Source/UI/Rodex/UIRodexComposeWnd.cpp @@ -292,7 +292,7 @@ void UIRodexComposeWnd::DragAndDrop(int x, int y, std::intptr_t value) { this->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); } else { g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 13, 0, 0, 0); + g_windowMgr.itemDropCntWnd->SendMsg(nullptr, UM_SETSTATE, 13, 0, 0, 0); } } else { mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); @@ -327,7 +327,7 @@ int UIRodexComposeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu packet.packetType = 0xB97; std::memset(packet.name, 0, sizeof(packet.name)); strcpy_s(packet.name, sizeof(packet.name), this->m_recipientEdit->Text()); - if (g_session.HasUnknown809C(packet.name)) { + if (g_session.HasCharacterName(packet.name)) { packet.known = 1; } else { packet.known = g_session.IsKnownName(packet.name); @@ -409,7 +409,7 @@ int UIRodexComposeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu case UM_REFRESHITEM: this->m_items.clear(); for (int i = 0; i < 5; ++i) { - ITEM_INFO item = g_session.GetItem5C68(i); + ITEM_INFO item = g_session.GetSelectionItemAt(i); if (item.quantity > 0) { this->m_items.push_back(item); } @@ -487,7 +487,7 @@ void UIRodexComposeWnd::Paint() { this->DrawBitmap(9, 377, taxBg, true); char taxBuf[260] = {}; - std::int64_t tax = static_cast(g_session.CountItems5C68()) * 2500; + std::int64_t tax = static_cast(g_session.CountSelectionItems()) * 2500; char inputBuf[260] = {}; strcpy_s(inputBuf, sizeof(inputBuf), this->m_zeny->Text()); g_session.IsNumberWithCommas(inputBuf); diff --git a/Source/UI/RuneSystem/UIRuneSystemWnd.cpp b/Source/UI/RuneSystem/UIRuneSystemWnd.cpp index 4841b1b6e..637d38e17 100644 --- a/Source/UI/RuneSystem/UIRuneSystemWnd.cpp +++ b/Source/UI/RuneSystem/UIRuneSystemWnd.cpp @@ -1744,7 +1744,7 @@ int UIRune_Decom::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 g_windowMgr.CloseWindow(WID_RUNESYSTEM_DECOMRESULTWND); if (!g_runeSystemMgr->IsRequestPending() && (!this->parent || this->parent->SendMsg(this, 0x6A, 50, 0, 0, 0) != 0) && this->m_ownedCount) { if (static_cast(g_session.m_weight) > static_cast(g_session.m_maxWeight) * 0.7f || - g_session.GetList0Size() + g_session.CountItems17F0() + g_session.CountItems2B50() + 8 >= + g_session.GetList0Size() + g_session.CountDistinctEquippedItems() + g_session.CountDistinctCostumeItems() + 8 >= g_session.extraInventorySlots + 100) { g_windowMgr.Confirm(LookupMessage(MSI_MACRO_USER_REPORT), 0, true, false, 0, "Message", 280, 120, 0); } else { diff --git a/Source/UI/Shop/MerchantShopRefresh.cpp b/Source/UI/Shop/MerchantShopRefresh.cpp index 76d3c16fe..b76eb05a7 100644 --- a/Source/UI/Shop/MerchantShopRefresh.cpp +++ b/Source/UI/Shop/MerchantShopRefresh.cpp @@ -46,10 +46,10 @@ void UIMerchantShopMakeWnd::Refresh() { for (int index = 0; index < count; ++index) { const ITEM_INFO item = g_session.GetItem1768At(index); - g_session.AddItem1750(item, this->mode, 0); + g_session.AddMerchantMyShopItem(item, this->mode, 0); } - g_session.ClearItems1768(); + g_session.ClearMerchantPurchaseSavedItems(); backup.Restore(this->mode != 0, this->slotCount); const std::vector displayed(backup.items); diff --git a/Source/UI/Shortcuts/ShortcutCooldowns.cpp b/Source/UI/Shortcuts/ShortcutCooldowns.cpp index a9d0b71c7..a164238a5 100644 --- a/Source/UI/Shortcuts/ShortcutCooldowns.cpp +++ b/Source/UI/Shortcuts/ShortcutCooldowns.cpp @@ -88,13 +88,13 @@ namespace { // OFFSET: 0x00E1DCE0 // FUNCTION: fn_23876 -int CSession::IsSkillIdInRange6018(unsigned id) const { +int CSession::IsHirelingJob(unsigned id) const { return id - 6018u <= 34; } // OFFSET: 0x00E1DD00 // FUNCTION: fn_23877 -int CSession::IsSkillIdInRange6001(unsigned id) const { +int CSession::IsCompanionJob(unsigned id) const { return id - 6001u <= 51; } @@ -662,7 +662,7 @@ void UISelCharForUServerWnd::Paint() { } CharSlotInfo& slot = this->m_slots[index]; - this->DrawRobeSprite(slot.job, g_session.SyncUnknown0E98(), slot.robe, slot.x, slot.y, false, 0, 0); + this->DrawRobeSprite(slot.job, g_session.GetCurrentSex(), slot.robe, slot.x, slot.y, false, 0, 0); SpriteAtlasRecord record{}; for (int layer = 0; layer < 5; ++layer) { @@ -705,7 +705,7 @@ void UISelCharForUServerWnd::Paint() { direction = 0; } - g_session.m_hotkeyScript->Call("OffsetItemPos_GetOffsetForDoram", "ddd>dd", item, direction, g_session.SyncUnknown0E98(), &x, &y); + g_session.m_hotkeyScript->Call("OffsetItemPos_GetOffsetForDoram", "ddd>dd", item, direction, g_session.GetCurrentSex(), &x, &y); offsetX = x; offsetY = y; } diff --git a/Source/UI/Shortcuts/ShortcutVisibility.cpp b/Source/UI/Shortcuts/ShortcutVisibility.cpp index 4d50de8db..79f2fe58e 100644 --- a/Source/UI/Shortcuts/ShortcutVisibility.cpp +++ b/Source/UI/Shortcuts/ShortcutVisibility.cpp @@ -11,7 +11,7 @@ namespace { // INLINED __forceinline void PromoteWindow(UIWindow* window) { - if ((g_windowMgr.modal != nullptr && g_windowMgr.window_4F174 != window) || g_windowMgr.LookupWindow(WID_NEWMAKECHARWND) || g_windowMgr.LookupWindow(WID_MAKECHARWND) || + if ((g_windowMgr.modal != nullptr && g_windowMgr.navigationWnd != window) || g_windowMgr.LookupWindow(WID_NEWMAKECHARWND) || g_windowMgr.LookupWindow(WID_MAKECHARWND) || g_windowMgr.LookupWindow(WID_SECONDPASSWORDINPUTWND) || g_windowMgr.LookupWindow(WID_SECONDPASSWORDEDITWND)) { return; } @@ -53,12 +53,12 @@ bool UIWindowMgr::ShowWindowById(int id, int visible) { this->chatWndVisible = visible; - if (!this->window_01C8) { + if (!this->chatWnd) { g_windowMgr.EnsureWindow(WID_CHATWND); } - this->window_01C8->Show(visible); - UIWindow* window = this->window_01C8; + this->chatWnd->Show(visible); + UIWindow* window = this->chatWnd; if (visible == 0) { window->StoreInfo(); @@ -72,12 +72,12 @@ bool UIWindowMgr::ShowWindowById(int id, int visible) { case WID_ITEMDROPCNTWND: g_windowMgr.EnsureWindow(WID_ITEMDROPCNTWND); - if (this->window_01EC->geometry.visible != visible) { - this->window_01EC->Show(visible); + if (this->itemDropCntWnd->geometry.visible != visible) { + this->itemDropCntWnd->Show(visible); } if (visible != 0) { - PromoteWindow(this->window_01EC); + PromoteWindow(this->itemDropCntWnd); } return false; @@ -89,10 +89,10 @@ bool UIWindowMgr::ShowWindowById(int id, int visible) { this->m_normalItemSlotWindow.show = visible; g_windowMgr.EnsureWindow(WID_SHORTCUTWND); - this->window_01E8->Show(visible); + this->shortCutWnd->Show(visible); if (visible != 0) { - PromoteWindow(this->window_01E8); + PromoteWindow(this->shortCutWnd); } if (g_serviceOptions.Get(0x10E)) { @@ -112,20 +112,20 @@ bool UIWindowMgr::ShowWindowById(int id, int visible) { case WID_SKILLDESCRIBEWND: { this->skillDescriptionVisible = visible; - if (!this->window_0230) { + if (!this->skillDescribeWnd) { if (visible == 0) { return true; } g_windowMgr.EnsureWindow(WID_SKILLDESCRIBEWND); - if (!this->window_0230) { + if (!this->skillDescribeWnd) { return true; } } - this->window_0230->Show(visible); - UIWindow* window = this->window_0230; + this->skillDescribeWnd->Show(visible); + UIWindow* window = this->skillDescribeWnd; if (visible == 0) { window->StoreInfo(); @@ -143,19 +143,19 @@ bool UIWindowMgr::ShowWindowById(int id, int visible) { case WID_ROUNDBOXTOOLTIPWND: this->visible_276 = visible; - if (!this->window_4F1E4) { + if (!this->roundBoxTooltipWnd) { if (visible == 0) { return true; } g_windowMgr.EnsureWindow(WID_ROUNDBOXTOOLTIPWND); - if (!this->window_4F1E4) { + if (!this->roundBoxTooltipWnd) { return true; } } - this->window_4F1E4->Show(visible); + this->roundBoxTooltipWnd->Show(visible); return true; } diff --git a/Source/UI/Shortcuts/UIShortCutWnd.cpp b/Source/UI/Shortcuts/UIShortCutWnd.cpp index 383d12216..848c5be58 100644 --- a/Source/UI/Shortcuts/UIShortCutWnd.cpp +++ b/Source/UI/Shortcuts/UIShortCutWnd.cpp @@ -718,9 +718,9 @@ void UIRoMapWnd::OnLBtnUp(int x, int y) { g_navigationManager.expandedMap = 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); + if (g_windowMgr.navigationWnd) { + static_cast(g_windowMgr.navigationWnd)->SelectRoute(0); + static_cast(g_windowMgr.navigationWnd)->SelectRouteNode(0); } this->UpdateNavigationButtons(); } diff --git a/Source/UI/Text/CreateLineInfo.h b/Source/UI/Text/CreateLineInfo.h index eab68c225..1c9fd6140 100644 --- a/Source/UI/Text/CreateLineInfo.h +++ b/Source/UI/Text/CreateLineInfo.h @@ -95,8 +95,8 @@ public: /* 007C */ int m_height; CCreateLineInfo( - UIWindow* parent, const char* text, int width, int lineSpacing, std::uint32_t color, int fontHeight, LineFontFlags flags, bool unknown0028, - int unknown002C, bool unknown0030, int unknown0034, unsigned char align + UIWindow* parent, const char* text, int width, int lineSpacing, std::uint32_t color, int fontHeight, LineFontFlags flags, bool outlineEnabled, + int outlineColorValue, bool unknown0030, int shadowColorValue, unsigned char align ); virtual ~CCreateLineInfo(); diff --git a/Source/UI/Text/NavigationLink.cpp b/Source/UI/Text/NavigationLink.cpp index 4a9b33af7..3937195b4 100644 --- a/Source/UI/Text/NavigationLink.cpp +++ b/Source/UI/Text/NavigationLink.cpp @@ -690,8 +690,8 @@ void UIItemImage::Paint() { // OFFSET: 0x00836970 // FUNCTION: fn_10433 CCreateLineInfo::CCreateLineInfo( - UIWindow* parent, const char* text, int width, int lineSpacing, std::uint32_t color, int fontHeight, LineFontFlags flags, bool unknown0028, - int unknown002C, bool unknown0030, int unknown0034, unsigned char align + UIWindow* parent, const char* text, int width, int lineSpacing, std::uint32_t color, int fontHeight, LineFontFlags flags, bool outlineEnabled, + int outlineColorValue, bool unknown0030, int shadowColorValue, unsigned char align ) : m_align(align), m_newSegment(true), m_height(0) { if (parent && (this->m_parent = parent, text)) { @@ -705,9 +705,9 @@ CCreateLineInfo::CCreateLineInfo( this->m_bold = flags.bold; this->m_italic = flags.italic; this->shadow = unknown0030; - this->shadowColor = unknown0034; - this->outline = unknown0028; - this->outlineColor = unknown002C; + this->shadowColor = shadowColorValue; + this->outline = outlineEnabled; + this->outlineColor = outlineColorValue; if (!s_fontStackCache.empty()) { this->m_fontStack.swap(s_fontStackCache); diff --git a/Source/UI/Text/UIAchWnd.cpp b/Source/UI/Text/UIAchWnd.cpp index e869db2e7..29e9ca35c 100644 --- a/Source/UI/Text/UIAchWnd.cpp +++ b/Source/UI/Text/UIAchWnd.cpp @@ -360,7 +360,7 @@ void UIAchListWnd::Paint() { } const AchievementInfo& info = found->second; - const SessionRecord6144 record = g_session.FindRecord6144(found->first); + const SessionRecord6144 record = g_session.FindAchievementRecord(found->first); const bool completed = static_cast(record.completionFlags >> 8) == 1; const int top = this->rowHeight * row; if (this->selectedIndex == this->firstRow + row) { @@ -381,7 +381,7 @@ void UIAchListWnd::Paint() { this->DrawBitmap(8, top + 3, icon, true); } - if (g_session.HasUnknown6178Record(this->ids[this->firstRow + row])) { + if (g_session.HasTrackedAchievement(this->ids[this->firstRow + row])) { this->DrawBitmap(8, top + 3, AchievementBitmap("유저인터페이스\\achievement_re\\list_pin.bmp"), true); } @@ -521,13 +521,13 @@ void UIAchSummaryWnd::Paint() { int x = 260; for (auto it = this->recent.rbegin(); it != this->recent.rend(); ++it) { - std::string icon = "유저인터페이스\\achievement_re\\icon_" + g_achievementMgr->GetUnknown0068(it->first) + ".bmp"; + std::string icon = "유저인터페이스\\achievement_re\\icon_" + g_achievementMgr->GetIconName(it->first) + ".bmp"; this->DrawBitmap(x - 242, 314, AchievementBitmap(icon.c_str()), true); this->DrawBitmap(x, 316, AchievementBitmap("유저인터페이스\\achievement_re\\badge_complete.bmp"), true); - this->DrawTextAt(x + 23, 325, FormatOwnedString("%d", g_achievementMgr->GetUnknown0048(it->first)).c_str(), 0, 0, 12, 0xA55239, 1, 0); - this->DrawTextAt(x - 241, 365, g_achievementMgr->GetUnknown0018(it->first).c_str(), 0, 0, 12, 0xC9977D, 0, 0); + this->DrawTextAt(x + 23, 325, FormatOwnedString("%d", g_achievementMgr->GetPoints(it->first)).c_str(), 0, 0, 12, 0xA55239, 1, 0); + this->DrawTextAt(x - 241, 365, g_achievementMgr->GetSummaryText(it->first).c_str(), 0, 0, 12, 0xC9977D, 0, 0); - SessionRecord6144 record = g_session.FindRecord6144(it->first); + SessionRecord6144 record = g_session.FindAchievementRecord(it->first); if (g_achievementMgr->HasReward(it->first) == 1 && record.rewarded == 0) { this->DrawBitmap(x + 12, 360, AchievementBitmap("유저인터페이스\\achievement_re\\list_rewardbox_not_receive.bmp"), true); } @@ -594,7 +594,7 @@ void UIAchViewWnd::Paint() { return; } - if (static_cast(g_session.FindRecord6144(this->achievementId).completionFlags >> 8) == 1) { + if (static_cast(g_session.FindAchievementRecord(this->achievementId).completionFlags >> 8) == 1) { this->DrawBitmap(264, 3, AchievementBitmap("유저인터페이스\\achievement_re\\detail_stamp.bmp"), true); } @@ -939,25 +939,25 @@ void UIAchListWnd::SetAchievements(std::map* achievements, this->ids.clear(); auto byProgress = [this](int left, int right) { - return g_session.FindRecord6144(left).completedAt < g_session.FindRecord6144(right).completedAt; + return g_session.FindAchievementRecord(left).completedAt < g_session.FindAchievementRecord(right).completedAt; }; if (mode == 0) { for (auto it = achievements->begin(); it != achievements->end(); ++it) { - if (static_cast(g_session.FindRecord6144(it->first).completionFlags >> 8) == 1) { + if (static_cast(g_session.FindAchievementRecord(it->first).completionFlags >> 8) == 1) { this->ids.push_back(it->first); } std::sort(this->ids.begin(), this->ids.end(), byProgress); } for (auto it = achievements->begin(); it != achievements->end(); ++it) { - if (static_cast(g_session.FindRecord6144(it->first).completionFlags >> 8) == 0) { + if (static_cast(g_session.FindAchievementRecord(it->first).completionFlags >> 8) == 0) { this->ids.push_back(it->first); } } } else if (mode == 1) { for (auto it = achievements->begin(); it != achievements->end(); ++it) { - SessionRecord6144 record = g_session.FindRecord6144(it->first); + SessionRecord6144 record = g_session.FindAchievementRecord(it->first); if (static_cast(record.completionFlags >> 8) == 1 && g_achievementMgr->HasReward(it->first) == 1 && record.rewarded == 0) { this->ids.push_back(it->first); } @@ -965,7 +965,7 @@ void UIAchListWnd::SetAchievements(std::map* achievements, } for (auto it = achievements->begin(); it != achievements->end(); ++it) { - if (static_cast(g_session.FindRecord6144(it->first).completionFlags >> 8) == 0) { + if (static_cast(g_session.FindAchievementRecord(it->first).completionFlags >> 8) == 0) { this->ids.push_back(it->first); } } @@ -1366,7 +1366,7 @@ void UIAchSummaryWnd::UpdateInfo() { int second = 0; int first = 0; - g_session.FindTopRecords6144(&second, &first); + g_session.FindLatestCompletedAchievements(&second, &first); { AchievementInfo info; @@ -1422,7 +1422,7 @@ void UIAchViewWnd::UpdateInfo() { this->receiveButton->Enable(0); if (this->info) { - const SessionRecord6144 record = g_session.FindRecord6144(this->achievementId); + const SessionRecord6144 record = g_session.FindAchievementRecord(this->achievementId); this->description->SendMsg(nullptr, UM_SETTEXT, reinterpret_cast(this->info->description.c_str()), 50, 0, 0); const bool hasReward = this->info->rewardBuffId > 0 || this->info->rewardTitleId > 0 || this->info->rewardItemId > 0; diff --git a/Source/UI/Text/UITextViewerLinks.cpp b/Source/UI/Text/UITextViewerLinks.cpp index 13751731b..9f4615061 100644 --- a/Source/UI/Text/UITextViewerLinks.cpp +++ b/Source/UI/Text/UITextViewerLinks.cpp @@ -70,8 +70,8 @@ bool UITextViewer::AddItemLinks(std::string text, unsigned addedLines) { parsed = static_cast(DisplayUrlTextTag(parsed)); parsed = static_cast(DisplayNavigationTextTag(parsed)); - if (g_windowMgr.window_01C8) { - parsed = static_cast(g_windowMgr.window_01C8)->ConvertChat(std::move(parsed)); + if (g_windowMgr.chatWnd) { + parsed = static_cast(g_windowMgr.chatWnd)->ConvertChat(std::move(parsed)); } { @@ -116,8 +116,8 @@ bool UITextViewer::AddNaviLinks(std::string text, unsigned addedLines) { parsed = static_cast(DisplayUrlTextTag(parsed)); parsed = static_cast(DisplayItemTextTag(parsed)); - if (g_windowMgr.window_01C8) { - parsed = static_cast(g_windowMgr.window_01C8)->ConvertChat(std::move(parsed)); + if (g_windowMgr.chatWnd) { + parsed = static_cast(g_windowMgr.chatWnd)->ConvertChat(std::move(parsed)); } parsed = static_cast(DisplayTipBoxTextTag(parsed)); @@ -219,8 +219,8 @@ bool UITextViewer::AddQuestLinks(std::string text, unsigned addedLines) { parsed = static_cast(DisplayUrlTextTag(parsed)); parsed = static_cast(DisplayNavigationTextTag(parsed)); - if (g_windowMgr.window_01C8) { - parsed = static_cast(g_windowMgr.window_01C8)->ConvertChat(std::move(parsed)); + if (g_windowMgr.chatWnd) { + parsed = static_cast(g_windowMgr.chatWnd)->ConvertChat(std::move(parsed)); } { @@ -267,8 +267,8 @@ void UITextViewer::AddTipLinks(std::string text, unsigned addedLines) { parsed = static_cast(DisplayItemTextTag(parsed)); parsed = static_cast(DisplayQuestTextTag(parsed)); - if (g_windowMgr.window_01C8) { - parsed = static_cast(g_windowMgr.window_01C8)->ConvertChat(std::move(parsed)); + if (g_windowMgr.chatWnd) { + parsed = static_cast(g_windowMgr.chatWnd)->ConvertChat(std::move(parsed)); } { @@ -362,8 +362,8 @@ bool UITextViewer::AddUrlLinks(std::string text, unsigned addedLines) { parsed = static_cast(DisplayNavigationTextTag(parsed)); parsed = static_cast(DisplayItemTextTag(parsed)); - if (g_windowMgr.window_01C8) { - parsed = static_cast(g_windowMgr.window_01C8)->ConvertChat(std::move(parsed)); + if (g_windowMgr.chatWnd) { + parsed = static_cast(g_windowMgr.chatWnd)->ConvertChat(std::move(parsed)); } parsed = static_cast(DisplayTipBoxTextTag(parsed)); diff --git a/Source/UI/Text/UITextViewerMessages.cpp b/Source/UI/Text/UITextViewerMessages.cpp index 8e3de745f..bd9ebf7ba 100644 --- a/Source/UI/Text/UITextViewerMessages.cpp +++ b/Source/UI/Text/UITextViewerMessages.cpp @@ -165,8 +165,8 @@ __forceinline void UITextViewer::AppendText(char* text, int width, int carriageR display = DisplayItemTextTag(display); display = RemoveTextLinkInfo(display); - if (g_windowMgr.window_01C8) { - display = static_cast(g_windowMgr.window_01C8)->ConvertChat(display); + if (g_windowMgr.chatWnd) { + display = static_cast(g_windowMgr.chatWnd)->ConvertChat(display); } std::string navigation; @@ -251,8 +251,8 @@ int UITextViewer::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 display = DisplayItemTextTag(display); display = RemoveTextLinkInfo(display); - if (g_windowMgr.window_01C8) { - display = static_cast(g_windowMgr.window_01C8)->ConvertChat(display); + if (g_windowMgr.chatWnd) { + display = static_cast(g_windowMgr.chatWnd)->ConvertChat(display); } std::string navigation; diff --git a/Source/UI/UIBartermarketWnd.cpp b/Source/UI/UIBartermarketWnd.cpp index 04c6cef96..40d5541b0 100644 --- a/Source/UI/UIBartermarketWnd.cpp +++ b/Source/UI/UIBartermarketWnd.cpp @@ -1168,8 +1168,8 @@ bool UIBarterItemPurchaseWnd::Purchase() { std::list items = *g_barterMarketItemMgr->GetAllItems(); int count = g_session.GetList0Size(); - count += g_session.CountItems17F0(); - count += g_session.CountItems2B50(); + count += g_session.CountDistinctEquippedItems(); + count += g_session.CountDistinctCostumeItems(); for (std::list::iterator it = items.begin(); it != items.end(); ++it) { std::map::iterator total = totals.find(it->name); @@ -1577,8 +1577,8 @@ bool UIExpandedBarterItemPurchaseWnd::Purchase() { std::vector entries = *g_expandedBarterMarketItemMgr->GetEntries(); int count = g_session.GetList0Size(); - count += g_session.CountItems17F0(); - count += g_session.CountItems2B50(); + count += g_session.CountDistinctEquippedItems(); + count += g_session.CountDistinctCostumeItems(); for (std::vector::iterator it = entries.begin(); it != entries.end(); ++it) { std::map::iterator total = totals.find(it->name); diff --git a/Source/UI/UIGradeEnchantWnd.cpp b/Source/UI/UIGradeEnchantWnd.cpp index 5b27b3fea..dcbbdfc0c 100644 --- a/Source/UI/UIGradeEnchantWnd.cpp +++ b/Source/UI/UIGradeEnchantWnd.cpp @@ -561,7 +561,7 @@ int UIGradeEnchantWnd::SendMsg( case UM_REFRESHITEM: if (this->state == 0 || this->state == 1) { const ITEM_INFO dropped = LookupClientItemByIdentity(g_session.m_inventoryItems, argument1); - if (g_session.HasItem61B8(dropped.identity[1]) == 1) { + if (g_session.HasSwapEquipmentItem(dropped.identity[1]) == 1) { g_modeMgr.GetGameMode()->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); return -1; } @@ -582,7 +582,7 @@ int UIGradeEnchantWnd::SendMsg( // OFFSET: 0x007E9650 // FUNCTION: fn_09767 void UIGradeEnchantWnd::SetEnchantInfo( - short index, int value, int materialCount, GradeEnchantInfo info, int value0108, int value010C, const GradeEnchantMaterial* materials + short index, int value, int materialCount, GradeEnchantInfo info, int enchantOption, int enchantOptionCount, const GradeEnchantMaterial* materials ) { if (this->state != 0 && this->state != 1) { return; @@ -599,8 +599,8 @@ void UIGradeEnchantWnd::SetEnchantInfo( this->item = owned; this->info = info; - this->enchantOption = value0108; - this->enchantOptionCount = value010C; + this->enchantOption = enchantOption; + this->enchantOptionCount = enchantOptionCount; this->materials.assign(materials, materials + materialCount); this->selectedMaterial = -1; this->blessingAmount = 0; @@ -705,8 +705,8 @@ void UIGradeEnchantWnd::UpdateEnchantMessages() { } if (static_cast(g_session.m_weight) > static_cast(g_session.m_maxWeight) * 0.7f || - g_session.GetList0Size() + g_session.CountItems17F0() + - g_session.CountItems2B50() >= + g_session.GetList0Size() + g_session.CountDistinctEquippedItems() + + g_session.CountDistinctCostumeItems() >= g_session.extraInventorySlots + 100) { this->messageIds.push_back(3710); } diff --git a/Source/UI/UIGradeEnchantWnd.h b/Source/UI/UIGradeEnchantWnd.h index 709770f64..f09902621 100644 --- a/Source/UI/UIGradeEnchantWnd.h +++ b/Source/UI/UIGradeEnchantWnd.h @@ -74,7 +74,7 @@ public: int SuccessRate(); void UpdateEnchantMessages(); void SetEnchantInfo( - short index, int value, int materialCount, GradeEnchantInfo info, int value0108, int value010C, const GradeEnchantMaterial* materials + short index, int value, int materialCount, GradeEnchantInfo info, int enchantOption, int enchantOptionCount, const GradeEnchantMaterial* materials ); void SetResult(int state, int result); diff --git a/Source/UI/UIItemReformWnd.cpp b/Source/UI/UIItemReformWnd.cpp index 75693bd4a..55172c32e 100644 --- a/Source/UI/UIItemReformWnd.cpp +++ b/Source/UI/UIItemReformWnd.cpp @@ -520,7 +520,7 @@ int UIItemReformWnd_List::SendMsg( } std::vector indices = g_session.FindInventoryIndicesByItemId(*base, 1); for (std::vector::iterator index = indices.begin(); index != indices.end(); ++index) { - if (g_session.HasItem61B8(*index) != 0) { + if (g_session.HasSwapEquipmentItem(*index) != 0) { continue; } ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *index); diff --git a/Source/UI/UILapineScrollBar.cpp b/Source/UI/UILapineScrollBar.cpp index 98efafb11..e1563cedd 100644 --- a/Source/UI/UILapineScrollBar.cpp +++ b/Source/UI/UILapineScrollBar.cpp @@ -321,7 +321,7 @@ unsigned char UILapineBox_IngredientListWnd::AddIngredient(std::uint32_t id) { return 0; } - if (g_session.HasItem61B8(owned.identity[1]) == 1) { + if (g_session.HasSwapEquipmentItem(owned.identity[1]) == 1) { return 0; } diff --git a/Source/UI/UILapineUpgradeBoxWnd.cpp b/Source/UI/UILapineUpgradeBoxWnd.cpp index 4f01def8f..a0ea21550 100644 --- a/Source/UI/UILapineUpgradeBoxWnd.cpp +++ b/Source/UI/UILapineUpgradeBoxWnd.cpp @@ -505,7 +505,7 @@ bool UILapineUpgradeBox_IngredientListWnd::AddIngredient(std::uint32_t identity) if (owned.refiningLevel < this->minRefine || owned.refiningLevel > this->maxRefine || owned.optionCount < this->minOptionCount) { return false; } - if ((g_session.IsPetEgg(itemId) == 1 && owned.damaged == 1) || g_session.HasItem61B8(owned.identity[1]) == 1) { + if ((g_session.IsPetEgg(itemId) == 1 && owned.damaged == 1) || g_session.HasSwapEquipmentItem(owned.identity[1]) == 1) { return false; } const auto material = std::find_if(this->materials.begin(), this->materials.end(), [itemId](ITEM_INFO value) { diff --git a/Source/UI/UIPreviewEquipWnd.cpp b/Source/UI/UIPreviewEquipWnd.cpp index 0271a2e0a..9d66cc72c 100644 --- a/Source/UI/UIPreviewEquipWnd.cpp +++ b/Source/UI/UIPreviewEquipWnd.cpp @@ -305,7 +305,7 @@ int UIPreviewEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s // FUNCTION: fn_09887 void UIPreviewEquipWnd::RefreshHeadgearLocations() { if (this->m_render->lowerHeadgear) { - ITEM_INFO equipped = g_session.GetItem17F0(0); + ITEM_INFO equipped = g_session.GetEquippedItemAt(0); if (this->m_render->lowerHeadgear == equipped.sprite) { this->m_render->lowerHeadgearLocation = 1; if (equipped.identity[2] == 0x301) { @@ -315,7 +315,7 @@ void UIPreviewEquipWnd::RefreshHeadgearLocations() { } } - ITEM_INFO costume = g_session.GetItem2B50(0); + ITEM_INFO costume = g_session.GetCostumeItemAt(0); if (this->m_render->lowerHeadgear == costume.sprite) { this->m_render->lowerHeadgearLocation = 1; if (costume.identity[2] == 0x1C00) { @@ -327,7 +327,7 @@ void UIPreviewEquipWnd::RefreshHeadgearLocations() { } if (this->m_render->upperHeadgear) { - ITEM_INFO equipped = g_session.GetItem17F0(8); + ITEM_INFO equipped = g_session.GetEquippedItemAt(8); if (this->m_render->upperHeadgear == equipped.sprite) { if (equipped.identity[2] == 0x100) { this->m_render->upperHeadgearLocation = 0x100; @@ -350,7 +350,7 @@ void UIPreviewEquipWnd::RefreshHeadgearLocations() { } } - ITEM_INFO costume = g_session.GetItem2B50(8); + ITEM_INFO costume = g_session.GetCostumeItemAt(8); if (this->m_render->upperHeadgear == costume.sprite) { if (costume.identity[2] == 0x400) { this->m_render->upperHeadgearLocation = 0x100; @@ -375,7 +375,7 @@ void UIPreviewEquipWnd::RefreshHeadgearLocations() { } if (this->m_render->middleHeadgear) { - ITEM_INFO equipped = g_session.GetItem17F0(9); + ITEM_INFO equipped = g_session.GetEquippedItemAt(9); if (this->m_render->middleHeadgear == equipped.sprite) { if (equipped.identity[2] == 0x200) { this->m_render->middleHeadgearLocation = 0x200; @@ -387,7 +387,7 @@ void UIPreviewEquipWnd::RefreshHeadgearLocations() { } } - ITEM_INFO costume = g_session.GetItem2B50(9); + ITEM_INFO costume = g_session.GetCostumeItemAt(9); if (this->m_render->middleHeadgear == costume.sprite) { if (costume.identity[2] == 0x800) { this->m_render->middleHeadgearLocation = 0x200; diff --git a/Source/UI/UIRefiningWnd.cpp b/Source/UI/UIRefiningWnd.cpp index 4ced9cf97..683c89bde 100644 --- a/Source/UI/UIRefiningWnd.cpp +++ b/Source/UI/UIRefiningWnd.cpp @@ -832,7 +832,7 @@ int UIRefiningWnd::SendMsg( case UM_REFRESHITEM: if (this->state == 0 || this->state == 1) { const ITEM_INFO info = LookupClientItemByIdentity(g_session.m_inventoryItems, argument1); - if (g_session.HasItem61B8(info.identity[1]) == 1) { + if (g_session.HasSwapEquipmentItem(info.identity[1]) == 1) { g_modeMgr.GetGameMode()->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); return -1; } diff --git a/Source/UI/Window/FrameFocus.cpp b/Source/UI/Window/FrameFocus.cpp index 5c6174d32..9dff88125 100644 --- a/Source/UI/Window/FrameFocus.cpp +++ b/Source/UI/Window/FrameFocus.cpp @@ -94,11 +94,11 @@ UIWindow* UIWindowMgr::Capture() const { // OFFSET: 0x00A96A40 // FUNCTION: fn_17191 bool UIWindowMgr::IsDropDownChild(const UIWindow* window) { - if (!this->window_0A30 || !this->window_0A30->geometry.visible) { + if (!this->dropDownBoxWnd || !this->dropDownBoxWnd->geometry.visible) { return false; } - return static_cast(this->window_0A30)->HasChild(window); + return static_cast(this->dropDownBoxWnd)->HasChild(window); } // OFFSET: 0x00A96E60 @@ -106,7 +106,7 @@ bool UIWindowMgr::IsDropDownChild(const UIWindow* window) { bool UIWindowMgr::IsHoverParentVisible() { if (this->hoverWindow) { UIWindow* parent = this->hoverWindow->parent; - if (parent && parent != this->window_01C8 && parent->geometry.visible) { + if (parent && parent != this->chatWnd && parent->geometry.visible) { return true; } } @@ -152,13 +152,13 @@ bool UIWindowMgr::IsSharedWindowId(int id) { // OFFSET: 0x00A97070 // FUNCTION: fn_17198 bool UIWindowMgr::HasNavigationBlocker() { - return this->window_4F260 || this->window_4F264 || this->window_4F268 || this->window_4F26C; + return this->barterMarketWnd || this->barterItemPurchaseWnd || this->expandedBarterMarketWnd || this->expandedBarterItemPurchaseWnd; } // OFFSET: 0x00A97380 // FUNCTION: fn_17202 int UIWindowMgr::Window4F250Ready() { - UIWindow* window = this->window_4F250; + UIWindow* window = this->transientWnd; if (window == nullptr) { return false; } @@ -206,7 +206,7 @@ bool UIWindowMgr::HasTitleAtActorCell(std::uint32_t aid) { return true; } - const std::uint32_t ownerAid = static_cast(g_modeMgr.GetGameMode())->FindUnknown01AC(roomId); + const std::uint32_t ownerAid = static_cast(g_modeMgr.GetGameMode())->FindChatRoomActorId(roomId); if (ownerAid == 0) { return true; } @@ -231,7 +231,7 @@ bool UIWindowMgr::HasTitleAtActorCell(std::uint32_t aid) { // OFFSET: 0x00A97490 // FUNCTION: fn_17204 void UIWindowMgr::CancelActiveDialog() { - UIWindow* window = this->window_03DC ? this->window_03DC : this->bookWnd; + UIWindow* window = this->changeNameWnd ? this->changeNameWnd : this->bookWnd; if (window) { window->SendMsg(nullptr, UM_LEFTPUSH, 0, 0, 0, 0); return; diff --git a/Source/UI/Window/FuncDrawWNDChar.cpp b/Source/UI/Window/FuncDrawWNDChar.cpp index 97291e318..deb80d5f4 100644 --- a/Source/UI/Window/FuncDrawWNDChar.cpp +++ b/Source/UI/Window/FuncDrawWNDChar.cpp @@ -81,7 +81,7 @@ void FuncDrawWNDChar::Draw(bool option) { direction = 0; } - g_session.m_hotkeyScript->Call("OffsetItemPos_GetOffsetForDoram", "ddd>dd", this->m_layers[key], direction, g_session.SyncUnknown0E98(), &x, &y); + g_session.m_hotkeyScript->Call("OffsetItemPos_GetOffsetForDoram", "ddd>dd", this->m_layers[key], direction, g_session.GetCurrentSex(), &x, &y); offset.x = x; offset.y = y; } @@ -361,7 +361,7 @@ FuncDrawOffset FuncDrawWNDChar::LayerAnchorOffset(int layer, const ActionFrame** short accessory = this->m_topAccessory; if (accessory == 181 || accessory == 197) { offset.y -= 7; - } else if (accessory == 200 && g_session.SyncUnknown0E98() == 0) { + } else if (accessory == 200 && g_session.GetCurrentSex() == 0) { offset.y -= 4; } } diff --git a/Source/UI/Window/InputFocus.cpp b/Source/UI/Window/InputFocus.cpp index 798f94d90..6e9e0d344 100644 --- a/Source/UI/Window/InputFocus.cpp +++ b/Source/UI/Window/InputFocus.cpp @@ -129,5 +129,5 @@ void UIWindowMgr::SetPressedWindowRoot(UIWindow* window) { root = root->parent; } } - this->window_4F1D4 = root; + this->keyboardCommandRootWnd = root; } diff --git a/Source/UI/Window/UIBasicInfoWnd.cpp b/Source/UI/Window/UIBasicInfoWnd.cpp index d617aa942..9ee8faa1e 100644 --- a/Source/UI/Window/UIBasicInfoWnd.cpp +++ b/Source/UI/Window/UIBasicInfoWnd.cpp @@ -277,7 +277,7 @@ int UIBasicInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen break; } case 214: - if (!g_windowMgr.CloseWindow(WID_CHATROOMMAKEWND) && !g_windowMgr.window_027C) { + if (!g_windowMgr.CloseWindow(WID_CHATROOMMAKEWND) && !g_windowMgr.chatRoomWnd) { if (!g_windowMgr.merchantShopMakeWnd && !g_windowMgr.merchantItemMyShopWnd) { g_windowMgr.EnsureWindow(WID_CHATROOMMAKEWND); } else { diff --git a/Source/UI/Window/UIEmblemWnd.cpp b/Source/UI/Window/UIEmblemWnd.cpp index ea35aa2e6..e98801e1c 100644 --- a/Source/UI/Window/UIEmblemWnd.cpp +++ b/Source/UI/Window/UIEmblemWnd.cpp @@ -23,7 +23,7 @@ void UIEmblemWnd::Paint() { this->ClearSurface(0xFFFF00FF); const bool framed = g_serviceOptions.Get(243) != 0; - if (framed && g_session.GetSceneUnknown004C() && !g_session.WorldUnknown0050()) { + if (framed && g_session.GetSiegeMode() && !g_session.GetBattleFieldMode()) { CBitmapRes* frame = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\emblem_frame.bmp"))); if (frame) { this->DrawBitmap(0, 0, frame, true); @@ -32,7 +32,7 @@ void UIEmblemWnd::Paint() { const std::string name = g_guildMgr->GetEmblemFilename(this->guildId); CEmblemRes* emblem = static_cast(ResourceMgr::Instance().Load(name)); - if (emblem && g_session.GetSceneUnknown004C() && !g_session.WorldUnknown0050()) { + if (emblem && g_session.GetSiegeMode() && !g_session.GetBattleFieldMode()) { this->DrawBitmap(framed ? 2 : 0, framed ? 2 : 0, &emblem->gif, true); } } diff --git a/Source/UI/Window/UIFrameWnd.cpp b/Source/UI/Window/UIFrameWnd.cpp index 77c467c6f..559f2b4f1 100644 --- a/Source/UI/Window/UIFrameWnd.cpp +++ b/Source/UI/Window/UIFrameWnd.cpp @@ -714,7 +714,7 @@ int UIChatRoomWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: int talkType; const int offset = g_session.GetTalkType(buffer, &talkType, parts); if (offset != -1) { - g_windowMgr.SetUnknown04DC(buffer + offset); + g_windowMgr.SetChatInputText(buffer + offset); } if (talkType == 0) { talkType = 50; diff --git a/Source/UI/Window/UIMessageBox.cpp b/Source/UI/Window/UIMessageBox.cpp index eca2eaaa0..adb66900a 100644 --- a/Source/UI/Window/UIMessageBox.cpp +++ b/Source/UI/Window/UIMessageBox.cpp @@ -869,7 +869,7 @@ int UITalkboxTrapInputWnd::SendMsg(UIWindow* sender, int message, std::intptr_t // OFFSET: 0x008C1ED0 // FUNCTION: fn_11818 -void UIWindowMgr::SetUnknown04DC(const char* text) { +void UIWindowMgr::SetChatInputText(const char* text) { this->chatInputText = text; } @@ -1178,79 +1178,79 @@ void UIReplayRECControlWnd::ApplyMode() { this->Resize(194, 34); if (this->mode == 0) { - this->window_00C0->Move(-100, -100); + this->recordStopButton->Move(-100, -100); for (int index = 0; index < 5; ++index) { this->tabs[index]->Move(-100, -100); } - this->window_00C4->Move(-100, -100); - this->window_0134->Move(-100, -100); + this->confirmFilenameButton->Move(-100, -100); + this->filenameEdit->Move(-100, -100); this->button_00D0->Move(-100, -100); - this->window_00EC->Move(-100, -100); + this->optionsTitleText->Move(-100, -100); for (int index = 0; index < 10; ++index) { this->options[index]->Move(-100, -100); } - this->window_0128->Move(-100, -100); - this->window_012C->Move(-100, -100); - this->window_0134->Move(-100, -100); - this->window_00BC->Move(110, 5); + this->userFilenameCheckBox->Move(-100, -100); + this->rejectExistingNameCheckBox->Move(-100, -100); + this->filenameEdit->Move(-100, -100); + this->recordStartButton->Move(110, 5); this->button_00C8->Move(136, 5); this->button_00C8->SetDisabled(0); this->button_00C8->Invalidate(); this->button_00D0->Move(162, 5); this->button_00D0->SetDisabled(0); this->button_00D0->Invalidate(); - this->window_00E8->Move(32, 12); + this->recordTimeText->Move(32, 12); this->tabs[0]->Move(6, 5); } else if (this->mode == 1) { this->recordStart = timeGetTime(); - this->window_00BC->Move(-100, -100); + this->recordStartButton->Move(-100, -100); for (int index = 0; index < 4; ++index) { this->tabs[index]->Move(-100, -100); } this->tabs[4]->Move(-100, -100); - this->window_00CC->Move(-100, -100); + this->closeOptionsButton->Move(-100, -100); this->options[7]->Move(-100, -100); for (int index = 0; index < 10; ++index) { this->options[index]->Move(-100, -100); } - this->window_0128->Move(-100, -100); - this->window_012C->Move(-100, -100); - this->window_00C4->Move(-100, -100); - this->window_0134->Move(-100, -100); - this->window_00C0->Move(110, 5); + this->userFilenameCheckBox->Move(-100, -100); + this->rejectExistingNameCheckBox->Move(-100, -100); + this->confirmFilenameButton->Move(-100, -100); + this->filenameEdit->Move(-100, -100); + this->recordStopButton->Move(110, 5); this->button_00C8->Move(136, 5); this->button_00C8->SetDisabled(1); this->button_00C8->Invalidate(); this->button_00D0->Move(162, 5); this->button_00D0->SetDisabled(1); this->button_00D0->Invalidate(); - this->window_00E8->Move(32, 12); + this->recordTimeText->Move(32, 12); this->tabs[0]->Move(6, 5); } else if (this->mode == 2) { this->Resize(194, 200); - this->window_00BC->Move(-100, -100); - this->window_00C0->Move(-100, -100); + this->recordStartButton->Move(-100, -100); + this->recordStopButton->Move(-100, -100); this->button_00C8->Move(-100, -100); this->button_00D0->Move(-100, -100); - this->window_00E8->Move(-100, -100); + this->recordTimeText->Move(-100, -100); for (int index = 0; index < 4; ++index) { this->tabs[index]->Move(-100, -100); } - this->window_00C4->Move(-100, -100); - this->window_0134->Move(-100, -100); + this->confirmFilenameButton->Move(-100, -100); + this->filenameEdit->Move(-100, -100); this->tabs[4]->Move(6, 5); - this->window_00CC->Move(162, 5); - this->window_00EC->Move(42, 12); + this->closeOptionsButton->Move(162, 5); + this->optionsTitleText->Move(42, 12); this->options[0]->Move(17, 63); this->options[1]->Move(17, 81); this->options[2]->Move(17, 99); @@ -1260,32 +1260,32 @@ void UIReplayRECControlWnd::ApplyMode() { this->options[6]->Move(104, 99); this->options[7]->Move(104, 117); this->options[9]->Move(104, 63); - this->window_0128->Move(17, 160); - this->window_012C->Move(17, 178); + this->userFilenameCheckBox->Move(17, 160); + this->rejectExistingNameCheckBox->Move(17, 178); } else if (this->mode == 3) { - this->window_00BC->Move(-100, -100); - this->window_00C0->Move(-100, -100); + this->recordStartButton->Move(-100, -100); + this->recordStopButton->Move(-100, -100); this->button_00C8->Move(-100, -100); this->button_00D0->Move(-100, -100); - this->window_00E8->Move(-100, -100); + this->recordTimeText->Move(-100, -100); for (int index = 0; index < 4; ++index) { this->tabs[index]->Move(-100, -100); } this->tabs[4]->Move(-100, -100); - this->window_00CC->Move(-100, -100); + this->closeOptionsButton->Move(-100, -100); this->options[7]->Move(-100, -100); for (int index = 0; index < 10; ++index) { this->options[index]->Move(-100, -100); } - this->window_0128->Move(-100, -100); - this->window_012C->Move(-100, -100); - this->window_00C4->Move(162, 5); - this->window_0134->Move(7, 8); - g_windowMgr.SetFocus(this->window_0134); + this->userFilenameCheckBox->Move(-100, -100); + this->rejectExistingNameCheckBox->Move(-100, -100); + this->confirmFilenameButton->Move(162, 5); + this->filenameEdit->Move(7, 8); + g_windowMgr.SetFocus(this->filenameEdit); } this->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); @@ -1925,7 +1925,7 @@ void UIReplayRECControlWnd::OnCreate(int, int) { this->replayOption119 = option119; UIEditCtrl* edit = new UIEditCtrl(); - this->window_0134 = edit; + this->filenameEdit = edit; edit->SetSize(151, 18); edit->Move(-100, -100); edit->maximum = 80; @@ -2270,14 +2270,14 @@ void UIReplayRECControlWnd::UpdateRecordTime() { const int minutes = seconds / 60; const int hours = minutes / 60; if (hours == 100) { - this->window_00E8->Move(124, 47); + this->recordTimeText->Move(124, 47); } else if (hours == 1000) { - this->window_00E8->Move(116, 47); + this->recordTimeText->Move(116, 47); } char text[100] = {}; std::sprintf(text, "%03d:%02d:%02d", hours, minutes % 60, seconds % 60); - this->window_00E8->SetTextFitted(text); + this->recordTimeText->SetTextFitted(text); this->Invalidate(); this->InvalidateChildren(); this->recordStart = timeGetTime(); @@ -2315,7 +2315,7 @@ int UIReplayRECControlWnd::SendMsg(UIWindow* sender, int message, std::intptr_t g_modeMgr.gameMode->SendMsg(MM_STOP_REPLAY_RECORDING, 0, 0, 0, 0); return 0; case ID_CONFIRM_REPLAY_RECORDING_PATH: { - auto* edit = static_cast(this->window_0134); + auto* edit = static_cast(this->filenameEdit); int error; if (edit->Length() <= 0) { @@ -2354,13 +2354,13 @@ int UIReplayRECControlWnd::SendMsg(UIWindow* sender, int message, std::intptr_t g_windowMgr.CloseWindow(WID_REPLAYRECCONTROLWND); return 0; case ID_CHECK: - if (sender == this->window_0128) { + if (sender == this->userFilenameCheckBox) { ReplayFileList::Instance().pathEnabled = b != 0; this->replayPathEnabled = ReplayFileList::Instance().pathEnabled; return 0; } - if (sender == this->window_012C) { + if (sender == this->rejectExistingNameCheckBox) { ReplayFileList::Instance().rejectExistingName = b != 0; this->replayOption119 = ReplayFileList::Instance().rejectExistingName; return 0; @@ -3029,7 +3029,7 @@ int UISelectServerWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s case ID_SELECT_REPLAY: reinterpret_cast(ReplayFileList::Instance()).SetBaseFrame(reinterpret_cast(&Replay::Instance())); ReplayFileList::Instance().selectionState = g_session.m_aid; - ReplayFileList::Instance().dialogState = g_session.SyncUnknown0E98(); + ReplayFileList::Instance().dialogState = g_session.GetCurrentSex(); g_modeMgr.gameMode->SendMsg(LMM_SELECT_REPLAY_DATA, 0, 0, 0, 0); g_windowMgr.Schedule(this); return 0; @@ -3228,7 +3228,7 @@ UIPetInfoWnd::UIPetInfoWnd() this->saved = nullptr; this->renameButton = 0; this->statusButton = 0; - this->window_00C4 = nullptr; + this->feedConfirmationWnd = nullptr; } // OFFSET: 0x008A43E0 @@ -3288,8 +3288,8 @@ UILoginWnd::~UILoginWnd() = default; // OFFSET: 0x008A54C0 // FUNCTION: fn_11681 UIPetInfoWnd::~UIPetInfoWnd() { - if (this->window_00C4) { - g_windowMgr.Schedule(this->window_00C4); + if (this->feedConfirmationWnd) { + g_windowMgr.Schedule(this->feedConfirmationWnd); } } @@ -3794,7 +3794,7 @@ void UIPetInfoWnd::OnCreate(int, int) { // OFFSET: 0x008BFE80 // FUNCTION: fn_11812 int UIPetInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { - if (this->window_00C4 && sender != this->window_00C4) { + if (this->feedConfirmationWnd && sender != this->feedConfirmationWnd) { return 0; } @@ -3809,9 +3809,9 @@ int UIPetInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_REFINING_FAIL_ITEM_DISAPPEAR)), 255, 0, 0, 0); break; } - this->window_00C4 = new UINormalMB(); - this->window_00C4->Create(this, LookupMessage(MSI_SURE_TO_FEED_PET), 2, true, nullptr, 280, 120, nullptr); - g_windowMgr.AddRendered(this->window_00C4); + this->feedConfirmationWnd = new UINormalMB(); + this->feedConfirmationWnd->Create(this, LookupMessage(MSI_SURE_TO_FEED_PET), 2, true, nullptr, 280, 120, nullptr); + g_windowMgr.AddRendered(this->feedConfirmationWnd); g_windowMgr.CloseWindow(WID_COMBOBOXIDWND); return 0; case 468: @@ -3924,15 +3924,15 @@ int UIPetInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i } case 488: { CMode* mode = g_modeMgr.GetGameMode(); - if (sender == this->window_00C4 && b == 187) { + if (sender == this->feedConfirmationWnd && b == 187) { if (g_windowMgr.LookupWindow(WID_EXCHANGEUI)) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_BARTERITEM_NAME_COUNT)), 255, 0, 0, 0); - this->window_00C4 = nullptr; + this->feedConfirmationWnd = nullptr; return 0; } mode->SendMsg(MM_COMMAND_PET, 1, 0, 0, 0); } - this->window_00C4 = nullptr; + this->feedConfirmationWnd = nullptr; return 0; } default: diff --git a/Source/UI/Window/UINavigationWnd.cpp b/Source/UI/Window/UINavigationWnd.cpp index 1f49027ed..164cc482a 100644 --- a/Source/UI/Window/UINavigationWnd.cpp +++ b/Source/UI/Window/UINavigationWnd.cpp @@ -728,7 +728,7 @@ int UINavigationWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume return 0; } g_windowMgr.Schedule(this); - g_windowMgr.window_4F174 = nullptr; + g_windowMgr.navigationWnd = nullptr; return 0; case ID_BUTTON1: g_navigationManager.displayMode = 1; diff --git a/Source/UI/Window/UINewSelectCharWnd.cpp b/Source/UI/Window/UINewSelectCharWnd.cpp index f8b7e9bfb..2125c038b 100644 --- a/Source/UI/Window/UINewSelectCharWnd.cpp +++ b/Source/UI/Window/UINewSelectCharWnd.cpp @@ -76,7 +76,7 @@ static_assert(sizeof(CharacterMovePacket) == 8); // FUNCTION: fn_09577 UINewSelectCharWnd::UINewSelectCharWnd() : UIFrameWnd(0) { this->m_slotsPerPage = 15; - this->m_unknown13C = false; + this->m_gameStartPending = false; this->m_window100 = nullptr; this->m_textButton = nullptr; this->m_button416 = nullptr; @@ -88,7 +88,7 @@ UINewSelectCharWnd::UINewSelectCharWnd() : UIFrameWnd(0) { this->m_slotButtons2.resize(this->m_slotsPerPage); this->m_characterWindows.resize(this->m_slotsPerPage); - this->m_unknown118 = false; + this->m_navigationBlocked = false; this->m_page = 0; this->m_pageSlot = 0; this->m_totalCharacters = this->m_maxCharacters = g_session.m_normalSlotCount + g_session.m_premiumSlotCount + g_session.m_billingSlotCount; @@ -108,7 +108,7 @@ UINewSelectCharWnd::UINewSelectCharWnd() : UIFrameWnd(0) { } this->m_lastTick = timeGetTime(); - this->m_unknown138 = -1; + this->m_slotMoveSource = -1; } UINewSelectCharWnd::~UINewSelectCharWnd() = default; @@ -589,7 +589,7 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg case UM_COMMAND: switch (argument1) { case ID_OK: { - if (this->m_unknown13C) { + if (this->m_gameStartPending) { break; } @@ -606,7 +606,7 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg g_session.SetPlayerNameKey(reinterpret_cast(info->name)); g_session.SetFlag(info->sex == 'c' ? static_cast(g_session.m_sex) : static_cast(info->sex)); - this->m_unknown118 = true; + this->m_navigationBlocked = true; const BlockedCharacterEntry* blocked = reinterpret_cast(&g_session.characterSelectionData[0x40]); for (int index = 0; index < g_session.blockedCharacterCount; ++index) { if (info->gid == blocked[index].gid) { @@ -614,14 +614,14 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg std::memset(text, 0, sizeof(text)); std::sprintf(text, LookupMessage(MSI_BLOCKED), blocked[index].expireDate); g_windowMgr.Confirm(text, 0, true, true, 0, "Message", 0x118, 0x78, 0); - this->m_unknown118 = false; + this->m_navigationBlocked = false; return 0; } } g_soundMgr->PlayWave("버튼소리.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); g_modeMgr.gameMode->SendMsg(MM_COMMAND, 0x2712, 0, 0, 0); - this->m_unknown13C = true; + this->m_gameStartPending = true; if (this->m_windowFC != nullptr) { UIBitmapButton* button = static_cast(this->m_windowFC); button->SetBitmap("유저인터페이스\\select_character_ver3\\bt_gameStart_on.bmp", 0, 0); @@ -652,7 +652,7 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg } break; case ID_SLOT: { - if (this->m_unknown13C || g_windowMgr.HasModalWindow() == 1) { + if (this->m_gameStartPending || g_windowMgr.HasModalWindow() == 1) { break; } @@ -678,9 +678,9 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg const CharacterInfo* info = reinterpret_cast(g_modeMgr.gameMode->SendMsg(MM_QUERYCHARICTORINFO, static_cast(g_selectedSlotIndex), 0, 0, 0)); const int selected = static_cast(g_selectedSlotIndex); - if (this->m_unknown138 != selected && selected < this->m_maxCharacters) { + if (this->m_slotMoveSource != selected && selected < this->m_maxCharacters) { if (info == nullptr) { - if (this->m_unknown138 != -1) { + if (this->m_slotMoveSource != -1) { static_cast(g_modeMgr.GetLoginMode())->ShowNotice(0x2E, false); } } else { @@ -720,12 +720,12 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg } if (g_windowMgr.Confirm(LookupMessage(MSI_DELETE_CHARACTER), 2, false, false, 0, "Message", 0x118, 0x78, 0) == 0xBB) { - this->m_unknown118 = true; + this->m_navigationBlocked = true; if (g_windowMgr.RunEmailAddress() == 0xB8) { g_modeMgr.gameMode->SendMsg(MM_COMMAND, 0x271A, 0, 0, 0); g_windowMgr.Schedule(this); } - this->m_unknown118 = false; + this->m_navigationBlocked = false; } break; } @@ -870,7 +870,7 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg break; } case ID_CHANGE_NAME: { - if (g_windowMgr.window_03DC != nullptr) { + if (g_windowMgr.changeNameWnd != nullptr) { g_windowMgr.CloseWindow(WID_CHANGENAMEWND); } const std::intptr_t info = g_modeMgr.gameMode->SendMsg(MM_QUERYCHARICTORINFO, static_cast(g_selectedSlotIndex), 0, 0, 0); @@ -933,22 +933,22 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg break; } case 0x1B0: - this->m_unknown138 = static_cast(g_selectedSlotIndex); + this->m_slotMoveSource = static_cast(g_selectedSlotIndex); break; case 0x1B1: { const unsigned char selected = static_cast(g_selectedSlotIndex); if (g_windowMgr.Confirm(LookupMessage(MSI_CHANGE_CHARACTER_SLOT), 2, false, false, 0, "Message", 0x118, 0x78, 0) == 0xBB) { - const CharacterInfo* info = reinterpret_cast(g_modeMgr.gameMode->SendMsg(MM_QUERYCHARICTORINFO, this->m_unknown138, 0, 0, 0)); + const CharacterInfo* info = reinterpret_cast(g_modeMgr.gameMode->SendMsg(MM_QUERYCHARICTORINFO, this->m_slotMoveSource, 0, 0, 0)); if (info != nullptr) { CharacterMovePacket packet; packet.id = 0x8D4; - packet.from = static_cast(this->m_unknown138); + packet.from = static_cast(this->m_slotMoveSource); packet.to = selected; packet.count = static_cast(info->slotChangeCount); GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.id), &packet); } } - this->m_unknown138 = -1; + this->m_slotMoveSource = -1; break; } case 0x1B2: @@ -966,18 +966,18 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg } break; case UM_SETSTATE: - if (!this->m_unknown13C) { + if (!this->m_gameStartPending) { this->m_pageSlot = argument1; } break; case UM_UPPUSH: - if (this->m_unknown13C) { + if (this->m_gameStartPending) { break; } if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } - if (g_windowMgr.HasModalWindow() != 1 && this->m_unknown118 != true) { + if (g_windowMgr.HasModalWindow() != 1 && this->m_navigationBlocked != true) { const int previous = this->m_pageSlot; this->m_pageSlot -= 5; if (this->m_pageSlot < 0) { @@ -997,13 +997,13 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg } break; case UM_DOWNPUSH: - if (this->m_unknown13C) { + if (this->m_gameStartPending) { break; } if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } - if (g_windowMgr.HasModalWindow() != 1 && this->m_unknown118 != true) { + if (g_windowMgr.HasModalWindow() != 1 && this->m_navigationBlocked != true) { const int previous = this->m_pageSlot; this->m_pageSlot = previous + 5; if (this->m_page * this->m_slotsPerPage + this->m_pageSlot >= this->m_maxCharacters) { @@ -1025,13 +1025,13 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg } break; case UM_LEFTPUSH: - if (this->m_unknown13C) { + if (this->m_gameStartPending) { break; } if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } - if (g_windowMgr.HasModalWindow() != 1 && this->m_unknown118 != true) { + if (g_windowMgr.HasModalWindow() != 1 && this->m_navigationBlocked != true) { if (--this->m_pageSlot < 0) { if (this->m_page <= 0) { this->m_pageSlot = 0; @@ -1049,13 +1049,13 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg } break; case UM_RIGHTPUSH: - if (this->m_unknown13C) { + if (this->m_gameStartPending) { break; } if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } - if (g_windowMgr.HasModalWindow() != 1 && this->m_unknown118 != true) { + if (g_windowMgr.HasModalWindow() != 1 && this->m_navigationBlocked != true) { const int previous = this->m_pageSlot; this->m_pageSlot = previous + 1; if (this->m_page * this->m_slotsPerPage + this->m_pageSlot >= this->m_maxCharacters) { diff --git a/Source/UI/Window/UINewSelectCharWnd.h b/Source/UI/Window/UINewSelectCharWnd.h index 16ad3991d..efd3cfc21 100644 --- a/Source/UI/Window/UINewSelectCharWnd.h +++ b/Source/UI/Window/UINewSelectCharWnd.h @@ -76,7 +76,7 @@ protected: /* 010C */ char* m_slotStatus; /* 0110 */ short* m_slotShorts; /* 0114 */ DWORD m_lastTick; - /* 0118 */ bool m_unknown118; + /* 0118 */ bool m_navigationBlocked; /* 011C */ int m_page; /* 0120 */ int m_pageSlot; /* 0124 */ int m_pageCount; @@ -84,10 +84,10 @@ protected: /* 012C */ int m_totalSlots; /* 0130 */ int m_totalCharacters; /* 0134 */ int m_maxCharacters; - /* 0138 */ int m_unknown138; + /* 0138 */ int m_slotMoveSource; public: - /* 013C */ bool m_unknown13C; + /* 013C */ bool m_gameStartPending; }; #endif diff --git a/Source/UI/Window/UINewSkillListWnd.cpp b/Source/UI/Window/UINewSkillListWnd.cpp index b18047800..ed4bbaae3 100644 --- a/Source/UI/Window/UINewSkillListWnd.cpp +++ b/Source/UI/Window/UINewSkillListWnd.cpp @@ -141,7 +141,7 @@ void UINewSkillListWnd::OnWheel(int delta) { // FUNCTION: fn_13800 void UINewSkillListWnd::ApplySkillPoints() { if (g_session.m_simplifiedSkillList == 0) { - for (auto it = this->m_unknown_02A0.begin(); it != this->m_unknown_02A0.end(); ++it) { + for (auto it = this->m_plannedSkillLevels.begin(); it != this->m_plannedSkillLevels.end(); ++it) { const int id = it->id; const int value = it->value; CSkillInfo* skill = g_session.m_skillBundle.FindGrouped(id); @@ -151,7 +151,7 @@ void UINewSkillListWnd::ApplySkillPoints() { } } } - this->m_unknown_02A0.clear(); + this->m_plannedSkillLevels.clear(); } else { std::list& live = this->SkillList(this->m_tab, true); std::list& pending = this->SkillList(this->m_tab, false); @@ -185,7 +185,7 @@ void UINewSkillListWnd::DrawCharacter() { SpriteAtlasRecord record{}; const int job = g_session.m_job; - const int sex = g_session.SyncUnknown0E98(); + const int sex = g_session.GetCurrentSex(); int head = g_session.m_head; const int bodyPalette = g_session.m_bodyStyle; const int headPalette = g_session.m_headPalette; @@ -231,7 +231,7 @@ void UINewSkillListWnd::DrawCharacter() { } int x = 0; int y = 0; - g_session.m_hotkeyScript->Call("OffsetItemPos_GetOffsetForDoram", "ddd>dd", view, 23, g_session.SyncUnknown0E98(), &x, &y); + g_session.m_hotkeyScript->Call("OffsetItemPos_GetOffsetForDoram", "ddd>dd", view, 23, g_session.GetCurrentSex(), &x, &y); offsetX = x; offsetY = y; } @@ -746,7 +746,7 @@ void UINewSkillListWnd::ResetLists() { for (unsigned i = 0; i < 4; ++i) { this->m_lists[i] = g_session.m_skillBundle.Group(i); } - this->m_unknown_02A0.clear(); + this->m_plannedSkillLevels.clear(); g_session.m_skillBundle.MarkLevelChanges(); } @@ -1540,7 +1540,7 @@ bool UINewSkillListWnd::IncreaseSkillLevel(int skillId) { int target; if (id == skillId) { int current = 0; - for (const NewSkillListValue& value : this->m_unknown_02A0) { + for (const NewSkillListValue& value : this->m_plannedSkillLevels) { if (value.id == id) { current = value.value; break; @@ -1559,7 +1559,7 @@ bool UINewSkillListWnd::IncreaseSkillLevel(int skillId) { } int current = 0; - for (const NewSkillListValue& value : this->m_unknown_02A0) { + for (const NewSkillListValue& value : this->m_plannedSkillLevels) { if (value.id == id) { current = value.value; break; @@ -1581,7 +1581,7 @@ bool UINewSkillListWnd::IncreaseSkillLevel(int skillId) { const int level = current + added; bool found = false; - for (NewSkillListValue& value : this->m_unknown_02A0) { + for (NewSkillListValue& value : this->m_plannedSkillLevels) { if (value.id == id) { value.value = level; found = true; @@ -1589,7 +1589,7 @@ bool UINewSkillListWnd::IncreaseSkillLevel(int skillId) { } } if (!found) { - this->m_unknown_02A0.push_back(NewSkillListValue{id, level}); + this->m_plannedSkillLevels.push_back(NewSkillListValue{id, level}); } } @@ -1672,7 +1672,7 @@ void UINewSkillListWnd::DrawSkillTree() { this->DrawBitmap(x + 4, y + 44, bitmap, true); } - const int planned = SkillValueOf(this->m_unknown_02A0, static_cast(skill.id)); + const int planned = SkillValueOf(this->m_plannedSkillLevels, static_cast(skill.id)); const CSkillInfo* current = g_session.m_skillBundle.FindGrouped(skill.id); if (current) { int added = planned - current->learnedLevel; @@ -1717,7 +1717,7 @@ void UINewSkillListWnd::DrawSkillTree() { textX += this->TextWidth(" / ", 0, 0, 11, 1, 0); const std::uint32_t id = skill.id; - int target = SkillValueOf(this->m_unknown_02A0, static_cast(id)); + int target = SkillValueOf(this->m_plannedSkillLevels, static_cast(id)); const int grouped = g_session.m_skillBundle.GroupedLevel(id); if (target < grouped) { target = grouped; diff --git a/Source/UI/Window/UINewSkillListWnd.h b/Source/UI/Window/UINewSkillListWnd.h index bb44cdc9a..80253ebb9 100644 --- a/Source/UI/Window/UINewSkillListWnd.h +++ b/Source/UI/Window/UINewSkillListWnd.h @@ -85,7 +85,7 @@ public: /* 0274 */ std::uint32_t m_lastTick; /* 0278 */ std::list m_lists[4]; /* 0298 */ std::list m_values; - /* 02A0 */ std::list m_unknown_02A0; + /* 02A0 */ std::list m_plannedSkillLevels; /* 02A8 */ bool m_showDetail; /* 02A9 */ unsigned char unknown_02A9[3]; /* 02AC */ int m_detailId; diff --git a/Source/UI/Window/UIPetInfoWnd.h b/Source/UI/Window/UIPetInfoWnd.h index 7a4b3763d..669bc931f 100644 --- a/Source/UI/Window/UIPetInfoWnd.h +++ b/Source/UI/Window/UIPetInfoWnd.h @@ -28,7 +28,7 @@ public: /* 00B8 */ PetInfoWndInfo* saved; /* 00BC */ UIBitmapButton* renameButton; /* 00C0 */ UINoneVisibleButton* statusButton; - /* 00C4 */ UINormalMB* window_00C4; + /* 00C4 */ UINormalMB* feedConfirmationWnd; /* 00C8 */ UIPetInfoBarGraph* friendlyGauge; /* 00CC */ std::string friendlyText; /* 00E4 */ unsigned char autoFeedAvailable; diff --git a/Source/UI/Window/UIReplayRECControlWnd.h b/Source/UI/Window/UIReplayRECControlWnd.h index 7ce960eb5..818e04228 100644 --- a/Source/UI/Window/UIReplayRECControlWnd.h +++ b/Source/UI/Window/UIReplayRECControlWnd.h @@ -31,11 +31,11 @@ public: /* 00B8 */ int unknown_00B8; union { struct { - /* 00BC */ UIWindow* window_00BC; - /* 00C0 */ UIWindow* window_00C0; - /* 00C4 */ UIWindow* window_00C4; + /* 00BC */ UIWindow* recordStartButton; + /* 00C0 */ UIWindow* recordStopButton; + /* 00C4 */ UIWindow* confirmFilenameButton; /* 00C8 */ UIButton* button_00C8; - /* 00CC */ UIWindow* window_00CC; + /* 00CC */ UIWindow* closeOptionsButton; /* 00D0 */ UIButton* button_00D0; }; /* 00BC */ UIBitmapButton* buttons[6]; @@ -43,8 +43,8 @@ public: /* 00D4 */ UIWindow* tabs[5]; union { struct { - /* 00E8 */ UIStaticText* window_00E8; - /* 00EC */ UIWindow* window_00EC; + /* 00E8 */ UIStaticText* recordTimeText; + /* 00EC */ UIWindow* optionsTitleText; }; /* 00E8 */ UIStaticText* texts[2]; }; @@ -54,15 +54,15 @@ public: /* 0126 */ unsigned char unknown_0126[2]; union { struct { - /* 0128 */ UIWindow* window_0128; - /* 012C */ UIWindow* window_012C; + /* 0128 */ UIWindow* userFilenameCheckBox; + /* 012C */ UIWindow* rejectExistingNameCheckBox; }; /* 0128 */ UICheckBox* fileOptions[2]; }; /* 0130 */ bool replayPathEnabled; /* 0131 */ bool replayOption119; /* 0132 */ unsigned char unknown_0132[2]; - /* 0134 */ UIWindow* window_0134; + /* 0134 */ UIWindow* filenameEdit; /* 0138 */ ReplayRECControlWndInfo* saved; }; diff --git a/Source/UI/Window/UIRoMapWnd.cpp b/Source/UI/Window/UIRoMapWnd.cpp index f3924b1d5..f64edd18f 100644 --- a/Source/UI/Window/UIRoMapWnd.cpp +++ b/Source/UI/Window/UIRoMapWnd.cpp @@ -87,7 +87,7 @@ void UIRoMapWnd::ResetKafraBounds() { // FUNCTION: fn_12634 void UIRoMapWnd::UpdateNavigationButtons() { UIWindow** buttons = reinterpret_cast(reinterpret_cast(this) + 0x20C); - if (g_windowMgr.window_4F174 != nullptr && !g_navigationManager.expandedMap) { + if (g_windowMgr.navigationWnd != nullptr && !g_navigationManager.expandedMap) { buttons[0]->Move(-100, -100); buttons[1]->Move(-100, -100); buttons[2]->Move(-100, -100); @@ -742,8 +742,8 @@ int UIRoMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, return 0; case ID_BASE: g_windowMgr.EnsureWindow(WID_NAVIGATIONV4WND); - if (g_windowMgr.window_4F174) { - g_windowMgr.window_4F174->SendMsg(nullptr, UM_COMMAND, ID_BASE, 0, 0, 0); + if (g_windowMgr.navigationWnd) { + g_windowMgr.navigationWnd->SendMsg(nullptr, UM_COMMAND, ID_BASE, 0, 0, 0); } this->UpdateNavigationButtons(); return 0; @@ -773,8 +773,8 @@ int UIRoMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, g_navigationManager.expandedMap = false; g_navigationManager.SearchNavigation(name, 0, false); if (g_windowMgr.LookupWindow(WID_NAVIGATIONV4WND)) { - static_cast(g_windowMgr.window_4F174)->SelectRoute(0); - static_cast(g_windowMgr.window_4F174)->SelectRouteNode(0); + static_cast(g_windowMgr.navigationWnd)->SelectRoute(0); + static_cast(g_windowMgr.navigationWnd)->SelectRouteNode(0); } this->UpdateNavigationButtons(); } diff --git a/Source/UI/Window/UIRodexContentsWnd.cpp b/Source/UI/Window/UIRodexContentsWnd.cpp index e3e113dd8..c2ab6afee 100644 --- a/Source/UI/Window/UIRodexContentsWnd.cpp +++ b/Source/UI/Window/UIRodexContentsWnd.cpp @@ -330,7 +330,7 @@ int UIRodexContentsWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg } else if (message == UM_REFRESHITEM) { this->m_items.clear(); for (int i = 0; i < 5; ++i) { - ITEM_INFO item = g_session.GetItem5C68(i); + ITEM_INFO item = g_session.GetSelectionItemAt(i); if (item.quantity > 0) { this->m_items.push_back(item); } diff --git a/Source/UI/Window/UISecondCostumeWnd.cpp b/Source/UI/Window/UISecondCostumeWnd.cpp index c87413663..c2c8d2a75 100644 --- a/Source/UI/Window/UISecondCostumeWnd.cpp +++ b/Source/UI/Window/UISecondCostumeWnd.cpp @@ -53,7 +53,7 @@ void UISecondCostumeWnd::DrawCharacterPreview(int x, int y) { } FuncDrawWNDChar drawer( - this, x, y, static_cast(g_session.SyncUnknown0E98()), static_cast(g_session.GetDisplayJob()), g_session.GetDisplayJob(), + this, x, y, static_cast(g_session.GetCurrentSex()), static_cast(g_session.GetDisplayJob()), g_session.GetDisplayJob(), static_cast(body), static_cast(head), bottomAccessory, topAccessory, midAccessory, robe, flags, 0, bodyStyle, headPalette, action, 0, static_cast(time) ); @@ -64,7 +64,7 @@ void UISecondCostumeWnd::DrawCharacterPreview(int x, int y) { // FUNCTION: fn_12885 void UISecondCostumeWnd::LoadLists() { const int job = g_session.GetDisplayJob(); - const int sex = g_session.SyncUnknown0E98(); + const int sex = g_session.GetCurrentSex(); for (int index = 1;; ++index) { const char* name = nullptr; diff --git a/Source/UI/Window/UISelCharForUServerWnd.cpp b/Source/UI/Window/UISelCharForUServerWnd.cpp index f57b543f4..77887d6c8 100644 --- a/Source/UI/Window/UISelCharForUServerWnd.cpp +++ b/Source/UI/Window/UISelCharForUServerWnd.cpp @@ -98,20 +98,20 @@ void UISelCharForUServerWnd::OnCreate(int, int) { slot.action = 0; slot.frame = 0; - slot.actionNames[0] = static_cast(GetBodyActionResourceName(info->job, g_session.SyncUnknown0E98(), info->bodyCostume, 0)); - slot.spriteNames[0] = static_cast(g_session.GetBodySprName(info->job, g_session.SyncUnknown0E98(), info->bodyCostume, 0)); + slot.actionNames[0] = static_cast(GetBodyActionResourceName(info->job, g_session.GetCurrentSex(), info->bodyCostume, 0)); + slot.spriteNames[0] = static_cast(g_session.GetBodySprName(info->job, g_session.GetCurrentSex(), info->bodyCostume, 0)); int head = info->head; - slot.actionNames[1] = static_cast(g_session.GetHeadActName(info->job, g_session.SyncUnknown0E98(), &head)); - slot.spriteNames[1] = static_cast(g_session.GetHeadSprName(info->job, g_session.SyncUnknown0E98(), &head)); - slot.actionNames[2] = static_cast(g_session.GetAccessoryActName(info->job, g_session.SyncUnknown0E98(), head, info->accessory3)); - slot.spriteNames[2] = static_cast(g_session.GetAccessorySprName(info->job, g_session.SyncUnknown0E98(), head, info->accessory3)); + slot.actionNames[1] = static_cast(g_session.GetHeadActName(info->job, g_session.GetCurrentSex(), &head)); + slot.spriteNames[1] = static_cast(g_session.GetHeadSprName(info->job, g_session.GetCurrentSex(), &head)); + slot.actionNames[2] = static_cast(g_session.GetAccessoryActName(info->job, g_session.GetCurrentSex(), head, info->accessory3)); + slot.spriteNames[2] = static_cast(g_session.GetAccessorySprName(info->job, g_session.GetCurrentSex(), head, info->accessory3)); info->head = static_cast(head); - slot.actionNames[3] = static_cast(g_session.GetAccessoryActName(info->job, g_session.SyncUnknown0E98(), head, info->accessory2)); - slot.spriteNames[3] = static_cast(g_session.GetAccessorySprName(info->job, g_session.SyncUnknown0E98(), head, info->accessory2)); + slot.actionNames[3] = static_cast(g_session.GetAccessoryActName(info->job, g_session.GetCurrentSex(), head, info->accessory2)); + slot.spriteNames[3] = static_cast(g_session.GetAccessorySprName(info->job, g_session.GetCurrentSex(), head, info->accessory2)); this->accessory2[slotIndex] = info->accessory2; - slot.actionNames[4] = static_cast(g_session.GetAccessoryActName(info->job, g_session.SyncUnknown0E98(), head, info->accessory)); - slot.spriteNames[4] = static_cast(g_session.GetAccessorySprName(info->job, g_session.SyncUnknown0E98(), head, info->accessory)); + slot.actionNames[4] = static_cast(g_session.GetAccessoryActName(info->job, g_session.GetCurrentSex(), head, info->accessory)); + slot.spriteNames[4] = static_cast(g_session.GetAccessorySprName(info->job, g_session.GetCurrentSex(), head, info->accessory)); int bodyPalette = info->bodyStyle; if (info->bodyCostume < 1) { @@ -121,15 +121,15 @@ void UISelCharForUServerWnd::OnCreate(int, int) { slot.bodyPalette = bodyPalette; if (bodyPalette != 0) { slot.bodyPaletteName = static_cast( - g_session.GetBodyPalName(info->job, g_session.SyncUnknown0E98(), bodyPalette, info->bodyCostume, 0, 0)); + g_session.GetBodyPalName(info->job, g_session.GetCurrentSex(), bodyPalette, info->bodyCostume, 0, 0)); } slot.headPalette = info->headPalette; if (slot.headPalette != 0) { - slot.headPaletteName = static_cast(g_session.GetHeadPalName(head, info->job, g_session.SyncUnknown0E98(), slot.headPalette)); + slot.headPaletteName = static_cast(g_session.GetHeadPalName(head, info->job, g_session.GetCurrentSex(), slot.headPalette)); } - slot.imfName = GetBodyImfName(info->job, g_session.SyncUnknown0E98(), info->head, info->bodyCostume); + slot.imfName = GetBodyImfName(info->job, g_session.GetCurrentSex(), info->head, info->bodyCostume); } } diff --git a/Source/UI/Window/UIWindow.cpp b/Source/UI/Window/UIWindow.cpp index 8307765dd..5f5521003 100644 --- a/Source/UI/Window/UIWindow.cpp +++ b/Source/UI/Window/UIWindow.cpp @@ -1439,8 +1439,8 @@ std::string UIWindow::FitDisplayText(int width, const char* text, int family, in display = DisplayItemTextTag(display); display = RemoveTextLinkInfo(display); - if (g_windowMgr.window_01C8) { - display = static_cast(g_windowMgr.window_01C8)->ConvertChat(std::move(display)); + if (g_windowMgr.chatWnd) { + display = static_cast(g_windowMgr.chatWnd)->ConvertChat(std::move(display)); } std::string navigation; @@ -1511,8 +1511,8 @@ std::string UIWindow::FitVerticalDisplayText(int height, const char* text, int f display = static_cast(DisplayItemTextTag(display)); display = static_cast(RemoveTextLinkInfo(display)); - if (g_windowMgr.window_01C8) { - display = static_cast(g_windowMgr.window_01C8)->ConvertChat(std::move(display)); + if (g_windowMgr.chatWnd) { + display = static_cast(g_windowMgr.chatWnd)->ConvertChat(std::move(display)); } std::string navigation; @@ -2072,8 +2072,8 @@ void UINavigationroadiconWnd::OnLBtnUp(int x, int y) { } if (slot != 0) { - if (g_windowMgr.window_4F174) { - g_windowMgr.window_4F174->SendMsg(nullptr, UM_SETCURITEM, slot, 0, 0, 0); + if (g_windowMgr.navigationWnd) { + g_windowMgr.navigationWnd->SendMsg(nullptr, UM_SETCURITEM, slot, 0, 0, 0); } const int column = slot <= 4 ? slot : slot - 4; @@ -2657,9 +2657,9 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu window->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); } - g_windowMgr.window_4F258 = window; + g_windowMgr.privateAirplaneWnd = window; if (g_windowMgr.RunModal(window) == 0xBC) { - g_windowMgr.window_4F258 = nullptr; + g_windowMgr.privateAirplaneWnd = nullptr; } } break; diff --git a/Source/UI/Window/UIWindowMgr.cpp b/Source/UI/Window/UIWindowMgr.cpp index fd7bb044f..c554def95 100644 --- a/Source/UI/Window/UIWindowMgr.cpp +++ b/Source/UI/Window/UIWindowMgr.cpp @@ -333,7 +333,7 @@ void UIWindowMgr::DrawWindows() { for (auto entry = this->rendered.begin(); entry != this->rendered.end(); ++entry) { UIWindow* window = *entry; - if (window->geometry.visible != 0 && (this->window_4F288 == nullptr || window->geometry.id == 359)) { + if (window->geometry.visible != 0 && (this->macroBlackListCheckWnd == nullptr || window->geometry.id == 359)) { g_renderDiagnosticLine = 3783; g_renderDiagnosticFile = g_windowManagerDiagnosticFile; if (window->geometry.id == 189) { @@ -553,89 +553,89 @@ void UIWindowMgr::InitializeWindowPolicy() { // FUNCTION: fn_17227 UIWindow* UIWindowMgr::LookupWindow(int id) { if (g_replayAnimationScaling != 0 && id == 600) { - return this->window_4F16C; + return this->replayMessageBoxWnd; } switch (id) { case WID_LOGINWND: - return this->window_01CC; + return this->loginWnd; case WID_LOGINOTPWND: - return this->window_01D0; + return this->loginOTPWnd; case WID_CHATWND: - return this->window_01C8; + return this->chatWnd; case WID_CHATROOMMAKEWND: - return this->window_0274; + return this->chatRoomMakeWnd; case WID_CHATROOMCHANGEWND: - return this->window_0278; + return this->chatRoomChangeWnd; case WID_CHATROOMWND: - return this->window_027C; + return this->chatRoomWnd; case WID_MESSENGERGROUPWND: - return this->window_02C8; + return this->messengerGroupWnd; case WID_SKILLLISTWND: - return this->window_02C4; + return this->skillListWnd; case WID_GUILDMEMBERMANAGEWND: - return this->window_0324; + return this->guildMemberManageWnd; case WID_GUILDINFOMANAGEWND: - return this->window_0320; + return this->guildInfoManageWnd; case WID_PETINFOWND: - return this->window_038C; + return this->petInfoWnd; case WID_GUILDSKILLWND: - return this->window_032C; + return this->guildSkillWnd; case WID_PROHIBITLISTWND: - return this->window_0388; + return this->prohibitListWnd; case WID_HOMUNINFOWND: - return this->window_03C0; + return this->homunInfoWnd; case WID_SKILLLISTWND_SKILLTAB_0: - return this->window_03C4; + return this->homunculusSkillWnd; case WID_MERINFOWND: - return this->window_03C8; + return this->mercenaryInfoWnd; case WID_SKILLLISTWND_SKILLTAB_1: - return this->window_03CC; + return this->mercenarySkillWnd; case WID_ITEMSTOREWND: - return this->window_0288; + return this->itemStoreWnd; case WID_COLLECTIONSYSTEMWND: - return this->window_4F18C; + return this->collectionSystemWnd; case WID_QUESTDISPLAY: - return this->window_0428; + return this->questDisplayWnd; case WID_NAVIGATIONV4WND: - return this->window_4F174; + return this->navigationWnd; case WID_CLANINFOMANAGEWND: - return this->window_0444; + return this->clanInfoManageWnd; case WID_GUILD_STORAGE_LOG: - return this->window_044C; + return this->guildStorageLogWnd; case WID_MINIMAPWND: - return this->window_4F1CC; + return this->miniMapWnd; case WID_NEWSELECTCHARWND: - return this->window_03D4; + return this->newSelectCharWnd; case WID_BANK_NEWWND: - return this->window_0448; + return this->bankNewWnd; case WID_EDITCTRLWND: - return this->window_4F1D0; + return this->editCtrlWnd; case WID_CAPTCHAREGISTERWND: - return this->window_4F1E8; + return this->captchaRegisterWnd; case WID_MACRODETECTORWND: - return this->window_4F1EC; + return this->macroDetectorWnd; case WID_MACROREPORTERWND: - return this->window_4F1F0; + return this->macroReporterWnd; case WID_MACROUSERINFOWND: - return this->window_4F1F4; + return this->macroUserInfoWnd; case WID_CAPTCHAPREVIEWWND: - return this->window_4F1F8; + return this->captchaPreviewWnd; case WID_MINIPARTYWND: if (!this->snapExcluded.empty()) { return this->snapExcluded.front(); } [[fallthrough]]; case WID_CASHSHOP_WND: - return this->window_4F254; + return this->cashShopWnd; case WID_TIPBOXWND: - return this->window_0468; + return this->tipboxWnd; case WID_RPIMAGEWND2: - return this->window_4F25C; + return this->rpImageWnd2; case WID_MACROBLACKLISTCHECKWND: - return this->window_4F288; + return this->macroBlackListCheckWnd; case WID_WAITDBSAVEWND: - return this->window_4F2AC; + return this->waitDBSaveWnd; default: { const auto found = this->windows.find(id); return found != this->windows.end() ? found->second : nullptr; @@ -648,10 +648,10 @@ UIWindow* UIWindowMgr::LookupWindow(int id) { // FUNCTION: fn_17209 void UIWindowMgr::ResetWindows() { this->windows.clear(); - this->window_01B8 = nullptr; + this->previousMouseWnd = nullptr; this->inputWindow = nullptr; this->hoverWindow = nullptr; - this->window_01C8 = nullptr; + this->chatWnd = nullptr; this->loadingWnd = 0; this->basicInfoWnd = 0; this->itemWnd = 0; @@ -659,7 +659,7 @@ void UIWindowMgr::ResetWindows() { this->nCashWnd = 0; this->statusWnd = 0; this->minimapZoomWnd = 0; - this->window_01EC = nullptr; + this->itemDropCntWnd = nullptr; this->sayDialogWnd = 0; this->sayDialogOverlayWnd = 0; this->choose3Wnd = 0; @@ -673,7 +673,7 @@ void UIWindowMgr::ResetWindows() { this->itemCollectionComparisonWnd = 0; this->combinedCardItemCollectionWnd = 0; this->itemParamChangeDisplayWnd = 0; - this->window_0230 = nullptr; + this->skillDescribeWnd = nullptr; this->quitWnd = 0; this->restartWnd = 0; this->cardItemIllustWnd = 0; @@ -689,12 +689,12 @@ void UIWindowMgr::ResetWindows() { this->chooseSellBuyWnd = 0; this->paraItemShopWnd = 0; this->paraItemPurchaseWnd = 0; - this->window_0274 = nullptr; - this->window_0278 = nullptr; - this->window_027C = nullptr; + this->chatRoomMakeWnd = nullptr; + this->chatRoomChangeWnd = nullptr; + this->chatRoomWnd = nullptr; this->passwordWnd = 0; this->exchangeAcceptWnd = 0; - this->window_0288 = nullptr; + this->itemStoreWnd = nullptr; this->itemStoreTabWnds[0] = 0; this->itemStoreTabWnds[1] = 0; this->itemStoreTabWnds[2] = 0; @@ -704,8 +704,8 @@ void UIWindowMgr::ResetWindows() { this->itemStoreTabWnds[6] = 0; this->itemStoreLastTabWnd = 0; this->itemStoreFindWnd = 0; - this->window_02C4 = nullptr; - this->window_02C8 = nullptr; + this->skillListWnd = nullptr; + this->messengerGroupWnd = nullptr; this->joinPartyAcceptWnd = 0; this->coupleAcceptWnd = 0; this->starPlaceAcceptWnd = 0; @@ -715,7 +715,7 @@ void UIWindowMgr::ResetWindows() { this->babyAcceptWnd2 = 0; this->joinGuildAcceptWnd = 0; this->allyGuildAcceptWnd = 0; - this->window_01E8 = nullptr; + this->shortCutWnd = nullptr; this->tipOfTheDayWnd = 0; this->merchantItemWnd = 0; this->merchantMirrorItemWnd = 0; @@ -723,18 +723,18 @@ void UIWindowMgr::ResetWindows() { this->merchantItemShopWnd = 0; this->merchantItemPurchaseWnd = 0; this->merchantItemMyShopWnd = 0; - this->window_03A4 = 0; + this->candidateWnd = 0; this->compositionWnd = 0; - this->window_03AC = 0; + this->keyStrokeWnd = 0; this->partySettingWnd = 0; this->skillNameChangeWnd = 0; this->npcEditDialogWnd = 0; this->npcTextEditDialogWnd = 0; this->notifyItemObtainWnd = 0; - this->window_0320 = nullptr; - this->window_0324 = nullptr; + this->guildInfoManageWnd = nullptr; + this->guildMemberManageWnd = nullptr; this->guildPositionManageWnd = 0; - this->window_032C = nullptr; + this->guildSkillWnd = nullptr; this->guildBanishedMemberWnd = 0; this->guildNoticeWnd = 0; this->guildTotalInfoWnd = 0; @@ -752,7 +752,7 @@ void UIWindowMgr::ResetWindows() { this->multiIllustWnds[7] = 0; this->multiIllustWnds[8] = 0; this->multiIllustWnds[9] = 0; - this->window_038C = nullptr; + this->petInfoWnd = nullptr; this->petEggListWnd = 0; this->petTamingDeceiveWnd = 0; this->itemRepairWnd = 0; @@ -762,15 +762,15 @@ void UIWindowMgr::ResetWindows() { this->cashEmotionListWnd = 0; this->bookWnd = 0; this->joinFriendAcceptWnd = 0; - this->window_03C0 = nullptr; - this->window_03C4 = nullptr; - this->window_03C8 = nullptr; - this->window_03CC = nullptr; + this->homunInfoWnd = nullptr; + this->homunculusSkillWnd = nullptr; + this->mercenaryInfoWnd = nullptr; + this->mercenarySkillWnd = nullptr; this->autoMessageWnd = 0; this->secondPasswordInputWnd = 0; this->secondPasswordEditWnd = 0; - this->window_03D4 = nullptr; - this->window_03D8 = nullptr; + this->newSelectCharWnd = nullptr; + this->selCharForUServerWnd = nullptr; this->rebirthWnd = 0; this->subChatHistoryWnd = 0; this->secondSubChatHistoryWnd = 0; @@ -793,20 +793,20 @@ void UIWindowMgr::ResetWindows() { this->jobListWnd = 0; this->seekPartyListWnd = 0; this->partyBookingHelpWnd = 0; - this->window_4F18C = nullptr; - this->window_4F164 = nullptr; + this->collectionSystemWnd = nullptr; + this->replayRecordControlWnd = nullptr; this->unknown_01D8 = 0; - this->window_0428 = nullptr; - this->window_4F174 = nullptr; + this->questDisplayWnd = nullptr; + this->navigationWnd = nullptr; this->unknown_0440 = 0; - this->window_0444 = nullptr; - this->window_0448 = nullptr; + this->clanInfoManageWnd = nullptr; + this->bankNewWnd = nullptr; this->messageBoxes.clear(); - this->window_044C = nullptr; + this->guildStorageLogWnd = nullptr; this->weaponRefineWnd = 0; this->makeTargetProcessWnd = 0; this->makeTargetListWnd = 0; - this->window_4F170 = nullptr; + this->secondCostumeWnd = nullptr; this->openMailBoxWnd = 0; this->rodexInboxWnd = 0; this->rodexComposeWnd = 0; @@ -817,58 +817,58 @@ void UIWindowMgr::ResetWindows() { this->openRoulletteWnd = 0; this->roulletteWnd = 0; this->hiddenWindows.clear(); - const bool hadWindow0270 = this->window_0270 != nullptr; + const bool hadNpcMarketWnd = this->paraResultWnd != nullptr; this->windowVisibilityState = 0; - this->window_4F1CC = nullptr; - this->window_4F1D0 = nullptr; - this->window_4F1D4 = nullptr; - this->window_4F1E8 = nullptr; - this->window_4F1F0 = nullptr; - this->window_4F1F4 = nullptr; - this->window_4F1FC = nullptr; - this->window_4F250 = nullptr; - this->window_4F254 = nullptr; - this->window_4F258 = nullptr; - this->window_01CC = nullptr; - this->window_0468 = nullptr; - this->window_4F25C = nullptr; + this->miniMapWnd = nullptr; + this->editCtrlWnd = nullptr; + this->keyboardCommandRootWnd = nullptr; + this->captchaRegisterWnd = nullptr; + this->macroReporterWnd = nullptr; + this->macroUserInfoWnd = nullptr; + this->macroDetectorEditWnd = nullptr; + this->transientWnd = nullptr; + this->cashShopWnd = nullptr; + this->privateAirplaneWnd = nullptr; + this->loginWnd = nullptr; + this->tipboxWnd = nullptr; + this->rpImageWnd2 = nullptr; this->partyInvitationToWnd = 0; - this->window_4F260 = nullptr; - this->window_4F264 = nullptr; - this->window_4F268 = nullptr; - this->window_4F26C = nullptr; - this->window_4F270 = nullptr; - this->window_4F274 = nullptr; - this->window_4F278 = nullptr; - this->window_4F27C = nullptr; + this->barterMarketWnd = nullptr; + this->barterItemPurchaseWnd = nullptr; + this->expandedBarterMarketWnd = nullptr; + this->expandedBarterItemPurchaseWnd = nullptr; + this->registerPartyWnd = nullptr; + this->advenPartyBoardWnd = nullptr; + this->requestJoinPartyWnd = nullptr; + this->applyForPartyWnd = nullptr; this->purchaseMirrorItemWnd = 0; this->createGuildAlternateWnd = 0; - this->window_01D0 = nullptr; + this->loginOTPWnd = nullptr; this->combinedCardItemCollectionComparisonWnd = 0; - if (hadWindow0270) { + if (hadNpcMarketWnd) { if (CMode* mode = g_modeMgr.GetGameMode()) { mode->SendMsg(MM_NPC_MARKET_CLOSE, 0, 0, 0, 0); } } - const bool hadWindow276 = this->window_4F1E4 != nullptr; - this->window_0270 = nullptr; + const bool hadWindow276 = this->roundBoxTooltipWnd != nullptr; + this->paraResultWnd = nullptr; this->makeTargetResultWnd = 0; - this->window_0388 = nullptr; + this->prohibitListWnd = nullptr; this->spellListWnd = 0; if (hadWindow276) { this->visible_276 = 0; - this->window_4F1E4 = nullptr; + this->roundBoxTooltipWnd = nullptr; } - this->window_4F1F8 = nullptr; - this->window_0A30 = nullptr; - this->window_4F2AC = nullptr; + this->captchaPreviewWnd = nullptr; + this->dropDownBoxWnd = nullptr; + this->waitDBSaveWnd = nullptr; } // OFFSET: 0x00A88490 // FUNCTION: fn_17086 UIWindowMgr::UIWindowMgr() - : activeWindowId(0), retainedPersistentWindow(false), window_03DC(nullptr), previousMouseX(-1), previousMouseY(-1), basicInfoExpanded(true), - window_0A30(nullptr), macroReporterVisible(false), unknown_4F211(false), window_4F2AC(nullptr) { + : activeWindowId(0), retainedPersistentWindow(false), changeNameWnd(nullptr), previousMouseX(-1), previousMouseY(-1), basicInfoExpanded(true), + dropDownBoxWnd(nullptr), macroReporterVisible(false), unknown_4F211(false), waitDBSaveWnd(nullptr) { this->ResetWindows(); this->backgroundSurface = nullptr; this->screenWidth = 0; @@ -910,18 +910,18 @@ UIWindowMgr::UIWindowMgr() this->inputSuggestionsEnabled = 0; this->chatModeChanged = 1; this->windowVisibilityState = 0; - this->window_4F168 = nullptr; - this->window_4F164 = nullptr; - this->window_4F16C = nullptr; + this->replayControlWnd = nullptr; + this->replayRecordControlWnd = nullptr; + this->replayMessageBoxWnd = nullptr; this->InitializeWindowPolicy(); - this->window_4F174 = nullptr; + this->navigationWnd = nullptr; this->activeBrowser = nullptr; this->specialBrowser = nullptr; this->currentHitUid = 0; this->previousHitUid = 0; this->visible_276 = 0; - this->window_4F1EC = nullptr; - this->window_4F250 = nullptr; + this->macroDetectorWnd = nullptr; + this->transientWnd = nullptr; this->itemStoreWindowCount = 0; this->miniPartyWidth = 151; this->miniPartyHeight = 37; @@ -940,9 +940,9 @@ void UIWindowMgr::Shutdown() { this->activeWindowId = 185; } - if (this->window_0A30 && this->window_0A30->geometry.visible) { - static_cast(this->window_0A30)->Detach(); - this->window_0A30->Show(0); + if (this->dropDownBoxWnd && this->dropDownBoxWnd->geometry.visible) { + static_cast(this->dropDownBoxWnd)->Detach(); + this->dropDownBoxWnd->Show(0); } for (UIWindow*& window : this->rendered) { @@ -993,14 +993,14 @@ void UIWindowMgr::ClearMapWindows() { } this->SaveVisibleWindowIds(); - if (!this->window_01C8) { + if (!this->chatWnd) { this->Shutdown(); return; } - if (this->window_0A30 && this->window_0A30->geometry.visible) { - static_cast(this->window_0A30)->Detach(); - this->window_0A30->Show(0); + if (this->dropDownBoxWnd && this->dropDownBoxWnd->geometry.visible) { + static_cast(this->dropDownBoxWnd)->Detach(); + this->dropDownBoxWnd->Show(0); } for (auto entry = this->rendered.begin(); entry != this->rendered.end();) { @@ -1016,7 +1016,7 @@ void UIWindowMgr::ClearMapWindows() { } UIWindow* window = *entry; - if (this->window_01C8 == window || window == this->window_4F1EC || window->geometry.id == 67) { + if (this->chatWnd == window || window == this->macroDetectorWnd || window->geometry.id == 67) { ++entry; continue; } @@ -1051,7 +1051,7 @@ void UIWindowMgr::ClearMapWindows() { unregistered = false; } } - if (!unregistered || this->window_01C8 == *entry) { + if (!unregistered || this->chatWnd == *entry) { ++entry; continue; } @@ -1060,36 +1060,36 @@ void UIWindowMgr::ClearMapWindows() { } for (auto entry = this->snapRectangles.begin(); entry != this->snapRectangles.end();) { - if (this->window_01C8 == entry->first) { + if (this->chatWnd == entry->first) { ++entry; } else { entry = this->snapRectangles.erase(entry); } } - std::uint32_t saved03E4 = 0; + std::uint32_t savedSubChatHistoryWnd = 0; if (this->subChatHistoryWnd) { - saved03E4 = this->subChatHistoryWnd; + savedSubChatHistoryWnd = this->subChatHistoryWnd; } - std::uint32_t saved03E8 = 0; + std::uint32_t savedSecondSubChatHistoryWnd = 0; if (this->secondSubChatHistoryWnd) { - saved03E8 = this->secondSubChatHistoryWnd; + savedSecondSubChatHistoryWnd = this->secondSubChatHistoryWnd; } - std::uint32_t saved03F0 = 0; + std::uint32_t savedSubChatMiniWnd = 0; if (this->subChatMiniWnd) { - saved03F0 = this->subChatMiniWnd; + savedSubChatMiniWnd = this->subChatMiniWnd; } - UIWindow* saved01C8 = nullptr; - if (this->window_01C8) { - saved01C8 = this->window_01C8; + UIWindow* savedChatWnd = nullptr; + if (this->chatWnd) { + savedChatWnd = this->chatWnd; } std::map savedWindows(this->retainedWindows); this->ResetWindows(); - this->window_01C8 = saved01C8; - this->subChatHistoryWnd = saved03E4; - this->subChatMiniWnd = saved03F0; - this->secondSubChatHistoryWnd = saved03E8; + this->chatWnd = savedChatWnd; + this->subChatHistoryWnd = savedSubChatHistoryWnd; + this->subChatMiniWnd = savedSubChatMiniWnd; + this->secondSubChatHistoryWnd = savedSecondSubChatHistoryWnd; this->retainedWindows = savedWindows; for (UIWindow*& window : this->snapExcluded) { @@ -1124,11 +1124,11 @@ UIWindowMgr::~UIWindowMgr() { // OFFSET: 0x00A8B0A0 // FUNCTION: fn_17121 void UIWindowMgr::SelectWhisperName(const char* name) { - if (!name || !this->window_01C8) { + if (!name || !this->chatWnd) { return; } - char* list = *reinterpret_cast(reinterpret_cast(this->window_01C8) + 0xC0); + char* list = *reinterpret_cast(reinterpret_cast(this->chatWnd) + 0xC0); std::vector& names = *reinterpret_cast*>(list + 0x11C); int index = 0; bool found = false; @@ -1144,9 +1144,9 @@ void UIWindowMgr::SelectWhisperName(const char* name) { names.push_back(std::string(name)); } - UIWindow* field = *reinterpret_cast(reinterpret_cast(this->window_01C8) + 0xC0); + UIWindow* field = *reinterpret_cast(reinterpret_cast(this->chatWnd) + 0xC0); *reinterpret_cast(reinterpret_cast(field) + 0x128) = index; - this->window_01C8->SendMsg(field, UM_COMBOBOX_SELECTED, index, 0, 0, 0); + this->chatWnd->SendMsg(field, UM_COMBOBOX_SELECTED, index, 0, 0, 0); } // GLOBAL: gl_25163 @@ -1194,7 +1194,7 @@ int UIWindowMgr::ShowWhisperFrom(const char* name, const char* text, int color, UIWindow* window = entry->second; window->SendMsg(nullptr, UM_ADDCHAT, reinterpret_cast(text), color, 2, 0); - if ((this->modal == nullptr || this->window_4F174 == window) && !this->LookupWindow(WID_NEWMAKECHARWND) && !this->LookupWindow(WID_MAKECHARWND) && !this->LookupWindow(WID_SECONDPASSWORDINPUTWND) && + if ((this->modal == nullptr || this->navigationWnd == window) && !this->LookupWindow(WID_NEWMAKECHARWND) && !this->LookupWindow(WID_MAKECHARWND) && !this->LookupWindow(WID_SECONDPASSWORDINPUTWND) && !this->LookupWindow(WID_SECONDPASSWORDEDITWND)) { int companion = -1; if (window->geometry.id == 12) { @@ -1224,11 +1224,11 @@ int UIWindowMgr::ShowWhisperFrom(const char* name, const char* text, int color, // OFFSET: 0x00A8B240 // FUNCTION: fn_17122 void UIWindowMgr::AddWhisperName(const char* name) { - if (!this->window_01C8) { + if (!this->chatWnd) { return; } - char* list = *reinterpret_cast(reinterpret_cast(this->window_01C8) + 0xC0); + char* list = *reinterpret_cast(reinterpret_cast(this->chatWnd) + 0xC0); std::vector& names = *reinterpret_cast*>(list + 0x11C); for (const std::string& entry : names) { if (entry == name) { @@ -1238,7 +1238,7 @@ void UIWindowMgr::AddWhisperName(const char* name) { names.push_back(std::string(name)); const unsigned count = static_cast(names.size()); - unsigned& current = *reinterpret_cast(*reinterpret_cast(reinterpret_cast(this->window_01C8) + 0xC0) + 0x128); + unsigned& current = *reinterpret_cast(*reinterpret_cast(reinterpret_cast(this->chatWnd) + 0xC0) + 0x128); if (count - 1 <= current) { current = count; } @@ -1277,14 +1277,14 @@ void UIWindowMgr::NotifyMode() { // OFFSET: 0x00A8AD60 // FUNCTION: fn_17116 void UIWindowMgr::ShowTransient(UIWindow* window) { - if (this->window_4F250) { - this->Schedule(this->window_4F250); + if (this->transientWnd) { + this->Schedule(this->transientWnd); } - this->window_4F250 = window; + this->transientWnd = window; window->geometry.targetAlpha = 128; window->geometry.alphaStart = timeGetTime(); - window = this->window_4F250; + window = this->transientWnd; this->rendered.push_back(window); } @@ -1429,7 +1429,7 @@ static_assert(sizeof(ReplaySettingHeader) == 6); // OFFSET: 0x00AA80A0 // FUNCTION: fn_17240 -void UIWindowMgr::CenterSurface0478() { +void UIWindowMgr::DrawCenteredBackground() { this->framesInvalidated = 0; if (this->backgroundSurface) { int x = static_cast(GetRenderSystemHolder()->Width() - this->screenWidth) / 2; @@ -1565,7 +1565,7 @@ bool UIWindowMgr::ProcessKeyDown(int key, int keyData, int pressed) { } else if (!this->inputSuggestionsEnabled) { UIWindow* hover = this->hoverWindow; UIWindow* parent = hover ? hover->parent : nullptr; - if (!hover || !parent || parent == this->window_01C8 || !parent->geometry.visible) { + if (!hover || !parent || parent == this->chatWnd || !parent->geometry.visible) { this->imeInputActive = 0; } } @@ -1578,7 +1578,7 @@ bool UIWindowMgr::ProcessKeyDown(int key, int keyData, int pressed) { bool hoverOnButton = false; if (this->inputSuggestionsEnabled) { - const UIWindow* window = this->window_01C8; + const UIWindow* window = this->chatWnd; if (window) { UIWindow* const* buttons = reinterpret_cast(reinterpret_cast(window) + 0xBC); if (this->hoverWindow == buttons[0] || this->hoverWindow == buttons[1]) { @@ -1590,7 +1590,7 @@ bool UIWindowMgr::ProcessKeyDown(int key, int keyData, int pressed) { UIWindow* hover = this->hoverWindow; if (hover) { UIWindow* parent = hover->parent; - if (parent && parent != this->window_01C8 && parent->geometry.visible) { + if (parent && parent != this->chatWnd && parent->geometry.visible) { hoverOnButton = true; } } @@ -1885,18 +1885,18 @@ int UIWindowMgr::SendNotice(int selector, std::intptr_t a, std::intptr_t b, std: break; } case UIM_SAVE_CHAT_TO_FILE_FROM_CHATROOM: - if (this->window_027C != nullptr) { - static_cast(this->window_027C)->SaveChatLog(); + if (this->chatRoomWnd != nullptr) { + static_cast(this->chatRoomWnd)->SaveChatLog(); } break; case UIM_SAVE_CHAT_TO_FILE: - if (this->window_01C8 != nullptr) { - static_cast(this->window_01C8)->SaveChatLogs(); + if (this->chatWnd != nullptr) { + static_cast(this->chatWnd)->SaveChatLogs(); } break; case UIM_PUSH_INTO_CHATROOM: - if (this->window_027C != nullptr) { - this->window_027C->SendMsg(nullptr, UM_ADDCHAT, a, b, 0, 0); + if (this->chatRoomWnd != nullptr) { + this->chatRoomWnd->SendMsg(nullptr, UM_ADDCHAT, a, b, 0, 0); } break; case UIM_PUSHINTOCHATHISTORY: @@ -1905,7 +1905,7 @@ int UIWindowMgr::SendNotice(int selector, std::intptr_t a, std::intptr_t b, std: break; } std::uint32_t color = static_cast(b); - if (this->window_01C8 == nullptr) { + if (this->chatWnd == nullptr) { if (color == 0) { color = 0xFFFFFF; } @@ -1921,7 +1921,7 @@ int UIWindowMgr::SendNotice(int selector, std::intptr_t a, std::intptr_t b, std: color = 0xFFFFFF; } if (std::strcmp(text, "No Msg") != 0 && std::strcmp(text, "NO MSG") != 0) { - this->window_01C8->SendMsg(nullptr, selector == UIM_PUSHINTOCHATHISTORY2 ? UM_ADDCHAT2 : UM_ADDCHAT, a, color, c, d); + this->chatWnd->SendMsg(nullptr, selector == UIM_PUSHINTOCHATHISTORY2 ? UM_ADDCHAT2 : UM_ADDCHAT, a, color, c, d); } } break; @@ -1933,13 +1933,13 @@ int UIWindowMgr::SendNotice(int selector, std::intptr_t a, std::intptr_t b, std: break; case UIM_OPENCHATWND: this->ShowWindowById(WID_CHATWND, 1); - if (this->window_01C8 != nullptr) { - this->window_01C8->SendMsg(nullptr, UM_OPENCHATWND, 0, 0, 0, 0); + if (this->chatWnd != nullptr) { + this->chatWnd->SendMsg(nullptr, UM_OPENCHATWND, 0, 0, 0, 0); } break; case UIM_CHANGECHATWNDSTATUS: - if (this->window_01C8 != nullptr) { - this->window_01C8->SendMsg(nullptr, UM_CHANGESTATUS, a, 0, 0, 0); + if (this->chatWnd != nullptr) { + this->chatWnd->SendMsg(nullptr, UM_CHANGESTATUS, a, 0, 0, 0); } break; case UIM_IME_OPENCANDIDATE: @@ -1956,7 +1956,7 @@ int UIWindowMgr::SendNotice(int selector, std::intptr_t a, std::intptr_t b, std: // OFFSET: 0x00AA8F50 // FUNCTION: fn_17252 __declspec(noinline) void UIWindowMgr::BroadcastMessage21() { - UIWindow* window = this->window_03DC; + UIWindow* window = this->changeNameWnd; if (window || (window = this->bookWnd) != nullptr) { window->SendMsg(nullptr, UM_RIGHTPUSH, 0, 0, 0, 0); return; @@ -1972,7 +1972,7 @@ __declspec(noinline) void UIWindowMgr::BroadcastMessage21() { // OFFSET: 0x00AB1120 // FUNCTION: fn_17332 __declspec(noinline) bool UIWindowMgr::IsHoverOnWindow01C8Button() { - const UIWindow* window = this->window_01C8; + const UIWindow* window = this->chatWnd; if (window) { UIWindow* const* buttons = reinterpret_cast(reinterpret_cast(window) + 0xBC); if (this->hoverWindow == buttons[0] || this->hoverWindow == buttons[1]) { @@ -2157,7 +2157,7 @@ void __fastcall RefreshPartyWindows(CSession* session); // OFFSET: 0x00A8C4B0 // FUNCTION: fn_17132 void UIWindowMgr::CloseMiniPartyWindow(int id) { - g_session.EraseRecord0734(id); + g_session.EraseMiniPartyRecord(id); this->closedMiniPartyIds.push_back(id); RefreshPartyWindows(&g_session); } @@ -2221,9 +2221,9 @@ bool UIWindowMgr::ProcessEnterKey() { } if (window == nullptr) { if (this->hoverWindow != nullptr) { - if (this->window_01C8 != nullptr && this->hoverWindow->parent == this->window_01C8) { - if (static_cast(this->window_01C8)->SuggestionsVisible()) { - UIWindow* child = static_cast(this->window_01C8)->m_suggestions; + if (this->chatWnd != nullptr && this->hoverWindow->parent == this->chatWnd) { + if (static_cast(this->chatWnd)->SuggestionsVisible()) { + UIWindow* child = static_cast(this->chatWnd)->m_suggestions; if (child != nullptr) { child->SendMsg(nullptr, UM_CASH_EMOTION_KEY, 0xD, 0, 0, 0); return true; @@ -2242,12 +2242,12 @@ bool UIWindowMgr::ProcessEnterKey() { this->hoverWindow->SendMsg(nullptr, UM_DEFPUSH, 0, 0, 0, 0); return handled; } - window = this->window_03D4; + window = this->newSelectCharWnd; if (window == nullptr) { - if (this->window_01C8 != nullptr && g_windowMgr.inputSuggestionsEnabled == 1) { + if (this->chatWnd != nullptr && g_windowMgr.inputSuggestionsEnabled == 1) { handled = false; - this->window_01C8->RecordEditTexts(); - window = this->window_01C8; + this->chatWnd->RecordEditTexts(); + window = this->chatWnd; } else { for (auto it = this->rendered.begin(); it != this->rendered.end(); ++it) { if (!(*it)->IsFrameWnd()) { @@ -2317,7 +2317,7 @@ void CloseWindow10005B() { // OFFSET: 0x00A05280 // FUNCTION: fn_45510 -void CloseWindow10006() { +void CloseEnchantWindow() { g_windowMgr.CloseWindow(WID_ENCHANTUI); } @@ -2490,18 +2490,18 @@ bool UIWindowMgr::ProcessHotkeyAction(int action, int pressed) { if ((this->IsHoverOnWindow01C8Button() || (this->windowHistory.begin() != this->windowHistory.end() && *this->windowHistory.begin() == 1)) && this->inputSuggestionsEnabled != 0 && this->chatModeChanged != 0) { - UINewChatWnd* suggestions = static_cast(this->window_01C8); + UINewChatWnd* suggestions = static_cast(this->chatWnd); if (suggestions && suggestions->SuggestionsVisible()) { suggestions->ShowSuggestions(0); return false; } this->inputSuggestionsEnabled = 0; - static_cast(this->window_01C8)->ApplyInputLayout(); + static_cast(this->chatWnd)->ApplyInputLayout(); return false; } - if (this->window_01C8 && this->hoverWindow) { + if (this->chatWnd && this->hoverWindow) { UIWindow* parent = this->hoverWindow->parent; if (parent && this->hoverWindow->geometry.x != -100) { const auto isRetained = [this](const UIWindow* window) { @@ -2512,7 +2512,7 @@ bool UIWindowMgr::ProcessHotkeyAction(int action, int pressed) { } return false; }; - if (parent == static_cast(this->window_01C8)->m_tabControl || isRetained(parent)) { + if (parent == static_cast(this->chatWnd)->m_tabControl || isRetained(parent)) { parent->SendMsg(this->hoverWindow, UM_DEFPUSH, 1, 0, 0, 0); return false; } @@ -2657,15 +2657,15 @@ bool UIWindowMgr::ProcessHotkeyAction(int action, int pressed) { break; case VK_PRIOR: - if (this->window_4F1D4) { - this->window_4F1D4->BroadcastMsg3(); + if (this->keyboardCommandRootWnd) { + this->keyboardCommandRootWnd->BroadcastMsg3(); return false; } break; case VK_NEXT: - if (this->window_4F1D4) { - this->window_4F1D4->BroadcastMsg4(); + if (this->keyboardCommandRootWnd) { + this->keyboardCommandRootWnd->BroadcastMsg4(); return false; } break; @@ -2695,22 +2695,22 @@ bool UIWindowMgr::ProcessHotkeyAction(int action, int pressed) { break; case 70: - if (HIBYTE(GetAsyncKeyState(VK_CONTROL)) && this->window_4F1D4) { - this->window_4F1D4->SendMsg(nullptr, 177, 0, 0, 0, 0); + if (HIBYTE(GetAsyncKeyState(VK_CONTROL)) && this->keyboardCommandRootWnd) { + this->keyboardCommandRootWnd->SendMsg(nullptr, 177, 0, 0, 0, 0); return false; } break; case VK_HOME: - if (this->window_4F1D4) { - this->window_4F1D4->SendMsg(nullptr, 179, 0, 0, 0, 0); + if (this->keyboardCommandRootWnd) { + this->keyboardCommandRootWnd->SendMsg(nullptr, 179, 0, 0, 0, 0); return false; } break; case VK_END: - if (this->window_4F1D4) { - this->window_4F1D4->SendMsg(nullptr, UM_ENDPUSH, 0, 0, 0, 0); + if (this->keyboardCommandRootWnd) { + this->keyboardCommandRootWnd->SendMsg(nullptr, UM_ENDPUSH, 0, 0, 0, 0); } break; } @@ -2739,8 +2739,8 @@ bool UIWindowMgr::CloseWindow(int id) { return false; } - if (this->LookupWindow(id) == this->window_4F1D4) { - this->window_4F1D4 = nullptr; + if (this->LookupWindow(id) == this->keyboardCommandRootWnd) { + this->keyboardCommandRootWnd = nullptr; } if (Replay::Instance().state == 2 && Replay::Instance().header.options.Get(ReplayRecordOption::Item) && @@ -2762,9 +2762,9 @@ bool UIWindowMgr::CloseWindow(int id) { switch (id) { case WID_CHATWND: this->CloseWindow(WID_COMBOBOXWND); - if (this->window_01C8) { - this->Schedule(this->window_01C8); - this->window_01C8 = nullptr; + if (this->chatWnd) { + this->Schedule(this->chatWnd); + this->chatWnd = nullptr; closed = true; this->chatWndVisible = 0; } @@ -2793,9 +2793,9 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_QUESTDISPLAY: - if (this->window_0428) { - this->Schedule(this->window_0428); - this->window_0428 = nullptr; + if (this->questDisplayWnd) { + this->Schedule(this->questDisplayWnd); + this->questDisplayWnd = nullptr; closed = true; } break; @@ -2826,9 +2826,9 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_ITEMDROPCNTWND: - if (this->window_01EC) { - this->Schedule(this->window_01EC); - this->window_01EC = nullptr; + if (this->itemDropCntWnd) { + this->Schedule(this->itemDropCntWnd); + this->itemDropCntWnd = nullptr; closed = true; } break; @@ -2847,9 +2847,9 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_CHATROOMWND: - if (this->window_027C) { - this->Schedule(this->window_027C); - this->window_027C = nullptr; + if (this->chatRoomWnd) { + this->Schedule(this->chatRoomWnd); + this->chatRoomWnd = nullptr; closed = true; } break; @@ -2903,16 +2903,16 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_CHATROOMCHANGEWND: - if (this->window_0278) { - this->Schedule(this->window_0278); - this->window_0278 = nullptr; + if (this->chatRoomChangeWnd) { + this->Schedule(this->chatRoomChangeWnd); + this->chatRoomChangeWnd = nullptr; closed = true; } break; case WID_CHATROOMMAKEWND: - if (this->window_0274) { - this->Schedule(this->window_0274); - this->window_0274 = nullptr; + if (this->chatRoomMakeWnd) { + this->Schedule(this->chatRoomMakeWnd); + this->chatRoomMakeWnd = nullptr; closed = true; } break; @@ -2998,49 +2998,49 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_PARARESULTWND: - if (this->window_0270) { + if (this->paraResultWnd) { this->NotifyMode(); - this->Schedule(this->window_0270); - this->window_0270 = nullptr; + this->Schedule(this->paraResultWnd); + this->paraResultWnd = nullptr; closed = true; } break; case WID_BARTERMARKETWND: - if (this->window_4F260) { - this->Schedule(this->window_4F260); - this->window_4F260 = nullptr; + if (this->barterMarketWnd) { + this->Schedule(this->barterMarketWnd); + this->barterMarketWnd = nullptr; closed = true; } break; case WID_BARTERITEMPURCHASEWND: - if (this->window_4F264) { + if (this->barterItemPurchaseWnd) { if (g_modeMgr.gameMode) { g_modeMgr.gameMode->SendMsg(MM_NPC_BARTER_MARKET_CLOSE, 0, 0, 0, 0); } - this->Schedule(this->window_4F264); - this->window_4F264 = nullptr; + this->Schedule(this->barterItemPurchaseWnd); + this->barterItemPurchaseWnd = nullptr; closed = true; } break; case WID_EXPANDEDBARTERMARKETWND: - if (this->window_4F268) { - this->Schedule(this->window_4F268); + if (this->expandedBarterMarketWnd) { + this->Schedule(this->expandedBarterMarketWnd); closed = true; - this->window_4F268 = nullptr; - if (this->window_4F26C) { + this->expandedBarterMarketWnd = nullptr; + if (this->expandedBarterItemPurchaseWnd) { this->CloseWindow(WID_EXPANDEDBARTERITEMPURCHASEWND); } } break; case WID_EXPANDEDBARTERITEMPURCHASEWND: - if (this->window_4F26C) { + if (this->expandedBarterItemPurchaseWnd) { if (g_modeMgr.gameMode) { g_modeMgr.gameMode->SendMsg(MM_NPC_EXPANDED_BARTER_MARKET_CLOSE, 0, 0, 0, 0); } - this->Schedule(this->window_4F26C); + this->Schedule(this->expandedBarterItemPurchaseWnd); closed = true; - this->window_4F26C = nullptr; - if (this->window_4F268) { + this->expandedBarterItemPurchaseWnd = nullptr; + if (this->expandedBarterMarketWnd) { this->CloseWindow(WID_EXPANDEDBARTERMARKETWND); } } @@ -3102,9 +3102,9 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_SKILLDESCRIBEWND: - if (this->window_0230) { - this->Schedule(this->window_0230); - this->window_0230 = nullptr; + if (this->skillDescribeWnd) { + this->Schedule(this->skillDescribeWnd); + this->skillDescribeWnd = nullptr; closed = true; this->skillDescriptionVisible = 0; } @@ -3162,31 +3162,31 @@ bool UIWindowMgr::CloseWindow(int id) { this->CloseWindow(WID_SKILLDELAYINFO); } this->CloseWindow(WID_SKILLDESCRIBEWND); - if (this->window_02C4) { - this->Schedule(this->window_02C4); - this->window_02C4 = nullptr; + if (this->skillListWnd) { + this->Schedule(this->skillListWnd); + this->skillListWnd = nullptr; closed = true; this->skillListWndVisible = 0; } break; case WID_ITEMSTOREWND: - if (this->window_0288) { - this->Schedule(this->window_0288); - this->window_0288 = nullptr; + if (this->itemStoreWnd) { + this->Schedule(this->itemStoreWnd); + this->itemStoreWnd = nullptr; closed = true; } break; case WID_MESSENGERWND: - if (this->window_02C8) { - this->window_02C8->StoreInfo(); + if (this->messengerGroupWnd) { + this->messengerGroupWnd->StoreInfo(); } closed = this->CloseWindow(WID_MESSENGERGROUPWND); g_windowMgr.DismissTransient(); break; case WID_MESSENGERGROUPWND: - if (this->window_02C8) { - this->Schedule(this->window_02C8); - this->window_02C8 = nullptr; + if (this->messengerGroupWnd) { + this->Schedule(this->messengerGroupWnd); + this->messengerGroupWnd = nullptr; this->messengerGroupWndVisible = 0; g_windowMgr.CloseWindow(WID_PARTYSETTINGWND_PARTYCOUNT); g_windowMgr.CloseWindow(WID_FRIENDOPTIONWND); @@ -3218,9 +3218,9 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_CANDIDATEWND: - if (this->window_03A4) { - this->Schedule(this->window_03A4); - this->window_03A4 = nullptr; + if (this->candidateWnd) { + this->Schedule(this->candidateWnd); + this->candidateWnd = nullptr; closed = true; } break; @@ -3304,10 +3304,10 @@ bool UIWindowMgr::CloseWindow(int id) { break; } case WID_GUILDMEMBERMANAGEWND: - if (this->window_0324) { - this->window_0324->StoreInfo(); - this->Schedule(this->window_0324); - this->window_0324 = nullptr; + if (this->guildMemberManageWnd) { + this->guildMemberManageWnd->StoreInfo(); + this->Schedule(this->guildMemberManageWnd); + this->guildMemberManageWnd = nullptr; closed = true; } break; @@ -3320,10 +3320,10 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_GUILDSKILLWND: - if (this->window_032C) { - this->window_032C->StoreInfo(); - this->Schedule(this->window_032C); - this->window_032C = nullptr; + if (this->guildSkillWnd) { + this->guildSkillWnd->StoreInfo(); + this->Schedule(this->guildSkillWnd); + this->guildSkillWnd = nullptr; closed = true; } break; @@ -3352,10 +3352,10 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_GUILDINFOMANAGEWND: - if (this->window_0320) { - this->window_0320->StoreInfo(); - this->Schedule(this->window_0320); - this->window_0320 = nullptr; + if (this->guildInfoManageWnd) { + this->guildInfoManageWnd->StoreInfo(); + this->Schedule(this->guildInfoManageWnd); + this->guildInfoManageWnd = nullptr; closed = true; } break; @@ -3527,9 +3527,9 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_KEYSTROKEWND: - if (this->window_03AC) { - this->Schedule(this->window_03AC); - this->window_03AC = nullptr; + if (this->keyStrokeWnd) { + this->Schedule(this->keyStrokeWnd); + this->keyStrokeWnd = nullptr; } break; case WID_EMOTIONWND: @@ -3547,9 +3547,9 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_PETINFOWND: - if (this->window_038C) { - this->Schedule(this->window_038C); - this->window_038C = nullptr; + if (this->petInfoWnd) { + this->Schedule(this->petInfoWnd); + this->petInfoWnd = nullptr; closed = true; } break; @@ -3590,9 +3590,9 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_PROHIBITLISTWND: - if (this->window_0388) { - this->Schedule(this->window_0388); - this->window_0388 = nullptr; + if (this->prohibitListWnd) { + this->Schedule(this->prohibitListWnd); + this->prohibitListWnd = nullptr; closed = true; } break; @@ -3625,43 +3625,43 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_HOMUNINFOWND: - if (this->window_03C0) { - this->Schedule(this->window_03C0); - this->window_03C0 = nullptr; + if (this->homunInfoWnd) { + this->Schedule(this->homunInfoWnd); + this->homunInfoWnd = nullptr; closed = true; } break; case WID_SKILLLISTWND_SKILLTAB_0: - if (this->window_03C4) { - this->Schedule(this->window_03C4); - this->window_03C4 = nullptr; + if (this->homunculusSkillWnd) { + this->Schedule(this->homunculusSkillWnd); + this->homunculusSkillWnd = nullptr; closed = true; this->homunculusSkillWndVisible = 0; } break; case WID_MERINFOWND: - if (this->window_03C8) { - this->Schedule(this->window_03C8); - this->window_03C8 = nullptr; + if (this->mercenaryInfoWnd) { + this->Schedule(this->mercenaryInfoWnd); + this->mercenaryInfoWnd = nullptr; closed = true; } break; case WID_REPLAYCONTROLWND: - this->Schedule(this->window_4F168); - this->window_4F168 = nullptr; + this->Schedule(this->replayControlWnd); + this->replayControlWnd = nullptr; closed = true; break; case WID_REPLAYRECCONTROLWND: - if (this->window_4F164) { - this->Schedule(this->window_4F164); - this->window_4F164 = nullptr; + if (this->replayRecordControlWnd) { + this->Schedule(this->replayRecordControlWnd); + this->replayRecordControlWnd = nullptr; closed = true; } break; case WID_NAVIGATIONV4WND: - if (this->window_4F174) { - this->Schedule(this->window_4F174); - this->window_4F174 = nullptr; + if (this->navigationWnd) { + this->Schedule(this->navigationWnd); + this->navigationWnd = nullptr; closed = true; } break; @@ -3672,9 +3672,9 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_SKILLLISTWND_SKILLTAB_1: - if (this->window_03CC) { - this->Schedule(this->window_03CC); - this->window_03CC = nullptr; + if (this->mercenarySkillWnd) { + this->Schedule(this->mercenarySkillWnd); + this->mercenarySkillWnd = nullptr; closed = true; this->mercenarySkillWndVisible = 0; } @@ -3687,9 +3687,9 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_CHANGENAMEWND: - if (this->window_03DC) { - this->Schedule(this->window_03DC); - this->window_03DC = nullptr; + if (this->changeNameWnd) { + this->Schedule(this->changeNameWnd); + this->changeNameWnd = nullptr; closed = true; } break; @@ -3751,9 +3751,9 @@ bool UIWindowMgr::CloseWindow(int id) { this->Schedule(this->modal); this->modal = nullptr; closed = true; - if (this->window_4F174) { + if (this->navigationWnd) { g_navigationManager.hideWindow = false; - static_cast(this->window_4F174)->RefreshLayout(); + static_cast(this->navigationWnd)->RefreshLayout(); } } break; @@ -3762,8 +3762,8 @@ bool UIWindowMgr::CloseWindow(int id) { this->Schedule(this->itemStoreTabWnds[id - 146]); this->itemStoreTabWnds[id - 146] = nullptr; closed = true; - if (this->window_0288) { - static_cast(this->window_0288)->SetTabChecked(id - 146, false); + if (this->itemStoreWnd) { + static_cast(this->itemStoreWnd)->SetTabChecked(id - 146, false); } } break; @@ -3772,8 +3772,8 @@ bool UIWindowMgr::CloseWindow(int id) { this->Schedule(this->itemStoreLastTabWnd); this->itemStoreLastTabWnd = nullptr; closed = true; - if (this->window_0288) { - static_cast(this->window_0288)->SetTabChecked(7, false); + if (this->itemStoreWnd) { + static_cast(this->itemStoreWnd)->SetTabChecked(7, false); } } break; @@ -3848,7 +3848,7 @@ bool UIWindowMgr::CloseWindow(int id) { break; case WID_SEARCH_STORE_INFO: this->Schedule(found); - g_session.ClearEntryList5BD4(); + g_session.ClearStoreSearchResults(); break; } } @@ -3905,31 +3905,31 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_COLLECTIONSYSTEMWND: - if (this->window_4F18C) { - this->Schedule(this->window_4F18C); - this->window_4F18C = nullptr; + if (this->collectionSystemWnd) { + this->Schedule(this->collectionSystemWnd); + this->collectionSystemWnd = nullptr; closed = true; } break; case WID_CLANINFOMANAGEWND: - if (this->window_0444) { - this->window_0444->StoreInfo(); - this->Schedule(this->window_0444); - this->window_0444 = nullptr; + if (this->clanInfoManageWnd) { + this->clanInfoManageWnd->StoreInfo(); + this->Schedule(this->clanInfoManageWnd); + this->clanInfoManageWnd = nullptr; closed = true; } break; case WID_BANK_NEWWND: - if (this->window_0448) { - this->Schedule(this->window_0448); - this->window_0448 = nullptr; + if (this->bankNewWnd) { + this->Schedule(this->bankNewWnd); + this->bankNewWnd = nullptr; closed = true; } break; case WID_GUILD_STORAGE_LOG: - if (this->window_044C) { - this->Schedule(this->window_044C); - this->window_044C = nullptr; + if (this->guildStorageLogWnd) { + this->Schedule(this->guildStorageLogWnd); + this->guildStorageLogWnd = nullptr; closed = true; } break; @@ -3956,7 +3956,7 @@ bool UIWindowMgr::CloseWindow(int id) { if (this->rodexComposeWnd) { std::int16_t packet = 0xA03; GetRagConnection().Send(g_packetLengths.FixedLength(packet), &packet); - g_session.RestoreItems5C68(); + g_session.RestoreSelectionItems(); g_session.ClearItemQuantities(); this->Schedule(this->rodexComposeWnd); this->rodexComposeWnd = nullptr; @@ -3972,9 +3972,9 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_SECONDCOSTUMEWND: - if (this->window_4F170) { - this->Schedule(this->window_4F170); - this->window_4F170 = nullptr; + if (this->secondCostumeWnd) { + this->Schedule(this->secondCostumeWnd); + this->secondCostumeWnd = nullptr; closed = true; } break; @@ -3996,91 +3996,91 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_SHORTCUTWND: - if (this->window_01E8) { - this->Schedule(this->window_01E8); - this->window_01E8 = nullptr; + if (this->shortCutWnd) { + this->Schedule(this->shortCutWnd); + this->shortCutWnd = nullptr; closed = true; } break; case WID_MINIMAPWND: - if (this->window_4F1CC) { - this->Schedule(this->window_4F1CC); - this->window_4F1CC = nullptr; + if (this->miniMapWnd) { + this->Schedule(this->miniMapWnd); + this->miniMapWnd = nullptr; closed = true; } break; case WID_EDITCTRLWND: - if (this->window_4F1D0) { - this->Schedule(this->window_4F1D0); - this->window_4F1D0 = nullptr; + if (this->editCtrlWnd) { + this->Schedule(this->editCtrlWnd); + this->editCtrlWnd = nullptr; closed = true; } break; case WID_ROUNDBOXTOOLTIPWND: - if (this->window_4F1E4) { - this->Schedule(this->window_4F1E4); - this->window_4F1E4 = nullptr; + if (this->roundBoxTooltipWnd) { + this->Schedule(this->roundBoxTooltipWnd); + this->roundBoxTooltipWnd = nullptr; closed = true; this->visible_276 = 0; } break; case WID_CAPTCHAREGISTERWND: - if (this->window_4F1E8) { - this->Schedule(this->window_4F1E8); - this->window_4F1E8 = nullptr; + if (this->captchaRegisterWnd) { + this->Schedule(this->captchaRegisterWnd); + this->captchaRegisterWnd = nullptr; closed = true; } break; case WID_MACRODETECTORWND: - if (this->window_4F1EC) { - this->Schedule(this->window_4F1EC); - this->window_4F1EC = nullptr; + if (this->macroDetectorWnd) { + this->Schedule(this->macroDetectorWnd); + this->macroDetectorWnd = nullptr; closed = true; - this->window_4F1FC = nullptr; + this->macroDetectorEditWnd = nullptr; } break; case WID_MACROREPORTERWND: - if (this->window_4F1F0) { - this->Schedule(this->window_4F1F0); - this->window_4F1F0 = nullptr; + if (this->macroReporterWnd) { + this->Schedule(this->macroReporterWnd); + this->macroReporterWnd = nullptr; closed = true; this->macroReporterVisible = false; } break; case WID_MACROUSERINFOWND: - if (this->window_4F1F4) { - this->Schedule(this->window_4F1F4); - this->window_4F1F4 = nullptr; + if (this->macroUserInfoWnd) { + this->Schedule(this->macroUserInfoWnd); + this->macroUserInfoWnd = nullptr; closed = true; } break; case WID_CAPTCHAPREVIEWWND: - if (this->window_4F1F8) { - this->Schedule(this->window_4F1F8); - this->window_4F1F8 = nullptr; + if (this->captchaPreviewWnd) { + this->Schedule(this->captchaPreviewWnd); + this->captchaPreviewWnd = nullptr; closed = true; } break; case WID_LOGINOTPWND: if (UIWindow* found = this->LookupWindow(id)) { this->Schedule(found); - this->window_01D0 = nullptr; + this->loginOTPWnd = nullptr; closed = true; } break; case WID_CASHSHOP_WND: - if (this->window_4F254) { - this->Schedule(this->window_4F254); - this->window_4F254 = nullptr; + if (this->cashShopWnd) { + this->Schedule(this->cashShopWnd); + this->cashShopWnd = nullptr; closed = true; std::int16_t packet = 0x84A; GetRagConnection().Send(g_packetLengths.FixedLength(packet), &packet); } break; case WID_TIPBOXWND: - if (this->window_0468) { - this->Schedule(this->window_0468); - this->window_0468 = nullptr; + if (this->tipboxWnd) { + this->Schedule(this->tipboxWnd); + this->tipboxWnd = nullptr; closed = true; } break; @@ -4092,46 +4092,46 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_ADVENPARTYBOARDWND: - if (this->window_4F274) { - this->window_4F274->StoreInfo(); - this->Schedule(this->window_4F274); - this->window_4F274 = nullptr; + if (this->advenPartyBoardWnd) { + this->advenPartyBoardWnd->StoreInfo(); + this->Schedule(this->advenPartyBoardWnd); + this->advenPartyBoardWnd = nullptr; closed = true; } break; case WID_REGISTERPARTYWND: - if (this->window_4F270) { - this->window_4F270->StoreInfo(); - this->Schedule(this->window_4F270); - this->window_4F270 = nullptr; + if (this->registerPartyWnd) { + this->registerPartyWnd->StoreInfo(); + this->Schedule(this->registerPartyWnd); + this->registerPartyWnd = nullptr; closed = true; } break; case WID_REQUESTJOINPARTYWND: - if (this->window_4F278) { - this->Schedule(this->window_4F278); - this->window_4F278 = nullptr; + if (this->requestJoinPartyWnd) { + this->Schedule(this->requestJoinPartyWnd); + this->requestJoinPartyWnd = nullptr; closed = true; } break; case WID_APPLYFORPARTYWND: - if (this->window_4F27C) { - this->window_4F27C->StoreInfo(); - this->Schedule(this->window_4F27C); - this->window_4F27C = nullptr; + if (this->applyForPartyWnd) { + this->applyForPartyWnd->StoreInfo(); + this->Schedule(this->applyForPartyWnd); + this->applyForPartyWnd = nullptr; closed = true; } break; case WID_MACROBLACKLISTCHECKWND: - if (this->window_4F288) { - this->Schedule(this->window_4F288); - this->window_4F288 = nullptr; + if (this->macroBlackListCheckWnd) { + this->Schedule(this->macroBlackListCheckWnd); + this->macroBlackListCheckWnd = nullptr; } break; case WID_WAITDBSAVEWND: - if (this->window_4F2AC) { - this->Schedule(this->window_4F2AC); - this->window_4F2AC = nullptr; + if (this->waitDBSaveWnd) { + this->Schedule(this->waitDBSaveWnd); + this->waitDBSaveWnd = nullptr; closed = true; } break; @@ -4152,18 +4152,18 @@ bool UIWindowMgr::CloseWindow(int id) { // OFFSET: 0x00AA2A00 // FUNCTION: fn_17218 void UIWindowMgr::ShowWaitDBSaveWindow() { - if (this->window_4F2AC != nullptr) { + if (this->waitDBSaveWnd != nullptr) { return; } - this->window_4F2AC = new UIWaitDBSaveWnd(); - this->window_4F2AC->SetSize(g_renderer->viewport.width, g_renderer->viewport.height); - this->window_4F2AC->Move(0, 0); - this->window_4F2AC->SetId(10024); - this->rendered.push_back(this->window_4F2AC); + this->waitDBSaveWnd = new UIWaitDBSaveWnd(); + this->waitDBSaveWnd->SetSize(g_renderer->viewport.width, g_renderer->viewport.height); + this->waitDBSaveWnd->Move(0, 0); + this->waitDBSaveWnd->SetId(10024); + this->rendered.push_back(this->waitDBSaveWnd); - UIWindow* window = this->window_4F2AC; - if (window && (this->modal == nullptr || this->window_4F174 == window) && !this->LookupWindow(WID_NEWMAKECHARWND) && !this->LookupWindow(WID_MAKECHARWND) && + UIWindow* window = this->waitDBSaveWnd; + if (window && (this->modal == nullptr || this->navigationWnd == window) && !this->LookupWindow(WID_NEWMAKECHARWND) && !this->LookupWindow(WID_MAKECHARWND) && !this->LookupWindow(WID_SECONDPASSWORDINPUTWND) && !this->LookupWindow(WID_SECONDPASSWORDEDITWND)) { int companion = -1; if (window->geometry.id == 12) { @@ -4188,7 +4188,7 @@ void UIWindowMgr::ShowWaitDBSaveWindow() { } } - this->window_4F2AC->Show(1); + this->waitDBSaveWnd->Show(1); } @@ -4238,13 +4238,13 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { return false; } - if (this->window_4F258 != nullptr) { + if (this->privateAirplaneWnd != nullptr) { return false; } if (static_cast(hotkey) < 45) { - if (this->window_01E8) { - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, hotkey % 9, hotkey / 9, 0, 0); + if (this->shortCutWnd) { + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, hotkey % 9, hotkey / 9, 0, 0); } return true; } @@ -4384,15 +4384,15 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { } break; case HK_CHATWND_ZOOM + 100: - if (UIWindow* window = this->window_01C8) { + if (UIWindow* window = this->chatWnd) { if (window->geometry.visible != 0) { window->SendMsg(nullptr, UM_TOGGLEPUSH, 0, 0, 0, 0); - if (this->window_01C8->geometry.state == 0) { + if (this->chatWnd->geometry.state == 0) { this->ShowWindowById(WID_CHATWND, 0); } } else { this->ShowWindowById(WID_CHATWND, 1); - static_cast(this->window_01C8)->ApplyInputLayout(); + static_cast(this->chatWnd)->ApplyInputLayout(); } } break; @@ -4434,10 +4434,10 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { std::memcpy(&aid, &g_session.spAndHomunculusStats[8], sizeof(aid)); CGameActor* actor = static_cast(static_cast(mode)->scene->GetGameActorByAID(aid)); if (actor) { - if (actor->HasUnknown030CEntry()) { + if (actor->HasActiveHomunculusAI()) { AiCommand command; command.type = 9; - actor->SetUnknown0318(reinterpret_cast(&command), 0); + actor->SetMsg2AI(reinterpret_cast(&command), 0); } } } @@ -4450,10 +4450,10 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { std::uint32_t aid; std::memcpy(&aid, &g_session.companionTargetState[8], sizeof(aid)); CGameActor* actor = static_cast(static_cast(mode)->scene->GetGameActorByAID(aid)); - if (actor && actor->HasUnknown0310Entry()) { + if (actor && actor->HasActiveMercenaryAI()) { AiCommand command; command.type = 9; - actor->SetUnknown0318(reinterpret_cast(&command), 1); + actor->SetMsg2AI(reinterpret_cast(&command), 1); } } } @@ -4476,8 +4476,8 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { break; } case HK_CHATMODE_ONOFF + 100: - if (this->basicInfoWnd && this->chatModeChanged && this->window_01C8 && (this->IsHoverOnWindow01C8Button() || this->hoverWindow == nullptr)) { - static_cast(this->window_01C8)->ToggleInput(); + if (this->basicInfoWnd && this->chatModeChanged && this->chatWnd && (this->IsHoverOnWindow01C8Button() || this->hoverWindow == nullptr)) { + static_cast(this->chatWnd)->ToggleInput(); if (this->hoverWindow) { this->hoverWindow->SendMsg(nullptr, UM_DEFPUSH, 0, 0, 0, 0); } @@ -4503,25 +4503,25 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { } break; case HK_REPLAY_STARTSTOP + 100: - if (g_replayAnimationScaling != 0 && this->window_4F168) { + if (g_replayAnimationScaling != 0 && this->replayControlWnd) { const int state = Replay::Instance().state; - this->window_4F168->SendMsg(nullptr, UM_COMMAND, state == 6 ? 0x191 : 0x192, 0, 0, 0); - this->window_4F168->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); + this->replayControlWnd->SendMsg(nullptr, UM_COMMAND, state == 6 ? 0x191 : 0x192, 0, 0, 0); + this->replayControlWnd->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); } break; case HK_REPLAY_SPEEDP + 100: - if (g_replayAnimationScaling != 0 && this->window_4F168) { - this->window_4F168->SendMsg(nullptr, UM_COMMAND, ID_INCREASE_REPLAY_SPEED, 0, 0, 0); + if (g_replayAnimationScaling != 0 && this->replayControlWnd) { + this->replayControlWnd->SendMsg(nullptr, UM_COMMAND, ID_INCREASE_REPLAY_SPEED, 0, 0, 0); } break; case HK_REPLAY_SPEEDN + 100: - if (g_replayAnimationScaling != 0 && this->window_4F168) { - this->window_4F168->SendMsg(nullptr, UM_COMMAND, ID_DECREASE_REPLAY_SPEED, 0, 0, 0); + if (g_replayAnimationScaling != 0 && this->replayControlWnd) { + this->replayControlWnd->SendMsg(nullptr, UM_COMMAND, ID_DECREASE_REPLAY_SPEED, 0, 0, 0); } break; case HK_NAVIGATION_ONOFF + 100: - if (g_windowMgr.window_4F174) { - g_windowMgr.window_4F174->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); + if (g_windowMgr.navigationWnd) { + g_windowMgr.navigationWnd->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); } else if (g_windowMgr.modal) { g_windowMgr.modal->SendMsg(nullptr, UM_COMMAND, ID_BASE, 0, 0, 0); } else { @@ -4530,7 +4530,7 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { break; case HK_BANK + 100: - if (g_windowMgr.window_0448) { + if (g_windowMgr.bankNewWnd) { g_windowMgr.CloseWindow(WID_BANK_NEWWND); } else { BankingCheckPacket packet; @@ -4547,7 +4547,7 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { } break; case HK_SHORTCUTWND_ROTATE + 100: { - if (UIWindow* window = this->window_01E8) { + if (UIWindow* window = this->shortCutWnd) { window->SendMsg(nullptr, UM_ROTATE_SHORTCUT_ROWS, 1, g_session.GetOption(10), 0, 0); } ShortcutRotatePacket packet; @@ -4656,18 +4656,18 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { // OFFSET: 0x00A978D0 // FUNCTION: fn_17207 UIWindow* UIWindowMgr::EnsureWindow(int id) { - UIWindow* transient = this->window_4F250; + UIWindow* transient = this->transientWnd; if (transient && static_cast(transient)->member.valid && transient->geometry.state == 0) { bool behavior = false; g_session.m_hotkeyScript->Call("IsBeHaviorOfWindow", "d>b", this->GetHotkeyBehavior(), &behavior); - if (behavior && this->window_4F250 && static_cast(this->window_4F250)->member.valid) { - this->window_4F250->geometry.state = 1; - this->Schedule(this->window_4F250); - this->window_4F250 = nullptr; + if (behavior && this->transientWnd && static_cast(this->transientWnd)->member.valid) { + this->transientWnd->geometry.state = 1; + this->Schedule(this->transientWnd); + this->transientWnd = nullptr; } } - if (this->window_4F288) { + if (this->macroBlackListCheckWnd) { switch (id) { case WID_ITEMWND: case WID_EQUIPWND: @@ -4748,7 +4748,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { if (g_session.lowMemory == 1 && g_session.performanceWarningEnabled == 1 && g_effectDetailLevel == 2 && g_textureDetailLevel == 2) { this->EnsureWindow(WID_GAMESETTINGSUI); } - if (g_session.HasUnknown6178Records() == true) { + if (g_session.HasTrackedAchievements() == true) { this->EnsureWindow(WID_ACHTRACINGWND); } if (this->macroReporterVisible == true) { @@ -4764,14 +4764,14 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->ShowWindowById(WID_ITEMDROPCNTWND, 0); break; case WID_CHATWND: - window = this->window_01C8; + window = this->chatWnd; if (window == nullptr) { window = new UINewChatWnd(); - this->window_01C8 = window; + this->chatWnd = window; window->SetSize(600, this->chatWndHeight); this->AddRendered(window); } - this->window_01C8->SendMsg(nullptr, UM_SETINFO, 0, 0, 0, 0); + this->chatWnd->SendMsg(nullptr, UM_SETINFO, 0, 0, 0, 0); break; case WID_SELECTSERVERWND: window = new UISelectServerWnd(); @@ -4782,7 +4782,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { case WID_RPIMAGEWND2: if (this->LookupWindow(WID_RPIMAGEWND2) == nullptr) { window = new UIRPImageWnd2(); - this->window_4F25C = window; + this->rpImageWnd2 = window; window->SetSize(301, 132); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -4792,14 +4792,14 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { break; case WID_LOGINWND: window = new UILoginWnd(); - this->window_01CC = window; + this->loginWnd = window; window->SetSize(301, 132); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); break; case WID_LOGINOTPWND: window = new UILoginOTPWnd(); - this->window_01D0 = window; + this->loginOTPWnd = window; window->SetSize(280, 142); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -4818,7 +4818,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { break; case WID_NEWSELECTCHARWND: { window = new UINewSelectCharWnd(); - this->window_03D4 = window; + this->newSelectCharWnd = window; UIWindow* background = new UIRPImageWnd("유저인터페이스\\select_character_ver3\\bg_back1.tga", 5); CBitmapRes* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\select_character_ver3\\bg_back1.tga"))); if (background && bitmap) { @@ -4832,11 +4832,11 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { g_activeSkillEffects.erase(g_activeSkillEffects.begin(), g_activeSkillEffects.end()); g_session.m_requestTimers.clear(); if (g_session.m_passwordWndMode == 1) { - static_cast(this->window_03D4)->EnableButtonById(418); + static_cast(this->newSelectCharWnd)->EnableButtonById(418); } else { - static_cast(this->window_03D4)->DisableButtonById(418); - static_cast(this->window_03D4)->DisableButtonById(416); - static_cast(this->window_03D4)->DisableButtonById(417); + static_cast(this->newSelectCharWnd)->DisableButtonById(418); + static_cast(this->newSelectCharWnd)->DisableButtonById(416); + static_cast(this->newSelectCharWnd)->DisableButtonById(417); } break; } @@ -4870,15 +4870,15 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } break; case WID_QUESTDISPLAY: - if (this->window_0428 == nullptr) { + if (this->questDisplayWnd == nullptr) { UIQuestDisplay* display = new UIQuestDisplay(); - this->window_0428 = display; + this->questDisplayWnd = display; display->Create(250, 400); - this->window_0428->Move(this->screenWidth - 320, 150); - this->window_0428->renderLayer = 5; - this->AddRendered(this->window_0428); + this->questDisplayWnd->Move(this->screenWidth - 320, 150); + this->questDisplayWnd->renderLayer = 5; + this->AddRendered(this->questDisplayWnd); this->rendered.sort(layerGreater); - this->window_0428->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x570), 0, 0, 0); + this->questDisplayWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x570), 0, 0, 0); } break; case WID_WAITWND: @@ -4905,14 +4905,14 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->AddRendered(window); break; case WID_SHORTCUTWND: - window = this->window_01E8; + window = this->shortCutWnd; if (window == nullptr) { window = new UIShortCutWnd(); - this->window_01E8 = window; + this->shortCutWnd = window; window->SetSize(290, 34); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); - this->window_01E8->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&this->m_normalItemSlotWindow), 0, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&this->m_normalItemSlotWindow), 0, 0, 0); g_snapMgr.Add(window); } break; @@ -4963,14 +4963,14 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } break; case WID_SKILLLISTWND: - window = this->window_02C4; + window = this->skillListWnd; if (window == nullptr) { window = new UINewSkillListWnd(); - this->window_02C4 = window; + this->skillListWnd = window; window->SetSize(560, 400); window->Move(CenterOnViewportX(50), ScaleByScreenHeight(50)); this->AddRendered(window); - this->window_02C4->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x76C), 0, 0, 0); + this->skillListWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x76C), 0, 0, 0); } window->Show(1); this->skillListWndVisible = 1; @@ -4980,14 +4980,14 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } break; case WID_ITEMSTOREWND: - window = this->window_0288; + window = this->itemStoreWnd; if (window == nullptr) { window = new UIItemStoreWnd(); - this->window_0288 = window; + this->itemStoreWnd = window; window->SetSize(280, 458); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); - this->window_0288->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x614), 0, 0, 0); + this->itemStoreWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x614), 0, 0, 0); } window->Show(1); break; @@ -5127,14 +5127,14 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { break; } this->CloseWindow(WID_MESSENGERWND); - window = this->window_02C8; + window = this->messengerGroupWnd; if (window == nullptr) { window = new UIMessengerGroupWnd(); - this->window_02C8 = window; + this->messengerGroupWnd = window; window->SetSize(273, 326); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); - this->window_02C8->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x72C), 0, 0, 0); + this->messengerGroupWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x72C), 0, 0, 0); } window->Show(1); this->messengerGroupWndVisible = 1; @@ -5301,10 +5301,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { break; } case WID_GUILDMEMBERMANAGEWND: - window = this->window_0324; + window = this->guildMemberManageWnd; if (window == nullptr) { window = new UIGuildMemberManageWnd(); - this->window_0324 = window; + this->guildMemberManageWnd = window; window->SetSize(g_defaultPlacementWidth, g_defaultPlacementHeight); window->Move(ScaleToViewportWidth(0), 147); this->AddRendered(window); @@ -5325,10 +5325,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_GUILDSKILLWND: - window = this->window_032C; + window = this->guildSkillWnd; if (window == nullptr) { window = new UIGuildSkillWnd(); - this->window_032C = window; + this->guildSkillWnd = window; window->SetSize(g_defaultPlacementWidth, g_defaultPlacementHeight); window->Move(ScaleToViewportWidth(0), 147); this->AddRendered(window); @@ -5373,10 +5373,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_GUILDINFOMANAGEWND: - window = this->window_0320; + window = this->guildInfoManageWnd; if (window == nullptr) { window = new UIGuildInfoManageWnd(); - this->window_0320 = window; + this->guildInfoManageWnd = window; window->SetSize(g_defaultPlacementWidth, g_defaultPlacementHeight); window->Move(ScaleToViewportWidth(0), 147); this->AddRendered(window); @@ -5500,10 +5500,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_CANDIDATEWND: - window = this->window_03A4; + window = this->candidateWnd; if (window == nullptr) { window = new UICandidateWnd(); - this->window_03A4 = window; + this->candidateWnd = window; const int width = this->compactCompositionLayout ? 120 : 292; const int height = this->compactCompositionLayout ? 212 : 34; window->SetSize(width, height); @@ -5646,10 +5646,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_ITEMDROPCNTWND: - window = this->window_01EC; + window = this->itemDropCntWnd; if (window == nullptr) { window = new UIItemDropCntWnd(); - this->window_01EC = window; + this->itemDropCntWnd = window; window->SetSize(182, 46); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -5681,14 +5681,14 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_CHATROOMWND: - window = this->window_027C; + window = this->chatRoomWnd; if (window == nullptr) { window = new UIChatRoomWnd(); - this->window_027C = window; + this->chatRoomWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(300)); this->AddRendered(window); - this->window_027C->SendMsg(nullptr, UM_SETINFO2, reinterpret_cast(base + 0x604), 0, 0, 0); + this->chatRoomWnd->SendMsg(nullptr, UM_SETINFO2, reinterpret_cast(base + 0x604), 0, 0, 0); } window->Show(1); break; @@ -5784,10 +5784,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_CHATROOMCHANGEWND: - window = this->window_0278; + window = this->chatRoomChangeWnd; if (window == nullptr) { window = new UIChatRoomChangeWnd(); - this->window_0278 = window; + this->chatRoomChangeWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -5795,10 +5795,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_CHATROOMMAKEWND: - window = this->window_0274; + window = this->chatRoomMakeWnd; if (window == nullptr) { window = new UIChatRoomMakeWnd(); - this->window_0274 = window; + this->chatRoomMakeWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -5938,10 +5938,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_PARARESULTWND: - window = this->window_0270; + window = this->paraResultWnd; if (window == nullptr) { window = new UIParaResultWnd(); - this->window_0270 = window; + this->paraResultWnd = window; window->SetSize(280, 120); window->Move(300, 200); this->AddRendered(window); @@ -6038,10 +6038,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_SKILLDESCRIBEWND: - window = this->window_0230; + window = this->skillDescribeWnd; if (window == nullptr) { window = new UISkillDescribeWnd(); - this->window_0230 = window; + this->skillDescribeWnd = window; window->SetSize(304, 120); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300) - 120); this->AddRendered(window); @@ -6187,10 +6187,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->AddRendered(window); break; case WID_KEYSTROKEWND: - window = this->window_03AC; + window = this->keyStrokeWnd; if (window == nullptr) { window = new UIKeyStrokeWnd(); - this->window_03AC = window; + this->keyStrokeWnd = window; window->SetSize(60, 18); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300) - 60); this->AddRendered(window); @@ -6228,10 +6228,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { if (g_session.petJob == -1) { break; } - window = this->window_038C; + window = this->petInfoWnd; if (window == nullptr) { window = new UIPetInfoWnd(); - this->window_038C = window; + this->petInfoWnd = window; window->SetSize(280, 180); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(400) - 60); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x8BC), 0, 0, 0); @@ -6302,10 +6302,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->AddRendered(window); break; case WID_PROHIBITLISTWND: - window = this->window_0388; + window = this->prohibitListWnd; if (window == nullptr) { window = new UIProhibitListWnd(); - this->window_0388 = window; + this->prohibitListWnd = window; window->SetSize(500, 400); window->Move(CenterOnViewportX(100), ScaleByScreenHeight(100)); this->AddRendered(window); @@ -6338,10 +6338,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { if (g_session.m_homunJob == -1) { break; } - window = this->window_03C0; + window = this->homunInfoWnd; if (window == nullptr) { window = new UIHomunInfoWnd(); - this->window_03C0 = window; + this->homunInfoWnd = window; window->SetSize(280, 208); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(400) - 60); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x8CC), 0, 0, 0); @@ -6350,28 +6350,28 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_SKILLLISTWND_SKILLTAB_0: - window = this->window_03C4; + window = this->homunculusSkillWnd; if (window == nullptr) { window = new UISkillListWnd(); - this->window_03C4 = window; + this->homunculusSkillWnd = window; static_cast(window)->skillTab = 0; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); - this->window_03C4->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x8DC), 0, 0, 0); + this->homunculusSkillWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x8DC), 0, 0, 0); } - static_cast(this->window_03C4)->skillTab = 0; - this->window_03C4->Show(1); + static_cast(this->homunculusSkillWnd)->skillTab = 0; + this->homunculusSkillWnd->Show(1); this->homunculusSkillWndVisible = 1; break; case WID_MERINFOWND: if (g_session.m_mercenaryClass == -1) { break; } - window = this->window_03C8; + window = this->mercenaryInfoWnd; if (window == nullptr) { window = new UIMerInfoWnd(); - this->window_03C8 = window; + this->mercenaryInfoWnd = window; window->SetSize(280, 180); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(400) - 60); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x8F0), 0, 0, 0); @@ -6386,9 +6386,9 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->AddRendered(window); break; case WID_REPLAYCONTROLWND: - if (this->window_4F168 == nullptr) { + if (this->replayControlWnd == nullptr) { window = new UIReplayControlWnd(); - this->window_4F168 = window; + this->replayControlWnd = window; window->SetSize(197, 138); window->Move(ScaleToViewportWidth(640) - 197, ScaleByScreenHeight(480) - 138); window->renderLayer = 0; @@ -6397,27 +6397,27 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } break; case WID_REPLAYRECCONTROLWND: - if (this->window_4F164 == nullptr) { + if (this->replayRecordControlWnd == nullptr) { if (Replay::Instance().state == 2) { window = new UIReplayRECControlWnd(1); } else { window = new UIReplayRECControlWnd(0); } - this->window_4F164 = window; + this->replayRecordControlWnd = window; window->SetSize(194, 34); window->Move(CenterOnViewportX(259), CenterOnViewportY(230)); this->AddRendered(window); - this->window_4F164->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->navigationPlacement), 0, 0, 0); + this->replayRecordControlWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->navigationPlacement), 0, 0, 0); } break; case WID_NAVIGATIONV4WND: - if (this->window_4F174 == nullptr) { + if (this->navigationWnd == nullptr) { this->RecordWindowPacket(203); g_navigationManager.hideWindow = false; window = new UINavigationV4Wnd(); - this->window_4F174 = window; + this->navigationWnd = window; window->SetSize(272, 338); - this->window_4F174->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x4F178), 0, 0, 0); + this->navigationWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x4F178), 0, 0, 0); this->AddRendered(window); } break; @@ -6433,9 +6433,9 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { if (this->LookupWindow(WID_NAVIGATIONROADICONWND) == nullptr) { int x = 200; int y = 200; - if (this->window_4F174) { - x = this->window_4F174->geometry.x; - y = this->window_4F174->geometry.y; + if (this->navigationWnd) { + x = this->navigationWnd->geometry.x; + y = this->navigationWnd->geometry.y; } window = new UINavigationroadiconWnd(); window->SetSize(158, 102); @@ -6447,9 +6447,9 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { if (this->LookupWindow(WID_NAVIGATIONRUIDEWND) == nullptr) { int x = 200; int y = 200; - if (this->window_4F174) { - x = this->window_4F174->geometry.x; - y = this->window_4F174->geometry.y; + if (this->navigationWnd) { + x = this->navigationWnd->geometry.x; + y = this->navigationWnd->geometry.y; } window = new UINavigationRuideWnd(); window->SetSize(150, 338); @@ -6458,18 +6458,18 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } break; case WID_SKILLLISTWND_SKILLTAB_1: - window = this->window_03CC; + window = this->mercenarySkillWnd; if (window == nullptr) { window = new UISkillListWnd(); - this->window_03CC = window; + this->mercenarySkillWnd = window; static_cast(window)->skillTab = 1; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); - this->window_03CC->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x900), 0, 0, 0); + this->mercenarySkillWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x900), 0, 0, 0); } - static_cast(this->window_03CC)->skillTab = 1; - this->window_03CC->Show(1); + static_cast(this->mercenarySkillWnd)->skillTab = 1; + this->mercenarySkillWnd->Show(1); this->mercenarySkillWndVisible = 1; break; case WID_AUTOMESSAGEWND: @@ -6486,17 +6486,17 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { case WID_SELCHARFORUSERVERWND: { const int width = g_session.characterCount > 12 ? 783 : 540; window = new UISelCharForUServerWnd(); - this->window_03D8 = window; + this->selCharForUServerWnd = window; window->SetSize(width, 400); window->Move((g_renderer->viewport.width - width) / 2, (g_renderer->viewport.height - 400) / 2); this->AddRendered(window); break; } case WID_CHANGENAMEWND: - window = this->window_03DC; + window = this->changeNameWnd; if (window == nullptr) { window = new UIChangeNameWnd(); - this->window_03DC = window; + this->changeNameWnd = window; window->SetSize(184, 105); window->Move(CenterOnViewportX(260), CenterOnViewportY(180)); this->AddRendered(window); @@ -6602,10 +6602,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } window->Show(1); g_windowMgr.Promote(this->modal); - g_windowMgr.Promote(this->window_4F174); + g_windowMgr.Promote(this->navigationWnd); break; case WID_ESCOPTIONWND: - if (this->window_4F1EC || this->window_4F288) { + if (this->macroDetectorWnd || this->macroBlackListCheckWnd) { break; } window = this->escOptionWnd; @@ -6746,10 +6746,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_COLLECTIONSYSTEMWND: - window = this->window_4F18C; + window = this->collectionSystemWnd; if (window == nullptr) { window = new CUICollectionSystemWnd(); - this->window_4F18C = window; + this->collectionSystemWnd = window; window->SetSize(196, 256); window->Move(g_renderer->viewport.width / 2 - 98, g_renderer->viewport.height / 2 - 128); this->AddRendered(window); @@ -6838,10 +6838,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->AddRendered(window); break; case WID_CLANINFOMANAGEWND: - window = this->window_0444; + window = this->clanInfoManageWnd; if (window == nullptr) { window = new UIClanInfoManageWnd(); - this->window_0444 = window; + this->clanInfoManageWnd = window; window->SetSize(400, 317); window->Move(ScaleToViewportWidth(0), 147); this->AddRendered(window); @@ -6870,10 +6870,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_NOTIFY_JOIN_GUILD_ACCEPT_WND)), 255, 0, 0, 0); break; } - window = this->window_0448; + window = this->bankNewWnd; if (window == nullptr) { window = new UIBank_NewWnd(); - this->window_0448 = window; + this->bankNewWnd = window; window->SetSize(280, 153); window->Move(static_cast(g_renderer->viewport.width * 0.5 - 140.0), static_cast(g_renderer->viewport.height * 0.5 - 77.0)); this->AddRendered(window); @@ -6881,10 +6881,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_GUILD_STORAGE_LOG: - window = this->window_044C; + window = this->guildStorageLogWnd; if (window == nullptr) { window = new UIGuild_Storage_Log(); - this->window_044C = window; + this->guildStorageLogWnd = window; window->SetSize(400, 250); window->Move(static_cast(g_renderer->viewport.width * 0.5 - 300.0), static_cast(g_renderer->viewport.height * 0.5 - 225.0)); this->AddRendered(window); @@ -6964,7 +6964,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window = dynamic_cast(this->LookupWindow(WID_SECONDCOSTUMEWND)); if (window == nullptr) { window = new UISecondCostumeWnd(); - this->window_4F170 = window; + this->secondCostumeWnd = window; window->SetSize(395, 205); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200) + 46); window->Show(1); @@ -7041,9 +7041,9 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } break; case WID_MINIMAPWND: - if (this->window_4F1CC == nullptr) { + if (this->miniMapWnd == nullptr) { window = new UIMiniMapWnd(); - this->window_4F1CC = window; + this->miniMapWnd = window; MiniMapWndInfo* miniMapInfo = reinterpret_cast(base + 0x4F1A8); window->SetSize(miniMapInfo->expandedWidth, miniMapInfo->expandedHeight); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(miniMapInfo), 0, 0, 0); @@ -7052,9 +7052,9 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } break; case WID_EDITCTRLWND: - if (this->window_4F1D0 == nullptr) { + if (this->editCtrlWnd == nullptr) { window = new UIEditctrlWnd(); - this->window_4F1D0 = window; + this->editCtrlWnd = window; window->SetSize(250, 42); window->Move(g_mouse.x, g_mouse.y); window->Show(1); @@ -7064,14 +7064,14 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { case WID_ROUNDBOXTOOLTIPWND: if (this->LookupWindow(WID_ROUNDBOXTOOLTIPWND) == nullptr) { window = new UIRoundBoxTooltipWnd(); - this->window_4F1E4 = window; + this->roundBoxTooltipWnd = window; window->SetSize(100, 200); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300) - 120); this->AddRendered(window); window->Show(1); } else { - window = this->window_4F1E4; - this->window_4F1E4->Show(1); + window = this->roundBoxTooltipWnd; + this->roundBoxTooltipWnd->Show(1); } break; case WID_STYLINGSHOPWND: @@ -7085,10 +7085,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_CAPTCHAREGISTERWND: - window = this->window_4F1E8; + window = this->captchaRegisterWnd; if (window == nullptr) { window = new UICaptchaRegisterWnd(); - this->window_4F1E8 = window; + this->captchaRegisterWnd = window; window->SetSize(290, 211); window->Move((g_renderer->viewport.width - 290) / 2, (g_renderer->viewport.height - 211) / 2); this->AddRendered(window); @@ -7096,22 +7096,22 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MACRODETECTORWND: - window = this->window_4F1EC; + window = this->macroDetectorWnd; if (window == nullptr) { window = new UIMacroDetectorWnd(); - this->window_4F1EC = window; + this->macroDetectorWnd = window; window->SetSize(340, 312); window->Move((g_renderer->viewport.width - 340) / 2, (g_renderer->viewport.height - 312) / 2); this->AddRendered(window); } window->Show(1); - this->window_4F1FC = static_cast(this->window_4F1EC)->m_editCtrl; + this->macroDetectorEditWnd = static_cast(this->macroDetectorWnd)->m_editCtrl; break; case WID_MACROREPORTERWND: - window = this->window_4F1F0; + window = this->macroReporterWnd; if (window == nullptr) { window = new UIMacroReporterWnd(); - this->window_4F1F0 = window; + this->macroReporterWnd = window; window->SetSize(249, 308); window->Move(g_renderer->viewport.width - 299, (g_renderer->viewport.height - 308) / 2); this->AddRendered(window); @@ -7121,10 +7121,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->macroReporterVisible = true; break; case WID_MACROUSERINFOWND: - window = this->window_4F1F4; + window = this->macroUserInfoWnd; if (window == nullptr) { window = new UIMacroUserInfoWnd(); - this->window_4F1F4 = window; + this->macroUserInfoWnd = window; window->SetSize(200, 37); window->Move((g_renderer->viewport.width - 200) / 2, (g_renderer->viewport.height - 37) / 2); this->AddRendered(window); @@ -7132,10 +7132,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_CAPTCHAPREVIEWWND: - window = this->window_4F1F8; + window = this->captchaPreviewWnd; if (window == nullptr) { window = new UICaptchaPreviewWnd(); - this->window_4F1F8 = window; + this->captchaPreviewWnd = window; window->SetSize(220, 90); window->Move((g_renderer->viewport.width - 220) / 2, (g_renderer->viewport.height - 90) / 2); this->AddRendered(window); @@ -7149,9 +7149,9 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { int x = g_renderer->viewport.width - 200; window = new UIViewCameraInfoWnd(); window->SetSize(150, 100); - if (this->window_4F1CC) { - x = this->window_4F1CC->geometry.x; - y = this->window_4F1CC->geometry.height + 20 + this->window_4F1CC->geometry.y; + if (this->miniMapWnd) { + x = this->miniMapWnd->geometry.x; + y = this->miniMapWnd->geometry.height + 20 + this->miniMapWnd->geometry.y; } window->Move(x, y); window->renderLayer = 1; @@ -7203,7 +7203,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->rodexInboxWnd->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); this->SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_AURA_EFFECT_ON)), 255, 0, 0, 0); } - if (this->window_0448) { + if (this->bankNewWnd) { g_windowMgr.CloseWindow(WID_BANK_NEWWND); this->SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_NEWMAKECHAR_HUMAN)), 255, 0, 0, 0); } @@ -7271,7 +7271,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { case WID_TIPBOXWND: if (this->LookupWindow(WID_TIPBOXWND) == nullptr) { window = new UITipboxWnd(); - this->window_0468 = window; + this->tipboxWnd = window; window->SetSize(480, 365); window->Move(CenterOnViewportX(120), ScaleByScreenHeight(120)); this->AddRendered(window); @@ -7284,7 +7284,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { case WID_CASHSHOP_WND: if (this->LookupWindow(WID_CASHSHOP_WND) == nullptr) { window = new UICashShopWnd(); - this->window_4F254 = window; + this->cashShopWnd = window; window->SetSize(723, 540); window->Move(static_cast((g_renderer->viewport.width - 723) * 0.5), static_cast((g_renderer->viewport.height - 540) * 0.5)); window->SendMsg(nullptr, UM_SETINFO, 0, 0, 0, 0); @@ -7337,7 +7337,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { case WID_BARTERMARKETWND: if (this->LookupWindow(WID_BARTERMARKETWND) == nullptr) { window = new UIBartermarketWnd(); - this->window_4F260 = window; + this->barterMarketWnd = window; window->SetSize(280, 400); window->Move(0, 200); this->AddRendered(window); @@ -7349,7 +7349,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { case WID_BARTERITEMPURCHASEWND: if (this->LookupWindow(WID_BARTERITEMPURCHASEWND) == nullptr) { window = new UIBarterItemPurchaseWnd(); - this->window_4F264 = window; + this->barterItemPurchaseWnd = window; window->SetSize(280, 120); window->Move(300, 200); this->AddRendered(window); @@ -7365,7 +7365,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } if (this->LookupWindow(WID_EXPANDEDBARTERMARKETWND) == nullptr) { window = new UIExpandedBartermarketWnd(); - this->window_4F268 = window; + this->expandedBarterMarketWnd = window; window->SetSize(366, 366); window->Move(200, 200); this->AddRendered(window); @@ -7379,7 +7379,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } if (this->LookupWindow(WID_EXPANDEDBARTERITEMPURCHASEWND) == nullptr) { window = new UIExpandedBarterItemPurchaseWnd(); - this->window_4F26C = window; + this->expandedBarterItemPurchaseWnd = window; window->SetSize(366, 366); window->Move(586, 200); this->AddRendered(window); @@ -7425,7 +7425,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->rodexInboxWnd->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); this->SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CANNOT_OPEN_BANKING_DURING_GRADE_ENCHANT)), 255, 0, 0, 0); } - if (this->window_0448) { + if (this->bankNewWnd) { g_windowMgr.CloseWindow(WID_BANK_NEWWND); this->SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_BROADCASTING_GRADE_ENCHANT_FAIL)), 255, 0, 0, 0); } @@ -7451,46 +7451,46 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } break; case WID_ADVENPARTYBOARDWND: - window = this->window_4F274; + window = this->advenPartyBoardWnd; if (window == nullptr) { window = new UIAdvenPartyBoardWnd(); - this->window_4F274 = window; + this->advenPartyBoardWnd = window; window->SetSize(480, 340); window->Move(g_renderer->viewport.centerX - window->geometry.width / 2, g_renderer->viewport.centerY - window->geometry.height / 2); this->AddRendered(window); - this->window_4F274->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0xA20), 0, 0, 0); + this->advenPartyBoardWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0xA20), 0, 0, 0); } break; case WID_REGISTERPARTYWND: - window = this->window_4F270; + window = this->registerPartyWnd; if (window == nullptr) { window = new UIRegisterPartyWnd(); - this->window_4F270 = window; + this->registerPartyWnd = window; window->SetSize(220, 215); window->Move(g_renderer->viewport.centerX + 240, g_renderer->viewport.centerY + 170); this->AddRendered(window); - this->window_4F270->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0xA00), 0, 0, 0); + this->registerPartyWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0xA00), 0, 0, 0); } break; case WID_REQUESTJOINPARTYWND: - window = this->window_4F278; + window = this->requestJoinPartyWnd; if (window == nullptr) { window = new UIRequestJoinPartyWnd(); - this->window_4F278 = window; + this->requestJoinPartyWnd = window; window->SetSize(220, 160); window->Move(g_renderer->viewport.centerX - window->geometry.width / 2, g_renderer->viewport.centerY - window->geometry.height / 2); this->AddRendered(window); } break; case WID_APPLYFORPARTYWND: - window = this->window_4F27C; + window = this->applyForPartyWnd; if (window == nullptr) { window = new UIApplyForPartyWnd(); - this->window_4F27C = window; + this->applyForPartyWnd = window; window->SetSize(220, 190); window->Move(g_renderer->viewport.centerX + 240, g_renderer->viewport.centerY - 170); this->AddRendered(window); - this->window_4F27C->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0xA10), 0, 0, 0); + this->applyForPartyWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0xA10), 0, 0, 0); } break; case WID_REPUTEWND: @@ -7521,10 +7521,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } break; case WID_MACROBLACKLISTCHECKWND: - window = this->window_4F288; + window = this->macroBlackListCheckWnd; if (window == nullptr) { window = new UIMacroBlackListCheckWnd(); - this->window_4F288 = window; + this->macroBlackListCheckWnd = window; window->SetSize(540, 365); window->Move((g_renderer->viewport.width - 540) / 2, (g_renderer->viewport.height - 365) / 2); this->AddRendered(window); @@ -7541,7 +7541,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->rodexInboxWnd->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); this->SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_NOTIFY_ALLY_GUILD_ACCEPT_WND)), 255, 0, 0, 0); } - if (this->window_0448) { + if (this->bankNewWnd) { g_windowMgr.CloseWindow(WID_BANK_NEWWND); this->SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_NOTIFY_JOIN_FRIEND_ACCEPT_WND)), 255, 0, 0, 0); } @@ -7594,14 +7594,14 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { while (root->parent) { root = root->parent; } - this->window_4F1D4 = root; + this->keyboardCommandRootWnd = root; } bool notify = false; - auto transientEntry = std::find(this->rendered.begin(), this->rendered.end(), this->window_4F258); + auto transientEntry = std::find(this->rendered.begin(), this->rendered.end(), this->privateAirplaneWnd); if (transientEntry != this->rendered.end()) { this->rendered.erase(transientEntry); - this->rendered.push_back(this->window_4F258); + this->rendered.push_back(this->privateAirplaneWnd); notify = true; } diff --git a/Source/UI/Window/UIWindowMgr.h b/Source/UI/Window/UIWindowMgr.h index b703da4cc..fe03c6814 100644 --- a/Source/UI/Window/UIWindowMgr.h +++ b/Source/UI/Window/UIWindowMgr.h @@ -154,20 +154,20 @@ public: /* 019C */ UIWindow* inputWindow; /* 01A0 */ UIWindow* hoverWindow; /* 01A4 */ std::deque modalWindows; - /* 01B8 */ UIWindow* window_01B8; + /* 01B8 */ UIWindow* previousMouseWnd; /* 01BC */ UIWindow* loadingWnd; /* 01C0 */ UIWindow* minimapZoomWnd; /* 01C4 */ UIWindow* statusWnd; - /* 01C8 */ UIWindow* window_01C8; - /* 01CC */ UIWindow* window_01CC; - /* 01D0 */ UIWindow* window_01D0; + /* 01C8 */ UIWindow* chatWnd; + /* 01CC */ UIWindow* loginWnd; + /* 01D0 */ UIWindow* loginOTPWnd; /* 01D4 */ UIWindow* itemWnd; /* 01D8 */ std::uint32_t unknown_01D8; /* 01DC */ UIWindow* basicInfoWnd; /* 01E0 */ UIWindow* equipWnd; /* 01E4 */ UIWindow* nCashWnd; - /* 01E8 */ UIWindow* window_01E8; - /* 01EC */ UIWindow* window_01EC; + /* 01E8 */ UIWindow* shortCutWnd; + /* 01EC */ UIWindow* itemDropCntWnd; /* 01F0 */ UIWindow* sayDialogWnd; /* 01F4 */ UIWindow* sayDialogOverlayWnd; /* 01F8 */ UIWindow* choose3Wnd; @@ -184,7 +184,7 @@ public: /* 0224 */ UIWindow* combinedCardItemCollectionComparisonWnd; /* 0228 */ UIWindow* combinedCardItemCollectionWnd; /* 022C */ UIWindow* itemParamChangeDisplayWnd; - /* 0230 */ UIWindow* window_0230; + /* 0230 */ UIWindow* skillDescribeWnd; /* 0234 */ UIWindow* quitWnd; /* 0238 */ UIWindow* restartWnd; /* 023C */ UIWindow* cardItemIllustWnd; @@ -200,13 +200,13 @@ public: /* 0264 */ UIWindow* chooseSellBuyWnd; /* 0268 */ UIWindow* paraItemShopWnd; /* 026C */ UIWindow* paraItemPurchaseWnd; - /* 0270 */ UIWindow* window_0270; - /* 0274 */ UIWindow* window_0274; - /* 0278 */ UIWindow* window_0278; - /* 027C */ UIWindow* window_027C; + /* 0270 */ UIWindow* paraResultWnd; + /* 0274 */ UIWindow* chatRoomMakeWnd; + /* 0278 */ UIWindow* chatRoomChangeWnd; + /* 027C */ UIWindow* chatRoomWnd; /* 0280 */ UIWindow* passwordWnd; /* 0284 */ UIWindow* exchangeAcceptWnd; - /* 0288 */ UIWindow* window_0288; + /* 0288 */ UIWindow* itemStoreWnd; /* 028C */ UIWindow* itemStoreTabWnds[7]; /* 02A8 */ UIWindow* itemStoreLastTabWnd; /* 02AC */ UIWindow* itemStoreFindWnd; @@ -215,8 +215,8 @@ public: /* 02B8 */ UIWindow* jobListWnd; /* 02BC */ UIWindow* seekPartyListWnd; /* 02C0 */ UIWindow* partyBookingHelpWnd; - /* 02C4 */ UIWindow* window_02C4; - /* 02C8 */ UIWindow* window_02C8; + /* 02C4 */ UIWindow* skillListWnd; + /* 02C8 */ UIWindow* messengerGroupWnd; /* 02CC */ UIWindow* joinPartyAcceptWnd; /* 02D0 */ UIWindow* coupleAcceptWnd; /* 02D4 */ UIWindow* starPlaceAcceptWnd; @@ -238,10 +238,10 @@ public: /* 0314 */ UIWindow* npcEditDialogWnd; /* 0318 */ UIWindow* npcTextEditDialogWnd; /* 031C */ UIWindow* notifyItemObtainWnd; - /* 0320 */ UIWindow* window_0320; - /* 0324 */ UIWindow* window_0324; + /* 0320 */ UIWindow* guildInfoManageWnd; + /* 0324 */ UIWindow* guildMemberManageWnd; /* 0328 */ UIWindow* guildPositionManageWnd; - /* 032C */ UIWindow* window_032C; + /* 032C */ UIWindow* guildSkillWnd; /* 0330 */ UIWindow* guildBanishedMemberWnd; /* 0334 */ UIWindow* guildNoticeWnd; /* 0338 */ UIWindow* guildTotalInfoWnd; @@ -255,28 +255,28 @@ public: /* 037C */ UIWindow* makeTargetResultWnd; /* 0380 */ UIWindow* emotionWnd; /* 0384 */ UIWindow* cashEmotionListWnd; - /* 0388 */ UIWindow* window_0388; - /* 038C */ UIWindow* window_038C; + /* 0388 */ UIWindow* prohibitListWnd; + /* 038C */ UIWindow* petInfoWnd; /* 0390 */ UIWindow* petEggListWnd; /* 0394 */ UIWindow* petTamingDeceiveWnd; /* 0398 */ UIWindow* makingArrowListWnd; /* 039C */ UIWindow* selectCartWnd; /* 03A0 */ UIWindow* spellListWnd; - /* 03A4 */ UIWindow* window_03A4; + /* 03A4 */ UIWindow* candidateWnd; /* 03A8 */ UIWindow* compositionWnd; - /* 03AC */ UIWindow* window_03AC; + /* 03AC */ UIWindow* keyStrokeWnd; /* 03B0 */ UIWindow* bookWnd; /* 03B4 */ UIWindow* joinFriendAcceptWnd; /* 03B8 */ UIWindow* secondPasswordInputWnd; /* 03BC */ UIWindow* secondPasswordEditWnd; - /* 03C0 */ UIWindow* window_03C0; - /* 03C4 */ UIWindow* window_03C4; - /* 03C8 */ UIWindow* window_03C8; - /* 03CC */ UIWindow* window_03CC; + /* 03C0 */ UIWindow* homunInfoWnd; + /* 03C4 */ UIWindow* homunculusSkillWnd; + /* 03C8 */ UIWindow* mercenaryInfoWnd; + /* 03CC */ UIWindow* mercenarySkillWnd; /* 03D0 */ UIWindow* autoMessageWnd; - /* 03D4 */ UIWindow* window_03D4; - /* 03D8 */ UIWindow* window_03D8; - /* 03DC */ UIWindow* window_03DC; + /* 03D4 */ UIWindow* newSelectCharWnd; + /* 03D8 */ UIWindow* selCharForUServerWnd; + /* 03DC */ UIWindow* changeNameWnd; /* 03E0 */ UIWindow* rebirthWnd; /* 03E4 */ std::uint32_t subChatHistoryWnd; /* 03E8 */ std::uint32_t secondSubChatHistoryWnd; @@ -297,23 +297,23 @@ public: /* 041C */ UIWindow* buyingShopPurchaseWnd; /* 0420 */ std::uint32_t purchaseMirrorItemWnd; /* 0424 */ UIWindow* monsterDisplayWnd; - /* 0428 */ UIWindow* window_0428; + /* 0428 */ UIWindow* questDisplayWnd; /* 042C */ UIWindow* partyInvitationToWnd; /* 0430 */ UIWindow* guildHelperWnd; /* 0434 */ UIWindow* guildTipWnd; /* 0438 */ UIWindow* createGuildWnd; /* 043C */ UIWindow* createGuildAlternateWnd; /* 0440 */ std::uint32_t unknown_0440; - /* 0444 */ UIWindow* window_0444; - /* 0448 */ UIWindow* window_0448; - /* 044C */ UIWindow* window_044C; + /* 0444 */ UIWindow* clanInfoManageWnd; + /* 0448 */ UIWindow* bankNewWnd; + /* 044C */ UIWindow* guildStorageLogWnd; /* 0450 */ UIWindow* openMailBoxWnd; /* 0454 */ UIWindow* rodexInboxWnd; /* 0458 */ UIWindow* rodexComposeWnd; /* 045C */ UIWindow* rodexContentsWnd; /* 0460 */ UIWindow* openRoulletteWnd; /* 0464 */ UIRoulletteWnd* roulletteWnd; - /* 0468 */ UIWindow* window_0468; + /* 0468 */ UIWindow* tipboxWnd; /* 046C */ int previousMouseX; /* 0470 */ int previousMouseY; /* 0474 */ int modalResponse; @@ -380,20 +380,20 @@ public: /* 09D4 */ unsigned char entryQueueStandbyPlacement[0x10]; /* 09E4 */ std::vector messageBoxes; /* 09F0 */ unsigned char unknown_09F0[0x40]; - /* 0A30 */ UIWindow* window_0A30; + /* 0A30 */ UIWindow* dropDownBoxWnd; /* 0A34 */ WindowPolicyEntry policy[10041]; /* 4F154 */ unsigned char navigationPlacement[16]; - /* 4F164 */ UIWindow* window_4F164; - /* 4F168 */ UIWindow* window_4F168; - /* 4F16C */ UIWindow* window_4F16C; - /* 4F170 */ UIWindow* window_4F170; - /* 4F174 */ UIWindow* window_4F174; - /* 4F178 */ UIWindow* window_4F178; - /* 4F17C */ UIWindow* window_4F17C; - /* 4F180 */ UIWindow* window_4F180; - /* 4F184 */ UIWindow* window_4F184; - /* 4F188 */ UIWindow* window_4F188; - /* 4F18C */ UIWindow* window_4F18C; + /* 4F164 */ UIWindow* replayRecordControlWnd; + /* 4F168 */ UIWindow* replayControlWnd; + /* 4F16C */ UIWindow* replayMessageBoxWnd; + /* 4F170 */ UIWindow* secondCostumeWnd; + /* 4F174 */ UIWindow* navigationWnd; + /* 4F178 */ UIWindow* navigationWndX; + /* 4F17C */ UIWindow* navigationWndY; + /* 4F180 */ UIWindow* navigationWndWidth; + /* 4F184 */ UIWindow* navigationWndHeight; + /* 4F188 */ UIWindow* navigationWndVisible; + /* 4F18C */ UIWindow* collectionSystemWnd; /* 4F190 */ std::map savedRectangles; /* 4F198 */ std::map overlays; /* 4F1A0 */ unsigned previousHitUid; @@ -401,19 +401,19 @@ public: /* 4F1A8 */ int miniMapClickX; /* 4F1AC */ int miniMapClickY; /* 4F1B0 */ unsigned char miniMapPlacementState[0x1C]; - /* 4F1CC */ UIWindow* window_4F1CC; - /* 4F1D0 */ UIWindow* window_4F1D0; - /* 4F1D4 */ UIWindow* window_4F1D4; - /* 4F1D8 */ UIWindow* window_4F1D8; - /* 4F1DC */ UIWindow* window_4F1DC; + /* 4F1CC */ UIWindow* miniMapWnd; + /* 4F1D0 */ UIWindow* editCtrlWnd; + /* 4F1D4 */ UIWindow* keyboardCommandRootWnd; + /* 4F1D8 */ UIWindow* achievementTracingWndX; + /* 4F1DC */ UIWindow* achievementTracingWndY; /* 4F1E0 */ int visible_276; - /* 4F1E4 */ UIWindow* window_4F1E4; - /* 4F1E8 */ UIWindow* window_4F1E8; - /* 4F1EC */ UIWindow* window_4F1EC; - /* 4F1F0 */ UIWindow* window_4F1F0; - /* 4F1F4 */ UIWindow* window_4F1F4; - /* 4F1F8 */ UIWindow* window_4F1F8; - /* 4F1FC */ UIWindow* window_4F1FC; + /* 4F1E4 */ UIWindow* roundBoxTooltipWnd; + /* 4F1E8 */ UIWindow* captchaRegisterWnd; + /* 4F1EC */ UIWindow* macroDetectorWnd; + /* 4F1F0 */ UIWindow* macroReporterWnd; + /* 4F1F4 */ UIWindow* macroUserInfoWnd; + /* 4F1F8 */ UIWindow* captchaPreviewWnd; + /* 4F1FC */ UIWindow* macroDetectorEditWnd; /* 4F200 */ unsigned char macroReporterPlacement[16]; /* 4F210 */ bool macroReporterVisible; /* 4F211 */ bool unknown_4F211; @@ -423,22 +423,22 @@ public: /* 4F23C */ int miniPartyHeight; /* 4F240 */ std::list snapExcluded; /* 4F248 */ std::list closedMiniPartyIds; - /* 4F250 */ UIWindow* window_4F250; - /* 4F254 */ UIWindow* window_4F254; - /* 4F258 */ UIWindow* window_4F258; - /* 4F25C */ UIWindow* window_4F25C; - /* 4F260 */ UIWindow* window_4F260; - /* 4F264 */ UIWindow* window_4F264; - /* 4F268 */ UIWindow* window_4F268; - /* 4F26C */ UIWindow* window_4F26C; - /* 4F270 */ UIWindow* window_4F270; - /* 4F274 */ UIWindow* window_4F274; - /* 4F278 */ UIWindow* window_4F278; - /* 4F27C */ UIWindow* window_4F27C; + /* 4F250 */ UIWindow* transientWnd; + /* 4F254 */ UIWindow* cashShopWnd; + /* 4F258 */ UIWindow* privateAirplaneWnd; + /* 4F25C */ UIWindow* rpImageWnd2; + /* 4F260 */ UIWindow* barterMarketWnd; + /* 4F264 */ UIWindow* barterItemPurchaseWnd; + /* 4F268 */ UIWindow* expandedBarterMarketWnd; + /* 4F26C */ UIWindow* expandedBarterItemPurchaseWnd; + /* 4F270 */ UIWindow* registerPartyWnd; + /* 4F274 */ UIWindow* advenPartyBoardWnd; + /* 4F278 */ UIWindow* requestJoinPartyWnd; + /* 4F27C */ UIWindow* applyForPartyWnd; /* 4F280 */ std::list savedWindowIds; - /* 4F288 */ UIWindow* window_4F288; + /* 4F288 */ UIWindow* macroBlackListCheckWnd; /* 4F28C */ std::unordered_set deferredDeletion; - /* 4F2AC */ UIWindow* window_4F2AC; + /* 4F2AC */ UIWindow* waitDBSaveWnd; virtual ~UIWindowMgr(); UIWindowMgr(); @@ -484,7 +484,7 @@ public: void RegisterWindow(UIWindow* window); void UnregisterWindow(UIWindow* window); void InvalidateRegisteredWindows(); - void SetUnknown04DC(const char* text); + void SetChatInputText(const char* text); void Destroy(UIWindow* window); void ForgetWindowReferences(UIWindow* removed); void DeferDeletion(UIWindow* window); @@ -499,8 +499,8 @@ public: void DismissTransient(); void MoveTransient(int x, int y); void RetireTransientWindow(); - void ClearWindow01B8(); - void ClearUnknown04DC(); + void ClearPreviousMouseWnd(); + void ClearChatInputText(); int ProcessMouse(); void UpdateFrameWindows(); CWebBrowser* CreateBrowser(int width, int height); @@ -530,7 +530,7 @@ public: void EnableRouletteWnd(); char UpdateSnapRectangles(); bool ProcessDialogKey(int unused, int key); - void DestroyWindow0478(); + void DestroyBackgroundSurface(); void SubmitActiveDialog(); void NotifyMode(); void NotifyItemWindows(int accountId, int lower, int upper); @@ -554,7 +554,7 @@ public: int FindMiniPartyCell(); UIWindow* GetHoverWindow(); int GetRenderedWindowIds(int* ids); - void HideWindow01C8(); + void HideChatWnd(); bool DropAt(int x, int y, ModeDragState* drag); void FocusWindow01C8Edit(); void SetFocus(UIWindow* value); @@ -580,11 +580,11 @@ public: bool HasPendingDialog(); bool HasTitleAtActorCell(std::uint32_t aid); void CancelActiveDialog(); - void CenterSurface0478(); + void DrawCenteredBackground(); void DrawLoginOverlay(); void DrawWindows(); void RefreshWindow01C8Edits(); - void SetSurface0478(CBitmapRes* bitmap); + void SetBackgroundSurface(CBitmapRes* bitmap); void SendFlagEffect(int message); void RestoreHiddenWindows(); std::vector SaveReplaySettings(); @@ -633,9 +633,9 @@ static_assert(offsetof(UIWindowMgr, retired) == 0x184); static_assert(offsetof(UIWindowMgr, registeredWindows) == 0x18C); static_assert(offsetof(UIWindowMgr, snapRectangles) == 0x194); static_assert(offsetof(UIWindowMgr, modalWindows) == 0x1A4); -static_assert(offsetof(UIWindowMgr, window_01C8) == 0x1C8); -static_assert(offsetof(UIWindowMgr, window_01E8) == 0x1E8); -static_assert(offsetof(UIWindowMgr, window_0230) == 0x230); +static_assert(offsetof(UIWindowMgr, chatWnd) == 0x1C8); +static_assert(offsetof(UIWindowMgr, shortCutWnd) == 0x1E8); +static_assert(offsetof(UIWindowMgr, skillDescribeWnd) == 0x230); static_assert(offsetof(UIWindowMgr, modal) == 0x400); static_assert(offsetof(UIWindowMgr, unknown_0484) == 0x484); static_assert(offsetof(UIWindowMgr, pendingNoticeLines) == 0x4C4); @@ -654,7 +654,7 @@ static_assert(offsetof(UIWindowMgr, snapExcluded) == 0x4F240); static_assert(offsetof(UIWindowMgr, closedMiniPartyIds) == 0x4F248); static_assert(offsetof(UIWindowMgr, savedWindowIds) == 0x4F280); static_assert(offsetof(UIWindowMgr, deferredDeletion) == 0x4F28C); -static_assert(offsetof(UIWindowMgr, window_4F2AC) == 0x4F2AC); +static_assert(offsetof(UIWindowMgr, waitDBSaveWnd) == 0x4F2AC); static_assert(sizeof(UIWindowMgr) == 0x4F2B0); #endif diff --git a/Source/UI/Window/UIWindowMgr.inl b/Source/UI/Window/UIWindowMgr.inl index b6a0e1324..83e87608d 100644 --- a/Source/UI/Window/UIWindowMgr.inl +++ b/Source/UI/Window/UIWindowMgr.inl @@ -14,10 +14,10 @@ inline bool UIWindowMgr::ShowShortcutWindow(int value) { this->m_normalItemSlotWindow.show = value; g_windowMgr.EnsureWindow(36); - this->window_01E8->Show(value); + this->shortCutWnd->Show(value); if (value != 0) { - g_windowMgr.Promote(this->window_01E8); + g_windowMgr.Promote(this->shortCutWnd); } if (g_serviceOptions.Get(0x10E)) { diff --git a/Source/UI/Window/WindowAncestry.cpp b/Source/UI/Window/WindowAncestry.cpp index 3b9a558e0..3c32cd642 100644 --- a/Source/UI/Window/WindowAncestry.cpp +++ b/Source/UI/Window/WindowAncestry.cpp @@ -27,16 +27,16 @@ __forceinline void UIWindowMgr::ForgetWindowReferences(UIWindow* removed) { this->hoverWindow = nullptr; } - if (this->window_01B8 && (this->window_01B8 == removed || this->window_01B8->IsDescendantOf(removed))) { - this->window_01B8 = nullptr; + if (this->previousMouseWnd && (this->previousMouseWnd == removed || this->previousMouseWnd->IsDescendantOf(removed))) { + this->previousMouseWnd = nullptr; } - if (this->window_0A30 && this->window_0A30 == removed) { - this->window_0A30 = nullptr; + if (this->dropDownBoxWnd && this->dropDownBoxWnd == removed) { + this->dropDownBoxWnd = nullptr; } - if (this->window_4F1D4 && (this->window_4F1D4 == removed || this->window_4F1D4->IsDescendantOf(removed))) { - this->window_4F1D4 = nullptr; + if (this->keyboardCommandRootWnd && (this->keyboardCommandRootWnd == removed || this->keyboardCommandRootWnd->IsDescendantOf(removed))) { + this->keyboardCommandRootWnd = nullptr; } } @@ -54,8 +54,8 @@ void UIWindowMgr::DeferDeletion(UIWindow* window) { // OFFSET: 0x00AA8F30 // FUNCTION: fn_17250 -void UIWindowMgr::ClearWindow01B8() { - this->window_01B8 = nullptr; +void UIWindowMgr::ClearPreviousMouseWnd() { + this->previousMouseWnd = nullptr; } // OFFSET: 0x00AA8110 diff --git a/Source/UI/Window/WindowDialogs.cpp b/Source/UI/Window/WindowDialogs.cpp index 679aed0f0..0f210efb4 100644 --- a/Source/UI/Window/WindowDialogs.cpp +++ b/Source/UI/Window/WindowDialogs.cpp @@ -17,91 +17,91 @@ bool UIWindowMgr::ProcessDialogKey(int, int key) { return false; } - if (!this->window_01E8) { + if (!this->shortCutWnd) { return false; } switch (key) { case 0x100001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 0, 1, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 0, 1, 0, 0); return false; case 0x110001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 1, 1, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 1, 1, 0, 0); return false; case 0x120001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 2, 1, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 2, 1, 0, 0); return false; case 0x130001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 3, 1, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 3, 1, 0, 0); return false; case 0x140001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 4, 1, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 4, 1, 0, 0); return false; case 0x150001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 5, 1, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 5, 1, 0, 0); return false; case 0x160001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 6, 1, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 6, 1, 0, 0); return false; case 0x170001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 7, 1, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 7, 1, 0, 0); return false; case 0x180001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 8, 1, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 8, 1, 0, 0); return false; case 0x1E0001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 0, 2, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 0, 2, 0, 0); return false; case 0x1F0001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 1, 2, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 1, 2, 0, 0); return false; case 0x200001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 2, 2, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 2, 2, 0, 0); return false; case 0x210001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 3, 2, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 3, 2, 0, 0); return false; case 0x220001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 4, 2, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 4, 2, 0, 0); return false; case 0x230001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 5, 2, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 5, 2, 0, 0); return false; case 0x240001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 6, 2, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 6, 2, 0, 0); return false; case 0x250001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 7, 2, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 7, 2, 0, 0); return false; case 0x260001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 8, 2, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 8, 2, 0, 0); return false; case 0x2C0001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 0, 0, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 0, 0, 0, 0); return false; case 0x2D0001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 1, 0, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 1, 0, 0, 0); return false; case 0x2E0001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 2, 0, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 2, 0, 0, 0); return false; case 0x2F0001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 3, 0, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 3, 0, 0, 0); return false; case 0x300001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 4, 0, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 4, 0, 0, 0); return false; case 0x310001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 5, 0, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 5, 0, 0, 0); return false; case 0x320001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 6, 0, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 6, 0, 0, 0); return false; case 0x330001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 7, 0, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 7, 0, 0, 0); return false; case 0x340001: - this->window_01E8->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 8, 0, 0, 0); + this->shortCutWnd->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, 8, 0, 0, 0); return false; default: return false; @@ -163,7 +163,7 @@ int UIWindowMgr::Confirm( } auto* box = new UIMessageBox(); - this->window_4F16C = box; + this->replayMessageBoxWnd = box; box->Configure(text, type, defaultAccept, timeout, caption, width, height, 1, nullptr); if (protect == 1) { diff --git a/Source/UI/Window/WindowMgrState.cpp b/Source/UI/Window/WindowMgrState.cpp index 745739521..b5291ebf7 100644 --- a/Source/UI/Window/WindowMgrState.cpp +++ b/Source/UI/Window/WindowMgrState.cpp @@ -58,17 +58,17 @@ void UIWindowMgr::NotifyHoverWindow() { // OFFSET: 0x00A91400 // FUNCTION: fn_17159 UIWindow* UIWindowMgr::GetGuildWindow() { - if (this->window_0320) { - return this->window_0320; + if (this->guildInfoManageWnd) { + return this->guildInfoManageWnd; } - if (this->window_0324) { - return this->window_0324; + if (this->guildMemberManageWnd) { + return this->guildMemberManageWnd; } if (this->guildPositionManageWnd) { return this->guildPositionManageWnd; } - if (this->window_032C) { - return this->window_032C; + if (this->guildSkillWnd) { + return this->guildSkillWnd; } if (this->guildBanishedMemberWnd) { return this->guildBanishedMemberWnd; @@ -110,15 +110,15 @@ int UIWindowMgr::GetRenderedWindowIds(int* ids) { // OFFSET: 0x00A91C50 // FUNCTION: fn_17170 -void UIWindowMgr::HideWindow01C8() { - if (this->window_01C8) { - this->window_01C8->Show(0); +void UIWindowMgr::HideChatWnd() { + if (this->chatWnd) { + this->chatWnd->Show(0); } } // OFFSET: 0x00A91D90 // FUNCTION: fn_17172 -bool CGameActor::HasUnknown030CEntry() { +bool CGameActor::HasActiveHomunculusAI() { const int* entry = reinterpret_cast(this->homunAI); return entry && entry[1] != 0; } @@ -133,7 +133,7 @@ void UIWindowMgr::RestoreMiniPartyWindows() { continue; } - const SessionRecord0734 record = g_session.FindRecord0734(member.accountId); + const SessionRecord0734 record = g_session.FindMiniPartyRecord(member.accountId); UIMiniPartyWnd* window = new UIMiniPartyWnd(); window->SetSize(174, 52); window->m_cell = record.cell; @@ -161,7 +161,7 @@ void UIWindowMgr::LoadShortcutItems() { HKEY key; if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, path, 0, KEY_QUERY_VALUE, &key) == ERROR_SUCCESS) { g_session.ResetHotkeyDescriptions(); - g_session.ClearUnknown0420(); + g_session.ClearHotkeySkillLevels(); for (int index = 0; index < 36; ++index) { DWORD type = REG_SZ; DWORD size = 32; @@ -634,7 +634,7 @@ void UIWindowMgr::SaveVisibleWindowIds() { } else if ((id == 69 || id == 34) && this->messengerGroupWndVisible) { this->savedWindowIds.push_back(id); } else if (id == 271) { - if (g_session.HasUnknown6178Records() == true) { + if (g_session.HasTrackedAchievements() == true) { this->savedWindowIds.push_back(id); } } else if (id == 286) { @@ -660,8 +660,8 @@ void UIWindowMgr::SaveVisibleWindowIds() { // OFFSET: 0x00AAB8A0 // FUNCTION: fn_17282 void UIWindowMgr::UpdateNavigationList() { - if (this->window_4F174 && !g_navigationManager.expandedMap && static_cast(this->window_4F174)->IsListShown()) { - this->window_4F174->SendMsg(nullptr, UM_COMMAND, ID_MINI, 0, 0, 0); + if (this->navigationWnd && !g_navigationManager.expandedMap && static_cast(this->navigationWnd)->IsListShown()) { + this->navigationWnd->SendMsg(nullptr, UM_COMMAND, ID_MINI, 0, 0, 0); } } @@ -691,7 +691,7 @@ void UIWindowMgr::SaveShortcutItems() { std::sprintf(name, "SITEM%d%d%d", index, g_serviceType, g_session.selectedCharacterSlot); RegSetValueExA(key, name, 0, REG_SZ, reinterpret_cast(description), 32); - DWORD level = g_session.GetUnknown0420(index); + DWORD level = g_session.GetHotkeySkillLevel(index); std::sprintf(name, "S_SKILL_USE_LEVEL%d%d%d", index, g_serviceType, g_session.selectedCharacterSlot); RegSetValueExA(key, name, 0, REG_DWORD, reinterpret_cast(&level), 4); } @@ -1005,13 +1005,13 @@ void UIWindowMgr::SaveUIRectInfo() { // OFFSET: 0x00AA9F70 // FUNCTION: fn_17264 void UIWindowMgr::RefreshWindow01C8Edits() { - if (this->window_01C8) { - UIEditCtrl* const* edits = reinterpret_cast(reinterpret_cast(this->window_01C8) + 0xBC); + if (this->chatWnd) { + UIEditCtrl* const* edits = reinterpret_cast(reinterpret_cast(this->chatWnd) + 0xBC); if (this->hoverWindow == edits[0]) { edits[0]->SetText(""); } - edits = reinterpret_cast(reinterpret_cast(this->window_01C8) + 0xBC); + edits = reinterpret_cast(reinterpret_cast(this->chatWnd) + 0xBC); UIEditCtrl* edit = edits[1]; if (this->hoverWindow == edit) { edit->SetText(edit->Text()); @@ -1021,7 +1021,7 @@ void UIWindowMgr::RefreshWindow01C8Edits() { // OFFSET: 0x00AA9FD0 // FUNCTION: fn_17265 -void UIWindowMgr::SetSurface0478(CBitmapRes* bitmap) { +void UIWindowMgr::SetBackgroundSurface(CBitmapRes* bitmap) { if (!bitmap) { if (this->backgroundSurface) { delete this->backgroundSurface; @@ -1097,7 +1097,7 @@ bool UIWindowMgr::DropAt(int x, int y, ModeDragState* drag) { const int localY = y - offsetY; window->RecordDrop(localX, localY, *drag, -1); drag->sourceWindow = reinterpret_cast(window); - if (this->window_01EC != window->Root()) { + if (this->itemDropCntWnd != window->Root()) { window->DragAndDrop(localX, localY, reinterpret_cast(drag)); } @@ -1107,11 +1107,11 @@ bool UIWindowMgr::DropAt(int x, int y, ModeDragState* drag) { // OFFSET: 0x00A8FD30 // FUNCTION: fn_17150 void UIWindowMgr::FocusWindow01C8Edit() { - if (!this->window_01C8) { + if (!this->chatWnd) { return; } - UIWindow* edit = *reinterpret_cast(reinterpret_cast(this->window_01C8) + 0xBC); + UIWindow* edit = *reinterpret_cast(reinterpret_cast(this->chatWnd) + 0xBC); if (this->hoverWindow) { this->hoverWindow->OnFinishEdit(!edit ? false : edit->GetEditWindow() == this->hoverWindow); } diff --git a/Source/UI/Window/WindowMouseHit.cpp b/Source/UI/Window/WindowMouseHit.cpp index eb0fa457a..5f881eb7b 100644 --- a/Source/UI/Window/WindowMouseHit.cpp +++ b/Source/UI/Window/WindowMouseHit.cpp @@ -24,7 +24,7 @@ static MessengerMember PartyMember(UIMiniPartyWnd* window) { // INLINED static __forceinline void PromoteWindow(UIWindowMgr* manager, UIWindow* window) { - if (!window || (manager->modal != nullptr && manager->window_4F174 != window)) { + if (!window || (manager->modal != nullptr && manager->navigationWnd != window)) { return; } @@ -157,8 +157,8 @@ int UIWindowMgr::ProcessMouse() { if (this->modalWindows.empty() || !this->modalWindows.back()) { for (auto entry = this->retired.begin(); entry != this->retired.end(); ++entry) { UIWindow* window = *entry; - if (this->window_4F16C == window) { - this->window_4F16C = nullptr; + if (this->replayMessageBoxWnd == window) { + this->replayMessageBoxWnd = nullptr; } if (this->inputWindow && (this->inputWindow == window || this->inputWindow->IsDescendantOf(window))) { this->inputWindow = nullptr; @@ -166,8 +166,8 @@ int UIWindowMgr::ProcessMouse() { if (this->hoverWindow && (this->hoverWindow == window || this->hoverWindow->IsDescendantOf(window))) { this->hoverWindow = nullptr; } - if (this->window_01B8 && (this->window_01B8 == window || this->window_01B8->IsDescendantOf(window))) { - this->window_01B8 = nullptr; + if (this->previousMouseWnd && (this->previousMouseWnd == window || this->previousMouseWnd->IsDescendantOf(window))) { + this->previousMouseWnd = nullptr; } this->Destroy(window); } @@ -195,8 +195,8 @@ int UIWindowMgr::ProcessMouse() { } this->closedMiniPartyIds.clear(); - if (g_mouse.buttons[0] == 1 && this->window_01C8) { - UINewChatWnd* suggestions = static_cast(this->window_01C8); + if (g_mouse.buttons[0] == 1 && this->chatWnd) { + UINewChatWnd* suggestions = static_cast(this->chatWnd); if (suggestions->SuggestionsVisible() == 1) { int left; int top; @@ -263,7 +263,7 @@ int UIWindowMgr::ProcessMouse() { } if (g_mouse.buttons[0] == 1) { - ::SetPressedWindowRoot(this->window_4F1D4, window); + ::SetPressedWindowRoot(this->keyboardCommandRootWnd, window); } if (window) { @@ -288,7 +288,7 @@ int UIWindowMgr::ProcessMouse() { PromoteWindow(this, root); } - CUIDropDownBox* popup = static_cast(this->window_0A30); + CUIDropDownBox* popup = static_cast(this->dropDownBoxWnd); if (popup && window != popup && root != popup && !popup->HasOwnerChild(window)) { this->CloseDropDown(); } @@ -342,8 +342,8 @@ int UIWindowMgr::ProcessMouse() { } } - if (this->window_03D4) { - this->window_03D4->Invalidate(); + if (this->newSelectCharWnd) { + this->newSelectCharWnd->Invalidate(); } if (this->equipWnd) { this->equipWnd->Invalidate(); @@ -354,26 +354,26 @@ int UIWindowMgr::ProcessMouse() { if (this->otherEquipWnd) { this->otherEquipWnd->Invalidate(); } - if (this->window_03D8) { - this->window_03D8->Invalidate(); + if (this->selCharForUServerWnd) { + this->selCharForUServerWnd->Invalidate(); } - if (this->window_02C4 && g_session.m_simplifiedSkillList == 0) { - this->window_02C4->Invalidate(); + if (this->skillListWnd && g_session.m_simplifiedSkillList == 0) { + this->skillListWnd->Invalidate(); } - if (this->window_4F170) { - this->window_4F170->Invalidate(); + if (this->secondCostumeWnd) { + this->secondCostumeWnd->Invalidate(); } if (window) { - if (this->window_01B8 && window != this->window_01B8) { + if (this->previousMouseWnd && window != this->previousMouseWnd) { int left = 0; int top = 0; - this->window_01B8->ToScreen(left, top); - this->window_01B8->OnMouseMove(x - left, y - top); - this->window_01B8->ResetCursor(x - left, y - top); + this->previousMouseWnd->ToScreen(left, top); + this->previousMouseWnd->OnMouseMove(x - left, y - top); + this->previousMouseWnd->ResetCursor(x - left, y - top); } - this->window_01B8 = window; + this->previousMouseWnd = window; } } diff --git a/Source/UI/Window/WindowOrdering.cpp b/Source/UI/Window/WindowOrdering.cpp index f621b0abd..9ad6f0bc3 100644 --- a/Source/UI/Window/WindowOrdering.cpp +++ b/Source/UI/Window/WindowOrdering.cpp @@ -19,25 +19,25 @@ void UIWindowMgr::InvalidateAll() { // OFFSET: 0x00A96710 // FUNCTION: fn_17185 void UIWindowMgr::RefreshClanWnd() { - if (this->window_0444) { - this->window_0444->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->clanInfoManageWnd) { + this->clanInfoManageWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } // OFFSET: 0x00A96730 // FUNCTION: fn_17186 void UIWindowMgr::RefreshGuildWindows() { - if (this->window_0320) { - this->window_0320->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->guildInfoManageWnd) { + this->guildInfoManageWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } - if (this->window_0324) { - this->window_0324->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->guildMemberManageWnd) { + this->guildMemberManageWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } if (this->guildPositionManageWnd) { this->guildPositionManageWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } - if (this->window_032C) { - this->window_032C->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->guildSkillWnd) { + this->guildSkillWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } if (this->guildBanishedMemberWnd) { this->guildBanishedMemberWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); @@ -103,7 +103,7 @@ char UIWindowMgr::UpdateSnapRectangles() { // OFFSET: 0x00A976C0 // FUNCTION: fn_17206 void UIWindowMgr::Promote(UIWindow* window) { - if (!window || (this->modal != nullptr && this->window_4F174 != window)) { + if (!window || (this->modal != nullptr && this->navigationWnd != window)) { return; } diff --git a/Source/UI/Window/WindowRetirement.cpp b/Source/UI/Window/WindowRetirement.cpp index b43ae2f45..65baa8bed 100644 --- a/Source/UI/Window/WindowRetirement.cpp +++ b/Source/UI/Window/WindowRetirement.cpp @@ -11,24 +11,24 @@ extern template std::_List_node* std::list::_Emplac // OFFSET: 0x00AA2C90 // FUNCTION: fn_17219 __declspec(noinline) void UIWindowMgr::Schedule(UIWindow* window) { - if (window == this->window_03D4) { - this->window_03D4 = nullptr; + if (window == this->newSelectCharWnd) { + this->newSelectCharWnd = nullptr; } - if (window == this->window_03D8) { - this->window_03D8 = nullptr; + if (window == this->selCharForUServerWnd) { + this->selCharForUServerWnd = nullptr; } - if (window == this->window_03DC) { - this->window_03DC = nullptr; + if (window == this->changeNameWnd) { + this->changeNameWnd = nullptr; } - if (window == this->window_01B8) { - this->window_01B8 = nullptr; + if (window == this->previousMouseWnd) { + this->previousMouseWnd = nullptr; } - if (window == this->window_4F2AC) { - this->window_4F2AC = nullptr; + if (window == this->waitDBSaveWnd) { + this->waitDBSaveWnd = nullptr; } this->retired.push_back(window); @@ -74,15 +74,15 @@ void UIWindowMgr::Destroy(UIWindow* window) { // OFFSET: 0x00AA71E0 // FUNCTION: fn_17235 void UIWindowMgr::DismissTransient() { - if (this->window_4F250) { - this->Schedule(this->window_4F250); - this->window_4F250 = nullptr; + if (this->transientWnd) { + this->Schedule(this->transientWnd); + this->transientWnd = nullptr; } } // OFFSET: 0x00A8F840 // FUNCTION: fn_17145 -void UIWindowMgr::DestroyWindow0478() { +void UIWindowMgr::DestroyBackgroundSurface() { if (this->backgroundSurface) { delete this->backgroundSurface; this->backgroundSurface = nullptr;