Batch #8662 by eAthena: 0 byte-identical, 18 confirmed by peer review. - fn_13215 UIItemDropCntWnd::UIItemDropCntWnd: logic confirmed by peer review - fn_13216 UIItemPurchaseWnd::UIItemPurchaseWnd: logic confirmed by peer review - fn_13217 UIItemSellWnd2::UIItemSellWnd2: logic confirmed by peer review - fn_13218 UIItemSellWnd::UIItemSellWnd: logic confirmed by peer review - fn_13219 UIItemShopWnd2::UIItemShopWnd2: logic confirmed by peer review - fn_13220 UIItemShopWnd::UIItemShopWnd: logic confirmed by peer review - fn_13221 UIItemStoreFindWnd::UIItemStoreFindWnd: logic confirmed by peer review - fn_13222 UIItemStoreSubWnd::UIItemStoreSubWnd: logic confirmed by peer review - fn_13223 UIItemStoreWnd::UIItemStoreWnd: logic confirmed by peer review - fn_13224 UIItemWnd::UIItemWnd: logic confirmed by peer review - fn_13225 UIMerchantItemMyShopWnd::UIMerchantItemMyShopWnd: logic confirmed by peer review - fn_13227 UIMerchantItemPurchaseWnd::UIMerchantItemPurchaseWnd: logic confirmed by peer review - fn_13228 UIMerchantItemShopWnd::UIMerchantItemShopWnd: logic confirmed by peer review - fn_13229 UIMerchantItemWnd::UIMerchantItemWnd: logic confirmed by peer review - fn_13230 UIMerchantMirrorItemWnd::UIMerchantMirrorItemWnd: logic confirmed by peer review - fn_13232 UINoticeMessageBox_LockSellItem::UINoticeMessageBox_LockSellItem: logic confirmed by peer review - fn_13238 UIItemStoreWnd::~UIItemStoreWnd: logic confirmed by peer review - fn_13239 UIItemWnd::~UIItemWnd: logic confirmed by peer review Peer-reviewed-by: youko, dori Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
104 lines
3.4 KiB
C++
104 lines
3.4 KiB
C++
#ifndef RAGNAROK_SOURCE_UI_RODEX_UIRODEXINBOXWND_H
|
|
#define RAGNAROK_SOURCE_UI_RODEX_UIRODEXINBOXWND_H
|
|
|
|
#include "Contents/RodexMailStore.h"
|
|
#include "UI/Item/UIItemWnd.h"
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <ctime>
|
|
#include <map>
|
|
#include <string>
|
|
#include <utility>
|
|
#include <vector>
|
|
|
|
class UIBasicButton;
|
|
class UIBitmapButton;
|
|
class UIBmpRadioBtn;
|
|
class UICheckBox;
|
|
class UIEditCtrl;
|
|
class UIRadioBtn;
|
|
class UITextButton;
|
|
|
|
using RodexMailEntry = std::pair<int, std::int64_t>;
|
|
|
|
// INLINED
|
|
inline std::map<std::int64_t, RodexMail>* RodexMailsOfType(int type) {
|
|
switch (type) {
|
|
case 0:
|
|
return &g_rodexMailStore->m_mails0;
|
|
case 1:
|
|
return &g_rodexMailStore->m_mails1;
|
|
case 2:
|
|
return &g_rodexMailStore->m_mails2;
|
|
default:
|
|
return nullptr;
|
|
}
|
|
}
|
|
|
|
struct RodexMailEntryLess {
|
|
bool operator()(const RodexMailEntry& left, const RodexMailEntry& right) const;
|
|
};
|
|
|
|
class UIRodexInboxWnd : public UIItemWnd {
|
|
public:
|
|
UIRodexInboxWnd();
|
|
bool Slot03() override;
|
|
void Slot15(int width, int height) override;
|
|
void Paint() override;
|
|
void Slot25(int x, int y) override;
|
|
void Slot26(int x, int y) override;
|
|
void Nullsub257();
|
|
|
|
void Slot28(int x, int y) override;
|
|
int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override;
|
|
|
|
void DrawMailIcons(int row, unsigned char attachments, unsigned char read, unsigned char returned);
|
|
void SetButtonsDisabled(unsigned char disabled);
|
|
void SetMailRow(int row, std::int64_t mailId, std::string name, std::string subject, unsigned char read, unsigned char returned, int noAttachment);
|
|
void DrawExpireTime(int row, __time32_t sendTime, __time32_t expireTime, unsigned char returned);
|
|
void ClearChecks();
|
|
void RefreshMailLists();
|
|
void RemoveInboxMail(int id);
|
|
void SearchBySender(std::string keyword);
|
|
void SearchByTitle(std::string keyword);
|
|
void InitializeMailActions();
|
|
void RequestAllMailActions();
|
|
|
|
/* 0130 */ UIBmpRadioBtn* unknown_0130;
|
|
/* 0134 */ UIBmpRadioBtn* unknown_0134;
|
|
/* 0138 */ UIBmpRadioBtn* unknown_0138;
|
|
/* 013C */ UIBitmapButton* unknown_013C;
|
|
/* 0140 */ UIBitmapButton* unknown_0140;
|
|
/* 0144 */ UITextButton* unknown_0144[6];
|
|
/* 015C */ UITextButton* unknown_015C[6];
|
|
/* 0174 */ UICheckBox* checks[6];
|
|
/* 018C */ UIBasicButton* unknown_018C;
|
|
/* 0190 */ UIBasicButton* unknown_0190;
|
|
/* 0194 */ UIBitmapButton* unknown_0194;
|
|
/* 0198 */ UIBitmapButton* unknown_0198;
|
|
/* 019C */ int unknown_019C;
|
|
/* 01A0 */ int unknown_01A0;
|
|
/* 01A4 */ unsigned char expired;
|
|
/* 01A8 */ UIBitmapButton* unknown_01A8[6];
|
|
/* 01C0 */ UIRadioBtn* unknown_01C0[2];
|
|
/* 01C8 */ UIEditCtrl* unknown_01C8;
|
|
/* 01CC */ UIBitmapButton* unknown_01CC;
|
|
/* 01D0 */ UIBmpRadioBtn* unknown_01D0;
|
|
/* 01D4 */ unsigned char unknown_01D4;
|
|
/* 01D8 */ std::vector<RodexMailEntry> searchResults;
|
|
/* 01E4 */ std::vector<RodexMailEntry> mails0;
|
|
/* 01F0 */ std::vector<RodexMailEntry> mails1;
|
|
/* 01FC */ std::vector<RodexMailEntry> mails2;
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(RodexMailEntry) == 0x10);
|
|
static_assert(offsetof(UIRodexInboxWnd, unknown_012C) == 0x12C);
|
|
static_assert(offsetof(UIRodexInboxWnd, checks) == 0x174);
|
|
static_assert(offsetof(UIRodexInboxWnd, expired) == 0x1A4);
|
|
static_assert(offsetof(UIRodexInboxWnd, searchResults) == 0x1D8);
|
|
static_assert(offsetof(UIRodexInboxWnd, mails2) == 0x1FC);
|
|
#endif
|
|
|
|
#endif
|