From ae7cb57b3fdde4037cdc30aceeb99a3774071ef6 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 10:22:36 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/World/WorldProximity.cpp Batch #7544 by Toshiro: 0 byte-identical, 2 confirmed by peer review. - fn_17686 CWorld::PcApproachToPlayer: logic confirmed by peer review - fn_17687 CWorld::PlayerMove: logic confirmed by peer review Peer-reviewed-by: eAthena, secret Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/World/WorldProximity.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Source/Contents/World/WorldProximity.cpp b/Source/Contents/World/WorldProximity.cpp index 40dc7cd2..b2459fd5 100644 --- a/Source/Contents/World/WorldProximity.cpp +++ b/Source/Contents/World/WorldProximity.cpp @@ -262,8 +262,26 @@ bool WorldProximityRangeCallback::Invoke() { // OFFSET: 0x00AC9D50 +// FUNCTION: fn_17686 +__declspec(noinline) void CWorld::PcApproachToPlayer(std::uint32_t aid, const CellFloatPos& pos) { + if (this->player && this->player->Slot50() > 0 && this->IsGuildMaster(aid)) { + const float playerX = this->player->render.position.x; + const float playerZ = this->player->render.position.z; + const int range = this->nearbyRange; + CallWorldProximityUpdate(this, [playerX, playerZ, pos, range]() { + return std::fabs(pos.x - playerX) <= static_cast(range) && + std::fabs(pos.z - playerZ) <= static_cast(range); + }); + } +} // OFFSET: 0x00AC9E70 +// FUNCTION: fn_17687 +void CWorld::PlayerMove(const float& x, const float& z) { + CallWorldProximityUpdate(this, [this, x, z]() { + return this->IsExistGuildMasterNearby(x, z); + }); +} // OFFSET: 0x00ACA9F0