Decompile 2 functions in Source/Contents/Schedule/EmotionSchedule.cpp, Source/Contents/CashEmotionMgr.h
Batch #4914 by Millenium: 0 byte-identical, 2 confirmed by peer review. - fn_04717 CEmotionPurchaseExpireSchedule::Process: logic confirmed by peer review - fn_04720 CEmotionPurchaseUseableTimeUISchedule::Process: logic confirmed by peer review Peer-reviewed-by: youko, Lumen Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
0052c1f56b
commit
3288cd4862
2 changed files with 42 additions and 0 deletions
|
|
@ -146,6 +146,8 @@ public:
|
|||
bool IsOwnedPack(int packId);
|
||||
void sub_59CDE0(int param);
|
||||
void SetServerTimeZone(short serverBias);
|
||||
bool sub_59C5A0();
|
||||
bool sub_59D2C0();
|
||||
int sub_59FC50();
|
||||
// INLINED
|
||||
int BasePackId() const {
|
||||
|
|
@ -183,6 +185,8 @@ protected:
|
|||
};
|
||||
|
||||
extern CCashEmotionMgr* g_cashEmotionMgr;
|
||||
class UICashEmotionListWnd;
|
||||
extern UICashEmotionListWnd* g_cashEmotionListWnd;
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
static_assert(offsetof(CashEmotionData, name) == 0x08);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,42 @@
|
|||
#include "Contents/Schedule/EmotionSchedule.h"
|
||||
|
||||
#include "Contents/CashEmotionMgr.h"
|
||||
#include "Contents/ShowRankingScheduler.h"
|
||||
|
||||
class UICashEmotionListWnd {
|
||||
public:
|
||||
void sub_7C7E50();
|
||||
};
|
||||
|
||||
// GLOBAL: gl_24915
|
||||
UICashEmotionListWnd* g_cashEmotionListWnd;
|
||||
|
||||
// OFFSET: 0x00636B60
|
||||
// FUNCTION: fn_04715
|
||||
CEmotionPurchaseExpireSchedule::CEmotionPurchaseExpireSchedule(const std::uint64_t& timestamp, const std::int64_t& interval, int scheduleType)
|
||||
: CSchedule(timestamp, interval, scheduleType, ++g_schedulerSerial, 5) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x00636C90
|
||||
// FUNCTION: fn_04717
|
||||
void CEmotionPurchaseExpireSchedule::Process(const std::uint64_t& now) {
|
||||
CSchedule::Process(now);
|
||||
if (g_cashEmotionMgr->sub_59C5A0()) {
|
||||
if (g_cashEmotionListWnd) {
|
||||
g_cashEmotionListWnd->sub_7C7E50();
|
||||
}
|
||||
}
|
||||
int earliest = g_cashEmotionMgr->GetEarliestExpiry();
|
||||
if (earliest != 0x7FFFFFFF) {
|
||||
int current = g_cashEmotionMgr->sub_59FC50();
|
||||
if (current < earliest) {
|
||||
this->interval = (static_cast<std::int64_t>(earliest) * 10000000i64 - static_cast<std::int64_t>(current) * 10000000i64) / 10000i64;
|
||||
return;
|
||||
}
|
||||
}
|
||||
this->active = false;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00636D20
|
||||
// FUNCTION: fn_04718
|
||||
CEmotionPurchaseUseableTimeUISchedule::CEmotionPurchaseUseableTimeUISchedule(
|
||||
|
|
@ -16,6 +45,15 @@ CEmotionPurchaseUseableTimeUISchedule::CEmotionPurchaseUseableTimeUISchedule(
|
|||
: CSchedule(timestamp, interval, scheduleType, ++g_schedulerSerial, 7) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x00636E50
|
||||
// FUNCTION: fn_04720
|
||||
void CEmotionPurchaseUseableTimeUISchedule::Process(const std::uint64_t& now) {
|
||||
CSchedule::Process(now);
|
||||
if (!g_cashEmotionMgr->sub_59D2C0()) {
|
||||
this->active = false;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00636E80
|
||||
// FUNCTION: fn_04721
|
||||
CEmotionSaleExpireSchedule::CEmotionSaleExpireSchedule(const std::uint64_t& timestamp, const std::int64_t& interval, int scheduleType)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue