From a71d0d868d8db8f8e0ff0495039cd3ac764c3ed8 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 29 Oct 2026 20:43:47 +0000 Subject: [PATCH] Decompile 6 functions in Source/Contents/ServerTimeManager.cpp, Source/Contents/ServerTimeManager.h, ... Batch #3110 by youko: 0 byte-identical, 6 confirmed by peer review. - fn_01686 ServerTimeManager::~ServerTimeManager: logic confirmed by peer review - fn_01695 ServerTimeManager::Reset: logic confirmed by peer review - fn_01696 ServerTimeManager::Update: logic confirmed by peer review - fn_01718 ModelPositionKeysV2::operator=: logic confirmed by peer review - fn_01719 ModelQuaternionKeys::operator=: logic confirmed by peer review - fn_01720 ModelScaleKeysV2::operator=: logic confirmed by peer review Peer-reviewed-by: eAthena, meitogi Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/ModelKeyframes.cpp | 13 +++++++++++++ Source/Contents/ServerTimeManager.cpp | 24 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/Source/Contents/ModelKeyframes.cpp b/Source/Contents/ModelKeyframes.cpp index e2163ec8..e7d28426 100644 --- a/Source/Contents/ModelKeyframes.cpp +++ b/Source/Contents/ModelKeyframes.cpp @@ -76,7 +76,20 @@ void ModelScaleKeys::Add(int frame, float scaleX, float scaleY, float scaleZ, fl } // OFFSET: 0x005402D0 +// FUNCTION: fn_01718 +ModelPositionKeysV2& ModelPositionKeysV2::operator=(const ModelPositionKeysV2& other) { + return static_cast(std::vector::operator=(other)); +} // OFFSET: 0x005402E0 +// FUNCTION: fn_01719 +void ModelQuaternionKeys::operator=(const ModelQuaternionKeys& other) { + this->clear(); + std::vector::operator=(other); +} // OFFSET: 0x00540360 +// FUNCTION: fn_01720 +ModelScaleKeysV2& ModelScaleKeysV2::operator=(const ModelScaleKeysV2& other) { + return static_cast(std::vector::operator=(other)); +} diff --git a/Source/Contents/ServerTimeManager.cpp b/Source/Contents/ServerTimeManager.cpp index 0c511f88..d312f53c 100644 --- a/Source/Contents/ServerTimeManager.cpp +++ b/Source/Contents/ServerTimeManager.cpp @@ -8,6 +8,9 @@ void ServerTimeManager::Initialize() { } // OFFSET: 0x0053E500 +// FUNCTION: fn_01686 +ServerTimeManager::~ServerTimeManager() { +} // OFFSET: 0x0053E6A0 // FUNCTION: fn_01689 @@ -46,5 +49,26 @@ int ServerTimeManager::GetYear() const { } // OFFSET: 0x0053E910 +// FUNCTION: fn_01695 +void ServerTimeManager::Reset() { + this->offset = std::chrono::seconds::zero(); + this->Update(); +} // OFFSET: 0x0053E930 +// FUNCTION: fn_01696 +void ServerTimeManager::Update() { + this->now = std::chrono::system_clock::now(); + this->now += this->offset; + + const std::time_t seconds = std::chrono::system_clock::to_time_t(this->now); + std::tm local; + if (localtime_s(&local, &seconds) == 0) { + this->year = local.tm_year + 1900; + this->month = local.tm_mon + 1; + this->day = local.tm_mday; + this->hour = local.tm_hour; + this->minute = local.tm_min; + this->second = local.tm_sec; + } +}