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).
This commit is contained in:
ragnarok-clanker 2026-10-30 18:23:06 +00:00
commit afeed6b258
3 changed files with 76 additions and 0 deletions

View file

@ -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);

View file

@ -307,3 +307,59 @@ void CGameMode::SpawnMandraAttack(std::uint32_t aid, int target, char flag) {
effect->SendMsg(nullptr, 14, 0, aid, 0, reinterpret_cast<int>(&flag), reinterpret_cast<int>(&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<CItem*>(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<CSkill*>(*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<WorldObjects*>(this)->Remove(skill);
this->unknown_0020.erase(entry);
return true;
}
}
return false;
}

View file

@ -91,6 +91,23 @@ bool CWorld::FindActorInCell(const float* position, std::function<bool(std::uint
return std::find_if(ids.begin(), ids.end(), predicate) != ids.end();
}
// OFFSET: 0x00AC8BA0
// FUNCTION: fn_17679
bool CWorld::IsGuildMaster(std::uint32_t aid) {
for (CRenderObject* actor : this->actors) {
if (actor->render.accountId == aid) {
CGameActor* gameActor = static_cast<CGameActor*>(actor);
if (!gameActor) {
return false;
}
return gameActor->Slot42() == static_cast<int>(g_proximityCompareId);
}
}
return false;
}
// OFFSET: 0x00ACA180
// FUNCTION: fn_17689
void CWorld::ClearActorCells() {