Maintenance: [forced, user-approved] Family G27 (resubmit of 10254 rebased on e235d90a; only conflict was the AsyncWorkMgr.h forward
Batch #10259 by ragnarok-clanker: forced by an admin (1 lower score(s), 11 changed function(s)); checked with 508 compiled unit(s), including every includer of Source/Contents/Async/AsyncWorkMgr.h, Source/Contents/Skills/SkillLevelRegistry.h, Source/Contents/UserData/CharacterLinkedUserDataLoadAsyncWork.h, Source/Contents/UserData/CharacterLinkedUserDataMgr.h, Source/UI/Window/UIWindowMgr.h, Source/UI/Window/UIWindowMgr.inl, Source/Contents/Skills/SkillLevelConfig.h, Source/Contents/UserData/CharacterConfigLoad.h, Source/UI/Shortcuts/NormalItemSlotLoad.h. Deletes: Source/Contents/Skills/SkillLevelConfig.h, Source/Contents/UserData/CharacterConfigLoad.h, Source/UI/Shortcuts/NormalItemSlotLoad.h
This commit is contained in:
parent
15ee30e2aa
commit
bd0ade90cd
16 changed files with 63 additions and 124 deletions
|
|
@ -1,23 +1,25 @@
|
|||
#include "UI/Shortcuts/NormalItemSlotLoad.h"
|
||||
#include "Client/Session.h"
|
||||
#include "Contents/UserData/CharacterLinkedUserDataMgr.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/UIWindowMgr.inl"
|
||||
#include "UI/Window/UIWindow.h"
|
||||
#include "UI/Window/WindowManagerWindows.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <json/value.h>
|
||||
|
||||
// OFFSET: 0x005E65E0
|
||||
// FUNCTION: fn_03929
|
||||
void LoadNormalItemSlots(
|
||||
Json::Value& data, NormalItemSlot* slots, NormalItemSlotWindow& saved, bool& itemSlotActive, WindowManagerWindows& windows
|
||||
) {
|
||||
void CCharacterLinkedUserDataMgr::LoadNormalItemSlots(Json::Value& data) {
|
||||
NormalItemSlotWindow& saved = g_windowMgr.m_normalItemSlotWindow;
|
||||
bool& itemSlotActive = g_session.ItemSlotActive();
|
||||
|
||||
Json::Value& values = data["NormalItemSlot"];
|
||||
|
||||
if (values.isNull()) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::memset(slots, 0, 9 * sizeof(NormalItemSlot));
|
||||
g_session.ClearNormalItemSlots();
|
||||
|
||||
for (auto entry = values.begin(); entry != values.end(); ++entry) {
|
||||
Json::Value& value = *entry;
|
||||
|
|
@ -28,7 +30,7 @@ void LoadNormalItemSlots(
|
|||
|
||||
const int item = value.get("ItemID", 0).asInt();
|
||||
const int index = value.get("SlotNum", 0).asInt();
|
||||
slots[index].itemId = static_cast<std::uint32_t>(item);
|
||||
g_session.m_normalItemSlots[index].itemId = static_cast<std::uint32_t>(item);
|
||||
}
|
||||
|
||||
Json::Value& info = data["SlotInfo"];
|
||||
|
|
@ -52,7 +54,7 @@ void LoadNormalItemSlots(
|
|||
Json::Value& active = data["ItemSlotActive"];
|
||||
itemSlotActive = active.isNull() ? true : active.asBool();
|
||||
|
||||
UIWindow* window = windows.LookupWindow(36);
|
||||
UIWindow* window = g_windowMgr.LookupWindow(36);
|
||||
|
||||
if (!window) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
#ifndef RAGNAROK_SOURCE_UI_SHORTCUTS_NORMALITEMSLOTLOAD_H
|
||||
#define RAGNAROK_SOURCE_UI_SHORTCUTS_NORMALITEMSLOTLOAD_H
|
||||
|
||||
#include "Contents/UserData/NormalItemSlots.h"
|
||||
|
||||
#include "UI/Window/WindowManagerWindows.h"
|
||||
|
||||
void LoadNormalItemSlots(
|
||||
Json::Value& data, NormalItemSlot* slots, NormalItemSlotWindow& saved, bool& itemSlotActive, WindowManagerWindows& windows
|
||||
);
|
||||
|
||||
#endif
|
||||
|
|
@ -1299,7 +1299,7 @@ void UIWindowMgr::ApplyReplayOptions(const ReplayOptions& options) {
|
|||
this->unknown_077C = 0;
|
||||
this->unknown_05BC = 0;
|
||||
this->unknown_05D0 = 0;
|
||||
this->unknown_0758 = options.unknown_0007;
|
||||
this->m_normalItemSlotWindow.show = options.unknown_0007;
|
||||
this->unknown_003C = options.recordRestricted;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -354,8 +354,8 @@ public:
|
|||
/* 05D0 */ int unknown_05D0;
|
||||
/* 05D4 */ unsigned char unknown_05D4[0x168];
|
||||
/* 073C */ int unknown_073C;
|
||||
/* 0740 */ unsigned char unknown_0740[0x18];
|
||||
/* 0758 */ int unknown_0758;
|
||||
/* 0740 */ unsigned char unknown_0740[0x08];
|
||||
/* 0748 */ NormalItemSlotWindow m_normalItemSlotWindow;
|
||||
/* 075C */ unsigned char unknown_075C[0x20];
|
||||
/* 077C */ int unknown_077C;
|
||||
/* 0780 */ unsigned char unknown_0780[0x10];
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ inline bool UIWindowMgr::ShowShortcutWindow(int value) {
|
|||
return false;
|
||||
}
|
||||
|
||||
this->unknown_0758 = value;
|
||||
this->m_normalItemSlotWindow.show = value;
|
||||
g_windowMgr.EnsureWindow(36);
|
||||
this->window_01E8->Show(value);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue