Maintenance: [forced, user-approved] Family G26: remove MerchantShopRefresh and StoreBackupContext (inventory rows 57, 99). Refresh 0
Batch #10251 by ragnarok-clanker: forced by an admin (2 lower score(s), 10 changed function(s)); checked with 244 compiled unit(s), including every includer of Source/Contents/Async/AsyncWorkMgr.h, Source/Contents/Store/MCStoreInfoBackup.h, Source/Contents/Store/MCStoreInfoBackupAsyncWork.h, Source/UI/Shop/UIMerchantShopMakeWnd.h, Source/UI/Shop/MerchantShopRefresh.h. Deletes: Source/UI/Shop/MerchantShopRefresh.h
This commit is contained in:
parent
72ed60d3a8
commit
88b2de90c3
10 changed files with 103 additions and 198 deletions
|
|
@ -1,6 +1,8 @@
|
|||
#include "Contents/Store/MCStoreInfoBackup.h"
|
||||
#include "Client/Session.h"
|
||||
#include "Network/TextEncoding.h"
|
||||
#include "UI/Shop/UIMerchantShopMakeWnd.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
|
|
@ -14,6 +16,10 @@ void CMCStoreInfoBackup::ImportData(Json::Value& data) {
|
|||
this->title = FromUtf8(data.get("Title", "").asString(), g_textCodePage);
|
||||
Json::Value values = data["Item"];
|
||||
|
||||
if (values.isNull() && this->title.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto entry = values.begin(); entry != values.end(); ++entry) {
|
||||
Json::Value& value = *entry;
|
||||
|
||||
|
|
@ -53,6 +59,12 @@ void CMCStoreInfoBackup::ImportData(Json::Value& data) {
|
|||
item.unknown_0014[0] = static_cast<std::uint32_t>(value.get("Price", 0).asInt());
|
||||
this->items.push_back(item);
|
||||
}
|
||||
|
||||
UIWindow* window = g_windowMgr.unknown_02FC ? g_windowMgr.unknown_02FC : g_windowMgr.unknown_040C;
|
||||
|
||||
if (window) {
|
||||
static_cast<UIMerchantShopMakeWnd*>(window)->Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00607240
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue