rodecomp/Source/Contents/World/WorldObjects.cpp
ragnarok-clanker d7862ef5c4 Decompile 9 functions in Source/Utility/Math/Vector3d.h, Source/Utility/Math/AffineMatrix.h, ...
Batch #1843 by ragnarok-clanker: 1 byte-identical, 8 confirmed by peer review.

- fn_02024 ClientRadians: logic confirmed by peer review
- fn_17668 WorldScene::GetGameActorByAID: logic confirmed by peer review
- fn_21057 CRenderObject::GetTargetPos: logic confirmed by peer review
- fn_17667 WorldScene::GetGameActorByAidIncludeMe: logic confirmed by peer review
- fn_21290 CGameMode::NotifyItemBounds: logic confirmed by peer review
- fn_03089 CEffect::Slot25: logic confirmed by peer review
- fn_08405 CellWorldPosition: logic confirmed by peer review
- fn_19762 EffectPrimitiveSlot::EffectPrimitiveSlot: byte-identical (already on main)
- fn_19865 DrawEffectPrimitive15: logic confirmed by peer review

Peer-reviewed-by: Yommy, eAthena, ragnarok-clanker
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-28 22:49:51 +00:00

75 lines
1.8 KiB
C++

#include "Client/Session.h"
#include "Contents/Actors/RenderObject.h"
#include "Contents/World/WorldObjects.h"
#include "Contents/World/WorldScene.h"
#include "Contents/Effects/EffectLists.h"
// OFFSET: 0x00AC8220
// FUNCTION: fn_17667
CRenderObject* WorldScene::GetGameActorByAidIncludeMe(std::uint32_t aid) const {
if (aid == g_session.m_aid) {
return reinterpret_cast<CRenderObject*>(this->player);
}
for (CRenderObject* actor : this->actors) {
if (actor->render.accountId == aid) {
return actor;
}
}
return nullptr;
}
// OFFSET: 0x00ACA4E0
// FUNCTION: fn_17692
void WorldObjects::Remove(CRenderObject* object) {
for (auto entry = this->objects.begin(); entry != this->objects.end(); ++entry) {
if (*entry == object) {
delete object;
this->objects.erase(entry);
return;
}
}
}
// GLOBAL: gl_24483
EffectLists* g_effectMgr;
// OFFSET: 0x00ACA320
// FUNCTION: fn_17691
void WorldScene::Clear() {
auto entry = this->objects.begin();
while (entry != this->objects.end()) {
delete *entry;
entry = this->objects.erase(entry);
}
this->player = nullptr;
this->actors.clear();
this->unknown_0018.clear();
this->unknown_0020.clear();
g_effectMgr->Clear();
this->pendingActorIds.clear();
this->actorCells.clear();
this->unindexedActorIds.clear();
}
// OFFSET: 0x00ACA980
// FUNCTION: fn_17698
void WorldObjects::SendObjectMessage(CGameObject* sender, std::uint64_t identity, int message, int a, int b, int c, int d) {
if (this == nullptr) {
return;
}
if (identity == 0) {
return;
}
for (CRenderObject* object : this->objects) {
if (object->identity == identity) {
object->SendObjectMessage(sender, message, message >> 31, a, a >> 31, b, b >> 31, c, c >> 31, d, d >> 31, 0, 0, 0, 0);
return;
}
}
}