From afeed6b2580500dabe862ec551bc90c32c4efef7 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 18:23:06 +0000 Subject: [PATCH] Decompile 3 functions in Source/Contents/World/WorldObjects.cpp, Source/Contents/World/WorldProximity.cpp, ... Batch #5981 by eAthena: 0 byte-identical, 3 confirmed by peer review. - fn_17679 CWorld::IsGuildMaster: logic confirmed by peer review - fn_17693 CWorld::RemoveGroundItem: logic confirmed by peer review - fn_17697 CWorld::RemoveSkill: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, superintelligence, SapitoSucio, tayoba, Snow, Yommy, willerthal Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/World/World.h | 3 ++ Source/Contents/World/WorldObjects.cpp | 56 ++++++++++++++++++++++++ Source/Contents/World/WorldProximity.cpp | 17 +++++++ 3 files changed, 76 insertions(+) diff --git a/Source/Contents/World/World.h b/Source/Contents/World/World.h index 8d0599fa..1617c75f 100644 --- a/Source/Contents/World/World.h +++ b/Source/Contents/World/World.h @@ -38,6 +38,9 @@ public: void RemovePcPos(std::uint32_t aid, bool notify); void RemovePcPosForMove(std::uint32_t aid, bool notify); void ClearActorCells(); + bool IsGuildMaster(std::uint32_t aid); + bool RemoveGroundItem(std::uint32_t aid); + bool RemoveSkill(std::uint32_t aid); void PlayerMove(const float& x, const float& z); void PcApproachToPlayer(std::uint32_t accountId, const CellFloatPos& pos); diff --git a/Source/Contents/World/WorldObjects.cpp b/Source/Contents/World/WorldObjects.cpp index 41936658..22ea78fb 100644 --- a/Source/Contents/World/WorldObjects.cpp +++ b/Source/Contents/World/WorldObjects.cpp @@ -307,3 +307,59 @@ void CGameMode::SpawnMandraAttack(std::uint32_t aid, int target, char flag) { effect->SendMsg(nullptr, 14, 0, aid, 0, reinterpret_cast(&flag), reinterpret_cast(&flag) >> 31, target, target >> 31, 0, 0, 0, 0, 0, 0); } } + +// OFFSET: 0x00ACA540 +// FUNCTION: fn_17693 +bool CWorld::RemoveGroundItem(std::uint32_t aid) { + for (auto item = this->unknown_0018.begin(); item != this->unknown_0018.end(); ++item) { + CRenderObject* object = *item; + + if (static_cast(object)->itemAid == aid) { + for (auto entry = this->objects.begin(); entry != this->objects.end(); ++entry) { + if (*entry == object) { + delete object; + this->objects.erase(entry); + break; + } + } + + this->unknown_0018.erase(item); + return true; + } + } + + return false; +} + +// OFFSET: 0x00ACA8A0 +// FUNCTION: fn_17697 +bool CWorld::RemoveSkill(std::uint32_t aid) { + for (auto entry = this->unknown_0020.begin(); entry != this->unknown_0020.end(); ++entry) { + CSkill* skill = static_cast(*entry); + + if (skill->skillAid == aid) { + if (!skill) { + return false; + } + + skill->SendMsg(nullptr, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + + if (skill->HasPendingDamage() == true) { + for (std::uint32_t pending : this->pendingActorIds) { + if (pending == aid) { + return false; + } + } + + this->pendingActorIds.push_back(aid); + return false; + } + + reinterpret_cast(this)->Remove(skill); + this->unknown_0020.erase(entry); + return true; + } + } + + return false; +} diff --git a/Source/Contents/World/WorldProximity.cpp b/Source/Contents/World/WorldProximity.cpp index bb3a44fd..4b2e7e8a 100644 --- a/Source/Contents/World/WorldProximity.cpp +++ b/Source/Contents/World/WorldProximity.cpp @@ -91,6 +91,23 @@ bool CWorld::FindActorInCell(const float* position, std::functionactors) { + if (actor->render.accountId == aid) { + CGameActor* gameActor = static_cast(actor); + if (!gameActor) { + return false; + } + + return gameActor->Slot42() == static_cast(g_proximityCompareId); + } + } + + return false; +} + // OFFSET: 0x00ACA180 // FUNCTION: fn_17689 void CWorld::ClearActorCells() {