Batch #16644 by ragnarok-clanker: no function's compiled code changes; checked with 593 compiled unit(s), including every includer of Source/Client/Application/Registry.h, Source/Client/Application/RegistryKey.h, Source/Client/Application/Timer.h, Source/Client/Mode/ModeFade.h, Source/Client/Mode/ModeFadeOut.h, Source/Client/Mode/ModeScreenshot.h, Source/Client/Replay/Replay.h, Source/Client/Replay/ReplayRecordOption.h, Source/Client/Session/Session.h, Source/Contents/Actors/ActorPickNode.h, Source/Contents/Effects/Core/RagEffectState.h, Source/Contents/Effects/Particles/Particle.h, Source/Contents/Movies/BinkMovie.h, Source/Contents/Sprites/SpriteLayerDrawing.h, Source/File/NFileLog.h, Source/Network/NIPAddr.h, Source/Network/Packets/ActorNamePacket.h, Source/Network/Packets/ClientKeepalive.h, Source/Network/Packets/ClientOptionPacket.h, Source/Network/Packets/ExecutableDigestPacket.h, Source/Network/Packets/GameTickPacket.h, Source/Render/DX7/QueuedDrawingDX7.h, Source/Render/DX7/RendererDX7.h, Source/Render/DX9/RenderSystemDX9.h, Source/Render/Device/DeviceSelection.h, Source/Render/Device/Direct3DErrors.h, Source/Render/Device/DisplayMode.h, Source/Render/Device/RenderAdapter.h, Source/Render/Device/RenderBackends.h, Source/Render/Drawing/ActionSpriteDrawing.h, Source/Render/Drawing/BitmapDrawing.h, Source/Render/Drawing/BlendColor.h, Source/Render/Drawing/SpriteGeometry.h, Source/Render/Drawing/TextureStageModes.h, Source/Render/Primitives/AuxiliarySubmission.h, Source/Render/Primitives/SpriteQuad.h, Source/Render/Primitives/TextureQuad.h, Source/Render/Projection/ScreenGeometry.h, Source/Render/Projection/ScreenRectangle.h, Source/Resource/Audio/BinkRuntime.h, Source/Resource/Bitmap/EmblemResource.h, Source/Resource/Bitmap/GifLzw.h, Source/Resource/Bitmap/GifResource.h, Source/Resource/Bitmap/PaletteResource.h, Source/Resource/Bitmap/SkinPalette.h, Source/Resource/Bitmap/TextureNames.h, Source/Resource/Effects/EZeffectResource.h, Source/Resource/Json/JsonCppLoader.h, Source/Resource/Models/RmaResource.h, Source/Resource/Sprites/ImfResource.h, Source/Resource/Xml/XmlNode.h, Source/Security/FileSignatureVerifier.h, Source/Security/ProcessSecurity.h, Source/UI/Achievement/UIAchWnd.h, Source/UI/AdventureGuide/UIAdventureGuide.h, Source/UI/Buttons/UIBalloonOpenBtn.h, Source/UI/Buttons/UIMiniBtnWnd.h, Source/UI/Buttons/UISlotBitmap.h, Source/UI/Buttons/UIStaticBitmap.h, Source/UI/Buttons/UIStaticItem.h, Source/UI/Buttons/UIWindowCallBtnWnd.h, Source/UI/CashEmotion/UICashEmotionSprBtn.h, Source/UI/CashShop/UIMileageWnd.h, Source/UI/CashShop/UIPayConfirmWnd.h, Source/UI/Chat/UIChatRoomWnd.h, Source/UI/Dialogs/UIAccountLimitedToolWnd.h, Source/UI/Dialogs/UICntWnd.h, Source/UI/Dialogs/UILoadingWnd.h, Source/UI/Dialogs/UIMessageBox.h, Source/UI/Dialogs/UIMessageBoxAutoreturn.h, Source/UI/Dialogs/UINormalMB.h, Source/UI/Dialogs/UINoteWnd.h, Source/UI/Dialogs/UINoticeWnd.h, Source/UI/Dialogs/UIRPImageWnd.h, Source/UI/Dialogs/UIRPImageWnd2.h, Source/UI/Dialogs/UITalkboxTrapInputWnd.h, Source/UI/Dialogs/UITransMenuWnd.h, Source/UI/Dialogs/UIVideoWnd.h, Source/UI/Dialogs/UIWordDisplayWnd.h, Source/UI/Edit/UIItemTagCtrl.h, Source/UI/Enchant/EnchantUI.h, Source/UI/Events/UICheckAttendanceWnd.h, Source/UI/Events/UIOpenRoulletteWnd.h, Source/UI/Events/UIRoulletteWnd.h, Source/UI/Exchange/UIExchangeUI.h, Source/UI/GameSettings/GameSettingsUI.h, Source/UI/GameSettings/UIBattleMsgOptionWnd.h, Source/UI/GameSettings/UIEscOptionWnd.h, Source/UI/GameSettings/UIHotKeyWnd.h, Source/UI/GameSettings/UIHotkeyGuideWnd.h, Source/UI/GameSettings/UIViewCameraInfoWnd.h, Source/UI/Gauges/UIBarGraph.h, Source/UI/Guild/UIEmblemWnd.h, Source/UI/Guild/UIGuildWnd.h, Source/UI/Items/UIChangeMaterialWnd.h, Source/UI/Items/UICollectionSystemWnd.h, Source/UI/Items/UIEquipmentPropertiesWnd.h, Source/UI/Items/UIGradeEnchantWnd.h, Source/UI/Items/UIIngredientInfoWnd.h, Source/UI/Items/UIItemBaseWnd.h, Source/UI/Items/UIItemCollectionWnd.h, Source/UI/Items/UIItemMoveInfo.h, Source/UI/Items/UIItemPurchaseWnd.h, Source/UI/Items/UIItemReformWnd.h, Source/UI/Items/UIItemSellWnd.h, Source/UI/Items/UIItemSellWnd2.h, Source/UI/Items/UIItemShopWnd.h, Source/UI/Items/UIItemShopWnd2.h, Source/UI/Items/UIItemStoreComboBox.h, Source/UI/Items/UIItemStoreFindWnd.h, Source/UI/Items/UIItemStoreSubWnd.h, Source/UI/Items/UIItemStoreWnd.h, Source/UI/Items/UIItemWnd.h, Source/UI/Items/UILapineScrollBar.h, Source/UI/Items/UILapineUpgradeBoxWnd.h, Source/UI/Items/UIMerchantItemLogWnd.h, Source/UI/Items/UIParaItemShopWnd.h, Source/UI/Items/UIPreviewEquipWnd.h, Source/UI/Items/UIRefiningWnd.h, Source/UI/Items/UISecondCostumeWnd.h, Source/UI/Items/UISelectCartWnd.h, Source/UI/Lists/UIComboBoxEx.h, Source/UI/Lists/UIScrollBarVariants.h, Source/UI/Lists/UIScrollWnd.h, Source/UI/Lists/UITagListBox.h, Source/UI/Login/FuncDrawWNDChar.h, Source/UI/Login/UIChangeNameWnd.h, Source/UI/Login/UIDescriptRace.h, Source/UI/Login/UIEmailAddressWnd.h, Source/UI/Login/UILoginOTPWnd.h, Source/UI/Login/UILoginWnd.h, Source/UI/Login/UIMakeCharWnd.h, Source/UI/Login/UINewMakeCharWnd.h, Source/UI/Login/UINewSelectCharWnd.h, Source/UI/Login/UIPasswordWnd.h, Source/UI/Login/UISecondPasswordEditWnd.h, Source/UI/Login/UISelCharForUServerWnd.h, Source/UI/Login/UISelectServerWnd.h, Source/UI/Login/UIWaitDBSaveWnd.h, Source/UI/Macro/UICaptchaPreviewWnd.h, Source/UI/Macro/UICaptchaRegisterWnd.h, Source/UI/Macro/UIMacroBlackListCheckWnd.h, Source/UI/Macro/UIMacroDetectorWnd.h, Source/UI/Macro/UIMacroReport.h, Source/UI/Macro/UIMacroUserInfoWnd.h, Source/UI/Monster/UIMonsterDisplayWnd.h, Source/UI/Monster/UIMonsterInfoWnd.h, Source/UI/Navigation/NavigationLink.h, Source/UI/Navigation/UIChooseWarpWnd.h, Source/UI/Navigation/UIListBoxNavi.h, Source/UI/Navigation/UIListBoxNaviSearch.h, Source/UI/Navigation/UIMemorialDunWnd.h, Source/UI/Navigation/UIMiniMapWnd.h, Source/UI/Navigation/UIMinimapZoomWnd.h, Source/UI/Navigation/UINavigationHelpWnd.h, Source/UI/Navigation/UINavigationWnd.h, Source/UI/Navigation/UIRoMapWnd.h, Source/UI/Navigation/UIScrollBarNavi.h, Source/UI/Navigation/UIShowWarpWnd.h, Source/UI/Party/MiniPartyGrid.h, Source/UI/Party/MiniPartyPlacement.h, Source/UI/Party/MiniPartyWndAreaMgr.h, Source/UI/Party/UIJobSlotButton.h, Source/UI/Party/UIPartyBookingHelpWnd.h, Source/UI/Party/UISeekPartyListWnd.h, Source/UI/Party/UISeekPartyMBWnd.h, Source/UI/Party/UISeekPartyWnd.h, Source/UI/ProbabilityTable/UIProbabilityTable.h, Source/UI/Quest/UINotifyQuestWnd.h, Source/UI/Quest/UIOngoingQuestInfo.h, Source/UI/Quest/UIRecommendedQuestInfo.h, Source/UI/Quest/UIRenewQuestUI.h, Source/UI/Quest/UIRenewQuestWnd.h, Source/UI/Replay/UIReplayButton.h, Source/UI/Replay/UIReplayControlWnd.h, Source/UI/Replay/UIReplayListBox.h, Source/UI/Replay/UIReplayRECControlWnd.h, Source/UI/Replay/UISelectReplayDataWnd.h, Source/UI/Repute/UIReputeWnd.h, Source/UI/Rodex/UIOpenMailBoxWnd.h, Source/UI/Rodex/UIRodexContentsWnd.h, Source/UI/Rodex/UIRodexInboxWnd.h, Source/UI/RuneSystem/UIRuneSystemWindows.h, Source/UI/RuneSystem/UIRuneSystemWnd.h, Source/UI/SelectPackageItemBox/SelectPackageItemBox.h, Source/UI/SelectPackageItemBox/UIPackageBoxNameList.h, Source/UI/Shop/PriceCommission.h, Source/UI/Shop/UIBank_NewWnd.h, Source/UI/Shop/UIBartermarketWnd.h, Source/UI/Shop/UIMerchantItemMyShopWnd.h, Source/UI/Shop/UIMerchantItemPurchaseWnd.h, Source/UI/Shop/UIMerchantItemShopWnd.h, Source/UI/Shop/UIMerchantItemWnd.h, Source/UI/Shop/UIMerchantMirrorItemWnd.h, Source/UI/Shop/UISerachStoreInfoWnd.h, Source/UI/Shop/UInCash_CallWnd.h, Source/UI/Skill/UIDebuffRemoveWnd.h, Source/UI/Skill/UIGraffiStrboxWnd.h, Source/UI/Skill/UINewSkillListWnd.h, Source/UI/SkillDelayInfo/SkillDelayInfo.h, Source/UI/Status/UIBasicInfoWnd.h, Source/UI/Status/UIHomunInfoWnd.h, Source/UI/Status/UIJobListWnd.h, Source/UI/Status/UIMerInfoWnd.h, Source/UI/Status/UIPetEvolutionWnd.h, Source/UI/Status/UIPetInfoWnd.h, Source/UI/Status/UIPetTamingDeceiveWnd.h, Source/UI/Status/UIRebirthWnd.h, Source/UI/StylingShop/UIStylingShopWnd.h, Source/UI/Text/TextTags.h, Source/UI/Text/UIBroadcastBalloon.h, Source/UI/Text/UIRoundBoxTooltipWnd.h, Source/UI/Window/FrameSkin.h, Source/UI/Window/UIBasicCtrl.h, Source/UI/Window/UIControl.h, Source/UI/Window/UIWindowMgr.inl, Source/Utility/Cipher/EncryptedName.h, Source/Utility/Hash/CRC32.h, Source/Utility/Hash/GGHash.h, Source/Utility/Hash/GGHashMgr.h, Source/Utility/Hash/Md5State.h, Source/Utility/Hash/SHA3.h, Source/Utility/Hash/XxHash3.h, Source/Utility/Text/GuidParse.h, Source/Utility/Text/Tokenizer.h, Source/Utility/Zlib.h, Source/ActorPickNode.h, Source/Client/ModeFade.h, Source/Client/ModeFadeOut.h, Source/Client/ModeScreenshot.h, Source/Client/Registry.h, Source/Client/Replay.h, Source/Client/ReplayRecordOption.h, Source/Client/Session.h, Source/Client/Timer.h, Source/Network/ActorNamePacket.h, Source/Network/ClientKeepalive.h, Source/Network/ClientOptionPacket.h, Source/Network/ExecutableDigestPacket.h, Source/Network/GameTickPacket.h, Source/Render/ActionSpriteDrawing.h, Source/Render/AuxiliarySubmission.h, Source/Render/BitmapDrawing.h, Source/Render/BlendColor.h, Source/Render/DeviceSelection.h, Source/Render/Direct3DErrors.h, Source/Render/DisplayMode.h, Source/Render/RenderAdapter.h, Source/Render/RenderBackends.h, Source/Render/RendererDX7.h, Source/Render/ScreenGeometry.h, Source/Render/ScreenRectangle.h, Source/Render/SpriteGeometry.h, Source/Render/SpriteQuad.h, Source/Render/TextureQuad.h, Source/Render/TextureStageModes.h, Source/Resource/BinkRuntime.h, Source/Resource/EZeffectResource.h, Source/Resource/EmblemResource.h, Source/Resource/GifLzw.h, Source/Resource/GifResource.h, Source/Resource/ImfResource.h, Source/Resource/PaletteResource.h, Source/Resource/RmaResource.h, Source/Resource/SkinPalette.h, Source/Resource/TextureNames.h, Source/Resource/XmlNode.h, Source/UI/Buttons/UICashEmotionSprBtn.h, Source/UI/Buttons/UIDescriptRace.h, Source/UI/Buttons/UIItemMoveInfo.h, Source/UI/Buttons/UIJobSlotButton.h, Source/UI/Buttons/UIReplayButton.h, Source/UI/Dialogs/UIChooseWarpWnd.h, Source/UI/Dialogs/UIEmailAddressWnd.h, Source/UI/Dialogs/UIGraffiStrboxWnd.h, Source/UI/Dialogs/UIMemorialDunWnd.h, Source/UI/Dialogs/UIMiniMapWnd.h, Source/UI/Dialogs/UIMinimapZoomWnd.h, Source/UI/Dialogs/UINotifyQuestWnd.h, Source/UI/Dialogs/UIPasswordWnd.h, Source/UI/Dialogs/UIPetTamingDeceiveWnd.h, Source/UI/Dialogs/UISecondPasswordEditWnd.h, Source/UI/Dialogs/UISelectCartWnd.h, Source/UI/Dialogs/UIWaitDBSaveWnd.h, Source/UI/FrameSkin.h, Source/UI/Item/UIEquipmentPropertiesWnd.h, Source/UI/Item/UIItemBaseWnd.h, Source/UI/Item/UIItemPurchaseWnd.h, Source/UI/Item/UIItemSellWnd.h, Source/UI/Item/UIItemSellWnd2.h, Source/UI/Item/UIItemShopWnd.h, Source/UI/Item/UIItemShopWnd2.h, Source/UI/Item/UIItemStoreFindWnd.h, Source/UI/Item/UIItemStoreSubWnd.h, Source/UI/Item/UIItemStoreWnd.h, Source/UI/Item/UIItemWnd.h, Source/UI/Item/UIMerchantItemLogWnd.h, Source/UI/Item/UIParaItemShopWnd.h, Source/UI/Lists/UIItemStoreComboBox.h, Source/UI/Lists/UIListBoxNavi.h, Source/UI/Lists/UIListBoxNaviSearch.h, Source/UI/Lists/UIPackageBoxNameList.h, Source/UI/Lists/UIReplayListBox.h, Source/UI/Lists/UIScrollBarNavi.h, Source/UI/MiniPartyGrid.h, Source/UI/MiniPartyPlacement.h, Source/UI/PriceCommission.h, Source/UI/Text/NavigationLink.h, Source/UI/Text/UIAchWnd.h, Source/UI/TextTags.h, Source/UI/UIBarGraph.h, Source/UI/UIBartermarketWnd.h, Source/UI/UIBasicCtrl.h, Source/UI/UIBroadcastBalloon.h, Source/UI/UICaptchaPreviewWnd.h, Source/UI/UICaptchaRegisterWnd.h, Source/UI/UIChangeMaterialWnd.h, Source/UI/UICheckAttendanceWnd.h, Source/UI/UIGradeEnchantWnd.h, Source/UI/UIHotkeyGuideWnd.h, Source/UI/UIIngredientInfoWnd.h, Source/UI/UIItemReformWnd.h, Source/UI/UILapineScrollBar.h, Source/UI/UILapineUpgradeBoxWnd.h, Source/UI/UIMacroBlackListCheckWnd.h, Source/UI/UIMacroDetectorWnd.h, Source/UI/UIMacroReport.h, Source/UI/UIMacroUserInfoWnd.h, Source/UI/UIPreviewEquipWnd.h, Source/UI/UIRefiningWnd.h, Source/UI/UIReputeWnd.h, Source/UI/UIRoundBoxTooltipWnd.h, Source/UI/UIScrollWnd.h, Source/UI/UISlotBitmap.h, Source/UI/UIStaticBitmap.h, Source/UI/UIStaticItem.h, Source/UI/Window/FuncDrawWNDChar.h, Source/UI/Window/MiniPartyWndAreaMgr.h, Source/UI/Window/UIAccountLimitedToolWnd.h, Source/UI/Window/UIBalloonOpenBtn.h, Source/UI/Window/UIBank_NewWnd.h, Source/UI/Window/UIBasicInfoWnd.h, Source/UI/Window/UIBattleMsgOptionWnd.h, Source/UI/Window/UIChangeNameWnd.h, Source/UI/Window/UIChatRoomWnd.h, Source/UI/Window/UICntWnd.h, Source/UI/Window/UICollectionSystemWnd.h, Source/UI/Window/UIDebuffRemoveWnd.h, Source/UI/Window/UIEmblemWnd.h, Source/UI/Window/UIEscOptionWnd.h, Source/UI/Window/UIHomunInfoWnd.h, Source/UI/Window/UIHotKeyWnd.h, Source/UI/Window/UIJobListWnd.h, Source/UI/Window/UILoginOTPWnd.h, Source/UI/Window/UILoginWnd.h, Source/UI/Window/UIMakeCharWnd.h, Source/UI/Window/UIMerInfoWnd.h, Source/UI/Window/UIMessageBox.h, Source/UI/Window/UIMessageBoxAutoreturn.h, Source/UI/Window/UIMileageWnd.h, Source/UI/Window/UIMiniBtnWnd.h, Source/UI/Window/UIMonsterDisplayWnd.h, Source/UI/Window/UIMonsterInfoWnd.h, Source/UI/Window/UINavigationHelpWnd.h, Source/UI/Window/UINavigationWnd.h, Source/UI/Window/UINewMakeCharWnd.h, Source/UI/Window/UINewSelectCharWnd.h, Source/UI/Window/UINewSkillListWnd.h, Source/UI/Window/UINormalMB.h, Source/UI/Window/UINoteWnd.h, Source/UI/Window/UINoticeWnd.h, Source/UI/Window/UIOpenMailBoxWnd.h, Source/UI/Window/UIOpenRoulletteWnd.h, Source/UI/Window/UIPartyBookingHelpWnd.h, Source/UI/Window/UIPayConfirmWnd.h, Source/UI/Window/UIPetEvolutionWnd.h, Source/UI/Window/UIPetInfoWnd.h, Source/UI/Window/UIRPImageWnd.h, Source/UI/Window/UIRPImageWnd2.h, Source/UI/Window/UIRebirthWnd.h, Source/UI/Window/UIReplayControlWnd.h, Source/UI/Window/UIReplayRECControlWnd.h, Source/UI/Window/UIRoMapWnd.h, Source/UI/Window/UIRodexContentsWnd.h, Source/UI/Window/UIRoulletteWnd.h, Source/UI/Window/UISecondCostumeWnd.h, Source/UI/Window/UISeekPartyListWnd.h, Source/UI/Window/UISeekPartyMBWnd.h, Source/UI/Window/UISeekPartyWnd.h, Source/UI/Window/UISelCharForUServerWnd.h, Source/UI/Window/UISelectReplayDataWnd.h, Source/UI/Window/UISelectServerWnd.h, Source/UI/Window/UISerachStoreInfoWnd.h, Source/UI/Window/UIShowWarpWnd.h, Source/UI/Window/UITalkboxTrapInputWnd.h, Source/UI/Window/UITransMenuWnd.h, Source/UI/Window/UIVideoWnd.h, Source/UI/Window/UIViewCameraInfoWnd.h, Source/UI/Window/UIWindowCallBtnWnd.h, Source/UI/Window/UIWordDisplayWnd.h, Source/Utility/CRC32.h, Source/Utility/Compression/Zlib.h, Source/Utility/EncryptedName.h, Source/Utility/FileSignatureVerifier.h, Source/Utility/GGHash.h, Source/Utility/GGHashMgr.h, Source/Utility/GuidParse.h, Source/Utility/JsonCppLoader.h, Source/Utility/Md5State.h, Source/Utility/NFileLog.h, Source/Utility/NIPAddr.h, Source/Utility/ProcessSecurity.h, Source/Utility/RegistryKey.h, Source/Utility/SHA3.h, Source/Utility/Tokenizer.h, Source/Utility/XxHash3.h. Adds to the build: Source/Client/Application/ClientOptions.cpp, Source/Client/Application/Registry.cpp, Source/Client/Application/RegistryKey.cpp, Source/Client/Application/Timer.cpp, Source/Client/Mode/EntityInit.cpp, Source/Client/Mode/ModeBaseEvents.cpp, Source/Client/Mode/ModeCursorDrawing.cpp, Source/Client/Mode/ModeFade.cpp, Source/Client/Mode/ModeFadeOut.cpp, Source/Client/Mode/ModeScreenshot.cpp, Source/Client/Mode/ModeTransitions.cpp, Source/Client/Replay/Replay.cpp, Source/Client/Replay/ReplayControl.cpp, Source/Client/Replay/ReplayPacketRecorder.cpp, Source/Client/Session/Session.cpp, Source/Client/Session/SessionAchievements.cpp, Source/Client/Session/SessionParty.cpp, Source/Client/Session/SessionPredicates.cpp, Source/Client/Session/SessionState.cpp, Source/Contents/Actors/ActorPickNode.cpp, Source/File/NFileLog.cpp, Source/Network/NIPAddr.cpp, Source/Network/Packets/ActorNamePacket.cpp, Source/Network/Packets/ClientKeepalive.cpp, Source/Network/Packets/ClientOptionPacket.cpp, Source/Network/Packets/ExecutableDigestPacket.cpp, Source/Network/Packets/GameTickPacket.cpp, Source/Render/DX7/AlphaQueuesDX7.cpp, Source/Render/DX7/AuxiliaryQueuesDX7.cpp, Source/Render/DX7/OpaqueQueuesDX7.cpp, Source/Render/DX7/RendererDX7.cpp, Source/Render/DX9/DeviceCapabilitiesDX9.cpp, Source/Render/Device/DeviceSelection.cpp, Source/Render/Device/Direct3DErrors.cpp, Source/Render/Device/DisplayMode.cpp, Source/Render/Device/RenderAdapter.cpp, Source/Render/Device/RenderBackends.cpp, Source/Render/Drawing/ActionSpriteDrawing.cpp, Source/Render/Drawing/BitmapDrawing.cpp, Source/Render/Drawing/BlendColor.cpp, Source/Render/Drawing/SpriteGeometry.cpp, Source/Render/Primitives/AlphaRectangle.cpp, Source/Render/Primitives/AuxiliarySubmission.cpp, Source/Render/Primitives/SpriteQuad.cpp, Source/Render/Primitives/TextureQuad.cpp, Source/Render/Primitives/UIRPDataDrawing.cpp, Source/Render/Projection/ScreenGeometry.cpp, Source/Render/Projection/ScreenRectangle.cpp, Source/Render/Projection/ViewportProjection.cpp, Source/Resource/Bitmap/EmblemResource.cpp, Source/Resource/Bitmap/GifLzw.cpp, Source/Resource/Bitmap/GifResource.cpp, Source/Resource/Bitmap/PaletteResource.cpp, Source/Resource/Bitmap/SkinPalette.cpp, Source/Resource/Bitmap/TextureNames.cpp, Source/Resource/Effects/EZeffectResource.cpp, Source/Resource/Json/JsonCppLoader.cpp, Source/Resource/Models/RmaResource.cpp, Source/Resource/Sprites/ImfLayerIndex.cpp, Source/Resource/Sprites/ImfResource.cpp, Source/Resource/Xml/XmlNode.cpp, Source/Resource/Xml/XmlParsing.cpp, Source/Security/FileSignatureVerifier.cpp, Source/Security/ProcessSecurity.cpp, Source/Security/UnknownA68.cpp, Source/UI/Achievement/UIAchWnd.cpp, Source/UI/Buttons/UIBalloonOpenBtn.cpp, Source/UI/Buttons/UIMiniBtnWnd.cpp, Source/UI/Buttons/UISlotBitmap.cpp, Source/UI/Buttons/UIStaticBitmap.cpp, Source/UI/Buttons/UIStaticItem.cpp, Source/UI/CashShop/UIMileageWnd.cpp, Source/UI/Chat/UIZeroChatWnd.cpp, Source/UI/Dialogs/UIAccountLimitedToolWnd.cpp, Source/UI/Dialogs/UILocaleTextWnd.cpp, Source/UI/Dialogs/UIMessageBox.cpp, Source/UI/Dialogs/UINormalMB.cpp, Source/UI/Dialogs/UINoteWnd.cpp, Source/UI/Dialogs/UINoticeWnd.cpp, Source/UI/Dialogs/UIRPImageWnd.cpp, Source/UI/Dialogs/UIRPImageWnd2.cpp, Source/UI/Dialogs/UITransMenuWnd.cpp, Source/UI/Dialogs/UIVideoWnd.cpp, Source/UI/Dialogs/UIWordDisplayWnd.cpp, Source/UI/Events/UICheckAttendanceWnd.cpp, Source/UI/Events/UIOpenRoulletteWnd.cpp, Source/UI/Events/UIRoulletteWnd.cpp, Source/UI/GameSettings/UIBattleMsgOptionWnd.cpp, Source/UI/GameSettings/UIEscOptionWnd.cpp, Source/UI/GameSettings/UIHotKeyWnd.cpp, Source/UI/GameSettings/UIHotkeyGuideWnd.cpp, Source/UI/GameSettings/UIViewCameraInfoWnd.cpp, Source/UI/Gauges/UIBarGraph.cpp, Source/UI/Guild/UIEmblemWnd.cpp, Source/UI/Items/UIChangeMaterialWnd.cpp, Source/UI/Items/UICollectionSystemWnd.cpp, Source/UI/Items/UIEquipmentPropertiesWnd.cpp, Source/UI/Items/UIGradeEnchantWnd.cpp, Source/UI/Items/UIItemMoveInfo.cpp, Source/UI/Items/UIItemReformWnd.cpp, Source/UI/Items/UIItemStoreComboBox.cpp, Source/UI/Items/UIItemStoreWnd.cpp, Source/UI/Items/UILapineBoxWnd.cpp, Source/UI/Items/UILapineScrollBar.cpp, Source/UI/Items/UILapineUpgradeBoxWnd.cpp, Source/UI/Items/UIMerchantItemLogWnd.cpp, Source/UI/Items/UIParaItemShopWnd.cpp, Source/UI/Items/UIPreviewEquipWnd.cpp, Source/UI/Items/UIRefiningWnd.cpp, Source/UI/Items/UISecondCostumeWnd.cpp, Source/UI/Lists/UIScrollWnd.cpp, Source/UI/Login/FuncDrawWNDChar.cpp, Source/UI/Login/UIChangeNameWnd.cpp, Source/UI/Login/UIDescriptRace.cpp, Source/UI/Login/UIEmailAddressWnd.cpp, Source/UI/Login/UILoginWnd.cpp, Source/UI/Login/UINewMakeCharWnd.cpp, Source/UI/Login/UINewSelectCharWnd.cpp, Source/UI/Login/UIPasswordWnd.cpp, Source/UI/Login/UISelCharForUServerWnd.cpp, Source/UI/Login/UIWaitDBSaveWnd.cpp, Source/UI/Macro/UICaptchaPreviewWnd.cpp, Source/UI/Macro/UICaptchaRegisterWnd.cpp, Source/UI/Macro/UIMacroBlackListCheckWnd.cpp, Source/UI/Macro/UIMacroDetectorWnd.cpp, Source/UI/Macro/UIMacroReport.cpp, Source/UI/Macro/UIMacroUserInfoWnd.cpp, Source/UI/Navigation/NavigationLink.cpp, Source/UI/Navigation/UIListBoxNavi.cpp, Source/UI/Navigation/UIMinimapZoomWnd.cpp, Source/UI/Navigation/UINavigationHelpWnd.cpp, Source/UI/Navigation/UINavigationWnd.cpp, Source/UI/Navigation/UIRoMapWnd.cpp, Source/UI/Navigation/UIScrollBarNavi.cpp, Source/UI/Navigation/UIShowWarpWnd.cpp, Source/UI/Party/MiniPartyGrid.cpp, Source/UI/Party/MiniPartyManager.cpp, Source/UI/Party/MiniPartyPlacement.cpp, Source/UI/Party/MiniPartyUsableArea.cpp, Source/UI/Party/UIJobSlotButton.cpp, Source/UI/Party/UIPartyBookingHelpWnd.cpp, Source/UI/Party/UISeekPartyListWnd.cpp, Source/UI/Party/UISeekPartyMBWnd.cpp, Source/UI/Party/UISeekPartyWnd.cpp, Source/UI/Repute/UIReputeWnd.cpp, Source/UI/Rodex/UIOpenMailBoxWnd.cpp, Source/UI/Rodex/UIRodexContentsWnd.cpp, Source/UI/SelectPackageItemBox/UIPackageBoxNameList.cpp, Source/UI/Shop/PriceCommission.cpp, Source/UI/Shop/UIBartermarketWnd.cpp, Source/UI/Shop/UISerachStoreInfoWnd.cpp, Source/UI/Skill/UIDebuffRemoveWnd.cpp, Source/UI/Skill/UIGraffiStrboxWnd.cpp, Source/UI/Skill/UINewSkillListWnd.cpp, Source/UI/Skill/UINewSkillListWndHitTest.cpp, Source/UI/Status/UIBasicInfoWnd.cpp, Source/UI/Status/UIJobListWnd.cpp, Source/UI/Status/UIPetEvolutionWnd.cpp, Source/UI/Status/UIRebirthWnd.cpp, Source/UI/Text/TextTagExtraction.cpp, Source/UI/Text/TextTagRegistry.cpp, Source/UI/Text/UIBroadcastBalloon.cpp, Source/UI/Text/UIRoundBoxTooltipWnd.cpp, Source/UI/Window/FrameSkin.cpp, Source/UI/Window/UIBasicCtrl.cpp, Source/UI/Window/WindowBackground.cpp, Source/UI/Window/WindowLowerBorder.cpp, Source/UI/Window/WindowOverlay.cpp, Source/UI/Window/WindowSprite.cpp, Source/UI/Window/WindowTitlebar.cpp, Source/Utility/BoolStubs.cpp, Source/Utility/Hash/CRC32.cpp, Source/Utility/Hash/GGHash.cpp, Source/Utility/Hash/GGHashMgr.cpp, Source/Utility/Hash/Md5State.cpp, Source/Utility/Hash/SHA3.cpp, Source/Utility/Hash/XxHash3.cpp, Source/Utility/Lexicon/LexiconTrie.cpp, Source/Utility/Text/GuidParse.cpp, Source/Utility/Text/Tokenizer.cpp Deletes: Source/ActorPickNode.cpp, Source/ActorPickNode.h, Source/Archive/UnknownA68.cpp, Source/Client/ClientOptions.cpp, Source/Client/ModeBaseEvents.cpp, Source/Client/ModeCursorDrawing.cpp, Source/Client/ModeFade.cpp, Source/Client/ModeFade.h, Source/Client/ModeFadeOut.cpp, Source/Client/ModeFadeOut.h, Source/Client/ModeScreenshot.cpp, Source/Client/ModeScreenshot.h, Source/Client/ModeTransitions.cpp, Source/Client/Registry.cpp, Source/Client/Registry.h, Source/Client/Replay.cpp, Source/Client/Replay.h, Source/Client/ReplayControl.cpp, Source/Client/ReplayPacketRecorder.cpp, Source/Client/ReplayRecordOption.h, Source/Client/Session.cpp, Source/Client/Session.h, Source/Client/SessionAchievements.cpp, Source/Client/SessionParty.cpp, Source/Client/SessionPredicates.cpp, Source/Client/SessionState.cpp, Source/Client/Timer.cpp, Source/Client/Timer.h, Source/EntityInit.cpp, Source/Interface/BoolStubs.cpp, Source/LexiconTrie.cpp, Source/Network/ActorNamePacket.cpp, Source/Network/ActorNamePacket.h, Source/Network/ClientKeepalive.cpp, Source/Network/ClientKeepalive.h, Source/Network/ClientOptionPacket.cpp, Source/Network/ClientOptionPacket.h, Source/Network/ExecutableDigestPacket.cpp, Source/Network/ExecutableDigestPacket.h, Source/Network/GameTickPacket.cpp, Source/Network/GameTickPacket.h, Source/Render/ActionSpriteDrawing.cpp, Source/Render/ActionSpriteDrawing.h, Source/Render/AlphaQueuesDX7.cpp, Source/Render/AlphaRectangle.cpp, Source/Render/AuxiliaryQueuesDX7.cpp, Source/Render/AuxiliarySubmission.cpp, Source/Render/AuxiliarySubmission.h, Source/Render/BitmapDrawing.cpp, Source/Render/BitmapDrawing.h, Source/Render/BlendColor.cpp, Source/Render/BlendColor.h, Source/Render/DeviceCapabilitiesDX9.cpp, Source/Render/DeviceSelection.cpp, Source/Render/DeviceSelection.h, Source/Render/Direct3DErrors.cpp, Source/Render/Direct3DErrors.h, Source/Render/DisplayMode.cpp, Source/Render/DisplayMode.h, Source/Render/OpaqueQueuesDX7.cpp, Source/Render/RenderAdapter.cpp, Source/Render/RenderAdapter.h, Source/Render/RenderBackends.cpp, Source/Render/RenderBackends.h, Source/Render/RendererDX7.cpp, Source/Render/RendererDX7.h, Source/Render/ScreenGeometry.cpp, Source/Render/ScreenGeometry.h, Source/Render/ScreenRectangle.cpp, Source/Render/ScreenRectangle.h, Source/Render/SpriteGeometry.cpp, Source/Render/SpriteGeometry.h, Source/Render/SpriteQuad.cpp, Source/Render/SpriteQuad.h, Source/Render/TextureQuad.cpp, Source/Render/TextureQuad.h, Source/Render/TextureStageModes.h, Source/Render/UIRPDataDrawing.cpp, Source/Render/ViewportProjection.cpp, Source/Resource/BinkRuntime.h, Source/Resource/EZeffectResource.cpp, Source/Resource/EZeffectResource.h, Source/Resource/EmblemResource.cpp, Source/Resource/EmblemResource.h, Source/Resource/GifLzw.cpp, Source/Resource/GifLzw.h, Source/Resource/GifResource.cpp, Source/Resource/GifResource.h, Source/Resource/ImfLayerIndex.cpp, Source/Resource/ImfResource.cpp, Source/Resource/ImfResource.h, Source/Resource/PaletteResource.cpp, Source/Resource/PaletteResource.h, Source/Resource/RmaResource.cpp, Source/Resource/RmaResource.h, Source/Resource/SkinPalette.cpp, Source/Resource/SkinPalette.h, Source/Resource/TextureNames.cpp, Source/Resource/TextureNames.h, Source/Resource/XmlNode.cpp, Source/Resource/XmlNode.h, Source/Resource/XmlParsing.cpp, Source/UI/Buttons/UICashEmotionSprBtn.h, Source/UI/Buttons/UIDescriptRace.cpp, Source/UI/Buttons/UIDescriptRace.h, Source/UI/Buttons/UIItemMoveInfo.cpp, Source/UI/Buttons/UIItemMoveInfo.h, Source/UI/Buttons/UIJobSlotButton.cpp, Source/UI/Buttons/UIJobSlotButton.h, Source/UI/Buttons/UIReplayButton.h, Source/UI/Dialogs/UIChooseWarpWnd.h, Source/UI/Dialogs/UIEmailAddressWnd.cpp, Source/UI/Dialogs/UIEmailAddressWnd.h, Source/UI/Dialogs/UIGraffiStrboxWnd.cpp, Source/UI/Dialogs/UIGraffiStrboxWnd.h, Source/UI/Dialogs/UIMemorialDunWnd.h, Source/UI/Dialogs/UIMiniMapWnd.h, Source/UI/Dialogs/UIMinimapZoomWnd.cpp, Source/UI/Dialogs/UIMinimapZoomWnd.h, Source/UI/Dialogs/UINotifyQuestWnd.h, Source/UI/Dialogs/UIPasswordWnd.cpp, Source/UI/Dialogs/UIPasswordWnd.h, Source/UI/Dialogs/UIPetTamingDeceiveWnd.h, Source/UI/Dialogs/UISecondPasswordEditWnd.h, Source/UI/Dialogs/UISelectCartWnd.h, Source/UI/Dialogs/UIWaitDBSaveWnd.cpp, Source/UI/Dialogs/UIWaitDBSaveWnd.h, Source/UI/FrameSkin.cpp, Source/UI/FrameSkin.h, Source/UI/Item/UIEquipmentPropertiesWnd.cpp, Source/UI/Item/UIEquipmentPropertiesWnd.h, Source/UI/Item/UIItemBaseWnd.h, Source/UI/Item/UIItemPurchaseWnd.h, Source/UI/Item/UIItemSellWnd.h, Source/UI/Item/UIItemSellWnd2.h, Source/UI/Item/UIItemShopWnd.h, Source/UI/Item/UIItemShopWnd2.h, Source/UI/Item/UIItemStoreFindWnd.h, Source/UI/Item/UIItemStoreSubWnd.h, Source/UI/Item/UIItemStoreWnd.cpp, Source/UI/Item/UIItemStoreWnd.h, Source/UI/Item/UIItemWnd.h, Source/UI/Item/UIMerchantItemLogWnd.cpp, Source/UI/Item/UIMerchantItemLogWnd.h, Source/UI/Item/UIParaItemShopWnd.cpp, Source/UI/Item/UIParaItemShopWnd.h, Source/UI/Lists/UIItemStoreComboBox.cpp, Source/UI/Lists/UIItemStoreComboBox.h, Source/UI/Lists/UIListBoxNavi.cpp, Source/UI/Lists/UIListBoxNavi.h, Source/UI/Lists/UIListBoxNaviSearch.h, Source/UI/Lists/UIPackageBoxNameList.cpp, Source/UI/Lists/UIPackageBoxNameList.h, Source/UI/Lists/UIReplayListBox.h, Source/UI/Lists/UIScrollBarNavi.cpp, Source/UI/Lists/UIScrollBarNavi.h, Source/UI/MiniPartyGrid.cpp, Source/UI/MiniPartyGrid.h, Source/UI/MiniPartyManager.cpp, Source/UI/MiniPartyPlacement.cpp, Source/UI/MiniPartyPlacement.h, Source/UI/MiniPartyUsableArea.cpp, Source/UI/PriceCommission.cpp, Source/UI/PriceCommission.h, Source/UI/Text/NavigationLink.cpp, Source/UI/Text/NavigationLink.h, Source/UI/Text/UIAchWnd.cpp, Source/UI/Text/UIAchWnd.h, Source/UI/TextTagExtraction.cpp, Source/UI/TextTagRegistry.cpp, Source/UI/TextTags.h, Source/UI/UIBarGraph.cpp, Source/UI/UIBarGraph.h, Source/UI/UIBartermarketWnd.cpp, Source/UI/UIBartermarketWnd.h, Source/UI/UIBasicCtrl.cpp, Source/UI/UIBasicCtrl.h, Source/UI/UIBroadcastBalloon.cpp, Source/UI/UIBroadcastBalloon.h, Source/UI/UICaptchaPreviewWnd.cpp, Source/UI/UICaptchaPreviewWnd.h, Source/UI/UICaptchaRegisterWnd.cpp, Source/UI/UICaptchaRegisterWnd.h, Source/UI/UIChangeMaterialWnd.cpp, Source/UI/UIChangeMaterialWnd.h, Source/UI/UICheckAttendanceWnd.cpp, Source/UI/UICheckAttendanceWnd.h, Source/UI/UIGradeEnchantWnd.cpp, Source/UI/UIGradeEnchantWnd.h, Source/UI/UIHotkeyGuideWnd.cpp, Source/UI/UIHotkeyGuideWnd.h, Source/UI/UIIngredientInfoWnd.h, Source/UI/UIItemReformWnd.cpp, Source/UI/UIItemReformWnd.h, Source/UI/UILapineBoxWnd.cpp, Source/UI/UILapineScrollBar.cpp, Source/UI/UILapineScrollBar.h, Source/UI/UILapineUpgradeBoxWnd.cpp, Source/UI/UILapineUpgradeBoxWnd.h, Source/UI/UIMacroBlackListCheckWnd.cpp, Source/UI/UIMacroBlackListCheckWnd.h, Source/UI/UIMacroDetectorWnd.cpp, Source/UI/UIMacroDetectorWnd.h, Source/UI/UIMacroReport.cpp, Source/UI/UIMacroReport.h, Source/UI/UIMacroUserInfoWnd.cpp, Source/UI/UIMacroUserInfoWnd.h, Source/UI/UIPreviewEquipWnd.cpp, Source/UI/UIPreviewEquipWnd.h, Source/UI/UIRefiningWnd.cpp, Source/UI/UIRefiningWnd.h, Source/UI/UIReputeWnd.cpp, Source/UI/UIReputeWnd.h, Source/UI/UIRoundBoxTooltipWnd.cpp, Source/UI/UIRoundBoxTooltipWnd.h, Source/UI/UIScrollWnd.cpp, Source/UI/UIScrollWnd.h, Source/UI/UISlotBitmap.cpp, Source/UI/UISlotBitmap.h, Source/UI/UIStaticBitmap.cpp, Source/UI/UIStaticBitmap.h, Source/UI/UIStaticItem.cpp, Source/UI/UIStaticItem.h, Source/UI/Window/FuncDrawWNDChar.cpp, Source/UI/Window/FuncDrawWNDChar.h, Source/UI/Window/MiniPartyWndAreaMgr.h, Source/UI/Window/UIAccountLimitedToolWnd.cpp, Source/UI/Window/UIAccountLimitedToolWnd.h, Source/UI/Window/UIBalloonOpenBtn.cpp, Source/UI/Window/UIBalloonOpenBtn.h, Source/UI/Window/UIBank_NewWnd.h, Source/UI/Window/UIBasicInfoWnd.cpp, Source/UI/Window/UIBasicInfoWnd.h, Source/UI/Window/UIBattleMsgOptionWnd.cpp, Source/UI/Window/UIBattleMsgOptionWnd.h, Source/UI/Window/UIChangeNameWnd.cpp, Source/UI/Window/UIChangeNameWnd.h, Source/UI/Window/UIChatRoomWnd.h, Source/UI/Window/UICntWnd.h, Source/UI/Window/UICollectionSystemWnd.cpp, Source/UI/Window/UICollectionSystemWnd.h, Source/UI/Window/UIDebuffRemoveWnd.cpp, Source/UI/Window/UIDebuffRemoveWnd.h, Source/UI/Window/UIEmblemWnd.cpp, Source/UI/Window/UIEmblemWnd.h, Source/UI/Window/UIEscOptionWnd.cpp, Source/UI/Window/UIEscOptionWnd.h, Source/UI/Window/UIHomunInfoWnd.h, Source/UI/Window/UIHotKeyWnd.cpp, Source/UI/Window/UIHotKeyWnd.h, Source/UI/Window/UIJobListWnd.cpp, Source/UI/Window/UIJobListWnd.h, Source/UI/Window/UILocaleTextWnd.cpp, Source/UI/Window/UILoginOTPWnd.h, Source/UI/Window/UILoginWnd.cpp, Source/UI/Window/UILoginWnd.h, Source/UI/Window/UIMakeCharWnd.h, Source/UI/Window/UIMerInfoWnd.h, Source/UI/Window/UIMessageBox.cpp, Source/UI/Window/UIMessageBox.h, Source/UI/Window/UIMessageBoxAutoreturn.h, Source/UI/Window/UIMileageWnd.cpp, Source/UI/Window/UIMileageWnd.h, Source/UI/Window/UIMiniBtnWnd.cpp, Source/UI/Window/UIMiniBtnWnd.h, Source/UI/Window/UIMonsterDisplayWnd.h, Source/UI/Window/UIMonsterInfoWnd.h, Source/UI/Window/UINavigationHelpWnd.cpp, Source/UI/Window/UINavigationHelpWnd.h, Source/UI/Window/UINavigationWnd.cpp, Source/UI/Window/UINavigationWnd.h, Source/UI/Window/UINewMakeCharWnd.cpp, Source/UI/Window/UINewMakeCharWnd.h, Source/UI/Window/UINewSelectCharWnd.cpp, Source/UI/Window/UINewSelectCharWnd.h, Source/UI/Window/UINewSkillListWnd.cpp, Source/UI/Window/UINewSkillListWnd.h, Source/UI/Window/UINewSkillListWndHitTest.cpp, Source/UI/Window/UINormalMB.cpp, Source/UI/Window/UINormalMB.h, Source/UI/Window/UINoteWnd.cpp, Source/UI/Window/UINoteWnd.h, Source/UI/Window/UINoticeWnd.cpp, Source/UI/Window/UINoticeWnd.h, Source/UI/Window/UIOpenMailBoxWnd.cpp, Source/UI/Window/UIOpenMailBoxWnd.h, Source/UI/Window/UIOpenRoulletteWnd.cpp, Source/UI/Window/UIOpenRoulletteWnd.h, Source/UI/Window/UIPartyBookingHelpWnd.cpp, Source/UI/Window/UIPartyBookingHelpWnd.h, Source/UI/Window/UIPayConfirmWnd.h, Source/UI/Window/UIPetEvolutionWnd.cpp, Source/UI/Window/UIPetEvolutionWnd.h, Source/UI/Window/UIPetInfoWnd.h, Source/UI/Window/UIRPImageWnd.cpp, Source/UI/Window/UIRPImageWnd.h, Source/UI/Window/UIRPImageWnd2.cpp, Source/UI/Window/UIRPImageWnd2.h, Source/UI/Window/UIRebirthWnd.cpp, Source/UI/Window/UIRebirthWnd.h, Source/UI/Window/UIReplayControlWnd.h, Source/UI/Window/UIReplayRECControlWnd.h, Source/UI/Window/UIRoMapWnd.cpp, Source/UI/Window/UIRoMapWnd.h, Source/UI/Window/UIRodexContentsWnd.cpp, Source/UI/Window/UIRodexContentsWnd.h, Source/UI/Window/UIRoulletteWnd.cpp, Source/UI/Window/UIRoulletteWnd.h, Source/UI/Window/UISecondCostumeWnd.cpp, Source/UI/Window/UISecondCostumeWnd.h, Source/UI/Window/UISeekPartyListWnd.cpp, Source/UI/Window/UISeekPartyListWnd.h, Source/UI/Window/UISeekPartyMBWnd.cpp, Source/UI/Window/UISeekPartyMBWnd.h, Source/UI/Window/UISeekPartyWnd.cpp, Source/UI/Window/UISeekPartyWnd.h, Source/UI/Window/UISelCharForUServerWnd.cpp, Source/UI/Window/UISelCharForUServerWnd.h, Source/UI/Window/UISelectReplayDataWnd.h, Source/UI/Window/UISelectServerWnd.h, Source/UI/Window/UISerachStoreInfoWnd.cpp, Source/UI/Window/UISerachStoreInfoWnd.h, Source/UI/Window/UIShowWarpWnd.cpp, Source/UI/Window/UIShowWarpWnd.h, Source/UI/Window/UITalkboxTrapInputWnd.h, Source/UI/Window/UITransMenuWnd.cpp, Source/UI/Window/UITransMenuWnd.h, Source/UI/Window/UIVideoWnd.cpp, Source/UI/Window/UIVideoWnd.h, Source/UI/Window/UIViewCameraInfoWnd.cpp, Source/UI/Window/UIViewCameraInfoWnd.h, Source/UI/Window/UIWindowCallBtnWnd.h, Source/UI/Window/UIWordDisplayWnd.cpp, Source/UI/Window/UIWordDisplayWnd.h, Source/UI/Window/UIZeroChatWnd.cpp, Source/UI/WindowBackground.cpp, Source/UI/WindowLowerBorder.cpp, Source/UI/WindowOverlay.cpp, Source/UI/WindowSprite.cpp, Source/UI/WindowTitlebar.cpp, Source/Utility/CRC32.cpp, Source/Utility/CRC32.h, Source/Utility/Compression/Zlib.h, Source/Utility/EncryptedName.h, Source/Utility/FileSignatureVerifier.cpp, Source/Utility/FileSignatureVerifier.h, Source/Utility/GGHash.cpp, Source/Utility/GGHash.h, Source/Utility/GGHashMgr.cpp, Source/Utility/GGHashMgr.h, Source/Utility/GuidParse.cpp, Source/Utility/GuidParse.h, Source/Utility/JsonCppLoader.cpp, Source/Utility/JsonCppLoader.h, Source/Utility/Md5State.cpp, Source/Utility/Md5State.h, Source/Utility/NFileLog.cpp, Source/Utility/NFileLog.h, Source/Utility/NIPAddr.cpp, Source/Utility/NIPAddr.h, Source/Utility/ProcessSecurity.cpp, Source/Utility/ProcessSecurity.h, Source/Utility/RegistryKey.cpp, Source/Utility/RegistryKey.h, Source/Utility/SHA3.cpp, Source/Utility/SHA3.h, Source/Utility/Tokenizer.cpp, Source/Utility/Tokenizer.h, Source/Utility/XxHash3.cpp, Source/Utility/XxHash3.h
2029 lines
70 KiB
C++
2029 lines
70 KiB
C++
#include "UI/Shop/UIBartermarketWnd.h"
|
|
#include "Client/Mode/ModeMessage.h"
|
|
#include "UI/Window/UIEnums.h"
|
|
#include "UI/Window/WindowId.h"
|
|
#include "UI/Window/UIEnums.h"
|
|
|
|
#include "Client/Mode/CGameMode.h"
|
|
#include "Client/Mode/CMode.h"
|
|
#include "Client/Mode/ModeDragState.h"
|
|
#include "Client/Mode/ModeMgr.h"
|
|
#include "Client/Session/Session.h"
|
|
#include "Contents/Items/ItemDescription.h"
|
|
#include "Contents/Items/ItemInfo.h"
|
|
#include "Contents/Tables/MessageTable.h"
|
|
#include "Render/Text/FontCache.h"
|
|
#include "Render/Text/TextContext.h"
|
|
#include "Resource/Bitmap/BitmapResource.h"
|
|
#include "Resource/ResourceMgr.h"
|
|
#include "Resource/Bitmap/SkinPalette.h"
|
|
#include "Resource/Bitmap/TextureNames.h"
|
|
#include "UI/Shop/ItemDrawing.h"
|
|
#include "UI/Text/ColoredText.h"
|
|
#include "UI/Window/UIResizer.h"
|
|
#include "UI/Window/UIWindowMgr.h"
|
|
#include "Utility/Text/FormatString.h"
|
|
|
|
#include "Resource/MSGSTRINGID.h"
|
|
#include <algorithm>
|
|
#include <cstdlib>
|
|
#include <cstring>
|
|
#include <format>
|
|
#include <map>
|
|
#include <new>
|
|
#include <string>
|
|
|
|
// OFFSET: 0x00844BE0
|
|
// FUNCTION: fn_10567
|
|
UIExpandedBarterItemPurchaseWnd::UIExpandedBarterItemPurchaseWnd()
|
|
: UIFrameWnd(0) {
|
|
this->resizer = nullptr;
|
|
this->scrollBar = nullptr;
|
|
this->firstRow = 0;
|
|
this->rowCount = 0;
|
|
this->hoveredRow = 0;
|
|
this->scrollEnabled = 0;
|
|
}
|
|
|
|
// OFFSET: 0x00844D00
|
|
// FUNCTION: fn_10569
|
|
UIExpandedBartermarketWnd::UIExpandedBartermarketWnd()
|
|
: UIFrameWnd(0) {
|
|
this->resizer = nullptr;
|
|
this->scrollBar = nullptr;
|
|
this->firstRow = 0;
|
|
this->rowCount = 0;
|
|
this->hoveredRow = 0;
|
|
this->scrollEnabled = 0;
|
|
}
|
|
|
|
// OFFSET: 0x00840B30
|
|
// FUNCTION: fn_10545
|
|
void UIBarterItemPurchaseWnd::DragAndDrop(int x, int y, std::intptr_t value) {
|
|
if (g_windowMgr.LookupWindow(WID_EXCHANGEUI)) {
|
|
UIWindow::DragAndDrop(x, y, value);
|
|
return;
|
|
}
|
|
|
|
const ModeDragState* drag = reinterpret_cast<const ModeDragState*>(value);
|
|
if (drag->source == 31) {
|
|
if (g_session.IsEquipItemType(drag->type) == true || g_session.IsShadowItemType(drag->type) == true) {
|
|
this->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0);
|
|
return;
|
|
}
|
|
|
|
g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1);
|
|
if (UIWindow* window = g_windowMgr.LookupWindow(WID_ITEMDROPCNTWND)) {
|
|
window->SendMsg(nullptr, UM_SETSTATE, 24, 0, 0, 0);
|
|
}
|
|
} else {
|
|
g_modeMgr.GetGameMode()->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00840C00
|
|
// FUNCTION: fn_10546
|
|
void UIBartermarketWnd::DragAndDrop(int x, int y, std::intptr_t value) {
|
|
if (g_windowMgr.LookupWindow(WID_EXCHANGEUI)) {
|
|
UIWindow::DragAndDrop(x, y, value);
|
|
return;
|
|
}
|
|
|
|
const ModeDragState* drag = reinterpret_cast<const ModeDragState*>(value);
|
|
if (drag->source != 4) {
|
|
if (CMode* mode = g_modeMgr.GetGameMode()) {
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
}
|
|
return;
|
|
}
|
|
|
|
if (drag->quantity == 1) {
|
|
this->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0);
|
|
return;
|
|
}
|
|
|
|
g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1);
|
|
if (UIWindow* window = g_windowMgr.LookupWindow(WID_ITEMDROPCNTWND)) {
|
|
window->SendMsg(nullptr, UM_SETSTATE, 23, 0, 0, 0);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00840CC0
|
|
// FUNCTION: fn_10547
|
|
std::pair<bool, BarterMarketItem> UIBartermarketWnd::GetBarterItemAt(int x, int y) {
|
|
if (x < 40 || x >= this->geometry.width - 20 || y < 17 || y >= this->visibleRows * 32 + 17) {
|
|
return std::make_pair(false, BarterMarketItem());
|
|
}
|
|
|
|
const int row = (y - 17) / 32;
|
|
std::list<BarterMarketItem> items = *g_barterMarketItemMgr->GetItems();
|
|
int index = 0;
|
|
int visible = 0;
|
|
for (std::list<BarterMarketItem>::iterator it = items.begin(); it != items.end(); ++it, ++index) {
|
|
if (index >= this->scroll * this->columns) {
|
|
if (visible == this->columns * row) {
|
|
return std::make_pair(true, *it);
|
|
}
|
|
++visible;
|
|
}
|
|
}
|
|
return std::make_pair(false, BarterMarketItem());
|
|
}
|
|
|
|
// OFFSET: 0x00840FF0
|
|
// FUNCTION: fn_10548
|
|
std::pair<bool, BarterMarketItem> UIBarterItemPurchaseWnd::GetBarterItemOrPriceAt(int x, int y) {
|
|
if (x < 40 || x >= this->geometry.width - 20 || y < 17 || y >= this->visibleRows * 32 + 17) {
|
|
return std::make_pair(false, BarterMarketItem());
|
|
}
|
|
|
|
const int column = (x - 40) / 32;
|
|
const int row = (y - 17) / 32;
|
|
std::list<BarterMarketItem> items = *g_barterMarketItemMgr->GetAllItems();
|
|
int index = 0;
|
|
int visible = 0;
|
|
for (std::list<BarterMarketItem>::iterator it = items.begin(); it != items.end(); ++it, ++index) {
|
|
if (index >= this->scroll * this->columns) {
|
|
if (visible == this->columns * row) {
|
|
if (column == 0) {
|
|
return std::make_pair(true, *it);
|
|
}
|
|
BarterMarketItem price;
|
|
char buffer[100];
|
|
std::memset(buffer, 0, sizeof(buffer));
|
|
_itoa(it->field_2c, buffer, 10);
|
|
price.name = buffer;
|
|
price.field_1c = 20;
|
|
return std::make_pair(true, price);
|
|
}
|
|
++visible;
|
|
}
|
|
}
|
|
return std::make_pair(false, BarterMarketItem());
|
|
}
|
|
|
|
// OFFSET: 0x00841320
|
|
// FUNCTION: fn_10549
|
|
std::pair<bool, BarterMarketItem> UIBartermarketWnd::GetBarterItemOrPriceAt(int x, int y) {
|
|
if (x < 40 || x >= this->geometry.width - 20 || y < 17 || y >= this->visibleRows * 32 + 17) {
|
|
return std::make_pair(false, BarterMarketItem());
|
|
}
|
|
|
|
const int column = (x - 40) / 32;
|
|
const int row = (y - 17) / 32;
|
|
std::list<BarterMarketItem> items = *g_barterMarketItemMgr->GetItems();
|
|
int index = 0;
|
|
int visible = 0;
|
|
for (std::list<BarterMarketItem>::iterator it = items.begin(); it != items.end(); ++it, ++index) {
|
|
if (index >= this->scroll * this->columns) {
|
|
if (visible == this->columns * row) {
|
|
if (column == 0) {
|
|
return std::make_pair(true, *it);
|
|
}
|
|
BarterMarketItem price;
|
|
char buffer[100];
|
|
std::memset(buffer, 0, sizeof(buffer));
|
|
_itoa(it->field_2c, buffer, 10);
|
|
price.name = buffer;
|
|
price.field_1c = 20;
|
|
return std::make_pair(true, price);
|
|
}
|
|
++visible;
|
|
}
|
|
}
|
|
return std::make_pair(false, BarterMarketItem());
|
|
}
|
|
|
|
// OFFSET: 0x00841650
|
|
// FUNCTION: fn_10550
|
|
std::pair<bool, BarterMarketItem> UIBarterItemPurchaseWnd::GetBarterItemAt(int x, int y) {
|
|
if (x < 40 || x >= this->geometry.width - 20 || y < 17 || y >= this->visibleRows * 32 + 17) {
|
|
return std::make_pair(false, BarterMarketItem());
|
|
}
|
|
|
|
const int row = (y - 17) / 32;
|
|
std::list<BarterMarketItem> items = *g_barterMarketItemMgr->GetAllItems();
|
|
int index = 0;
|
|
int visible = 0;
|
|
for (std::list<BarterMarketItem>::iterator it = items.begin(); it != items.end(); ++it, ++index) {
|
|
if (index >= this->scroll * this->columns) {
|
|
if (visible == this->columns * row) {
|
|
return std::make_pair(true, *it);
|
|
}
|
|
++visible;
|
|
}
|
|
}
|
|
return std::make_pair(false, BarterMarketItem());
|
|
}
|
|
|
|
|
|
// OFFSET: 0x00841910
|
|
// FUNCTION: fn_10551
|
|
int UIBarterItemPurchaseWnd::GetInventoryItemCount(int itemId) {
|
|
const int count = g_session.GetList0Size();
|
|
for (int i = 0; i < count; ++i) {
|
|
ITEM_INFO item = g_session.GetInventoryItemAt(i);
|
|
if (std::atoi(item.itemId.c_str()) == itemId) {
|
|
return item.quantity;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
// OFFSET: 0x00845940
|
|
// FUNCTION: fn_10576
|
|
void UIExpandedBarterItemPurchaseWnd::DragAndDrop(int x, int y, std::intptr_t value) {
|
|
CMode* mode = g_modeMgr.GetGameMode();
|
|
const ModeDragState* drag = reinterpret_cast<const ModeDragState*>(value);
|
|
if (drag->source == 31) {
|
|
if (g_session.IsEquipItemType(drag->type) == true || g_session.IsShadowItemType(drag->type) == true) {
|
|
this->SendMsg(0, UM_DROP, 0, 0, 0, 0);
|
|
return;
|
|
}
|
|
g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1);
|
|
g_windowMgr.LookupWindow(WID_ITEMDROPCNTWND)->SendMsg(0, UM_SETSTATE, 26, 0, 0, 0);
|
|
} else {
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x008459F0
|
|
// FUNCTION: fn_10577
|
|
void UIExpandedBartermarketWnd::DragAndDrop(int x, int y, std::intptr_t value) {
|
|
const ModeDragState* drag = reinterpret_cast<const ModeDragState*>(value);
|
|
if (drag->source != 32) {
|
|
g_modeMgr.GetGameMode()->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
return;
|
|
}
|
|
if (drag->quantity == 1) {
|
|
this->SendMsg(0, UM_DROP, 0, 0, 0, 0);
|
|
return;
|
|
}
|
|
g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1);
|
|
g_windowMgr.LookupWindow(WID_ITEMDROPCNTWND)->SendMsg(0, UM_SETSTATE, 25, 0, 0, 0);
|
|
}
|
|
|
|
// OFFSET: 0x00845F60
|
|
// FUNCTION: fn_10578
|
|
std::pair<bool, BarterMarketEntry> UIExpandedBarterItemPurchaseWnd::GetEntryAt(int x, int y) {
|
|
if (x < 40 || x >= this->geometry.width - 20 || y < 17 || y >= this->rowCount * 64 + 17) {
|
|
return std::make_pair(false, BarterMarketEntry());
|
|
}
|
|
|
|
const int row = (y - 17) / 64;
|
|
int index = 0;
|
|
int visible = 0;
|
|
for (std::list<BarterMarketEntry>::iterator it = this->entries.begin(); it != this->entries.end(); ++it, ++index) {
|
|
if (index >= this->firstRow) {
|
|
if (visible == row) {
|
|
return std::make_pair(true, *it);
|
|
}
|
|
++visible;
|
|
}
|
|
}
|
|
return std::make_pair(false, BarterMarketEntry());
|
|
}
|
|
|
|
// OFFSET: 0x00846110
|
|
// FUNCTION: fn_10579
|
|
std::pair<bool, BarterMarketEntry> UIExpandedBartermarketWnd::GetEntryAt(int x, int y) {
|
|
if (x < 40 || x >= this->geometry.width - 20 || y < 17 || y >= this->rowCount * 64 + 17) {
|
|
return std::make_pair(false, BarterMarketEntry());
|
|
}
|
|
|
|
int index = 0;
|
|
int visible = 0;
|
|
for (std::list<BarterMarketEntry>::iterator it = this->entries.begin(); it != this->entries.end(); ++it, ++index) {
|
|
if (index >= this->firstRow) {
|
|
if (visible == (y - 17) / 64) {
|
|
return std::make_pair(true, *it);
|
|
}
|
|
++visible;
|
|
}
|
|
}
|
|
return std::make_pair(false, BarterMarketEntry());
|
|
}
|
|
|
|
// OFFSET: 0x008462C0
|
|
// FUNCTION: fn_10580
|
|
std::pair<bool, BarterMarketEntry> UIExpandedBarterItemPurchaseWnd::GetEntryOrChunkAt(int x, int y) {
|
|
if (x < 40 || x >= this->geometry.width - 20 || y < 17 || y >= this->rowCount * 64 + 17) {
|
|
return std::pair<bool, BarterMarketEntry>(false, BarterMarketEntry());
|
|
}
|
|
|
|
const int offsetY = y - 17;
|
|
const int row = offsetY / 64;
|
|
int index = 0;
|
|
int visible = 0;
|
|
for (std::list<BarterMarketEntry>::iterator it = this->entries.begin(); it != this->entries.end(); ++it, ++index) {
|
|
if (index >= this->firstRow) {
|
|
if (visible == row) {
|
|
BarterMarketEntry entry;
|
|
if ((offsetY / 32) & 1) {
|
|
int right = 114;
|
|
for (std::vector<BarterChunk16>::iterator chunk = it->chunks.begin(); chunk != it->chunks.end(); ++chunk) {
|
|
if (x > right - 42 && x < right) {
|
|
entry.field_0 = chunk->field_c;
|
|
entry.field_28 = chunk->field_4;
|
|
char buffer[16] = {};
|
|
entry.name = _itoa(chunk->field_0, buffer, 10);
|
|
return std::pair<bool, BarterMarketEntry>(true, entry);
|
|
}
|
|
right += 42;
|
|
}
|
|
}
|
|
if (x > 40 && x < 72) {
|
|
entry = *it;
|
|
return std::pair<bool, BarterMarketEntry>(true, entry);
|
|
}
|
|
}
|
|
++visible;
|
|
}
|
|
}
|
|
return std::pair<bool, BarterMarketEntry>(false, BarterMarketEntry());
|
|
}
|
|
|
|
// OFFSET: 0x00846590
|
|
// FUNCTION: fn_10581
|
|
std::pair<bool, BarterMarketEntry> UIExpandedBartermarketWnd::GetEntryOrChunkAt(int x, int y) {
|
|
if (x < 40 || x >= this->geometry.width - 20 || y < 17 || y >= this->rowCount * 64 + 17) {
|
|
return std::make_pair(false, BarterMarketEntry());
|
|
}
|
|
|
|
const int offsetY = y - 17;
|
|
const int row = offsetY / 64;
|
|
int index = 0;
|
|
int visible = 0;
|
|
for (std::list<BarterMarketEntry>::iterator it = this->entries.begin(); it != this->entries.end(); ++it, ++index) {
|
|
if (index >= this->firstRow) {
|
|
if (visible == row) {
|
|
BarterMarketEntry entry;
|
|
if ((offsetY / 32) & 1) {
|
|
int right = 114;
|
|
for (std::vector<BarterChunk16>::iterator chunk = it->chunks.begin(); chunk != it->chunks.end(); ++chunk) {
|
|
if (x > right - 42 && x < right) {
|
|
entry.field_28 = chunk->field_4;
|
|
char buffer[16] = {};
|
|
entry.name = _itoa(chunk->field_0, buffer, 10);
|
|
entry.field_0 = chunk->field_c;
|
|
return std::make_pair(true, entry);
|
|
}
|
|
right += 42;
|
|
}
|
|
}
|
|
if (x > 40 && x < 72) {
|
|
entry = *it;
|
|
return std::make_pair(true, entry);
|
|
}
|
|
}
|
|
++visible;
|
|
}
|
|
}
|
|
return std::make_pair(false, BarterMarketEntry());
|
|
}
|
|
|
|
// OFFSET: 0x00849030
|
|
// FUNCTION: fn_10594
|
|
void UIExpandedBarterItemPurchaseWnd::OnWheel(int delta) {
|
|
if (this->scrollEnabled == 1) {
|
|
int step = this->rowCount - 1;
|
|
if (step > 3) {
|
|
step = 3;
|
|
}
|
|
this->SendMsg(this->scrollBar, UM_SCROLLVERT, delta > 0 ? -step : step, 0, 0, 0);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00849080
|
|
// FUNCTION: fn_10595
|
|
void UIExpandedBartermarketWnd::OnWheel(int delta) {
|
|
if (this->scrollEnabled == 1) {
|
|
int step = this->rowCount - 1;
|
|
if (step > 3) {
|
|
step = 3;
|
|
}
|
|
this->SendMsg(this->scrollBar, UM_SCROLLVERT, delta > 0 ? -step : step, 0, 0, 0);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x008490D0
|
|
// FUNCTION: fn_10596
|
|
void UIExpandedBarterItemPurchaseWnd::UpdateScrollBar() {
|
|
if (!this->scrollBar) {
|
|
return;
|
|
}
|
|
|
|
const int rows = this->rowCount;
|
|
const int count = static_cast<int>(this->entries.size());
|
|
int overflow = count - rows;
|
|
if (overflow < 0) {
|
|
overflow = 0;
|
|
}
|
|
|
|
if (overflow != 0) {
|
|
this->scrollEnabled = 1;
|
|
this->scrollBar->SetRange(overflow, rows, count);
|
|
|
|
int position = this->firstRow;
|
|
if (position < 0) {
|
|
this->firstRow = 0;
|
|
position = 0;
|
|
}
|
|
|
|
const int limit = count - this->rowCount;
|
|
if (position > limit) {
|
|
this->firstRow = limit;
|
|
position = limit;
|
|
}
|
|
|
|
this->scrollBar->SetPosition(position);
|
|
} else {
|
|
this->scrollEnabled = 0;
|
|
this->firstRow = 0;
|
|
this->scrollBar->SetRange(0, rows, count);
|
|
}
|
|
|
|
this->scrollBar->Invalidate();
|
|
}
|
|
|
|
// OFFSET: 0x00849170
|
|
// FUNCTION: fn_10597
|
|
void UIExpandedBartermarketWnd::UpdateScrollBar() {
|
|
if (!this->scrollBar) {
|
|
return;
|
|
}
|
|
|
|
const int rows = this->rowCount;
|
|
const int count = static_cast<int>(this->entries.size());
|
|
int overflow = count - rows;
|
|
if (overflow < 0) {
|
|
overflow = 0;
|
|
}
|
|
|
|
if (overflow != 0) {
|
|
this->scrollEnabled = 1;
|
|
this->scrollBar->SetRange(overflow, rows, count);
|
|
|
|
int position = this->firstRow;
|
|
if (position < 0) {
|
|
this->firstRow = 0;
|
|
position = 0;
|
|
}
|
|
|
|
const int limit = count - this->rowCount;
|
|
if (position > limit) {
|
|
this->firstRow = limit;
|
|
position = limit;
|
|
}
|
|
|
|
this->scrollBar->SetPosition(position);
|
|
} else {
|
|
this->scrollEnabled = 0;
|
|
this->firstRow = 0;
|
|
this->scrollBar->SetRange(0, rows, count);
|
|
}
|
|
|
|
this->scrollBar->Invalidate();
|
|
}
|
|
|
|
// OFFSET: 0x00849210
|
|
// FUNCTION: fn_10598
|
|
int UIExpandedBarterItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
|
|
switch (message) {
|
|
case UM_DROP: {
|
|
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
|
std::pair<bool, BarterMarketEntry> found = g_expandedBarterMarketItemMgr->FindItem(mode->drag.barterId);
|
|
if (!found.first) {
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_ITEM_OUT_OF_STOCK)), 255, 0, 0, 0);
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
found.second.value = mode->drag.quantity;
|
|
for (std::vector<BarterChunk16>::iterator chunk = found.second.chunks.begin(); chunk != found.second.chunks.end(); ++chunk) {
|
|
ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, chunk->field_0);
|
|
if (owned.identity[1] > 0) {
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_MONSTER_MONSTERINFO)), 255, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
if (g_session.HasItemCount(chunk->field_0, chunk->field_4) == true) {
|
|
const int itemId = chunk->field_0;
|
|
const int refine = chunk->field_4;
|
|
const int count = g_session.GetList0Size();
|
|
int available = 0;
|
|
for (int i = 0; i < count; ++i) {
|
|
ITEM_INFO item = g_session.GetInventoryItemAt(i);
|
|
if (std::atoi(item.itemId.c_str()) == itemId && item.refiningLevel >= refine) {
|
|
available = item.quantity;
|
|
break;
|
|
}
|
|
}
|
|
if (available <= 0) {
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_MONSTER_MONSTERINFO)), 255, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
if (g_session.IsEquipItemType(mode->drag.type) == true) {
|
|
if (g_expandedBarterMarketItemMgr->HasEntryByName(mode->drag.name) == true) {
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_EQUIPITEM_OLNY_ONE)), 255, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
} else if (g_session.IsShadowItemType(mode->drag.type) == true) {
|
|
if (g_expandedBarterMarketItemMgr->HasEntryByName(mode->drag.name) == true) {
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_SAVE_HOTKEY_TO_SERVER)), 255, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
if (mode->drag.quantity + g_expandedBarterMarketItemMgr->GetValueById(mode->drag.barterId) > 30000) {
|
|
char buffer[200];
|
|
std::memset(buffer, 0, sizeof(buffer));
|
|
StringFormat(buffer, sizeof(buffer), static_cast<std::size_t>(-1), LookupMessage(MSI_GLOBALRODEX_MESSAGE_RECEIVE_ALL), 30000);
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(buffer), 255, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
const int factor = static_cast<int>(g_expandedBarterMarketItemMgr->GetItemFactorById(mode->drag.barterId));
|
|
if (factor < 0) {
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_ITEM_OUT_OF_STOCK)), 255, 0, 0, 0);
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
if (factor > 0) {
|
|
const int available = g_session.m_maxWeight - g_session.m_weight;
|
|
const float remaining = static_cast<float>(available) - g_expandedBarterMarketItemMgr->GetWeightedTotal();
|
|
if (static_cast<int>(remaining) / factor < mode->drag.quantity) {
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_OVER_WEIGHT)), 255, 0, 0, 0);
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
if (static_cast<__int64>(mode->drag.quantity * found.second.field_8) + g_expandedBarterMarketItemMgr->total > g_session.m_zeny) {
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_INSUFFICIENT_MONEY)), 255, 0, 0, 0);
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
g_expandedBarterMarketItemMgr->AddEntry(found.second);
|
|
this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0);
|
|
g_windowMgr.LookupWindow(WID_EXPANDEDBARTERMARKETWND)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0);
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
case UM_COMMAND: {
|
|
CMode* mode = g_modeMgr.GetGameMode();
|
|
if (a == ID_OK) {
|
|
if (this->Purchase()) {
|
|
mode->SendMsg(MM_NPC_EXPANDED_BARTER_MARKET_PURCHASE, 0, 0, 0, 0);
|
|
mode->SendMsg(MM_RELEASE_QUEST, 0, 0, 0, 0);
|
|
g_expandedBarterMarketItemMgr->Clear();
|
|
}
|
|
} else if (a == ID_CANCEL) {
|
|
mode->SendMsg(MM_RELEASE_QUEST, 0, 0, 0, 0);
|
|
g_expandedBarterMarketItemMgr->Clear();
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
case UM_RESIZE: {
|
|
if (a != 3) {
|
|
return 0;
|
|
}
|
|
|
|
int height = c;
|
|
if (height < 366) {
|
|
height = 366;
|
|
} else if (height > 549.0f) {
|
|
height = 549;
|
|
}
|
|
height = height / 64 * 64;
|
|
|
|
if (height != this->geometry.height) {
|
|
this->Resize(this->geometry.width, height);
|
|
this->rowCount = (height - 46) / 64;
|
|
this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15);
|
|
this->scrollBar->Move(this->geometry.width - 15, 14);
|
|
this->scrollBar->Resize(this->scrollBar->geometry.width, this->geometry.height - 46);
|
|
this->UpdateScrollBar();
|
|
}
|
|
|
|
this->buyButton->Move(this->geometry.width - 105, this->geometry.height - 24);
|
|
this->cancelButton->Move(this->geometry.width - 60, this->geometry.height - 24);
|
|
g_windowMgr.StoreSnapRectangle(this);
|
|
return 0;
|
|
}
|
|
|
|
case UM_SCROLLVERT:
|
|
case UM_SCROLLVERTPAGEUP:
|
|
case UM_SCROLLVERTPAGEDOWN: {
|
|
const int previous = this->firstRow;
|
|
if (message == UM_SCROLLVERTPAGEUP) {
|
|
this->firstRow = previous - this->rowCount + 1;
|
|
} else {
|
|
if (message == UM_SCROLLVERTPAGEDOWN) {
|
|
a = this->rowCount - 1;
|
|
}
|
|
this->firstRow = a + previous;
|
|
}
|
|
|
|
if (previous != this->firstRow) {
|
|
this->UpdateScrollBar();
|
|
this->Invalidate();
|
|
}
|
|
return this->firstRow - previous;
|
|
}
|
|
|
|
case UM_REFRESHITEM: {
|
|
this->entries.erase(this->entries.begin(), this->entries.end());
|
|
std::vector<BarterMarketEntry>* entries = g_expandedBarterMarketItemMgr->GetEntries();
|
|
for (std::vector<BarterMarketEntry>::iterator it = entries->begin(); it != entries->end(); ++it) {
|
|
this->entries.emplace_back(*it);
|
|
}
|
|
this->Invalidate();
|
|
this->UpdateScrollBar();
|
|
return 0;
|
|
}
|
|
|
|
default:
|
|
return UIFrameWnd::SendMsg(sender, message, a, b, c, d);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00849B30
|
|
// FUNCTION: fn_10599
|
|
int UIExpandedBartermarketWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
|
|
switch (message) {
|
|
case UM_DROP: {
|
|
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
|
std::pair<bool, BarterMarketEntry> found = g_expandedBarterMarketItemMgr->FindEntry(mode->drag.barterId);
|
|
if (found.first) {
|
|
found.second.value = mode->drag.quantity;
|
|
g_expandedBarterMarketItemMgr->RemoveEntry(found.second);
|
|
g_windowMgr.LookupWindow(WID_EXPANDEDBARTERITEMPURCHASEWND)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0);
|
|
this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0);
|
|
}
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
case UM_RESIZE: {
|
|
if (a != 7) {
|
|
return 0;
|
|
}
|
|
|
|
int width = b;
|
|
int height = c;
|
|
if (width < 366) {
|
|
width = 366;
|
|
} else if (width > 439.2f) {
|
|
width = 439;
|
|
}
|
|
if (height < 366) {
|
|
height = 366;
|
|
} else if (height > 549.0f) {
|
|
height = 549;
|
|
}
|
|
height = height / 64 * 64;
|
|
|
|
if (width != this->geometry.width || height != this->geometry.height) {
|
|
this->Resize(width, height);
|
|
this->rowCount = (height - 46) / 64;
|
|
this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15);
|
|
this->scrollBar->Move(this->geometry.width - 15, 14);
|
|
this->scrollBar->Resize(this->scrollBar->geometry.width, this->geometry.height - 46);
|
|
this->UpdateScrollBar();
|
|
}
|
|
g_windowMgr.StoreSnapRectangle(this);
|
|
return 0;
|
|
}
|
|
|
|
case UM_SCROLLVERT:
|
|
case UM_SCROLLVERTPAGEUP:
|
|
case UM_SCROLLVERTPAGEDOWN: {
|
|
const int previous = this->firstRow;
|
|
if (message == UM_SCROLLVERTPAGEUP) {
|
|
this->firstRow = previous - this->rowCount + 1;
|
|
} else {
|
|
if (message == UM_SCROLLVERTPAGEDOWN) {
|
|
a = this->rowCount - 1;
|
|
}
|
|
this->firstRow = a + previous;
|
|
}
|
|
|
|
if (previous != this->firstRow) {
|
|
this->UpdateScrollBar();
|
|
this->Invalidate();
|
|
}
|
|
return this->firstRow - previous;
|
|
}
|
|
|
|
case UM_REFRESHITEM: {
|
|
this->entries.clear();
|
|
std::vector<BarterMarketEntry>* items = g_expandedBarterMarketItemMgr->GetItems();
|
|
for (std::vector<BarterMarketEntry>::iterator it = items->begin(); it != items->end(); ++it) {
|
|
this->entries.push_back(*it);
|
|
}
|
|
this->Invalidate();
|
|
this->UpdateScrollBar();
|
|
return 0;
|
|
}
|
|
|
|
default:
|
|
return UIFrameWnd::SendMsg(sender, message, a, b, c, d);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00AE75C0
|
|
// FUNCTION: fn_18076
|
|
__declspec(noinline) ITEM_INFO BarterMarketItem::ToItemInfo() const {
|
|
ITEM_INFO item;
|
|
item.identity[0] = this->field_1c;
|
|
item.quantity = this->value;
|
|
item.prices[0] = this->field_20;
|
|
item.itemId = this->name;
|
|
item.identified = 1;
|
|
item.identity[2] = this->field_40;
|
|
item.sprite = this->field_44;
|
|
return item;
|
|
}
|
|
|
|
// OFFSET: 0x00AE7660
|
|
// FUNCTION: fn_18077
|
|
__declspec(noinline) ITEM_INFO BarterMarketEntry::ToItemInfo() const {
|
|
ITEM_INFO item;
|
|
item.identity[0] = this->field_0;
|
|
item.quantity = this->value;
|
|
item.prices[0] = this->field_8;
|
|
item.itemId = this->name;
|
|
item.refiningLevel = this->field_28;
|
|
item.identified = 1;
|
|
item.priceFactor = static_cast<std::uint16_t>(this->factor);
|
|
item.identity[2] = this->field_38;
|
|
item.sprite = this->field_3c;
|
|
return item;
|
|
}
|
|
|
|
// OFFSET: 0x00843190
|
|
// FUNCTION: fn_10556
|
|
void UIBarterItemPurchaseWnd::OnLBtnDown(int x, int y) {
|
|
if (y < 17) {
|
|
UIFrameWnd::OnLBtnDown(x, y);
|
|
}
|
|
|
|
const int previous = this->hovered;
|
|
this->hovered = this->GetItemIndexAt(x, y);
|
|
if (previous != this->hovered) {
|
|
this->Invalidate();
|
|
}
|
|
|
|
std::pair<bool, BarterMarketItem> found = this->GetBarterItemAt(x, y);
|
|
if (found.first == true) {
|
|
if (CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode())) {
|
|
mode->drag.BeginBarterItem(4, found.second, found.second.value, -1);
|
|
}
|
|
}
|
|
}
|
|
|
|
// INLINED
|
|
__forceinline int UIBartermarketWnd::GetBarterItemIndexAt(int x, int y) {
|
|
if (x < 40 || x >= this->geometry.width - 20 || y < 17 || y >= this->visibleRows * 32 + 17) {
|
|
return -1;
|
|
}
|
|
|
|
const int column = std::min((x - 40) / 32, this->columns - 1);
|
|
const int row = (y - 17) / 32;
|
|
std::list<BarterMarketItem> items = *g_barterMarketItemMgr->GetItems();
|
|
int index = 0;
|
|
int visible = 0;
|
|
for (std::list<BarterMarketItem>::iterator it = items.begin(); it != items.end(); ++it, ++index) {
|
|
if (index >= this->scroll * this->columns) {
|
|
if (visible == this->columns * row + column) {
|
|
return index;
|
|
}
|
|
++visible;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
// OFFSET: 0x00843270
|
|
// FUNCTION: fn_10557
|
|
void UIBartermarketWnd::OnLBtnDown(int x, int y) {
|
|
if (y < 17) {
|
|
UIFrameWnd::OnLBtnDown(x, y);
|
|
}
|
|
|
|
const int previous = this->hovered;
|
|
this->hovered = this->GetBarterItemIndexAt(x, y);
|
|
if (previous != this->hovered) {
|
|
this->Invalidate();
|
|
}
|
|
|
|
std::pair<bool, BarterMarketItem> found = this->GetBarterItemAt(x, y);
|
|
if (found.first) {
|
|
if (CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode())) {
|
|
mode->drag.BeginBarterItem(31, found.second, 1, -1);
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00843DE0
|
|
// FUNCTION: fn_10561
|
|
void UIBarterItemPurchaseWnd::OnRBtnDown(int x, int y) {
|
|
std::pair<bool, BarterMarketItem> found = this->GetBarterItemOrPriceAt(x, y);
|
|
if (found.first == true) {
|
|
UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND);
|
|
ITEM_INFO item = found.second.ToItemInfo();
|
|
if (window) {
|
|
window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast<std::intptr_t>(&item), 0, 0, 0);
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00843EC0
|
|
// FUNCTION: fn_10562
|
|
void UIBartermarketWnd::OnRBtnDown(int x, int y) {
|
|
std::pair<bool, BarterMarketItem> found = this->GetBarterItemOrPriceAt(x, y);
|
|
if (found.first) {
|
|
UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND);
|
|
ITEM_INFO item = found.second.ToItemInfo();
|
|
if (window) {
|
|
window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast<std::intptr_t>(&item), 0, 0, 0);
|
|
}
|
|
}
|
|
}
|
|
|
|
// INLINED
|
|
__forceinline int UIExpandedBarterItemPurchaseWnd::GetEntryIndexAt(int x, int y) {
|
|
if (x < 40 || x >= this->geometry.width - 20 || y < 17 || y >= this->rowCount * 64 + 17) {
|
|
return -1;
|
|
}
|
|
|
|
const int row = (y - 17) / 64;
|
|
int index = 0;
|
|
int visible = 0;
|
|
for (std::list<BarterMarketEntry>::iterator it = this->entries.begin(); it != this->entries.end(); ++it, ++index) {
|
|
if (index >= this->firstRow) {
|
|
if (visible == row) {
|
|
return index;
|
|
}
|
|
++visible;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
// OFFSET: 0x008481E0
|
|
// FUNCTION: fn_10587
|
|
void UIExpandedBarterItemPurchaseWnd::OnLBtnDown(int x, int y) {
|
|
if (y < 17) {
|
|
UIFrameWnd::OnLBtnDown(x, y);
|
|
}
|
|
|
|
const int previous = this->hoveredRow;
|
|
this->hoveredRow = this->GetEntryIndexAt(x, y);
|
|
if (previous != this->hoveredRow) {
|
|
this->Invalidate();
|
|
}
|
|
|
|
std::pair<bool, BarterMarketEntry> found = this->GetEntryAt(x, y);
|
|
if (found.first == true) {
|
|
if (CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode())) {
|
|
mode->drag.BeginBarterEntry(32, found.second, found.second.value, -1);
|
|
}
|
|
}
|
|
}
|
|
|
|
// INLINED
|
|
__forceinline int UIExpandedBartermarketWnd::GetEntryIndexAt(int x, int y) {
|
|
if (x < 40 || x >= this->geometry.width - 20 || y < 17 || y >= this->rowCount * 64 + 17) {
|
|
return -1;
|
|
}
|
|
|
|
const int row = (y - 17) / 64;
|
|
int index = 0;
|
|
int visible = 0;
|
|
for (std::list<BarterMarketEntry>::iterator it = this->entries.begin(); it != this->entries.end(); ++it, ++index) {
|
|
if (index >= this->firstRow) {
|
|
if (visible == row) {
|
|
return index;
|
|
}
|
|
++visible;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
// OFFSET: 0x00848320
|
|
// FUNCTION: fn_10588
|
|
void UIExpandedBartermarketWnd::OnLBtnDown(int x, int y) {
|
|
if (y < 17) {
|
|
UIFrameWnd::OnLBtnDown(x, y);
|
|
}
|
|
|
|
const int previous = this->hoveredRow;
|
|
this->hoveredRow = this->GetEntryIndexAt(x, y);
|
|
if (previous != this->hoveredRow) {
|
|
this->Invalidate();
|
|
}
|
|
|
|
std::pair<bool, BarterMarketEntry> found = this->GetEntryAt(x, y);
|
|
if (found.first == true) {
|
|
if (found.second.value == 0) {
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_INVENTORY_EXTEND_OF_BODYITEM)), 255, 0, 0, 0);
|
|
} else if (CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode())) {
|
|
mode->drag.BeginBarterEntry(31, found.second, 1, -1);
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00848E70
|
|
// FUNCTION: fn_10592
|
|
void UIExpandedBarterItemPurchaseWnd::OnRBtnDown(int x, int y) {
|
|
std::pair<bool, BarterMarketEntry> found = this->GetEntryOrChunkAt(x, y);
|
|
if (found.first == true) {
|
|
UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND);
|
|
ITEM_INFO item = found.second.ToItemInfo();
|
|
if (window) {
|
|
window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast<std::intptr_t>(&item), 0, 0, 0);
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00848F50
|
|
// FUNCTION: fn_10593
|
|
void UIExpandedBartermarketWnd::OnRBtnDown(int x, int y) {
|
|
std::pair<bool, BarterMarketEntry> found = this->GetEntryOrChunkAt(x, y);
|
|
if (found.first == true) {
|
|
UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND);
|
|
ITEM_INFO item = found.second.ToItemInfo();
|
|
if (window) {
|
|
window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast<std::intptr_t>(&item), 0, 0, 0);
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00843420
|
|
// FUNCTION: fn_10558
|
|
void UIBarterItemPurchaseWnd::OnMouseHover(int x, int y) {
|
|
std::pair<bool, BarterMarketItem> found = this->GetBarterItemAt(x, y);
|
|
if (found.first) {
|
|
int tooltipX = (x - 40) / 32 * 32 + 40;
|
|
int tooltipY = (y - 17) / 32 * 32 + 1;
|
|
this->ToScreen(tooltipX, tooltipY);
|
|
std::string text;
|
|
BarterMarketItem item = found.second;
|
|
ITEM_DESC description = FindItemDescription(item.field_2c);
|
|
text = static_cast<const std::string&>(FormatOwnedString(LookupMessage(MSI_NO_ITEM_FOR_EXCHANGE), description.identifiedName, item.field_28 * item.value));
|
|
CMode* tooltip = g_modeMgr.gameMode;
|
|
ITEM_INFO info = item.ToItemInfo();
|
|
if (tooltip) {
|
|
tooltip->ShowTooltip(text.c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(info), 0, 1);
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x008436B0
|
|
// FUNCTION: fn_10559
|
|
void UIBartermarketWnd::OnMouseHover(int x, int y) {
|
|
std::pair<bool, BarterMarketItem> found = this->GetBarterItemAt(x, y);
|
|
if (found.first) {
|
|
int tooltipX = (x - 40) / 32 * 32 + 40;
|
|
int tooltipY = (y - 17) / 32 * 32 + 1;
|
|
this->ToScreen(tooltipX, tooltipY);
|
|
std::string text;
|
|
ITEM_DESC description = FindItemDescription(found.second.field_2c);
|
|
text = static_cast<const std::string&>(FormatOwnedString(LookupMessage(MSI_NO_ITEM_FOR_EXCHANGE), description.identifiedName, found.second.field_28));
|
|
CMode* tooltip = g_modeMgr.gameMode;
|
|
ITEM_INFO info = found.second.ToItemInfo();
|
|
if (tooltip) {
|
|
tooltip->ShowTooltip(text.c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(info), 0, 1);
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x008484A0
|
|
// FUNCTION: fn_10589
|
|
void UIExpandedBarterItemPurchaseWnd::OnMouseHover(int x, int y) {
|
|
std::pair<bool, BarterMarketEntry> found = this->GetEntryAt(x, y);
|
|
if (found.first && x > 40 && x < 72) {
|
|
int tooltipX = x;
|
|
int tooltipY = (y - 17) / 64 * 64 + 1;
|
|
this->ToScreen(tooltipX, tooltipY);
|
|
std::string text;
|
|
int index = 1;
|
|
for (std::vector<BarterChunk16>::iterator chunk = found.second.chunks.begin(); chunk != found.second.chunks.end(); ++chunk, ++index) {
|
|
ITEM_DESC description = FindItemDescription(chunk->field_0);
|
|
const char* name = description.identifiedName;
|
|
if (chunk->field_4 > 0) {
|
|
text += "+";
|
|
char buffer[12];
|
|
_itoa(chunk->field_4, buffer, 10);
|
|
text += buffer;
|
|
text += " ";
|
|
}
|
|
text += FormatOwnedString(LookupMessage(MSI_NO_ITEM_FOR_EXCHANGE), name, chunk->amount * found.second.value);
|
|
if (index != static_cast<int>(found.second.chunks.size())) {
|
|
text += "\n";
|
|
}
|
|
}
|
|
CMode* tooltip = g_modeMgr.GetGameMode();
|
|
ITEM_INFO info = found.second.ToItemInfo();
|
|
if (tooltip) {
|
|
tooltip->ShowTooltip(text.c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(info), 0, 1);
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00848B80
|
|
// FUNCTION: fn_10591
|
|
void UIExpandedBartermarketWnd::OnMouseHover(int x, int y) {
|
|
std::pair<bool, BarterMarketEntry> found = this->GetEntryAt(x, y);
|
|
if (found.first && x > 40 && x < 72) {
|
|
int tooltipX = x;
|
|
int tooltipY = (y - 17) / 64 * 64 + 1;
|
|
this->ToScreen(tooltipX, tooltipY);
|
|
std::string text;
|
|
int index = 1;
|
|
for (std::vector<BarterChunk16>::iterator chunk = found.second.chunks.begin(); chunk != found.second.chunks.end(); ++chunk, ++index) {
|
|
ITEM_DESC description = FindItemDescription(chunk->field_0);
|
|
const char* name = description.identifiedName;
|
|
if (chunk->field_4 > 0) {
|
|
text += "+";
|
|
char buffer[12];
|
|
_itoa(chunk->field_4, buffer, 10);
|
|
text += buffer;
|
|
text += " ";
|
|
}
|
|
text += FormatOwnedString(LookupMessage(MSI_NO_ITEM_FOR_EXCHANGE), name, chunk->amount);
|
|
if (index != static_cast<int>(found.second.chunks.size())) {
|
|
text += "\n";
|
|
}
|
|
}
|
|
CMode* tooltip = g_modeMgr.GetGameMode();
|
|
ITEM_INFO info = found.second.ToItemInfo();
|
|
if (tooltip) {
|
|
tooltip->ShowTooltip(text.c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(info), 0, 1);
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00843910
|
|
// FUNCTION: fn_10560
|
|
void UIPurchaseButton::OnMouseHover(int x, int y) {
|
|
std::string text;
|
|
std::map<int, int> totals = *g_barterMarketItemMgr->GetTotals();
|
|
int count = 0;
|
|
for (std::map<int, int>::iterator it = totals.begin(); it != totals.end();) {
|
|
const int amount = it->second;
|
|
ITEM_DESC description = FindItemDescription(it->first);
|
|
++it;
|
|
++count;
|
|
if (count == 30) {
|
|
text += "...";
|
|
break;
|
|
}
|
|
if (it == totals.end()) {
|
|
text += FormatOwnedString(LookupMessage(MSI_NO_ITEM_FOR_EXCHANGE), description.identifiedName, amount);
|
|
} else {
|
|
text += FormatOwnedString(LookupMessage(MSI_NO_ITEM_FOR_EXCHANGE), description.identifiedName, amount) + "\n";
|
|
}
|
|
}
|
|
int tooltipX = 0;
|
|
int tooltipY = -4 - count * 16;
|
|
this->ToScreen(tooltipX, tooltipY);
|
|
CMode* tooltip = g_modeMgr.gameMode;
|
|
if (tooltip) {
|
|
tooltip->ShowTooltip(text.c_str(), tooltipX, tooltipY, 0xFFFFFFFF, 0, 1);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00846940
|
|
// FUNCTION: fn_10582
|
|
std::string UIExpandedBarterPurchaseButton::FormatChunkText(int refine, std::string name, int amount) {
|
|
std::string text;
|
|
if (refine > 0) {
|
|
char buffer[5] = {};
|
|
_itoa(refine, buffer, 10);
|
|
text += "+" + std::string(buffer) + " ";
|
|
}
|
|
char line[1024];
|
|
std::memset(line, 0, sizeof(line));
|
|
StringFormat(line, sizeof(line), static_cast<std::size_t>(-1), LookupMessage(MSI_NO_ITEM_FOR_EXCHANGE), name.c_str(), amount);
|
|
text += std::string(line);
|
|
return text;
|
|
}
|
|
|
|
// OFFSET: 0x00848790
|
|
// FUNCTION: fn_10590
|
|
void UIExpandedBarterPurchaseButton::OnMouseHover(int x, int y) {
|
|
std::string text;
|
|
std::vector<BarterChunk16> chunks = *g_expandedBarterMarketItemMgr->GetChunks();
|
|
int index = 0;
|
|
for (std::vector<BarterChunk16>::iterator chunk = chunks.begin(); chunk != chunks.end(); ++chunk, ++index) {
|
|
ITEM_DESC description = FindItemDescription(chunk->field_0);
|
|
const char* name = description.identifiedName;
|
|
if (index == 30) {
|
|
text += "...";
|
|
break;
|
|
}
|
|
text += this->FormatChunkText(chunk->field_4, name, chunk->amount);
|
|
if (index != static_cast<int>(chunks.size()) - 1) {
|
|
text += "\n";
|
|
}
|
|
}
|
|
if (g_expandedBarterMarketItemMgr->total > 0) {
|
|
std::string total = FormatOwnedString(LookupMessage(MSI_ITEM_GRADE_ENCHANT_SUCCEESS), g_expandedBarterMarketItemMgr->total);
|
|
text += "\n" + total;
|
|
}
|
|
if (!text.empty()) {
|
|
int tooltipX = 0;
|
|
int tooltipY = -4 - index * 16;
|
|
this->ToScreen(tooltipX, tooltipY);
|
|
CMode* tooltip = g_modeMgr.gameMode;
|
|
if (tooltip) {
|
|
tooltip->ShowTooltip(text.c_str(), tooltipX, tooltipY, 0xFFFFFFFF, 0, 1);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// OFFSET: 0x00840530
|
|
// FUNCTION: fn_10544
|
|
bool UIBarterItemPurchaseWnd::Purchase() {
|
|
std::map<std::string, int> totals;
|
|
std::list<BarterMarketItem> items = *g_barterMarketItemMgr->GetAllItems();
|
|
|
|
int count = g_session.GetList0Size();
|
|
count += g_session.CountDistinctEquippedItems();
|
|
count += g_session.CountDistinctCostumeItems();
|
|
|
|
for (std::list<BarterMarketItem>::iterator it = items.begin(); it != items.end(); ++it) {
|
|
std::map<std::string, int>::iterator total = totals.find(it->name);
|
|
if (total != totals.end()) {
|
|
total->second += it->value;
|
|
} else {
|
|
totals.insert(std::make_pair(it->name, it->value));
|
|
}
|
|
|
|
if (g_session.IsEquipItemType(it->field_1c) == true || g_session.IsShadowItemType(it->field_1c) == true) {
|
|
++count;
|
|
} else if (this->GetInventoryItemCount(std::atoi(it->name.c_str())) == 0) {
|
|
++count;
|
|
}
|
|
}
|
|
|
|
if (count > g_session.extraInventorySlots + 100) {
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_SOUL_REAPER)), 255, 0, 0, 0);
|
|
this->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0);
|
|
return false;
|
|
}
|
|
|
|
std::map<int, int>* required = g_barterMarketItemMgr->GetTotals();
|
|
for (std::map<int, int>::iterator it = required->begin(); it != required->end(); ++it) {
|
|
if (this->GetInventoryItemCount(it->first) < it->second) {
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_PVP)), 255, 0, 0, 0);
|
|
this->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
for (std::map<std::string, int>::iterator it = totals.begin(); it != totals.end(); ++it) {
|
|
if (it->second + this->GetInventoryItemCount(std::atoi(it->first.c_str())) > 30000) {
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
const std::string text = FormatOwnedString(LookupMessage(MSI_STAR_EMPEROR), 30000);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(text.c_str()), 255, 0, 0, 0);
|
|
this->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
// OFFSET: 0x00841A10
|
|
// FUNCTION: fn_10552
|
|
void UIBarterItemPurchaseWnd::OnCreate(int width, int height) {
|
|
UIResizer* resizer = new UIResizer();
|
|
this->resizer = resizer;
|
|
resizer->SetSize(16, 16);
|
|
resizer->SetDirection(3);
|
|
resizer->SetBitmapName("유저인터페이스\\btn_resize.bmp");
|
|
resizer->Move(this->geometry.width - 15, this->geometry.height - 15);
|
|
resizer->SetColors(0xFFFF00FF, 0xFFFF00FF);
|
|
this->AddChild(resizer);
|
|
|
|
UIScrollBar* scrollBar = new UIScrollBar();
|
|
this->scrollBar = scrollBar;
|
|
scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - 38);
|
|
this->AddChild(scrollBar);
|
|
|
|
const std::string prefix = "유저인터페이스\\";
|
|
const char* names[2][3] = {
|
|
{"btn_buy", "btn_buy_a", "btn_buy_b"},
|
|
{"btn_cancel", "btn_cancel_a", "btn_cancel_b"},
|
|
};
|
|
const int ids[2] = {184, 185};
|
|
const int xs[2] = {this->geometry.width - 106, this->geometry.width - 61};
|
|
const int y = this->geometry.height - 24;
|
|
|
|
for (int index = 0; index < 2; ++index) {
|
|
UIBitmapButton* button = index == 0 ? static_cast<UIBitmapButton*>(new UIPurchaseButton()) : new UIBitmapButton();
|
|
this->buttons[index] = button;
|
|
button->SetBitmap((prefix + names[index][0] + ".bmp").c_str(), 0, 0);
|
|
button->SetBitmap((prefix + names[index][1] + ".bmp").c_str(), 1, 0);
|
|
button->SetBitmap((prefix + names[index][2] + ".bmp").c_str(), 2, 0);
|
|
button->SetSize(button->BitmapWidth(), button->BitmapHeight());
|
|
button->Move(xs[index], y);
|
|
button->SetId(ids[index]);
|
|
this->AddChild(button);
|
|
}
|
|
|
|
this->columns = 1;
|
|
this->visibleRows = (height - 38) / 32;
|
|
|
|
this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0);
|
|
}
|
|
|
|
// OFFSET: 0x00843FA0
|
|
// FUNCTION: fn_10563
|
|
int UIBarterItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
|
|
switch (message) {
|
|
case UM_SETINFO: {
|
|
this->saved = reinterpret_cast<ItemPurchaseWndInfo*>(a);
|
|
if (!this->saved) {
|
|
return 0;
|
|
}
|
|
if (!this->saved->IsValid()) {
|
|
this->saved->Reset();
|
|
}
|
|
this->SendMsg(nullptr, UM_RESIZE, 7, this->saved->width, this->saved->height, 0);
|
|
this->Move(this->saved->x, this->saved->y);
|
|
return 0;
|
|
}
|
|
|
|
case UM_DROP: {
|
|
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
|
if (!mode) {
|
|
return 0;
|
|
}
|
|
|
|
std::pair<bool, BarterMarketItem> found = g_barterMarketItemMgr->FindItem(mode->drag.barterId);
|
|
if (found.first == false) {
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_ITEM_OUT_OF_STOCK)), 255, 0, 0, 0);
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
found.second.value = mode->drag.quantity;
|
|
if (g_session.HasItemId(found.second.field_2c)) {
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_MONSTER_MONSTERINFO)), 255, 0, 0, 0);
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
if (g_barterMarketItemMgr->HasItemByName(mode->drag.name)) {
|
|
int notice = 0;
|
|
if (g_session.IsEquipItemType(mode->drag.type)) {
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
notice = 119;
|
|
} else if (g_session.IsShadowItemType(mode->drag.type)) {
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
notice = 3569;
|
|
}
|
|
|
|
if (notice != 0) {
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(notice)), 255, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
if (mode->drag.quantity + g_barterMarketItemMgr->GetAllItemValueByName(mode->drag.name) > 30000) {
|
|
char buffer[200] = {};
|
|
StringFormat(buffer, 200, static_cast<std::size_t>(-1), LookupMessage(MSI_LIMIT_BUY_ITEM2), 30000);
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(buffer), 255, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
const int amountById = g_barterMarketItemMgr->GetAmountById(mode->drag.barterId);
|
|
if (amountById < 0) {
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_ITEM_OUT_OF_STOCK)), 255, 0, 0, 0);
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
if (amountById > 0) {
|
|
const int available = g_session.m_maxWeight - g_session.m_weight;
|
|
const float remaining = static_cast<float>(available) - g_barterMarketItemMgr->GetTotalAmount();
|
|
if (static_cast<int>(remaining) / amountById < mode->drag.quantity) {
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_OVER_WEIGHT)), 255, 0, 0, 0);
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
g_barterMarketItemMgr->AddItem(found.second);
|
|
this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0);
|
|
if (UIWindow* window = g_windowMgr.LookupWindow(WID_BARTERMARKETWND)) {
|
|
window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0);
|
|
}
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
case UM_COMMAND: {
|
|
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
|
if (!mode) {
|
|
return 0;
|
|
}
|
|
|
|
if (a == ID_OK) {
|
|
if (!this->Purchase()) {
|
|
return 0;
|
|
}
|
|
mode->SendMsg(MM_NPC_BARTER_MARKET_PURCHASE, 0, 0, 0, 0);
|
|
} else if (a != ID_CANCEL) {
|
|
return 0;
|
|
}
|
|
|
|
mode->SendMsg(MM_RELEASE_QUEST, 0, 0, 0, 0);
|
|
g_barterMarketItemMgr->Clear();
|
|
return 0;
|
|
}
|
|
|
|
case UM_RESIZE: {
|
|
if (a != 3) {
|
|
return 0;
|
|
}
|
|
|
|
int width = b <= 320 ? static_cast<int>(b) : 320;
|
|
int height = c <= 336 ? static_cast<int>(c) : 336;
|
|
if (width < 232) {
|
|
width = 232;
|
|
}
|
|
if (height < 120) {
|
|
height = 120;
|
|
}
|
|
width = (width - 280) / 32 * 32 + 280;
|
|
height = (height - 120) / 32 * 32 + 120;
|
|
|
|
if (width != this->geometry.width || height != this->geometry.height) {
|
|
this->Resize(width, height);
|
|
this->columns = 1;
|
|
const int rowsHeight = this->geometry.height - 38;
|
|
this->visibleRows = rowsHeight / 32;
|
|
this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15);
|
|
this->scrollBar->Move(this->geometry.width - 15, 14);
|
|
this->scrollBar->Resize(this->scrollBar->geometry.width, rowsHeight);
|
|
this->UpdateScrollBar();
|
|
}
|
|
|
|
const int xs[2] = {this->geometry.width - 106, this->geometry.width - 61};
|
|
const int y = this->geometry.height - 24;
|
|
for (int index = 0; index < 2; ++index) {
|
|
this->buttons[index]->Move(xs[index], y);
|
|
}
|
|
|
|
g_windowMgr.StoreSnapRectangle(this);
|
|
return 0;
|
|
}
|
|
|
|
case UM_REFRESHITEM: {
|
|
this->items.clear();
|
|
std::list<BarterMarketItem>* items = g_barterMarketItemMgr->GetAllItems();
|
|
for (std::list<BarterMarketItem>::iterator it = items->begin(); it != items->end(); ++it) {
|
|
this->items.push_back(it->ToItemInfo());
|
|
}
|
|
this->Invalidate();
|
|
this->UpdateScrollBar();
|
|
return 0;
|
|
}
|
|
|
|
default:
|
|
break;
|
|
}
|
|
|
|
return UIFrameWnd::SendMsg(sender, message, a, b, c, d);
|
|
}
|
|
|
|
// OFFSET: 0x00846FB0
|
|
// FUNCTION: fn_10583
|
|
void UIExpandedBarterItemPurchaseWnd::OnCreate(int width, int height) {
|
|
this->resizer = new UIResizer();
|
|
this->resizer->SetSize(16, 16);
|
|
this->resizer->SetDirection(3);
|
|
this->resizer->SetBitmapName("유저인터페이스\\btn_resize.bmp");
|
|
this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15);
|
|
this->resizer->SetColors(0xFFFF00FF, 0xFFFF00FF);
|
|
this->AddChild(this->resizer);
|
|
|
|
this->scrollBar = new UIScrollBar();
|
|
this->scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - 46);
|
|
this->AddChild(this->scrollBar);
|
|
|
|
this->buyButton = new UIExpandedBarterPurchaseButton;
|
|
this->buyButton->SetBitmap("유저인터페이스\\btn_buy.bmp", 0, 0);
|
|
this->buyButton->SetBitmap("유저인터페이스\\btn_buy_a.bmp", 1, 0);
|
|
this->buyButton->SetBitmap("유저인터페이스\\btn_buy_b.bmp", 2, 0);
|
|
this->buyButton->SetSize(this->buyButton->BitmapWidth(), this->buyButton->BitmapHeight());
|
|
this->buyButton->Move(this->geometry.width - 105, this->geometry.height - 24);
|
|
this->buyButton->SetId(184);
|
|
this->AddChild(this->buyButton);
|
|
|
|
this->cancelButton = new UIBitmapButton();
|
|
this->cancelButton->SetBitmap("유저인터페이스\\btn_cancel.bmp", 0, 0);
|
|
this->cancelButton->SetBitmap("유저인터페이스\\btn_cancel_a.bmp", 1, 0);
|
|
this->cancelButton->SetBitmap("유저인터페이스\\btn_cancel_b.bmp", 2, 0);
|
|
this->cancelButton->SetSize(this->cancelButton->BitmapWidth(), this->cancelButton->BitmapHeight());
|
|
this->cancelButton->Move(this->geometry.width - 60, this->geometry.height - 24);
|
|
this->cancelButton->SetId(185);
|
|
this->AddChild(this->cancelButton);
|
|
|
|
this->rowCount = (height - 46) / 64;
|
|
|
|
this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0);
|
|
}
|
|
|
|
// OFFSET: 0x008446D0
|
|
// FUNCTION: fn_10564
|
|
int UIBartermarketWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
|
|
switch (message) {
|
|
case UM_SETINFO: {
|
|
this->saved = reinterpret_cast<ItemShopWndInfo*>(a);
|
|
if (a == 0) {
|
|
return 0;
|
|
}
|
|
if (!this->saved->IsValid()) {
|
|
this->saved->Reset();
|
|
}
|
|
this->SendMsg(nullptr, UM_RESIZE, 7, this->saved->width, this->saved->height, 0);
|
|
this->Move(this->saved->x, this->saved->y);
|
|
return 0;
|
|
}
|
|
|
|
case UM_DROP: {
|
|
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
|
if (!mode) {
|
|
return 0;
|
|
}
|
|
|
|
std::pair<bool, BarterMarketItem> found = g_barterMarketItemMgr->FindAllItem(mode->drag.barterId);
|
|
if (found.first == false) {
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_ITEM_OUT_OF_STOCK)), 255, 0, 0, 0);
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
found.second.value = mode->drag.quantity;
|
|
g_barterMarketItemMgr->RemoveItem(found.second);
|
|
if (UIWindow* window = g_windowMgr.LookupWindow(WID_BARTERITEMPURCHASEWND)) {
|
|
window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0);
|
|
}
|
|
this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0);
|
|
mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
case UM_RESIZE: {
|
|
if (a == 7) {
|
|
int width = b <= 320 ? static_cast<int>(b) : 320;
|
|
int height = c <= 336 ? static_cast<int>(c) : 336;
|
|
if (width < 232) {
|
|
width = 232;
|
|
}
|
|
if (height < 120) {
|
|
height = 120;
|
|
}
|
|
width = (width - 280) / 32 * 32 + 280;
|
|
height = (height - 120) / 32 * 32 + 120;
|
|
|
|
if (width != this->geometry.width || height != this->geometry.height) {
|
|
this->Resize(width, height);
|
|
this->columns = 1;
|
|
const int contentHeight = this->geometry.height - this->footerHeight - this->bottomPadding - 17;
|
|
this->visibleRows = contentHeight / 32;
|
|
this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15);
|
|
this->scrollBar->Move(this->geometry.width - 15, 14);
|
|
this->scrollBar->Resize(this->scrollBar->geometry.width, contentHeight);
|
|
this->UpdateScrollBar();
|
|
}
|
|
|
|
g_windowMgr.StoreSnapRectangle(this);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
case UM_REFRESHITEM: {
|
|
this->items.clear();
|
|
std::list<BarterMarketItem>* items = g_barterMarketItemMgr->GetItems();
|
|
for (std::list<BarterMarketItem>::iterator it = items->begin(); it != items->end(); ++it) {
|
|
this->items.push_back(it->ToItemInfo());
|
|
}
|
|
this->Invalidate();
|
|
this->UpdateScrollBar();
|
|
return 0;
|
|
}
|
|
|
|
default:
|
|
break;
|
|
}
|
|
|
|
return UIFrameWnd::SendMsg(sender, message, a, b, c, d);
|
|
}
|
|
|
|
// OFFSET: 0x00842570
|
|
// FUNCTION: fn_10553
|
|
void UIBartermarketWnd::OnCreate(int width, int height) {
|
|
this->resizer = new UIResizer();
|
|
this->resizer->SetSize(16, 16);
|
|
static_cast<UIResizer*>(this->resizer)->SetDirection(7);
|
|
static_cast<UIResizer*>(this->resizer)->SetBitmapName("유저인터페이스\\btn_resize.bmp");
|
|
this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15);
|
|
static_cast<UIResizer*>(this->resizer)->SetColors(0xFFFF00FF, 0xFFFF00FF);
|
|
this->AddChild(this->resizer);
|
|
|
|
this->scrollBar = new UIScrollBar();
|
|
static_cast<UIScrollBar*>(this->scrollBar)->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - this->bottomPadding - 17);
|
|
this->AddChild(this->scrollBar);
|
|
|
|
this->columns = 1;
|
|
this->visibleRows = (height - this->bottomPadding - 17) / 32;
|
|
|
|
this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0);
|
|
}
|
|
|
|
// OFFSET: 0x00845220
|
|
// FUNCTION: fn_10575
|
|
bool UIExpandedBarterItemPurchaseWnd::Purchase() {
|
|
std::map<std::string, int> totals;
|
|
std::vector<BarterMarketEntry> entries = *g_expandedBarterMarketItemMgr->GetEntries();
|
|
|
|
int count = g_session.GetList0Size();
|
|
count += g_session.CountDistinctEquippedItems();
|
|
count += g_session.CountDistinctCostumeItems();
|
|
|
|
for (std::vector<BarterMarketEntry>::iterator it = entries.begin(); it != entries.end(); ++it) {
|
|
std::map<std::string, int>::iterator total = totals.find(it->name);
|
|
if (total != totals.end()) {
|
|
total->second += it->value;
|
|
} else {
|
|
totals.insert(std::make_pair(it->name, it->value));
|
|
}
|
|
|
|
if (g_session.IsEquipItemType(it->field_0) == true || g_session.IsShadowItemType(it->field_0) == true) {
|
|
++count;
|
|
} else {
|
|
g_session.FindInventoryIndexByItemId(std::atoi(it->name.c_str()));
|
|
}
|
|
}
|
|
|
|
if (count > g_session.extraInventorySlots + 100) {
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_SOUL_REAPER)), 255, 0, 0, 0);
|
|
this->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0);
|
|
return false;
|
|
}
|
|
|
|
if (!g_expandedBarterMarketItemMgr->HasRequiredItems()) {
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_PVP)), 255, 0, 0, 0);
|
|
this->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0);
|
|
return false;
|
|
}
|
|
|
|
for (std::map<std::string, int>::iterator it = totals.begin(); it != totals.end(); ++it) {
|
|
const int itemId = std::atoi(it->first.c_str());
|
|
const int inventoryCount = g_session.GetList0Size();
|
|
int owned = 0;
|
|
for (int i = 0; i < inventoryCount; ++i) {
|
|
ITEM_INFO item = g_session.GetInventoryItemAt(i);
|
|
if (std::atoi(item.itemId.c_str()) == itemId) {
|
|
owned = item.quantity;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (it->second + owned > 30000) {
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
const std::string text = FormatOwnedString(LookupMessage(MSI_GLOBALRODEX_MESSAGE_DELETE_ALL_ON_ADMIN), 30000);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(text.c_str()), 255, 0, 0, 0);
|
|
this->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
// OFFSET: 0x00847290
|
|
// FUNCTION: fn_10584
|
|
void UIExpandedBartermarketWnd::OnCreate(int width, int height) {
|
|
this->resizer = new UIResizer();
|
|
this->resizer->SetSize(16, 16);
|
|
static_cast<UIResizer*>(this->resizer)->SetDirection(7);
|
|
static_cast<UIResizer*>(this->resizer)->SetBitmapName("유저인터페이스\\btn_resize.bmp");
|
|
this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15);
|
|
static_cast<UIResizer*>(this->resizer)->SetColors(0xFFFF00FF, 0xFFFF00FF);
|
|
this->AddChild(this->resizer);
|
|
|
|
this->scrollBar = new UIScrollBar();
|
|
this->scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - 46);
|
|
this->AddChild(this->scrollBar);
|
|
|
|
this->rowCount = (height - 46) / 64;
|
|
|
|
this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0);
|
|
}
|
|
|
|
// OFFSET: 0x008426E0
|
|
// FUNCTION: fn_10554
|
|
void UIBarterItemPurchaseWnd::Paint() {
|
|
this->DrawTitleBar(false, LookupMessage(MSI_EXCHANGE_ITEM_CNT), 0);
|
|
if (this->geometry.height == 17) {
|
|
return;
|
|
}
|
|
|
|
const int borderHeight = this->geometry.height - 38;
|
|
const int borderTiles = borderHeight / 8 + (borderHeight % 8 != 0);
|
|
for (int tile = 0, y = 17; tile < borderTiles; ++tile, y += 8) {
|
|
auto* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_left.bmp")));
|
|
this->DrawBitmap(0, y, bitmap, false);
|
|
}
|
|
for (int tile = 0, y = 17; tile < borderTiles; ++tile, y += 8) {
|
|
auto* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_right.bmp")));
|
|
this->DrawBitmap(this->geometry.width - bitmap->image.width, y, bitmap, false);
|
|
}
|
|
|
|
unsigned red;
|
|
unsigned green;
|
|
unsigned blue;
|
|
SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue);
|
|
const std::uint32_t background = RGB(red, green, blue);
|
|
int rightRemainder = (this->geometry.width - 60) % 32;
|
|
if (rightRemainder < 0) {
|
|
rightRemainder += 32;
|
|
}
|
|
int bottomRemainder = (this->geometry.height - 38) % 32;
|
|
if (bottomRemainder < 0) {
|
|
bottomRemainder += 32;
|
|
}
|
|
this->FillRegion(20, 17, rightRemainder, this->geometry.height - 38, background);
|
|
this->FillRegion(20, (this->geometry.height - 38) / 32 * 32 + 17, this->geometry.width - 24, bottomRemainder, background);
|
|
this->DrawButtonBar(2, 0, 1);
|
|
|
|
const int rows = (this->geometry.height - 38) / 32;
|
|
SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue);
|
|
this->FillRegion(40, 17, this->geometry.width - 50, rows * 32, RGB(red, green, blue));
|
|
|
|
for (int row = 0; row < rows; ++row) {
|
|
DrawItemSlotBackground(*this, 40, row * 32 + 17);
|
|
}
|
|
|
|
int visible = 0;
|
|
int index = 0;
|
|
std::list<BarterMarketItem>* items = g_barterMarketItemMgr->GetAllItems();
|
|
for (std::list<BarterMarketItem>::iterator it = items->begin(); it != items->end(); ++it, ++index) {
|
|
if (index < this->scroll * this->columns) {
|
|
continue;
|
|
}
|
|
|
|
const int row = visible / this->columns;
|
|
const int column = visible % this->columns;
|
|
const int x = column * 32;
|
|
const int y = row * 32;
|
|
if (this->hovered == index) {
|
|
SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, red, green, blue);
|
|
this->FillRegion(x + 72, y + 19, 0xBF, 0x1C, RGB(red, green, blue));
|
|
}
|
|
|
|
const ITEM_INFO item = it->ToItemInfo();
|
|
DrawItemWithQuantity(*this, ResourceMgr::Instance(), x + 44, y + 21, item, 0, 0);
|
|
this->DrawWrappedItemName(x + 76, y + 29, 100, &item, 0, 0, 12);
|
|
char iconId[64] = {};
|
|
StringFormat(iconId, sizeof(iconId), static_cast<std::size_t>(-1), "%d", it->field_2c);
|
|
DrawItemIconById(*this, this->geometry.width - 70, y + 21, iconId, 1);
|
|
char amount[64] = {};
|
|
if (it->field_28 > 0) {
|
|
const int bytes = StringFormat(amount, sizeof(amount), static_cast<std::size_t>(-1), "%d", it->value * it->field_28);
|
|
this->DrawRightAlignedText(this->geometry.width - 25, y + 29, amount, bytes, 0, 12, 0, 0);
|
|
}
|
|
|
|
if (++visible == this->visibleRows * this->columns) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00842BF0
|
|
// FUNCTION: fn_10555
|
|
void UIBartermarketWnd::Paint() {
|
|
this->DrawTitleBar(false, LookupMessage(MSI_SHOPITEMS), 0);
|
|
if (this->geometry.height == 17) {
|
|
return;
|
|
}
|
|
|
|
const int leftHeight = this->geometry.height - this->bottomPadding - 17;
|
|
const int leftTiles = leftHeight / 8 + (leftHeight % 8 != 0);
|
|
for (int tile = 0, y = 17; tile < leftTiles; ++tile, y += 8) {
|
|
auto* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_left.bmp")));
|
|
this->DrawBitmap(0, y, bitmap, false);
|
|
}
|
|
const int rightHeight = this->geometry.height - this->bottomPadding - 17;
|
|
const int rightTiles = rightHeight / 8 + (rightHeight % 8 != 0);
|
|
for (int tile = 0, y = 17; tile < rightTiles; ++tile, y += 8) {
|
|
auto* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_right.bmp")));
|
|
this->DrawBitmap(this->geometry.width - bitmap->image.width, y, bitmap, false);
|
|
}
|
|
|
|
unsigned red;
|
|
unsigned green;
|
|
unsigned blue;
|
|
SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue);
|
|
this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - this->bottomPadding - 17, RGB(red, green, blue));
|
|
const int contentHeight = this->geometry.height - this->bottomPadding - 17;
|
|
this->FillRegion(20, contentHeight / 32 * 32 + 17, this->geometry.width - 24, contentHeight % 32, RGB(red, green, blue));
|
|
this->DrawButtonBar(2, 0, 1);
|
|
|
|
const int columns = (this->geometry.width - 40) / 32;
|
|
const int rows = (this->geometry.height - this->footerHeight - this->bottomPadding - 17) / 32;
|
|
for (int row = 0; row < rows; ++row) {
|
|
DrawItemSlotBackground(*this, 40, row * 32 + 17);
|
|
}
|
|
unsigned slotRed;
|
|
unsigned slotGreen;
|
|
unsigned slotBlue;
|
|
SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, slotRed, slotGreen, slotBlue);
|
|
this->FillRegion(72, 17, columns * 32 - 32, rows * 32, RGB(slotRed, slotGreen, slotBlue));
|
|
|
|
int visible = 0;
|
|
int index = 0;
|
|
std::list<BarterMarketItem> items = *g_barterMarketItemMgr->GetItems();
|
|
for (std::list<BarterMarketItem>::iterator it = items.begin(); it != items.end(); ++it, ++index) {
|
|
if (index < this->scroll * this->columns) {
|
|
continue;
|
|
}
|
|
|
|
const int row = visible / this->columns;
|
|
const int column = visible % this->columns;
|
|
const int x = column * 32;
|
|
const int y = row * 32;
|
|
if (this->hovered == index) {
|
|
unsigned hoverRed;
|
|
unsigned hoverGreen;
|
|
unsigned hoverBlue;
|
|
SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, hoverRed, hoverGreen, hoverBlue);
|
|
this->FillRegion(x + 72, y + 19, this->geometry.width - 0x58, 0x1C, RGB(hoverRed, hoverGreen, hoverBlue));
|
|
}
|
|
|
|
if (it->flag_38 == true) {
|
|
DrawItemIcon(*this, ResourceMgr::Instance(), x + 44, y + 21, it->ToItemInfo(), 0);
|
|
} else {
|
|
DrawItemWithQuantity(*this, ResourceMgr::Instance(), x + 44, y + 21, it->ToItemInfo(), 0, 0);
|
|
}
|
|
{
|
|
const ITEM_INFO item = it->ToItemInfo();
|
|
this->DrawWrappedItemName(x + 76, y + 29, 120, &item, 0, 0, 12);
|
|
}
|
|
char iconId[64];
|
|
StringFormat(iconId, sizeof(iconId), static_cast<std::size_t>(-1), "%d", it->field_2c);
|
|
DrawItemIconById(*this, this->geometry.width - 70, y + 21, iconId, 1);
|
|
if (it->field_28 > 0) {
|
|
char amount[64];
|
|
const int bytes = StringFormat(amount, sizeof(amount), static_cast<std::size_t>(-1), "%d", it->field_28);
|
|
this->DrawRightAlignedText(this->geometry.width - 25, y + 29, amount, bytes, 0, 12, 0, 0);
|
|
}
|
|
|
|
if (++visible == this->visibleRows * this->columns) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x008473F0
|
|
// FUNCTION: fn_10585
|
|
void UIExpandedBarterItemPurchaseWnd::Paint() {
|
|
this->DrawTitleBar(false, LookupMessage(MSI_EXCHANGE_ITEM_CNT), 0);
|
|
|
|
const int leftHeight = this->geometry.height - 46;
|
|
const int leftTiles = leftHeight / 8 + (leftHeight % 8 != 0);
|
|
for (int tile = 0, y = 17; tile < leftTiles; ++tile, y += 8) {
|
|
auto* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_left.bmp")));
|
|
this->DrawBitmap(0, y, bitmap, false);
|
|
}
|
|
const int rightHeight = this->geometry.height - 46;
|
|
const int rightTiles = rightHeight / 8 + (rightHeight % 8 != 0);
|
|
for (int tile = 0, y = 17; tile < rightTiles; ++tile, y += 8) {
|
|
auto* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_right.bmp")));
|
|
this->DrawBitmap(this->geometry.width - bitmap->image.width, y, bitmap, false);
|
|
}
|
|
|
|
this->DrawButtonBar(2, 0, 1);
|
|
unsigned red;
|
|
unsigned green;
|
|
unsigned blue;
|
|
SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue);
|
|
this->FillRegion(20, 17, this->geometry.width - 40, this->geometry.height - 46, RGB(red, green, blue));
|
|
this->DrawButtonBar(2, 0, 1);
|
|
|
|
int visible = 0;
|
|
int index = 0;
|
|
for (std::list<BarterMarketEntry>::iterator it = this->entries.begin(); it != this->entries.end(); ++it, ++index) {
|
|
if (index < this->firstRow) {
|
|
continue;
|
|
}
|
|
|
|
const int y = visible * 64;
|
|
DrawItemSlotBackground(*this, 40, y + 17);
|
|
for (unsigned slot = 0; slot < it->chunks.size(); ++slot) {
|
|
DrawItemSlotBackground(*this, 72 + slot * 42, y + 49);
|
|
}
|
|
if (this->hoveredRow == index) {
|
|
unsigned hoverRed;
|
|
unsigned hoverGreen;
|
|
unsigned hoverBlue;
|
|
SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, hoverRed, hoverGreen, hoverBlue);
|
|
this->FillRegion(72, y + 19, this->geometry.width - 0x5A, 0x3C, RGB(hoverRed, hoverGreen, hoverBlue));
|
|
}
|
|
|
|
DrawItemWithQuantity(*this, ResourceMgr::Instance(), 44, y + 21, it->ToItemInfo(), 0, 0);
|
|
{
|
|
const ITEM_INFO item = it->ToItemInfo();
|
|
this->DrawWrappedItemName(76, y + 29, 100, &item, 0, 0, 12);
|
|
}
|
|
|
|
if (it->field_28 > 0) {
|
|
std::uint32_t color = 0xFFFFFF;
|
|
const std::string quantity = std::format("+{}", it->field_28);
|
|
DrawOutlinedColoredText(*this, 50, y + 18, quantity.c_str(), quantity.size(), color, 200, 0, 12, 1);
|
|
}
|
|
|
|
int chunkIndex = 0;
|
|
for (std::vector<BarterChunk16>::const_iterator chunk = it->chunks.begin(); chunk != it->chunks.end(); ++chunk) {
|
|
ITEM_INFO chunkItem;
|
|
chunkItem.quantity = chunk->amount * it->value;
|
|
char itemId[33];
|
|
_itoa(chunk->field_0, itemId, 10);
|
|
chunkItem.itemId = itemId;
|
|
chunkItem.refiningLevel = chunk->field_4;
|
|
const int chunkX = 84 + chunkIndex * 42;
|
|
DrawItemWithQuantity(*this, ResourceMgr::Instance(), chunkX - 8, y + 49, chunkItem, 1, 0);
|
|
if (chunkItem.refiningLevel > 0) {
|
|
char chunkAmount[16] = {};
|
|
StringFormat(chunkAmount, sizeof(chunkAmount), static_cast<std::size_t>(-1), "+%d", chunkItem.refiningLevel);
|
|
std::uint32_t color = 0xFFFFFF;
|
|
DrawOutlinedColoredText(*this, chunkX, y + 49, chunkAmount, std::strlen(chunkAmount), color, 200, 0, 12, 1);
|
|
}
|
|
++chunkIndex;
|
|
}
|
|
|
|
char amount[23] = {};
|
|
StringFormat(amount, sizeof(amount), static_cast<std::size_t>(-1), "%d z", it->field_8 * it->value);
|
|
this->DrawRightAlignedText(this->geometry.width - 20, y + 60, amount, 0, 0, 12, 0, 0);
|
|
|
|
if (++visible == this->rowCount) {
|
|
++index;
|
|
break;
|
|
}
|
|
}
|
|
|
|
for (int row = index; row < this->rowCount; ++row) {
|
|
DrawItemSlotBackground(*this, 40, row * 64 + 17);
|
|
for (int x = 72; x < 156; x += 42) {
|
|
DrawItemSlotBackground(*this, x, row * 64 + 49);
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00847AA0
|
|
// FUNCTION: fn_10586
|
|
void UIExpandedBartermarketWnd::Paint() {
|
|
this->DrawTitleBar(false, LookupMessage(MSI_SHOPITEMS), 0);
|
|
|
|
const int leftHeight = this->geometry.height - 46;
|
|
const int leftTiles = leftHeight / 8 + (leftHeight % 8 != 0);
|
|
for (int tile = 0, y = 17; tile < leftTiles; ++tile, y += 8) {
|
|
auto* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_left.bmp")));
|
|
this->DrawBitmap(0, y, bitmap, false);
|
|
}
|
|
const int rightHeight = this->geometry.height - 46;
|
|
const int rightTiles = rightHeight / 8 + (rightHeight % 8 != 0);
|
|
for (int tile = 0, y = 17; tile < rightTiles; ++tile, y += 8) {
|
|
auto* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_right.bmp")));
|
|
this->DrawBitmap(this->geometry.width - bitmap->image.width, y, bitmap, false);
|
|
}
|
|
|
|
unsigned red;
|
|
unsigned green;
|
|
unsigned blue;
|
|
SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue);
|
|
this->FillRegion(20, 17, this->geometry.width - 40, this->geometry.height - 46, RGB(red, green, blue));
|
|
this->DrawButtonBar(2, 0, 1);
|
|
|
|
int visible = 0;
|
|
int index = 0;
|
|
for (std::list<BarterMarketEntry>::iterator it = this->entries.begin(); it != this->entries.end(); ++it, ++index) {
|
|
if (index < this->firstRow) {
|
|
continue;
|
|
}
|
|
|
|
const int y = visible * 64;
|
|
DrawItemSlotBackground(*this, 40, y + 17);
|
|
for (unsigned slot = 0; slot < it->chunks.size(); ++slot) {
|
|
DrawItemSlotBackground(*this, 72 + slot * 42, y + 49);
|
|
}
|
|
if (this->hoveredRow == index) {
|
|
unsigned hoverRed;
|
|
unsigned hoverGreen;
|
|
unsigned hoverBlue;
|
|
SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, hoverRed, hoverGreen, hoverBlue);
|
|
this->FillRegion(72, y + 19, this->geometry.width - 0x5A, 0x3C, RGB(hoverRed, hoverGreen, hoverBlue));
|
|
}
|
|
|
|
if (it->flag_30 == true) {
|
|
DrawItemIcon(*this, ResourceMgr::Instance(), 44, y + 21, it->ToItemInfo(), 0);
|
|
} else if (it->value == 0) {
|
|
DrawItemWithQuantityAuxiliary(*this, 1, 44, y + 21, it->ToItemInfo(), 1, 0);
|
|
} else {
|
|
DrawItemWithQuantity(*this, ResourceMgr::Instance(), 44, y + 21, it->ToItemInfo(), 1, 0);
|
|
}
|
|
{
|
|
const ITEM_INFO item = it->ToItemInfo();
|
|
this->DrawWrappedItemName(76, y + 29, 100, &item, 0, 0, 12);
|
|
}
|
|
if (it->field_28 > 0) {
|
|
std::uint32_t color = 0xFFFFFF;
|
|
const std::string quantity = std::format("+{}", it->field_28);
|
|
DrawOutlinedColoredText(*this, 50, y + 18, quantity.c_str(), quantity.size(), color, 200, 0, 12, 1);
|
|
}
|
|
|
|
int chunkIndex = 0;
|
|
for (std::vector<BarterChunk16>::const_iterator chunk = it->chunks.begin(); chunk != it->chunks.end(); ++chunk) {
|
|
ITEM_INFO chunkItem;
|
|
chunkItem.quantity = chunk->amount;
|
|
char itemId[33];
|
|
_itoa(chunk->field_0, itemId, 10);
|
|
chunkItem.itemId = itemId;
|
|
chunkItem.refiningLevel = chunk->field_4;
|
|
const int chunkX = 76 + chunkIndex * 42;
|
|
if (it->value == 0) {
|
|
DrawItemWithQuantityAuxiliary(*this, 1, chunkX, y + 49, chunkItem, 1, 0);
|
|
} else {
|
|
DrawItemWithQuantity(*this, ResourceMgr::Instance(), chunkX, y + 49, chunkItem, 1, 0);
|
|
}
|
|
if (chunkItem.refiningLevel != 0) {
|
|
char chunkAmount[16] = {};
|
|
StringFormat(chunkAmount, sizeof(chunkAmount), static_cast<std::size_t>(-1), "+%d", chunkItem.refiningLevel);
|
|
std::uint32_t color = 0xFFFFFF;
|
|
DrawOutlinedColoredText(*this, chunkX + 8, y + 49, chunkAmount, std::strlen(chunkAmount), color, 200, 0, 12, 1);
|
|
}
|
|
++chunkIndex;
|
|
}
|
|
|
|
char amount[23] = {};
|
|
StringFormat(amount, sizeof(amount), static_cast<std::size_t>(-1), "%d z", it->field_8);
|
|
this->DrawRightAlignedText(this->geometry.width - 20, y + 60, amount, 0, 0, 12, 0, 0);
|
|
|
|
if (++visible == this->rowCount) {
|
|
++index;
|
|
break;
|
|
}
|
|
}
|
|
|
|
for (int row = index; row < this->rowCount; ++row) {
|
|
DrawItemSlotBackground(*this, 40, row * 64 + 17);
|
|
for (int x = 72; x < 156; x += 42) {
|
|
DrawItemSlotBackground(*this, x, row * 64 + 49);
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00840100
|
|
// FUNCTION: fn_10538
|
|
UIBarterItemPurchaseWnd::UIBarterItemPurchaseWnd() : UIItemPurchaseWnd() {
|
|
}
|
|
|
|
// OFFSET: 0x00840160
|
|
// FUNCTION: fn_10539
|
|
UIBartermarketWnd::UIBartermarketWnd() : UIItemShopWnd() {
|
|
}
|