Maintenance: [forced, user-approved] Family V3: remove the invented view struct ClientItemLists (a copy of CSession's layout, declare
Batch #10280 by ragnarok-clanker: forced by an admin (0 lower score(s), 115 changed function(s)); checked with 256 compiled unit(s), including every includer of Source/Client/Session.h, Source/Contents/ClientItemLists.h. Deletes: Source/Contents/ClientItemLists.h
This commit is contained in:
parent
0c406e7ceb
commit
e83c4def7d
25 changed files with 371 additions and 673 deletions
|
|
@ -1439,7 +1439,6 @@ void CGameMode::InitializeCamera() {
|
|||
#include "Contents/Schedule/CheckGDISchedule.h"
|
||||
#include "Contents/Schedule/TimeScheduler.h"
|
||||
#include "Render/Textures/TextureCache.h"
|
||||
#include "Contents/ClientItemLists.h"
|
||||
#include "Contents/Jobs/JobInheritance.h"
|
||||
#include "Network/Packets/PacketId.h"
|
||||
#include "Security/ReassemblyPacketMgr.h"
|
||||
|
|
@ -3196,7 +3195,6 @@ void CGameMode::PlayItemUseEffect(int itemId, std::uint32_t aid) {
|
|||
#include "Client/Input/Mouse.h"
|
||||
#include "Client/Mode/CLoginMode.h"
|
||||
#include "Client/Registry.h"
|
||||
#include "Contents/ClientItemLists.h"
|
||||
#include "Contents/Effects/EffectPrim.h"
|
||||
#include "Contents/MapSkyMgr.h"
|
||||
#include "Contents/NavigationManager.h"
|
||||
|
|
@ -3402,13 +3400,13 @@ void CGameMode::InitializeState() {
|
|||
}
|
||||
}
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ResetUnknown166C();
|
||||
g_session.ResetUnknown166C();
|
||||
g_session.UpdateRandomStats();
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1738();
|
||||
g_session.ClearItems1738();
|
||||
g_session.ClearTradeItems();
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1768();
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1758();
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1750();
|
||||
g_session.ClearItems1768();
|
||||
g_session.ClearItems1758();
|
||||
g_session.ClearItems1750();
|
||||
|
||||
// GLOBAL: gl_25334
|
||||
static int s_window315Checked;
|
||||
|
|
|
|||
|
|
@ -7,10 +7,6 @@
|
|||
#include <cstdint>
|
||||
#include <cstring>
|
||||
|
||||
struct ClientItemLists {
|
||||
bool Equip(const ITEM_INFO& item);
|
||||
void ResetEquipped();
|
||||
};
|
||||
|
||||
// GLOBAL: gl_25085
|
||||
EquipWindowLook g_equipWindowLook;
|
||||
|
|
@ -18,7 +14,7 @@ EquipWindowLook g_equipWindowLook;
|
|||
// OFFSET: 0x00D325F0
|
||||
// FUNCTION: fn_21743
|
||||
void CGameMode::ReceiveEquipWindowMicroscope(const unsigned char* packet) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ResetEquipped();
|
||||
g_session.ResetEquipped();
|
||||
g_session.ResetItems3500();
|
||||
|
||||
const int length = *reinterpret_cast<const std::int16_t*>(packet + 2);
|
||||
|
|
@ -47,7 +43,7 @@ void CGameMode::ReceiveEquipWindowMicroscope(const unsigned char* packet) {
|
|||
if (g_session.IsCostumeLocation(item.unknown_0000[3])) {
|
||||
g_session.EquipItem3500(item);
|
||||
} else {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->Equip(item);
|
||||
g_session.Equip(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -488,10 +488,6 @@ void CGameMode::SpawnGroundSkill(std::uint32_t aid, std::uint32_t owner, int val
|
|||
skill->SendMsg(nullptr, 45, 0, address, address >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
struct ClientItemLists {
|
||||
void AddItem1718(const RawItemBasic& item, int mode);
|
||||
void RemoveItem1710(std::uint32_t id, int quantity);
|
||||
};
|
||||
|
||||
int sub_D64A40(const unsigned char* entries);
|
||||
|
||||
|
|
@ -688,7 +684,7 @@ void CGameMode::ReceiveItem1718BasicList(const unsigned char* packet) {
|
|||
item.unknown_0038 = record.unknown_000D;
|
||||
item.id = -1;
|
||||
item.identified = 1;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1718(item, 0);
|
||||
g_session.AddItem1718(item, 0);
|
||||
}
|
||||
|
||||
if (UIWindow* window = g_windowMgr.EnsureWindow(22)) {
|
||||
|
|
@ -770,7 +766,7 @@ void CGameMode::ReceiveItem1718IndexList(const unsigned char* packet) {
|
|||
item.unknown_0008 = record.unknown_0006;
|
||||
item.unknown_000C = owned.unknown_0000[0];
|
||||
item.identified = owned.identified;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1718(item, 1);
|
||||
g_session.AddItem1718(item, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2275,7 +2271,7 @@ void CGameMode::ReceiveItemReward2(const unsigned char* data) {
|
|||
switch (packet->result) {
|
||||
case 0:
|
||||
g_session.AddStackedItem(reward);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->RemoveItem1710(reward.unknown_0000[1], reward.quantity);
|
||||
g_session.RemoveItem1710(reward.unknown_0000[1], reward.quantity);
|
||||
g_session.unknown_6140 = value;
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(2594)), 0x64FFFF, 0, 0, 0);
|
||||
break;
|
||||
|
|
@ -2316,7 +2312,7 @@ void CGameMode::ReceiveItemReward(const unsigned char* data) {
|
|||
}
|
||||
item.unknown_0074[0] = packet->bound;
|
||||
g_session.AddStackedItem(item);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->RemoveItem1710(packet->index, packet->quantity);
|
||||
g_session.RemoveItem1710(packet->index, packet->quantity);
|
||||
g_session.unknown_6140 = packet->value;
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(2594)), 0x64FFFF, 0, 0, 0);
|
||||
break;
|
||||
|
|
@ -2922,7 +2918,7 @@ void CGameMode::ReceivePendingItem1718List(const unsigned char* packet) {
|
|||
item.unknown_000C = record->type;
|
||||
item.id = -1;
|
||||
item.identified = 1;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1718(item, 0);
|
||||
g_session.AddItem1718(item, 0);
|
||||
if (g_unknown_015D4818 && g_unknown_015D4818->entry) {
|
||||
Unknown015D4818Values& values = g_unknown_015D4818->entry->values;
|
||||
values.unknown_0070 = record->unknown_000D;
|
||||
|
|
|
|||
|
|
@ -22,13 +22,6 @@ public:
|
|||
};
|
||||
}
|
||||
|
||||
struct ClientItemLists {
|
||||
bool AddItem1710(const ITEM_INFO& item, unsigned char refresh);
|
||||
bool AddItem1738(const ITEM_INFO& item, unsigned char refresh);
|
||||
bool AddItem1740(const ITEM_INFO& item);
|
||||
void ClearInventory();
|
||||
void ClearItems1740();
|
||||
};
|
||||
|
||||
|
||||
namespace {
|
||||
|
|
@ -113,7 +106,7 @@ void CGameMode::ReceiveEquipListPart(unsigned char listType, int count, const un
|
|||
std::memcpy(options, record.options, sizeof(options));
|
||||
ITEM_INFO item;
|
||||
FillEquipListItem(item, record, options);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1738(item, 0);
|
||||
g_session.AddItem1738(item, 0);
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
|
|
@ -129,7 +122,7 @@ void CGameMode::ReceiveEquipListPart(unsigned char listType, int count, const un
|
|||
}
|
||||
|
||||
if (item.unknown_0000[3] == 0) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(item, 0);
|
||||
g_session.AddItem1710(item, 0);
|
||||
g_session.UpdateInventoryItem(item, 0);
|
||||
} else {
|
||||
char equipped = 1;
|
||||
|
|
@ -163,7 +156,7 @@ void CGameMode::ReceiveEquipListPart(unsigned char listType, int count, const un
|
|||
std::memcpy(options, record.options, sizeof(options));
|
||||
ITEM_INFO item;
|
||||
FillEquipListItem(item, record, options);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1740(item);
|
||||
g_session.AddItem1740(item);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -179,12 +172,12 @@ void CGameMode::ReceiveInventoryStart(const unsigned char* packet) {
|
|||
|
||||
switch (g_gameModePacketBuffer[4]) {
|
||||
case 0:
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearInventory();
|
||||
g_session.ClearInventory();
|
||||
g_session.ResetEquipment();
|
||||
g_session.ResetItems2B50();
|
||||
break;
|
||||
case 1:
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1740();
|
||||
g_session.ClearItems1740();
|
||||
break;
|
||||
case 2:
|
||||
case 3: {
|
||||
|
|
|
|||
|
|
@ -1235,23 +1235,6 @@ struct ItemEffectResultPacket {
|
|||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
struct ClientItemLists {
|
||||
void ClearItems1738();
|
||||
void ClearItems1784(int index);
|
||||
void RemoveItem1710(std::uint32_t id, int quantity);
|
||||
bool AddItem1738(const ITEM_INFO& item, unsigned char refresh);
|
||||
bool AddExchangeItem(ITEM_INFO item);
|
||||
void ClearItemSlotQuantities();
|
||||
void ClearItems1768();
|
||||
void ClearItems1758();
|
||||
void ClearItems1748();
|
||||
void ClearItems1760();
|
||||
void AddItem1758(const ITEM_INFO& item);
|
||||
void AddItem1748(const ITEM_INFO& item);
|
||||
void AddItem1718(const RawItemBasic& item, int mode);
|
||||
int IsGuildMemberName(const char* name);
|
||||
int IsFriendName(const char* name);
|
||||
};
|
||||
|
||||
struct AchievementStatePacket {
|
||||
/* 0000 */ std::int16_t unknown_0000;
|
||||
|
|
@ -1367,7 +1350,7 @@ void CGameMode::ReceiveItem1784List(const unsigned char* data) {
|
|||
}
|
||||
|
||||
const unsigned int count = (packet->length - 6) / sizeof(Item1784Entry);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1784(9);
|
||||
g_session.ClearItems1784(9);
|
||||
|
||||
char name[256];
|
||||
std::memset(name, 0, sizeof(name));
|
||||
|
|
@ -1422,7 +1405,7 @@ void CGameMode::ReceiveCardCompositionResult(const unsigned char* data) {
|
|||
}
|
||||
}
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->RemoveItem1710(packet->cardIndex, 1);
|
||||
g_session.RemoveItem1710(packet->cardIndex, 1);
|
||||
g_session.UpdateInventoryItem(equip, 1);
|
||||
}
|
||||
break;
|
||||
|
|
@ -1820,7 +1803,7 @@ void __stdcall sub_D1C050(const AchievementStatePacket* packet) {
|
|||
g_windowMgr.CloseWindow(0x21);
|
||||
}
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1738();
|
||||
g_session.ClearItems1738();
|
||||
g_unknown_01738268 = 0;
|
||||
g_unknown_0173826C = 0;
|
||||
g_unknown_01738270 = 0;
|
||||
|
|
@ -2975,7 +2958,7 @@ void CGameMode::ReceiveTradeItemFilter(const unsigned char* data) {
|
|||
raw.identified = item.identified;
|
||||
raw.unknown_0004 = 1;
|
||||
raw.unknown_0008 = 2;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1718(raw, 1);
|
||||
g_session.AddItem1718(raw, 1);
|
||||
}
|
||||
UIWindow* window = g_windowMgr.EnsureWindow(160);
|
||||
window->SendMsg(nullptr, 0x24, 1, 0, 0, 0);
|
||||
|
|
@ -2995,7 +2978,7 @@ void CGameMode::ReceiveExchangeItemAddAck(const unsigned char* data) {
|
|||
if (packet->index != 0) {
|
||||
ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->index);
|
||||
item.quantity = exchangeAmount;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddExchangeItem(item);
|
||||
g_session.AddExchangeItem(item);
|
||||
} else {
|
||||
g_session.m_zeny -= exchangeAmount;
|
||||
g_session.RefreshHpSpWindows();
|
||||
|
|
@ -3028,7 +3011,7 @@ void CGameMode::ReceiveExchangeRequestAck2(const unsigned char* data) {
|
|||
this->SendMsg(40, 0, 0, 0, 0);
|
||||
*reinterpret_cast<int*>(&this->unknown_0100[0x14]) = 1;
|
||||
g_session.ResetSlots();
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItemSlotQuantities();
|
||||
g_session.ClearItemSlotQuantities();
|
||||
g_windowMgr.CloseWindow(10011);
|
||||
UIWindow* window = g_windowMgr.EnsureWindow(10011);
|
||||
if (window) {
|
||||
|
|
@ -3070,7 +3053,7 @@ void CGameMode::ReceiveExchangeRequestAck(const unsigned char* data) {
|
|||
this->SendMsg(40, 0, 0, 0, 0);
|
||||
*reinterpret_cast<int*>(&this->unknown_0100[0x14]) = 1;
|
||||
g_session.ResetSlots();
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItemSlotQuantities();
|
||||
g_session.ClearItemSlotQuantities();
|
||||
g_windowMgr.CloseWindow(10011);
|
||||
UIWindow* window = g_windowMgr.EnsureWindow(10011);
|
||||
if (window) {
|
||||
|
|
@ -3233,7 +3216,7 @@ void CGameMode::ReceiveStorageEquipList(const unsigned char* data) {
|
|||
item.unknown_005D = record->damaged;
|
||||
item.unknown_0060 = record->refine;
|
||||
item.unknown_0068 = record->expireTime;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1738(item, 0);
|
||||
g_session.AddItem1738(item, 0);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1738Window();
|
||||
|
|
@ -3261,7 +3244,7 @@ void CGameMode::ReceiveStorageEquipList2(const unsigned char* data) {
|
|||
item.unknown_0068 = record->expireTime;
|
||||
item.unknown_0064 = record->bindOnEquip;
|
||||
item.unknown_0070 = record->sprite;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1738(item, 0);
|
||||
g_session.AddItem1738(item, 0);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1738Window();
|
||||
|
|
@ -3295,7 +3278,7 @@ void CGameMode::ReceiveStorageEquipList3(const unsigned char* data) {
|
|||
item.unknown_0064 = record->bindOnEquip;
|
||||
item.unknown_0070 = record->sprite;
|
||||
item.unknown_0074[0] = (record->flags >> 2) & 1;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1738(item, 0);
|
||||
g_session.AddItem1738(item, 0);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1738Window();
|
||||
|
|
@ -3340,7 +3323,7 @@ void CGameMode::ReceiveStorageEquipList4(const unsigned char* data) {
|
|||
for (int index = 0; index < item.unknown_0098; ++index) {
|
||||
reinterpret_cast<ItemSlotOption*>(item.unknown_009C)[index] = options[index];
|
||||
}
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1738(item, 0);
|
||||
g_session.AddItem1738(item, 0);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1738Window();
|
||||
|
|
@ -3385,7 +3368,7 @@ void CGameMode::ReceiveStorageEquipList5(const unsigned char* data) {
|
|||
for (int index = 0; index < item.unknown_0098; ++index) {
|
||||
reinterpret_cast<ItemSlotOption*>(item.unknown_009C)[index] = options[index];
|
||||
}
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1738(item, 0);
|
||||
g_session.AddItem1738(item, 0);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1738Window();
|
||||
|
|
@ -3417,7 +3400,7 @@ void CGameMode::ReceiveStorageNormalList(const unsigned char* data) {
|
|||
item.unknown_0074[0] = (record->flags >> 1) & 1;
|
||||
item.unknown_0068 = record->expireTime;
|
||||
item.unknown_0060 = 0;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1738(item, 0);
|
||||
g_session.AddItem1738(item, 0);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1738Window();
|
||||
|
|
@ -3449,7 +3432,7 @@ void CGameMode::ReceiveStorageNormalList2(const unsigned char* data) {
|
|||
item.unknown_0074[0] = (record->flags >> 1) & 1;
|
||||
item.unknown_0068 = record->expireTime;
|
||||
item.unknown_0060 = 0;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1738(item, 0);
|
||||
g_session.AddItem1738(item, 0);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1738Window();
|
||||
|
|
@ -3748,7 +3731,7 @@ void CGameMode::ReceiveVendingItemList(
|
|||
) {
|
||||
const auto* records = reinterpret_cast<const VendingItemRecord*>(data);
|
||||
if (own == 1) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1758();
|
||||
g_session.ClearItems1758();
|
||||
for (int i = 0; i < count;) {
|
||||
const VendingItemRecord record = records[i];
|
||||
ITEM_INFO item;
|
||||
|
|
@ -3760,7 +3743,7 @@ void CGameMode::ReceiveVendingItemList(
|
|||
item.unknown_0000[1] = i;
|
||||
item.identified = 1;
|
||||
item.SetItemId(record.itemId);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1758(item);
|
||||
g_session.AddItem1758(item);
|
||||
}
|
||||
|
||||
UIMerchantItemMyShopWnd* window = dynamic_cast<UIMerchantItemMyShopWnd*>(static_cast<UIFrameWnd*>(g_windowMgr.EnsureWindow(176)));
|
||||
|
|
@ -3772,8 +3755,8 @@ void CGameMode::ReceiveVendingItemList(
|
|||
window->SetDuration(duration);
|
||||
}
|
||||
} else {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1748();
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1760();
|
||||
g_session.ClearItems1748();
|
||||
g_session.ClearItems1760();
|
||||
for (int i = 0; i < count;) {
|
||||
const VendingItemRecord record = records[i];
|
||||
ITEM_INFO item;
|
||||
|
|
@ -3785,7 +3768,7 @@ void CGameMode::ReceiveVendingItemList(
|
|||
item.unknown_0000[1] = i;
|
||||
item.identified = 1;
|
||||
item.SetItemId(record.itemId);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1748(item);
|
||||
g_session.AddItem1748(item);
|
||||
}
|
||||
|
||||
UIMerchantItemShopWnd* shop = static_cast<UIMerchantItemShopWnd*>(g_windowMgr.EnsureWindow(177));
|
||||
|
|
@ -3874,12 +3857,12 @@ void CGameMode::ReceiveTraitStatusChangeAck(unsigned char result, unsigned short
|
|||
void CGameMode::ReceiveVendingItemList2(int aid, int storeId, char own, int count, std::uint32_t duration, const unsigned char* data) {
|
||||
const auto* records = reinterpret_cast<const VendingItemRecord2*>(data);
|
||||
if (own == 1) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1758();
|
||||
g_session.ClearItems1758();
|
||||
for (int i = 0; i < count; ++i) {
|
||||
const VendingItemRecord2 record = records[i];
|
||||
ITEM_INFO item;
|
||||
FillVendingItem(item, record);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1758(item);
|
||||
g_session.AddItem1758(item);
|
||||
}
|
||||
|
||||
UIMerchantItemMyShopWnd* window = dynamic_cast<UIMerchantItemMyShopWnd*>(static_cast<UIFrameWnd*>(g_windowMgr.EnsureWindow(45)));
|
||||
|
|
@ -3891,13 +3874,13 @@ void CGameMode::ReceiveVendingItemList2(int aid, int storeId, char own, int coun
|
|||
}
|
||||
this->unknown_024C = 1;
|
||||
} else {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1748();
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1760();
|
||||
g_session.ClearItems1748();
|
||||
g_session.ClearItems1760();
|
||||
for (int i = 0; i < count; ++i) {
|
||||
const VendingItemRecord2 record = records[i];
|
||||
ITEM_INFO item;
|
||||
FillVendingItem(item, record);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1748(item);
|
||||
g_session.AddItem1748(item);
|
||||
}
|
||||
|
||||
UIMerchantItemShopWnd* shop = static_cast<UIMerchantItemShopWnd*>(g_windowMgr.EnsureWindow(43));
|
||||
|
|
@ -7648,7 +7631,7 @@ void CGameMode::sub_D1A520(int unknown_0004, std::string name, std::string text,
|
|||
}
|
||||
prefix = prefix + " ] : " + message.data();
|
||||
} else {
|
||||
ClientItemLists& lists = reinterpret_cast<ClientItemLists&>(g_session);
|
||||
CSession& lists = g_session;
|
||||
if (lists.IsFriendName(name.c_str())) {
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(917)), 0xFFFF, 0, 0, 0);
|
||||
g_windowMgr.SendNotice(19, reinterpret_cast<std::intptr_t>(LookupMessage(917)), 0xFFFF, 0, 0, 0);
|
||||
|
|
@ -7715,7 +7698,7 @@ void CGameMode::ReceiveStoreResult(unsigned char kind, unsigned char result) {
|
|||
switch (result) {
|
||||
case 0:
|
||||
g_windowMgr.CloseWindow(41);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1768();
|
||||
g_session.ClearItems1768();
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
|
|
@ -7729,7 +7712,7 @@ void CGameMode::ReceiveStoreResult(unsigned char kind, unsigned char result) {
|
|||
case 4:
|
||||
case 6:
|
||||
case 7:
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1768();
|
||||
g_session.ClearItems1768();
|
||||
g_windowMgr.CloseWindow(41);
|
||||
break;
|
||||
}
|
||||
|
|
@ -7737,7 +7720,7 @@ void CGameMode::ReceiveStoreResult(unsigned char kind, unsigned char result) {
|
|||
switch (result) {
|
||||
case 0:
|
||||
g_windowMgr.CloseWindow(174);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1768();
|
||||
g_session.ClearItems1768();
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
|
|
@ -7752,7 +7735,7 @@ void CGameMode::ReceiveStoreResult(unsigned char kind, unsigned char result) {
|
|||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1768();
|
||||
g_session.ClearItems1768();
|
||||
g_windowMgr.CloseWindow(174);
|
||||
g_windowMgr.CloseWindow(175);
|
||||
break;
|
||||
|
|
@ -7772,7 +7755,7 @@ void CGameMode::ReceiveStoreResult(unsigned char kind, unsigned char result) {
|
|||
}
|
||||
|
||||
if (result == 200) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1768();
|
||||
g_session.ClearItems1768();
|
||||
g_windowMgr.CloseWindow(41);
|
||||
g_windowMgr.CloseWindow(174);
|
||||
g_windowMgr.CloseWindow(8);
|
||||
|
|
|
|||
|
|
@ -128,27 +128,6 @@ struct TradeItemRecord {
|
|||
static_assert(sizeof(TradeItemRecord) == 0x22);
|
||||
#endif
|
||||
|
||||
struct ClientItemLists {
|
||||
bool AddItem1738(const ITEM_INFO& item, unsigned char refresh);
|
||||
bool AddItem1740(const ITEM_INFO& item);
|
||||
void AddItem1758(const ITEM_INFO& item);
|
||||
void AddItem1718(const RawItemBasic& item, int quantity, std::uint16_t unknown_006C);
|
||||
void AppendItem1718(const ITEM_INFO& item);
|
||||
void AddItem1748(const ITEM_INFO& item);
|
||||
void RemoveItem1758(ITEM_INFO& item);
|
||||
void RemoveItem1758ByItemId(ITEM_INFO& item);
|
||||
void ClearItems1768();
|
||||
void ClearItems1760And1748();
|
||||
void ClearItems1758();
|
||||
void ClearItems1760();
|
||||
void ClearItems1748();
|
||||
void ResetEquipped();
|
||||
bool Equip(const ITEM_INFO& item);
|
||||
void RemoveItem1710(std::uint32_t id, int quantity);
|
||||
bool AddItem1710(const ITEM_INFO& item, unsigned char refresh);
|
||||
bool EquipItem6B68(const ITEM_INFO& item);
|
||||
void ClearRecords0734();
|
||||
};
|
||||
|
||||
void __fastcall sub_DFF150(CSession* session);
|
||||
|
||||
|
|
@ -820,7 +799,7 @@ void CGameMode::ReceiveItem1738EquipList(const unsigned char* data) {
|
|||
for (int index = 0; index < item.unknown_0098; ++index) {
|
||||
reinterpret_cast<StoreItemOption*>(item.unknown_009C)[index] = options[index];
|
||||
}
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1738(item, 1);
|
||||
g_session.AddItem1738(item, 1);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1738Window();
|
||||
|
|
@ -860,7 +839,7 @@ void CGameMode::ReceiveItem1738EquipListOptions(const unsigned char* data) {
|
|||
for (int index = 0; index < item.unknown_0098; ++index) {
|
||||
reinterpret_cast<StoreItemOption*>(item.unknown_009C)[index] = options[index];
|
||||
}
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1738(item, 1);
|
||||
g_session.AddItem1738(item, 1);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1738Window();
|
||||
|
|
@ -892,7 +871,7 @@ void CGameMode::ReceiveItem1738NormalList(const unsigned char* data) {
|
|||
item.unknown_0060 = 0;
|
||||
item.unknown_0068 = record->expireTime;
|
||||
item.unknown_0074[0] = (record->flags >> 1) & 1;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1738(item, 0);
|
||||
g_session.AddItem1738(item, 0);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1738Window();
|
||||
|
|
@ -1661,7 +1640,7 @@ void CGameMode::ReceiveItem1740EquipList(const unsigned char* packet) {
|
|||
for (int index = 0; index < item.unknown_0098; ++index) {
|
||||
reinterpret_cast<StoreItemOption*>(item.unknown_009C)[index] = options[index];
|
||||
}
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1740(item);
|
||||
g_session.AddItem1740(item);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1740Window();
|
||||
|
|
@ -1695,7 +1674,7 @@ void CGameMode::ReceiveItem1740EquipListOptions(const unsigned char* packet) {
|
|||
for (int index = 0; index < item.unknown_0098; ++index) {
|
||||
reinterpret_cast<StoreItemOption*>(item.unknown_009C)[index] = options[index];
|
||||
}
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1740(item);
|
||||
g_session.AddItem1740(item);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1740Window();
|
||||
|
|
@ -1886,7 +1865,7 @@ void __stdcall sub_D08110(int field8, int itemIdWord, int quantityWord, int fiel
|
|||
item.unknown_0014[0] = static_cast<std::uint32_t>(field14);
|
||||
UIWindow* window = g_windowMgr.EnsureWindow(0x101);
|
||||
window->SendMsg(nullptr, 0x17, reinterpret_cast<std::intptr_t>(&item), field18, field8, 0);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->RemoveItem1758(item);
|
||||
g_session.RemoveItem1758(item);
|
||||
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
|
||||
g_windowMgr.SendNotice(
|
||||
1, reinterpret_cast<std::intptr_t>(FormatOwnedString(LookupMessage(0xE7), item.DisplayName(0).c_str(), quantity).c_str()), 0xFFFF64, 0, 0, 0
|
||||
|
|
@ -1917,7 +1896,7 @@ void __declspec(noinline) __stdcall sub_D08670(int field14, int itemId, int quan
|
|||
item.unknown_0014[0] = static_cast<std::uint32_t>(field8);
|
||||
UIWindow* window = g_windowMgr.EnsureWindow(0x102);
|
||||
window->SendMsg(nullptr, 0x17, reinterpret_cast<std::intptr_t>(&item), field10, field14, 0);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->RemoveItem1758ByItemId(item);
|
||||
g_session.RemoveItem1758ByItemId(item);
|
||||
if (g_saleOpenWindow != nullptr) {
|
||||
g_saleOpenWindow->SendMsg(nullptr, 0x17, 0, 0, 0, 0);
|
||||
}
|
||||
|
|
@ -1964,7 +1943,7 @@ void CGameMode::ReceiveItem1740BasicList(const unsigned char* data) {
|
|||
item.unknown_005D = record->unknown_000C;
|
||||
item.unknown_0060 = record->refine;
|
||||
item.unknown_0068 = record->expireTime;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1740(item);
|
||||
g_session.AddItem1740(item);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1740Window();
|
||||
|
|
@ -1991,7 +1970,7 @@ void CGameMode::ReceiveItem1740BasicListBind(const unsigned char* data) {
|
|||
item.unknown_0068 = record->expireTime;
|
||||
item.unknown_0064 = record->bindOnEquip;
|
||||
item.unknown_0070 = record->sprite;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1740(item);
|
||||
g_session.AddItem1740(item);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1740Window();
|
||||
|
|
@ -2077,7 +2056,7 @@ void CGameMode::ReceivePartyDead(const unsigned char* packet) {
|
|||
void CGameMode::ReceiveShopItemList(
|
||||
const std::vector<ITEM_INFO>& items, int value, int unused1, int argument, int unused2, std::uint32_t duration, unsigned char myShop
|
||||
) {
|
||||
ClientItemLists* lists = reinterpret_cast<ClientItemLists*>(&g_session);
|
||||
CSession* lists = &g_session;
|
||||
if (myShop == 1) {
|
||||
lists->ClearItems1758();
|
||||
for (ITEM_INFO item : items) {
|
||||
|
|
@ -2719,7 +2698,7 @@ void CGameMode::ReceivePacket0B73(const unsigned char* data) {
|
|||
// OFFSET: 0x00D25850
|
||||
// FUNCTION: fn_21673
|
||||
void CGameMode::ReceiveUnknownD25850(const unsigned char* packet) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->RemoveItem1710(*reinterpret_cast<const std::int16_t*>(packet + 2), 1);
|
||||
g_session.RemoveItem1710(*reinterpret_cast<const std::int16_t*>(packet + 2), 1);
|
||||
char number[12];
|
||||
char text[260];
|
||||
_itoa(*reinterpret_cast<const int*>(packet + 4), number, 10);
|
||||
|
|
@ -3446,7 +3425,7 @@ void CGameMode::ReceiveItem1740List(const unsigned char* packet) {
|
|||
item.unknown_0060 = 0;
|
||||
item.unknown_0068 = record->expireTime;
|
||||
item.unknown_0074[0] = (record->flags >> 1) & 1;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1740(item);
|
||||
g_session.AddItem1740(item);
|
||||
}
|
||||
|
||||
g_session.RefreshItem1740Window();
|
||||
|
|
@ -3489,10 +3468,10 @@ void CGameMode::ReceiveItem1758List(const unsigned char* packet) {
|
|||
reinterpret_cast<UIMerchantShopMakeWnd*>(g_windowMgr.unknown_040C)->PrintBuyList();
|
||||
}
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1768();
|
||||
g_session.ClearItems1768();
|
||||
g_windowMgr.CloseWindow(0xAE);
|
||||
g_windowMgr.CloseWindow(0xAF);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1758();
|
||||
g_session.ClearItems1758();
|
||||
|
||||
const int count = static_cast<unsigned int>(static_cast<int>(*reinterpret_cast<const std::int16_t*>(packet + 2)) - 12) / 11u;
|
||||
const Item1758Record* record = reinterpret_cast<const Item1758Record*>(packet + 12);
|
||||
|
|
@ -3506,7 +3485,7 @@ void CGameMode::ReceiveItem1758List(const unsigned char* packet) {
|
|||
item.unknown_0000[1] = index + 1;
|
||||
item.identified = 1;
|
||||
item.SetItemId(entry.itemId);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1758(item);
|
||||
g_session.AddItem1758(item);
|
||||
}
|
||||
|
||||
UIWindow* window = g_windowMgr.EnsureWindow(0xB0);
|
||||
|
|
@ -3522,14 +3501,14 @@ void CGameMode::ReceiveUnknownD50810(const unsigned char* packet) {
|
|||
g_modeMgr.GetGameMode()->SendMsg(82, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1758();
|
||||
g_session.ClearItems1758();
|
||||
|
||||
const int count = (*reinterpret_cast<const std::int16_t*>(packet + 2) - 8) / sizeof(Item1758StoreRecord);
|
||||
if (count == 0) {
|
||||
this->SendMsg(40, 0, 0, 0, 0);
|
||||
g_windowMgr.CloseWindow(43);
|
||||
g_windowMgr.CloseWindow(44);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1760And1748();
|
||||
g_session.ClearItems1760And1748();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -3550,15 +3529,15 @@ void CGameMode::ReceiveUnknownD50810(const unsigned char* packet) {
|
|||
for (int index = 0; index < item.unknown_0098; ++index) {
|
||||
reinterpret_cast<StoreItemOption*>(item.unknown_009C)[index] = record->options[index];
|
||||
}
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1758(item);
|
||||
g_session.AddItem1758(item);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00D50590
|
||||
// FUNCTION: fn_21885
|
||||
void CGameMode::ReceiveItem1748List(const unsigned char* packet) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1748();
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1760();
|
||||
g_session.ClearItems1748();
|
||||
g_session.ClearItems1760();
|
||||
|
||||
const int count = (*reinterpret_cast<const std::int16_t*>(packet + 2) - 0x0C) / sizeof(Item1748Record);
|
||||
for (int i = 0; i < count; ++i) {
|
||||
|
|
@ -3580,7 +3559,7 @@ void CGameMode::ReceiveItem1748List(const unsigned char* packet) {
|
|||
for (int index = 0; index < item.unknown_0098; ++index) {
|
||||
reinterpret_cast<StoreItemOption*>(item.unknown_009C)[index] = record.options[index];
|
||||
}
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1748(item);
|
||||
g_session.AddItem1748(item);
|
||||
}
|
||||
|
||||
UIWindow* window = g_windowMgr.EnsureWindow(43);
|
||||
|
|
@ -3685,7 +3664,7 @@ void CGameMode::ReceiveItem1718List(const unsigned char* packet) {
|
|||
item.id = -1;
|
||||
item.identified = 1;
|
||||
item.unknown_0038 = FindItemDescription(std::atoi(item.itemId)).unknown_0040;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1718(item, entry.quantity, static_cast<std::uint16_t>(entry.unknown_000D / 10));
|
||||
g_session.AddItem1718(item, entry.quantity, static_cast<std::uint16_t>(entry.unknown_000D / 10));
|
||||
}
|
||||
|
||||
if (UIWindow* window = g_windowMgr.EnsureWindow(0xFE)) {
|
||||
|
|
@ -3719,7 +3698,7 @@ void ReceiveTradeItems(int count, const TradeItemRecord* records) {
|
|||
item.identified = 1;
|
||||
item.unknown_0074[3] = 1;
|
||||
if (item.quantity > 0) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AppendItem1718(item);
|
||||
g_session.AppendItem1718(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3987,7 +3966,7 @@ struct BuyingStoreItemRecord {
|
|||
// OFFSET: 0x00D1CFF0
|
||||
// FUNCTION: fn_21628
|
||||
void CGameMode::ReceiveBuyingStoreItemList(const unsigned char* packet) {
|
||||
ClientItemLists* lists = reinterpret_cast<ClientItemLists*>(&g_session);
|
||||
CSession* lists = &g_session;
|
||||
lists->ClearItems1748();
|
||||
lists->ClearItems1760();
|
||||
|
||||
|
|
@ -4250,7 +4229,7 @@ void CGameMode::ReceiveSwapEquipmentList(const unsigned char* data) {
|
|||
}
|
||||
|
||||
if (g_session.IsCostumeLocation(record->location)) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->EquipItem6B68(item);
|
||||
g_session.EquipItem6B68(item);
|
||||
} else {
|
||||
g_session.EquipItem61B8(item);
|
||||
}
|
||||
|
|
@ -4435,7 +4414,7 @@ void CGameMode::ReceiveOpenStore(const unsigned char* packet) {
|
|||
} else {
|
||||
storeCount = count > 5 ? 5 : count;
|
||||
}
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1768();
|
||||
g_session.ClearItems1768();
|
||||
if (!g_windowMgr.window_027C && !g_windowMgr.window_0274 && !g_windowMgr.unknown_02FC) {
|
||||
if (UIWindow* window = g_windowMgr.EnsureWindow(174)) {
|
||||
static_cast<UIMerchantShopMakeWnd*>(window)->AddActionButton();
|
||||
|
|
@ -6611,7 +6590,7 @@ void CGameMode::OpenBuyingStoreMake(unsigned char slotCount) {
|
|||
} else {
|
||||
g_session.m_buyingStoreSlotCount = count > 5 ? 5 : count;
|
||||
}
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1768();
|
||||
g_session.ClearItems1768();
|
||||
if (!g_windowMgr.window_027C && !g_windowMgr.window_0274 && !g_windowMgr.unknown_02FC) {
|
||||
g_windowMgr.EnsureWindow(174);
|
||||
if (g_windowMgr.unknown_040C) {
|
||||
|
|
@ -6642,7 +6621,7 @@ void CGameMode::OpenVendingMake(unsigned char slotCount, int itemCount, const sh
|
|||
} else {
|
||||
g_session.m_vendingSlotCount = count > 13 ? 13 : count;
|
||||
}
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1768();
|
||||
g_session.ClearItems1768();
|
||||
if (!g_windowMgr.window_027C && !g_windowMgr.window_0274) {
|
||||
g_windowMgr.EnsureWindow(41);
|
||||
if (g_windowMgr.unknown_02FC) {
|
||||
|
|
@ -6843,7 +6822,7 @@ void CGameMode::ReceiveItemConsumed(const unsigned char* packet) {
|
|||
g_session.ResetSlots();
|
||||
}
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->RemoveItem1710(
|
||||
g_session.RemoveItem1710(
|
||||
*reinterpret_cast<const std::uint16_t*>(packet + 4), *reinterpret_cast<const std::int16_t*>(packet + 6)
|
||||
);
|
||||
*reinterpret_cast<int*>(&this->unknown_02B8[0x18]) = 0;
|
||||
|
|
@ -6887,7 +6866,7 @@ void CGameMode::ReceiveItemSellResult(const unsigned char* packet) {
|
|||
reinterpret_cast<std::intptr_t>(FormatOwnedString(LookupMessage(1746), item.DisplayName(0).c_str(), count, price * count).c_str()),
|
||||
0xFFFF64, 0, 0, 0
|
||||
);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->RemoveItem1710(
|
||||
g_session.RemoveItem1710(
|
||||
*reinterpret_cast<const std::int16_t*>(packet + 2), *reinterpret_cast<const std::int16_t*>(packet + 4)
|
||||
);
|
||||
}
|
||||
|
|
@ -6999,7 +6978,7 @@ void CGameMode::ReceiveBuyingStoreOpenResult(const unsigned char* packet) {
|
|||
case 1:
|
||||
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(1741)), 0xFF, 0, 0, 0);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1768();
|
||||
g_session.ClearItems1768();
|
||||
g_windowMgr.CloseWindow(174);
|
||||
g_windowMgr.CloseWindow(175);
|
||||
break;
|
||||
|
|
@ -7019,7 +6998,7 @@ void CGameMode::ReceiveBuyingStoreOpenResult(const unsigned char* packet) {
|
|||
case 10:
|
||||
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(3229)), 0xFF, 0, 0, 0);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1768();
|
||||
g_session.ClearItems1768();
|
||||
g_windowMgr.CloseWindow(174);
|
||||
g_windowMgr.CloseWindow(175);
|
||||
break;
|
||||
|
|
@ -7250,7 +7229,7 @@ void CGameMode::ReceiveEquipCardChange(const unsigned char* packet) {
|
|||
// OFFSET: 0x00D284D0
|
||||
// FUNCTION: fn_21694
|
||||
void CGameMode::ReceiveEquipWindowMicroscope2(const unsigned char* packet) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ResetEquipped();
|
||||
g_session.ResetEquipped();
|
||||
g_session.ResetItems3500();
|
||||
|
||||
const int length = *reinterpret_cast<const std::int16_t*>(packet + 2);
|
||||
|
|
@ -7276,7 +7255,7 @@ void CGameMode::ReceiveEquipWindowMicroscope2(const unsigned char* packet) {
|
|||
if (g_session.IsCostumeLocation(item.unknown_0000[3])) {
|
||||
g_session.EquipItem3500(item);
|
||||
} else {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->Equip(item);
|
||||
g_session.Equip(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7300,7 +7279,7 @@ void CGameMode::ReceiveEquipWindowMicroscope2(const unsigned char* packet) {
|
|||
// OFFSET: 0x00D28700
|
||||
// FUNCTION: fn_21695
|
||||
void CGameMode::ReceiveEquipWindowMicroscope3(const unsigned char* packet) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ResetEquipped();
|
||||
g_session.ResetEquipped();
|
||||
g_session.ResetItems3500();
|
||||
|
||||
const int length = *reinterpret_cast<const std::int16_t*>(packet + 2);
|
||||
|
|
@ -7328,7 +7307,7 @@ void CGameMode::ReceiveEquipWindowMicroscope3(const unsigned char* packet) {
|
|||
if (g_session.IsCostumeLocation(item.unknown_0000[3])) {
|
||||
g_session.EquipItem3500(item);
|
||||
} else {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->Equip(item);
|
||||
g_session.Equip(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7900,7 +7879,7 @@ namespace {
|
|||
if (g_session.IsCostumeLocation(item.unknown_0000[3])) {
|
||||
g_session.EquipItem3500(item);
|
||||
} else {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->Equip(item);
|
||||
g_session.Equip(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -7924,7 +7903,7 @@ namespace {
|
|||
// OFFSET: 0x00D28950
|
||||
// FUNCTION: fn_21696
|
||||
void CGameMode::ReceiveEquipWindowMicroscope4(const unsigned char* packet) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ResetEquipped();
|
||||
g_session.ResetEquipped();
|
||||
g_session.ResetItems3500();
|
||||
|
||||
const int length = *reinterpret_cast<const std::int16_t*>(packet + 2);
|
||||
|
|
@ -7958,7 +7937,7 @@ void CGameMode::ReceiveEquipWindowMicroscope4(const unsigned char* packet) {
|
|||
// OFFSET: 0x00D28EA0
|
||||
// FUNCTION: fn_21697
|
||||
void CGameMode::ReceiveEquipWindowMicroscope5(const unsigned char* packet) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ResetEquipped();
|
||||
g_session.ResetEquipped();
|
||||
g_session.ResetItems3500();
|
||||
|
||||
const int length = *reinterpret_cast<const std::int16_t*>(packet + 2);
|
||||
|
|
@ -7993,7 +7972,7 @@ void CGameMode::ReceiveEquipWindowMicroscope5(const unsigned char* packet) {
|
|||
// OFFSET: 0x00D29400
|
||||
// FUNCTION: fn_21698
|
||||
void CGameMode::ReceiveEquipWindowMicroscope6(const unsigned char* packet) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ResetEquipped();
|
||||
g_session.ResetEquipped();
|
||||
g_session.ResetItems3500();
|
||||
|
||||
const int length = *reinterpret_cast<const std::int16_t*>(packet + 2);
|
||||
|
|
@ -8033,7 +8012,7 @@ namespace {
|
|||
}
|
||||
|
||||
if (item.unknown_0000[3] == 0) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(item, 0);
|
||||
g_session.AddItem1710(item, 0);
|
||||
g_session.UpdateInventoryItem(item, 0);
|
||||
} else {
|
||||
char equipped = 1;
|
||||
|
|
@ -8242,7 +8221,7 @@ void CGameMode::ReceiveItemPickupAck2(const unsigned char* data) {
|
|||
item.unknown_0000[3] = 0x8000;
|
||||
}
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(item, 1);
|
||||
g_session.AddItem1710(item, 1);
|
||||
g_windowMgr.SendNotice(
|
||||
1, reinterpret_cast<std::intptr_t>(FormatOwnedString(LookupMessage(0x99), item.DisplayName(0).c_str(), packet->amount).c_str()), 0xFFFF00, 6, 0, 0
|
||||
);
|
||||
|
|
@ -8335,7 +8314,7 @@ void CGameMode::ReceiveItemPickupAck3(const unsigned char* data) {
|
|||
item.unknown_0000[3] = 0x8000;
|
||||
}
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(item, 1);
|
||||
g_session.AddItem1710(item, 1);
|
||||
g_windowMgr.SendNotice(
|
||||
1, reinterpret_cast<std::intptr_t>(FormatOwnedString(LookupMessage(0x99), item.DisplayName(0).c_str(), packet->amount).c_str()), 0xFFFF00, 6, 0, 0
|
||||
);
|
||||
|
|
@ -8432,7 +8411,7 @@ void CGameMode::ReceiveItemPickupAck(const unsigned char* data) {
|
|||
item.unknown_0000[3] = 0x8000;
|
||||
}
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(item, 1);
|
||||
g_session.AddItem1710(item, 1);
|
||||
g_windowMgr.SendNotice(
|
||||
1, reinterpret_cast<std::intptr_t>(FormatOwnedString(LookupMessage(0x99), item.DisplayName(0).c_str(), packet->amount).c_str()), 0xFFFF00, 6, 0, 0
|
||||
);
|
||||
|
|
@ -8537,7 +8516,7 @@ void CGameMode::ReceiveItemPickupAck5(
|
|||
item.unknown_0000[3] = 0x8000;
|
||||
}
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(item, 1);
|
||||
g_session.AddItem1710(item, 1);
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(FormatOwnedString(LookupMessage(0x99), item.DisplayName(0).c_str(), amount).c_str()), 0xFFFF00, 6, 0, 0);
|
||||
|
||||
UIWindow* window = g_windowMgr.EnsureWindow(0x3A);
|
||||
|
|
@ -8651,7 +8630,7 @@ void CGameMode::ReceiveItemPickupAck7(const unsigned char* data) {
|
|||
item.unknown_0000[3] = 0x8000;
|
||||
}
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(item, 1);
|
||||
g_session.AddItem1710(item, 1);
|
||||
g_windowMgr.SendNotice(
|
||||
1, reinterpret_cast<std::intptr_t>(FormatOwnedString(LookupMessage(0x99), item.DisplayName(0).c_str(), packet->amount).c_str()), 0xFFFF00, 6, 0, 0
|
||||
);
|
||||
|
|
@ -9721,7 +9700,7 @@ void CGameMode::ReceiveItemPickupAck8(const unsigned char* data) {
|
|||
item.unknown_0088 = 0;
|
||||
item.unknown_0070 = packet->look;
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(item, 1);
|
||||
g_session.AddItem1710(item, 1);
|
||||
g_windowMgr.SendNotice(
|
||||
1, reinterpret_cast<std::intptr_t>(FormatOwnedString(LookupMessage(0x99), item.DisplayName(0).c_str(), packet->amount).c_str()), 0xFFFF00, 6, 0, 0
|
||||
);
|
||||
|
|
@ -9841,7 +9820,7 @@ void CGameMode::ReceiveItemPickupAck9(const unsigned char* data) {
|
|||
item.unknown_0070 = packet->look;
|
||||
item.unknown_0088 = packet->grade;
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(item, 1);
|
||||
g_session.AddItem1710(item, 1);
|
||||
g_windowMgr.SendNotice(
|
||||
1, reinterpret_cast<std::intptr_t>(FormatOwnedString(LookupMessage(0x99), item.DisplayName(0).c_str(), packet->amount).c_str()), 0xFFFF00, 6, 0, 0
|
||||
);
|
||||
|
|
@ -10377,7 +10356,7 @@ void CGameMode::ReceiveActorDisappear(const unsigned char* data) {
|
|||
}
|
||||
if (g_windowMgr.unknown_0300 && static_cast<UIMerchantItemShopWnd*>(g_windowMgr.unknown_0300)->unknown_0100 == static_cast<int>(packet->aid)) {
|
||||
this->SendMsg(245, 0, 0, 0, 0);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1760And1748();
|
||||
g_session.ClearItems1760And1748();
|
||||
}
|
||||
if (this->scene->RemoveItem(packet->aid) == true) {
|
||||
this->SendMsg(13, packet->aid, 0, 0, 0);
|
||||
|
|
@ -11564,7 +11543,7 @@ void CGameMode::ReceiveEquipItemListFlags(const unsigned char* packet) {
|
|||
}
|
||||
|
||||
if (item.unknown_0000[3] == 0) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(item, 0);
|
||||
g_session.AddItem1710(item, 0);
|
||||
g_session.UpdateInventoryItem(item, 0);
|
||||
} else {
|
||||
char equipped = 1;
|
||||
|
|
@ -11607,7 +11586,7 @@ void CGameMode::ReceiveEquipItemList34(const unsigned char* packet) {
|
|||
}
|
||||
|
||||
if (item.unknown_0000[3] == 0) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(item, 0);
|
||||
g_session.AddItem1710(item, 0);
|
||||
g_session.UpdateInventoryItem(item, 0);
|
||||
} else {
|
||||
char equipped = 1;
|
||||
|
|
@ -11649,7 +11628,7 @@ void CGameMode::ReceiveEquipItemList38(const unsigned char* packet) {
|
|||
}
|
||||
|
||||
if (item.unknown_0000[3] == 0) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(item, 0);
|
||||
g_session.AddItem1710(item, 0);
|
||||
g_session.UpdateInventoryItem(item, 0);
|
||||
} else {
|
||||
char equipped = 1;
|
||||
|
|
@ -11712,7 +11691,7 @@ void CGameMode::ReceiveEquipItemResult(const unsigned char* packet) {
|
|||
ITEM_DESC description = FindItemDescription(std::atoi(item.itemId.c_str()));
|
||||
item.unknown_0070 = description.unknown_0040;
|
||||
if (g_session.IsCostumeLocation(*reinterpret_cast<const int*>(packet + 4))) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->EquipItem6B68(item);
|
||||
g_session.EquipItem6B68(item);
|
||||
} else {
|
||||
g_session.EquipItem61B8(item);
|
||||
}
|
||||
|
|
@ -12033,10 +12012,10 @@ void CGameMode::ReceiveItem1748List2(const unsigned char* packet) {
|
|||
|
||||
const std::int32_t value8 = *reinterpret_cast<const std::int32_t*>(packet + 8);
|
||||
const std::int32_t value4 = *reinterpret_cast<const std::int32_t*>(packet + 4);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1748();
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1760();
|
||||
g_session.ClearItems1748();
|
||||
g_session.ClearItems1760();
|
||||
for (ITEM_INFO item : items) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1748(item);
|
||||
g_session.AddItem1748(item);
|
||||
}
|
||||
|
||||
if (UIWindow* window = g_windowMgr.EnsureWindow(43)) {
|
||||
|
|
@ -12095,7 +12074,7 @@ void CGameMode::ReceivePartyMemberLeft(const unsigned char* data) {
|
|||
if (g_windowMgr.unknown_03F8) {
|
||||
g_windowMgr.CloseWindow(0x89);
|
||||
}
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearRecords0734();
|
||||
g_session.ClearRecords0734();
|
||||
}
|
||||
|
||||
sub_DFF150(&g_session);
|
||||
|
|
@ -12167,17 +12146,17 @@ void CGameMode::ReceiveItem1758StoreList(const unsigned char* packet) {
|
|||
g_modeMgr.GetGameMode()->SendMsg(82, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1758();
|
||||
g_session.ClearItems1758();
|
||||
if (items.size() == 0) {
|
||||
this->SendMsg(40, 0, 0, 0, 0);
|
||||
g_windowMgr.CloseWindow(43);
|
||||
g_windowMgr.CloseWindow(44);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1760And1748();
|
||||
g_session.ClearItems1760And1748();
|
||||
return;
|
||||
}
|
||||
|
||||
for (ITEM_INFO item : items) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1758(item);
|
||||
g_session.AddItem1758(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1849,7 +1849,7 @@ void CLoginMode::Initialize(const char* name) {
|
|||
g_soundMgr->PlayStream("bgm\\01.mp3", 0, false);
|
||||
}
|
||||
this->slotExtension = CharacterSlotExtension();
|
||||
g_session.ClearItems1784();
|
||||
g_session.ClearAllItems1784();
|
||||
g_entryQueueMgr->ready = 0;
|
||||
g_entryQueueMgr->current = nullptr;
|
||||
g_session.ClearShortcutSlots();
|
||||
|
|
|
|||
|
|
@ -887,7 +887,63 @@ public:
|
|||
void LoadXmlTables();
|
||||
void LoadExternalSettings();
|
||||
void ReloadLanguageTables();
|
||||
void ClearItems1784();
|
||||
bool AddItem1710(const ITEM_INFO& item, unsigned char refresh);
|
||||
void AddItem1718(const RawItemBasic& item, int quantity, std::uint16_t unknown_006C);
|
||||
void AddItem1718(const RawItemBasic& item, int mode);
|
||||
bool AddItem1768(const ITEM_INFO& item, unsigned char alternate, unsigned char refresh);
|
||||
bool AddItem1740(const ITEM_INFO& item);
|
||||
bool AddItem1750(const ITEM_INFO& item, int type, unsigned char refresh);
|
||||
void AddItem1758(const ITEM_INFO& item);
|
||||
void AddItem1760(const ITEM_INFO& item);
|
||||
void AddItem1748(const ITEM_INFO& item);
|
||||
bool Equip(const ITEM_INFO& item);
|
||||
void AppendItem1718(const ITEM_INFO& item);
|
||||
void MergeItem1718ByName(const ITEM_INFO& item);
|
||||
void MergeItem1720ByName(const ITEM_INFO& item);
|
||||
void MergeItem1720(const ITEM_INFO& item);
|
||||
void AddItem1730(const ITEM_INFO& item);
|
||||
void MergeItem1718(const ITEM_INFO& item);
|
||||
bool AddItem1738(const ITEM_INFO& item, unsigned char refresh);
|
||||
void RemoveItem1758ByItemId(ITEM_INFO& item);
|
||||
__declspec(noinline) void RemoveItem1710(std::uint32_t id, int quantity);
|
||||
bool AddExchangeItem(ITEM_INFO item);
|
||||
bool RemoveItem1768(const ITEM_INFO& item, unsigned char alternate);
|
||||
bool RemoveItem1740(const ITEM_INFO& item);
|
||||
bool RemoveItem1750(const ITEM_INFO& item, int type, unsigned char refresh);
|
||||
void RemoveItem1758(ITEM_INFO& item);
|
||||
void RemoveItem1760(const ITEM_INFO& item);
|
||||
void RemoveItem1718ByItemId(const ITEM_INFO& item);
|
||||
void RemoveItem1718(const ITEM_INFO& item);
|
||||
void RemoveItem1720ByName(const ITEM_INFO& item);
|
||||
void RemoveItem1720(const ITEM_INFO& item);
|
||||
void RemoveItem1730(const ITEM_INFO& item);
|
||||
void ReduceItem1718(const ITEM_INFO& item);
|
||||
bool RemoveItem1738(const ITEM_INFO& item);
|
||||
void ClearInventory();
|
||||
void ClearItems1760And1748();
|
||||
void ClearItems1768();
|
||||
void ClearItems1740();
|
||||
void ClearItems1750();
|
||||
void SetItems1750(int count, const short* ids);
|
||||
void ClearItems1758();
|
||||
void ClearItems1760();
|
||||
void ClearItems1748();
|
||||
void ClearItems1784(int index);
|
||||
void ClearItemSlotQuantities();
|
||||
void ResetEquipped();
|
||||
void ClearItems1720();
|
||||
void ClearItems1738();
|
||||
void CopyItems1740To1750();
|
||||
void CopyItems1760To1770();
|
||||
std::pair<bool, ITEM_INFO> FindItem1750(const ITEM_INFO& item, unsigned char unknown);
|
||||
void ClearRecords0734();
|
||||
void ResetUnknown166C();
|
||||
void ResetHotkeyDescriptions();
|
||||
int IsDifferentName(const char* name, const char* other);
|
||||
int IsGuildMemberNameDifferent(const char* name);
|
||||
int IsFriendNameDifferent(const char* name);
|
||||
bool EquipItem6B68(const ITEM_INFO& item);
|
||||
void ClearAllItems1784();
|
||||
void UpdateRandomStats();
|
||||
void ResetEquipment();
|
||||
void ResetSlots();
|
||||
|
|
|
|||
|
|
@ -41,9 +41,6 @@ const wchar_t g_stoveCategoryIdA[] = L"44C71118750747D";
|
|||
// STRING: st_01260
|
||||
const wchar_t g_stoveCategoryIdB[] = L"14A6891F90E24D7";
|
||||
|
||||
struct ClientItemLists {
|
||||
void ClearItems1784(int index);
|
||||
};
|
||||
|
||||
// OFFSET: 0x0063EEE0
|
||||
// FUNCTION: fn_04800
|
||||
|
|
@ -59,7 +56,7 @@ void CStoveMgr::FetchAllProducts() {
|
|||
Sleep(200);
|
||||
} while (g_stoveWaitingCallback);
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1784(9);
|
||||
g_session.ClearItems1784(9);
|
||||
Stove::PCSDK::IAP::StovePCFetchProductParam categoryParam;
|
||||
categoryParam.SetCategoryId(this->m_environment == 2 ? g_stoveCategoryIdA : g_stoveCategoryIdB);
|
||||
categoryParam.SetPageNumber(1);
|
||||
|
|
@ -88,7 +85,7 @@ void FetchStoveTermsAgreement() {
|
|||
// OFFSET: 0x0063E910
|
||||
// FUNCTION: fn_45460
|
||||
void CStoveMgr::FetchCategoryProducts() {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1784(9);
|
||||
g_session.ClearItems1784(9);
|
||||
Stove::PCSDK::IAP::StovePCFetchProductParam param;
|
||||
param.SetCategoryId(this->m_environment == 2 ? g_stoveCategoryIdA : g_stoveCategoryIdB);
|
||||
param.SetPageNumber(1);
|
||||
|
|
@ -300,7 +297,7 @@ void CategoryProductsCallback::operator()(Stove::PCSDK::CallbackResult callbackR
|
|||
unsigned int count) const {
|
||||
g_stoveWaitingCallback = false;
|
||||
if (callbackResult.GetResult().IsSuccessful()) {
|
||||
g_session.ClearItems1784();
|
||||
g_session.ClearAllItems1784();
|
||||
for (unsigned int index = 0; index < count; ++index) {
|
||||
const Stove::PCSDK::IAP::StovePCProduct& product = products[index];
|
||||
std::string categoryId = EncodeText(CP_ACP, std::wstring(product.GetCategoryId()));
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,118 +0,0 @@
|
|||
#ifndef RAGNAROK_SOURCE_CONTENTS_CLIENTITEMLISTS_H
|
||||
#define RAGNAROK_SOURCE_CONTENTS_CLIENTITEMLISTS_H
|
||||
|
||||
#include "Client/Session.h"
|
||||
#include "Contents/Items/ItemInfo.h"
|
||||
#include "Contents/Messenger/MessengerMember.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
struct ClientItemLists {
|
||||
/* 0000 */ unsigned char unknown_0000[0xC0];
|
||||
/* 00C0 */ std::string hotkeyDescriptions[36];
|
||||
/* 0420 */ unsigned char unknown_0420[0x314];
|
||||
/* 0734 */ std::list<SessionRecord0734> records0734;
|
||||
/* 073C */ unsigned char unknown_073C[0xF30];
|
||||
/* 166C */ int unknown_166C;
|
||||
/* 1670 */ int unknown_1670;
|
||||
/* 1674 */ int unknown_1674;
|
||||
/* 1678 */ int unknown_1678;
|
||||
/* 167C */ int unknown_167C;
|
||||
/* 1680 */ int unknown_1680;
|
||||
/* 1684 */ unsigned char unknown_1684[0x8C];
|
||||
/* 1710 */ std::list<ITEM_INFO> inventory;
|
||||
/* 1718 */ std::list<ITEM_INFO> items_1718;
|
||||
/* 1720 */ std::list<ITEM_INFO> items_1720;
|
||||
/* 1728 */ std::list<ITEM_INFO> items_1728;
|
||||
/* 1730 */ std::list<ITEM_INFO> items_1730;
|
||||
/* 1738 */ std::list<ITEM_INFO> items_1738;
|
||||
/* 1740 */ std::list<ITEM_INFO> items_1740;
|
||||
/* 1748 */ std::list<ITEM_INFO> items_1748;
|
||||
/* 1750 */ std::list<ITEM_INFO> items_1750;
|
||||
/* 1758 */ std::list<ITEM_INFO> items_1758;
|
||||
/* 1760 */ std::list<ITEM_INFO> items_1760;
|
||||
/* 1768 */ std::list<ITEM_INFO> items_1768;
|
||||
/* 1770 */ std::list<ITEM_INFO> items_1770;
|
||||
/* 1778 */ unsigned char unknown_1778[0xC];
|
||||
/* 1784 */ std::list<ITEM_INFO> items_1784[11];
|
||||
/* 17DC */ std::list<MessengerMember> partyMembers;
|
||||
/* 17E4 */ std::list<MessengerMember> friends;
|
||||
/* 17EC */ unsigned char unknown_17EC[0x9B4];
|
||||
/* 21A0 */ ITEM_INFO equipped[10];
|
||||
/* 2B50 */ unsigned char unknown_2B50[0x1360];
|
||||
/* 3EB0 */ ITEM_INFO exchangeItems[10];
|
||||
/* 4860 */ ITEM_INFO itemSlots[10];
|
||||
/* 5210 */ int unknown_5210;
|
||||
/* 5214 */ int unknown_5214;
|
||||
/* 5218 */ unsigned char unknown_5218[0x24C];
|
||||
/* 5464 */ int unknown_5464;
|
||||
/* 5468 */ unsigned char unknown_5468[0x5C];
|
||||
/* 54C4 */ std::string unknown_54C4;
|
||||
/* 54DC */ unsigned char unknown_54DC[0xCDC];
|
||||
/* 61B8 */ ITEM_INFO items_61B8[10];
|
||||
/* 6B68 */ ITEM_INFO items_6B68[10];
|
||||
|
||||
bool AddItem1710(const ITEM_INFO& item, unsigned char refresh);
|
||||
void AddItem1718(const RawItemBasic& item, int quantity, std::uint16_t unknown_006C);
|
||||
void AddItem1718(const RawItemBasic& item, int mode);
|
||||
bool AddItem1768(const ITEM_INFO& item, unsigned char alternate, unsigned char refresh);
|
||||
bool AddItem1740(const ITEM_INFO& item);
|
||||
bool AddItem1750(const ITEM_INFO& item, int type, unsigned char refresh);
|
||||
void AddItem1758(const ITEM_INFO& item);
|
||||
void AddItem1760(const ITEM_INFO& item);
|
||||
void AddItem1748(const ITEM_INFO& item);
|
||||
bool Equip(const ITEM_INFO& item);
|
||||
void AppendItem1718(const ITEM_INFO& item);
|
||||
void MergeItem1718ByName(const ITEM_INFO& item);
|
||||
void MergeItem1720ByName(const ITEM_INFO& item);
|
||||
void MergeItem1720(const ITEM_INFO& item);
|
||||
void AddItem1730(const ITEM_INFO& item);
|
||||
void MergeItem1718(const ITEM_INFO& item);
|
||||
bool AddItem1738(const ITEM_INFO& item, unsigned char refresh);
|
||||
void RemoveItem1758ByItemId(ITEM_INFO& item);
|
||||
__declspec(noinline) void RemoveItem1710(std::uint32_t id, int quantity);
|
||||
bool AddExchangeItem(ITEM_INFO item);
|
||||
bool RemoveItem1768(const ITEM_INFO& item, unsigned char alternate);
|
||||
bool RemoveItem1740(const ITEM_INFO& item);
|
||||
bool RemoveItem1750(const ITEM_INFO& item, int type, unsigned char refresh);
|
||||
void RemoveItem1758(ITEM_INFO& item);
|
||||
void RemoveItem1760(const ITEM_INFO& item);
|
||||
void RemoveItem1718ByItemId(const ITEM_INFO& item);
|
||||
void RemoveItem1718(const ITEM_INFO& item);
|
||||
void RemoveItem1720ByName(const ITEM_INFO& item);
|
||||
void RemoveItem1720(const ITEM_INFO& item);
|
||||
void RemoveItem1730(const ITEM_INFO& item);
|
||||
void ReduceItem1718(const ITEM_INFO& item);
|
||||
bool RemoveItem1738(const ITEM_INFO& item);
|
||||
void ClearInventory();
|
||||
void ClearItems1760And1748();
|
||||
void ClearItems1768();
|
||||
void ClearItems1740();
|
||||
void ClearItems1750();
|
||||
void SetItems1750(int count, const short* ids);
|
||||
void ClearItems1758();
|
||||
void ClearItems1760();
|
||||
void ClearItems1748();
|
||||
void ClearItems1784(int index);
|
||||
void ClearItemSlotQuantities();
|
||||
void ResetEquipped();
|
||||
void ClearItems1720();
|
||||
void ClearItems1738();
|
||||
void CopyItems1740To1750();
|
||||
void CopyItems1760To1770();
|
||||
std::pair<bool, ITEM_INFO> FindItem1750(const ITEM_INFO& item, unsigned char unknown);
|
||||
void ClearRecords0734();
|
||||
void ResetUnknown166C();
|
||||
void ResetHotkeyDescriptions();
|
||||
int IsDifferentName(const char* name, const char* other);
|
||||
int IsGuildMemberName(const char* name);
|
||||
int IsFriendName(const char* name);
|
||||
bool EquipItem6B68(const ITEM_INFO& item);
|
||||
void ResetItems6B68();
|
||||
void ResetItems61B8();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
#include "Client/Mode/ModeMgr.h"
|
||||
#include "Client/Mode/CMode.h"
|
||||
#include "Client/Mode/CGameMode.h"
|
||||
#include "Contents/ClientItemLists.h"
|
||||
#include "Contents/ClientState.h"
|
||||
#include "Contents/Items/ItemDescription.h"
|
||||
#include "Contents/Items/WeaponType.h"
|
||||
|
|
@ -1723,7 +1722,7 @@ bool CSession::UnequipItem2B50(int location) {
|
|||
const std::string text = FormatOwnedString("%s%s", name.c_str(), message);
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(text.c_str()), 0xFF, 7, 0, 0);
|
||||
item.unknown_0000[3] = 0;
|
||||
reinterpret_cast<ClientItemLists*>(this)->AddItem1710(item, 1);
|
||||
this->AddItem1710(item, 1);
|
||||
item.Reset();
|
||||
}
|
||||
if (slots.values[1] != -1 && slots.values[1] < 10) {
|
||||
|
|
|
|||
|
|
@ -5626,7 +5626,7 @@ int CSession::GetList5Size() const {
|
|||
|
||||
// OFFSET: 0x00DD8380
|
||||
// FUNCTION: fn_23305
|
||||
void CSession::ClearItems1784() {
|
||||
void CSession::ClearAllItems1784() {
|
||||
for (std::list<ITEM_INFO>& items : this->unknown_1784) {
|
||||
items.clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,9 +23,6 @@
|
|||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
struct ClientItemLists {
|
||||
bool AddItem1710(const ITEM_INFO& item, unsigned char refresh);
|
||||
};
|
||||
|
||||
// GLOBAL: gl_24650
|
||||
char g_decodedPlayerName[64];
|
||||
|
|
@ -898,7 +895,7 @@ void CSession::RestoreItems5C68() {
|
|||
for (int index = 0; index < 5; ++index) {
|
||||
if (this->unknown_5C68[index].quantity != 0) {
|
||||
restored = true;
|
||||
reinterpret_cast<ClientItemLists&>(g_session).AddItem1710(this->unknown_5C68[index], 0);
|
||||
g_session.AddItem1710(this->unknown_5C68[index], 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -915,7 +912,7 @@ void CSession::ReturnStackedItem(int index, int count) {
|
|||
const int quantity = item.quantity;
|
||||
if (quantity != 0 && item.unknown_0000[1] == index) {
|
||||
item.quantity = count;
|
||||
reinterpret_cast<ClientItemLists&>(g_session).AddItem1710(item, 0);
|
||||
g_session.AddItem1710(item, 0);
|
||||
item.quantity = quantity - count;
|
||||
RefreshItemWindows(&g_windowMgr);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
#include "Contents/Store/MCStoreInfoBackup.h"
|
||||
#include "Contents/MessageTable.h"
|
||||
#include "Client/Session.h"
|
||||
#include "Contents/ClientItemLists.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "Utility/Async/AsyncDiagnostic.h"
|
||||
|
||||
|
|
@ -32,7 +31,7 @@ void CMCStoreInfoBackup::Clear() {
|
|||
// OFFSET: 0x00606BB0
|
||||
// FUNCTION: fn_04234
|
||||
int CMCStoreInfoBackup::Restore(unsigned char wholeItem, int maximum) {
|
||||
ClientItemLists& lists = *reinterpret_cast<ClientItemLists*>(&g_session);
|
||||
CSession& lists = g_session;
|
||||
int examined = 0;
|
||||
auto saved = this->items.begin();
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
#include "Contents/ForbiddenWords.h"
|
||||
#include "Contents/Messenger/ClientMessenger.h"
|
||||
#include "Contents/Jobs/JobInheritance.h"
|
||||
#include "Contents/ClientItemLists.h"
|
||||
#include "UI/Chat/UINewChatWnd.h"
|
||||
#include "UI/Rodex/UIRodexComposeWnd.h"
|
||||
#include "Contents/Items/ItemNaming.h"
|
||||
|
|
@ -8822,7 +8821,7 @@ void UInCashWnd::Slot26(int x, int y) {
|
|||
|
||||
g_modeMgr.GetGameMode();
|
||||
this->m_selected = ~this->m_selected;
|
||||
reinterpret_cast<ClientItemLists&>(g_session).RemoveItem1720ByName(item);
|
||||
g_session.RemoveItem1720ByName(item);
|
||||
this->m_totalPrice -= item.quantity * item.unknown_0014[1];
|
||||
this->m_otherItems.clear();
|
||||
|
||||
|
|
|
|||
|
|
@ -91,9 +91,6 @@ struct PACKET_CZ_SE_PC_BUY_CASHITEM_LIST {
|
|||
static_assert(sizeof(CashItemPurchase) == 10);
|
||||
static_assert(offsetof(PACKET_CZ_SE_PC_BUY_CASHITEM_LIST, items) == 10);
|
||||
|
||||
struct ClientItemLists {
|
||||
void ClearItems1784(int index);
|
||||
};
|
||||
|
||||
|
||||
struct CashShopReplaceCartItemText {
|
||||
|
|
@ -790,7 +787,7 @@ void UICashShopWnd_Banner::CreateButtons() {
|
|||
// OFFSET: 0x007D17A0
|
||||
// FUNCTION: fn_09558
|
||||
int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
|
||||
ClientItemLists& itemLists = reinterpret_cast<ClientItemLists&>(g_session);
|
||||
CSession& itemLists = g_session;
|
||||
const CSession& lists = g_session;
|
||||
switch (message) {
|
||||
case 0:
|
||||
|
|
|
|||
|
|
@ -126,22 +126,6 @@ static const std::string g_editNaviTagBegin = "<NAVIL>";
|
|||
// GLOBAL: gl_24648
|
||||
static const std::string g_editNaviTagEnd = "</NAVIL>";
|
||||
|
||||
struct ClientItemLists {
|
||||
void SetItems1750(int count, const short* ids);
|
||||
bool AddItem1750(const ITEM_INFO& item, int type, unsigned char refresh);
|
||||
bool RemoveItem1768(const ITEM_INFO& item, unsigned char alternate);
|
||||
void RemoveItem1760(const ITEM_INFO& item);
|
||||
void AddItem1760(const ITEM_INFO& item);
|
||||
bool RemoveItem1750(const ITEM_INFO& item, int type, unsigned char refresh);
|
||||
void AddItem1730(const ITEM_INFO& item);
|
||||
void ReduceItem1718(const ITEM_INFO& item);
|
||||
void ClearItems1760();
|
||||
void MergeItem1718(const ITEM_INFO& item);
|
||||
void RemoveItem1730(const ITEM_INFO& item);
|
||||
void RemoveItem1720ByName(const ITEM_INFO& item);
|
||||
void CopyItems1740To1750();
|
||||
void ClearItems1760And1748();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
|
@ -2499,7 +2483,7 @@ void UIMerchantShopMakeWnd::SetItems(int count, const short* ids) {
|
|||
if (this->mode == 1) {
|
||||
window = reinterpret_cast<UIWindow*>(g_windowMgr.unknown_0410);
|
||||
} else {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->SetItems1750(count, ids);
|
||||
g_session.SetItems1750(count, ids);
|
||||
window = reinterpret_cast<UIWindow*>(g_windowMgr.unknown_02F8);
|
||||
}
|
||||
|
||||
|
|
@ -3674,7 +3658,7 @@ void UIMerchantMirrorItemWnd::Slot15(int width, int height) {
|
|||
} else if (this->unknown_00F4 == 2) {
|
||||
g_session.RefreshItems1750();
|
||||
} else if (Replay::Instance().state != 6) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->CopyItems1740To1750();
|
||||
g_session.CopyItems1740To1750();
|
||||
}
|
||||
this->SendMsg(nullptr, 23, 0, 0, 0, 0);
|
||||
}
|
||||
|
|
@ -4715,7 +4699,7 @@ int UIMerchantMirrorItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_
|
|||
ModeDragState& drag = mode->drag;
|
||||
ITEM_INFO item;
|
||||
item.Assign(reinterpret_cast<const RawItemData&>(drag));
|
||||
ClientItemLists* lists = reinterpret_cast<ClientItemLists*>(&g_session);
|
||||
CSession* lists = &g_session;
|
||||
|
||||
switch (drag.source) {
|
||||
case 10:
|
||||
|
|
@ -4859,7 +4843,7 @@ int UIItemSellWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:
|
|||
ITEM_INFO item;
|
||||
item.Assign(reinterpret_cast<const RawItemData&>(drag));
|
||||
if (g_session.HasItem1718(drag.id)) {
|
||||
ClientItemLists* lists = reinterpret_cast<ClientItemLists*>(&g_session);
|
||||
CSession* lists = &g_session;
|
||||
lists->AddItem1730(item);
|
||||
lists->ReduceItem1718(item);
|
||||
if (g_windowMgr.unknown_0254) {
|
||||
|
|
@ -4983,15 +4967,15 @@ int UIMerchantItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intpt
|
|||
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(694)), 255, 0, 0, 0);
|
||||
} else {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1760(item);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->RemoveItem1750(item, 2, 1);
|
||||
g_session.AddItem1760(item);
|
||||
g_session.RemoveItem1750(item, 2, 1);
|
||||
this->SendMsg(nullptr, 23, 0, 0, 0, 0);
|
||||
if (g_windowMgr.unknown_0420) {
|
||||
reinterpret_cast<UIWindow*>(g_windowMgr.unknown_0420)->SendMsg(nullptr, 23, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
} else if (g_session.m_zeny >= static_cast<long long>(price) * item.quantity + pending) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1760(item);
|
||||
g_session.AddItem1760(item);
|
||||
this->SendMsg(nullptr, 23, 0, 0, 0, 0);
|
||||
} else {
|
||||
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
|
||||
|
|
@ -5047,7 +5031,7 @@ int UIMerchantItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intpt
|
|||
g_windowMgr.CloseWindow(first);
|
||||
g_windowMgr.CloseWindow(second);
|
||||
mode->SendMsg(40, 0, 0, 0, 0);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1760And1748();
|
||||
g_session.ClearItems1760And1748();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -5195,7 +5179,7 @@ int UIMerchantItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
|
|||
if (this->unknown_010C == 0) {
|
||||
ITEM_INFO item;
|
||||
item.Assign(reinterpret_cast<const RawItemData&>(mode->drag));
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->RemoveItem1760(item);
|
||||
g_session.RemoveItem1760(item);
|
||||
if (g_windowMgr.unknown_0308) {
|
||||
reinterpret_cast<UIWindow*>(g_windowMgr.unknown_0308)->SendMsg(nullptr, 23, 0, 0, 0, 0);
|
||||
}
|
||||
|
|
@ -6411,7 +6395,7 @@ UIMerchantItemPurchaseWnd::UIMerchantItemPurchaseWnd(int value) : UIItemBaseWnd(
|
|||
this->unknown_00F8 = 0;
|
||||
this->saved = nullptr;
|
||||
this->hovered = -1;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1760();
|
||||
g_session.ClearItems1760();
|
||||
this->unknown_00F0 = 0;
|
||||
}
|
||||
|
||||
|
|
@ -6533,7 +6517,7 @@ int UIItemShopWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:
|
|||
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
||||
ITEM_INFO item;
|
||||
item.Assign(reinterpret_cast<const RawItemData&>(mode->drag));
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->RemoveItem1720ByName(item);
|
||||
g_session.RemoveItem1720ByName(item);
|
||||
if (g_windowMgr.unknown_0258) {
|
||||
g_windowMgr.unknown_0258->SendMsg(nullptr, 23, 0, 0, 0, 0);
|
||||
}
|
||||
|
|
@ -6546,7 +6530,7 @@ int UIItemShopWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:
|
|||
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
||||
ITEM_INFO item;
|
||||
item.Assign(reinterpret_cast<const RawItemData&>(mode->drag));
|
||||
ClientItemLists* lists = reinterpret_cast<ClientItemLists*>(&g_session);
|
||||
CSession* lists = &g_session;
|
||||
lists->MergeItem1718(item);
|
||||
lists->RemoveItem1730(item);
|
||||
if (g_windowMgr.unknown_0260) {
|
||||
|
|
@ -6596,7 +6580,7 @@ int UIItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::
|
|||
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
||||
ITEM_INFO item;
|
||||
item.Assign(reinterpret_cast<const RawItemData&>(mode->drag));
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->RemoveItem1720ByName(item);
|
||||
g_session.RemoveItem1720ByName(item);
|
||||
if (g_windowMgr.unknown_0258) {
|
||||
g_windowMgr.unknown_0258->SendMsg(nullptr, 23, 0, 0, 0, 0);
|
||||
}
|
||||
|
|
@ -6609,7 +6593,7 @@ int UIItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::
|
|||
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
||||
ITEM_INFO item;
|
||||
item.Assign(reinterpret_cast<const RawItemData&>(mode->drag));
|
||||
ClientItemLists* lists = reinterpret_cast<ClientItemLists*>(&g_session);
|
||||
CSession* lists = &g_session;
|
||||
lists->MergeItem1718(item);
|
||||
lists->RemoveItem1730(item);
|
||||
if (g_windowMgr.unknown_025C) {
|
||||
|
|
@ -7848,7 +7832,7 @@ int UIMerchantItemPurchaseMSGWnd::SendMsg(UIWindow* sender, int message, std::in
|
|||
static_cast<CMode*>(g_charViewMode)->SendMsg(83, this->purchaseIndex, this->unknown_00D0, 0, 0);
|
||||
case 185:
|
||||
g_windowMgr.CloseWindow(230);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1760And1748();
|
||||
g_session.ClearItems1760And1748();
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -8723,7 +8707,7 @@ int UIItemSellWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::
|
|||
ITEM_INFO item;
|
||||
item.Assign(reinterpret_cast<const RawItemData&>(drag));
|
||||
if (g_session.HasItem1718(drag.id)) {
|
||||
ClientItemLists* lists = reinterpret_cast<ClientItemLists*>(&g_session);
|
||||
CSession* lists = &g_session;
|
||||
lists->AddItem1730(item);
|
||||
lists->ReduceItem1718(item);
|
||||
if (g_windowMgr.unknown_0250) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
#include "Client/Mode/ModeMgr.h"
|
||||
#include "Client/Replay.h"
|
||||
#include "Client/Session.h"
|
||||
#include "Contents/ClientItemLists.h"
|
||||
#include "Contents/Configuration/ServiceConfiguration.h"
|
||||
#include "Contents/Items/ItemDescription.h"
|
||||
#include "Contents/Items/ItemNaming.h"
|
||||
|
|
@ -352,7 +351,7 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
|
|||
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(2536)), 255, 0, 0, 0);
|
||||
} else {
|
||||
ClientItemLists* lists = reinterpret_cast<ClientItemLists*>(&g_session);
|
||||
CSession* lists = &g_session;
|
||||
if (item.unknown_0074[3] == 1) {
|
||||
lists->RemoveItem1718(item);
|
||||
lists->MergeItem1720(item);
|
||||
|
|
@ -507,7 +506,7 @@ int UIParaItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s
|
|||
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
||||
ITEM_INFO item;
|
||||
item.Assign(reinterpret_cast<const RawItemData&>(mode->drag));
|
||||
ClientItemLists* lists = reinterpret_cast<ClientItemLists*>(&g_session);
|
||||
CSession* lists = &g_session;
|
||||
if (item.unknown_0074[3] == 1) {
|
||||
lists->RemoveItem1720(item);
|
||||
lists->MergeItem1718(item);
|
||||
|
|
|
|||
|
|
@ -36,10 +36,6 @@ struct MergeItemCancelPacket {
|
|||
/* 0000 */ std::int16_t id;
|
||||
};
|
||||
|
||||
struct ClientItemLists {
|
||||
bool AddItem1710(const ITEM_INFO& item, unsigned char refresh);
|
||||
void RemoveItem1710(std::uint32_t id, int quantity);
|
||||
};
|
||||
|
||||
// OFFSET: 0x007DEC20
|
||||
// FUNCTION: fn_09659
|
||||
|
|
@ -368,9 +364,9 @@ int CMergeItemWnd::SendMsg(UIWindow*, int message, std::intptr_t argument1, std:
|
|||
}
|
||||
case 60: {
|
||||
ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, argument1);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->RemoveItem1710(item.unknown_0000[1], item.quantity);
|
||||
g_session.RemoveItem1710(item.unknown_0000[1], item.quantity);
|
||||
item.quantity = argument2;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(item, 1);
|
||||
g_session.AddItem1710(item, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,10 +18,6 @@
|
|||
#include <cstring>
|
||||
#include <vector>
|
||||
|
||||
struct ClientItemLists {
|
||||
bool AddItem1710(const ITEM_INFO& item, unsigned char refresh);
|
||||
void RemoveItem1710(std::uint32_t id, int quantity);
|
||||
};
|
||||
|
||||
// OFFSET: 0x009A0090
|
||||
// FUNCTION: fn_13598
|
||||
|
|
@ -55,7 +51,7 @@ void UIMakeTargetProcessWnd::Slot10(int x, int y, std::intptr_t value) {
|
|||
if (item.unknown_0000[1] != 0 && item.IsForgeMaterial() && (!hasElementalStone || !item.IsElementalStone())) {
|
||||
this->materials[emptySlot] = item;
|
||||
this->materials[emptySlot].quantity = 1;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->RemoveItem1710(item.unknown_0000[1], 1);
|
||||
g_session.RemoveItem1710(item.unknown_0000[1], 1);
|
||||
if (g_windowMgr.unknown_01D4) {
|
||||
reinterpret_cast<UIWindow*>(g_windowMgr.unknown_01D4)->SendMsg(nullptr, 23, 0, 0, 0, 0);
|
||||
}
|
||||
|
|
@ -191,7 +187,7 @@ int UIMakeTargetProcessWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
|
|||
for (ITEM_INFO& material : this->materials) {
|
||||
if (material.unknown_0000[1] != 0) {
|
||||
restored = true;
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(material, 0);
|
||||
g_session.AddItem1710(material, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -220,7 +216,7 @@ int UIMakeTargetProcessWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
|
|||
for (int index = 2; index >= 0; --index) {
|
||||
ITEM_INFO& material = this->materials[index];
|
||||
if (material.unknown_0000[1] != 0 && material.itemId == name) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1710(material, 1);
|
||||
g_session.AddItem1710(material, 1);
|
||||
material.Reset();
|
||||
this->Invalidate();
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#include "Client/Session.h"
|
||||
#include "Contents/ClientItemLists.h"
|
||||
#include "Contents/Messenger/ClientMessenger.h"
|
||||
#include "Contents/Messenger/MessengerMember.h"
|
||||
#include "UI/MiniPartyGrid.h"
|
||||
|
|
@ -126,7 +125,7 @@ void UIWindowMgr::RebuildMiniPartyWindows() {
|
|||
records.push_back(record);
|
||||
}
|
||||
|
||||
reinterpret_cast<ClientItemLists&>(g_session).ClearRecords0734();
|
||||
g_session.ClearRecords0734();
|
||||
|
||||
for (const SessionRecord0734& record : records) {
|
||||
MessengerMember member = g_session.PartyByAccount(record.id);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#include "Client/Session.h"
|
||||
#include "Contents/ClientItemLists.h"
|
||||
#include "Contents/Store/MCStoreInfoBackup.h"
|
||||
#include "UI/Shop/PriceColor.h"
|
||||
#include "UI/Shop/UIMerchantShopMakeWnd.h"
|
||||
|
|
@ -47,10 +46,10 @@ void UIMerchantShopMakeWnd::Refresh() {
|
|||
|
||||
for (int index = 0; index < count; ++index) {
|
||||
const ITEM_INFO item = g_session.GetItem1768At(index);
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AddItem1750(item, this->mode, 0);
|
||||
g_session.AddItem1750(item, this->mode, 0);
|
||||
}
|
||||
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ClearItems1768();
|
||||
g_session.ClearItems1768();
|
||||
backup.Restore(this->mode != 0, this->unknown_012C);
|
||||
|
||||
const std::vector<ITEM_INFO> displayed(backup.items);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
#include "Resource/ResourceMgr.h"
|
||||
#include "File/ShortcutFilename.h"
|
||||
#include "Contents/Sound/SoundMgr.h"
|
||||
#include "Contents/ClientItemLists.h"
|
||||
#include "Contents/Skills/AutomaticSkills.h"
|
||||
#include "UI/Window/UIHotKeyWnd.h"
|
||||
#include "UI/Window/UIWindow.h"
|
||||
|
|
@ -968,9 +967,9 @@ int UIWindowMgr::ShowWhisperFrom(const char* name, const char* text, int color,
|
|||
label = LookupMessage(102);
|
||||
} else if (g_session.IsGuildMemberCharacter(accountId)) {
|
||||
label = "GuildMember";
|
||||
} else if (reinterpret_cast<ClientItemLists*>(&g_session)->IsFriendName(name)) {
|
||||
} else if (g_session.IsFriendNameDifferent(name)) {
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(917)), 0xFFFF, 0, 0, 0);
|
||||
} else if (reinterpret_cast<ClientItemLists*>(&g_session)->IsGuildMemberName(name)) {
|
||||
} else if (g_session.IsGuildMemberNameDifferent(name)) {
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(919)), 0xFFFF, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,9 +42,6 @@ const char* g_uiRectInfoKeySuffix = "\\UIRectInfo";
|
|||
// GLOBAL: gl_24987
|
||||
const char* g_shortcutItemKeySuffix = "\\ShortcutItem";
|
||||
|
||||
struct ClientItemLists {
|
||||
void ResetHotkeyDescriptions();
|
||||
};
|
||||
|
||||
// OFFSET: 0x00A911E0
|
||||
// FUNCTION: fn_17156
|
||||
|
|
@ -159,7 +156,7 @@ void UIWindowMgr::LoadShortcutItems() {
|
|||
RegCloseKey(probe);
|
||||
HKEY key;
|
||||
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, path, 0, KEY_QUERY_VALUE, &key) == ERROR_SUCCESS) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->ResetHotkeyDescriptions();
|
||||
g_session.ResetHotkeyDescriptions();
|
||||
g_session.ClearUnknown0420();
|
||||
for (int index = 0; index < 36; ++index) {
|
||||
DWORD type = REG_SZ;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue