rodecomp/Source/Contents/Effects/Core/DummyEffectLauncher.cpp
ragnarok-clanker 0d6efeaf09 Maintenance: C7 (replaces 18431/18498/18559). Actor SendMsg takes (CGameObject* sender, std::int64_t message, std::int64_t b..g). Aud
Batch #18562 by ragnarok-clanker: forced by an admin (31 lower score(s), 132 changed function(s)); checked with 230 compiled unit(s), including every includer of Source/Client/Mode/CGameMode.h, Source/Contents/Actors/EffectActors.h, Source/Contents/Actors/GameActor.h, Source/Contents/Actors/GameObject.h, Source/Contents/Actors/GndRiser.h, Source/Contents/Actors/GroundScope.h, Source/Contents/Actors/Item.h, Source/Contents/Actors/MousePointer.h, Source/Contents/Actors/Npc.h, Source/Contents/Actors/Pc.h, Source/Contents/Actors/RenderObject.h, Source/Contents/Actors/Skill.h, Source/Contents/Effects/Core/DummyEffectLauncher.h, Source/Contents/Effects/Core/EffectActor.h, Source/Contents/Effects/Core/EffectMaker.h, Source/Contents/Effects/Core/MsgEffect.h, Source/Contents/Effects/Skills/ArrowEffect.h, Source/Contents/Effects/Skills/MandraAttackEffect.h, Source/Contents/SignBoard/SignBoard.h, Source/Contents/Skills/GraffiSkill.h, Source/Contents/Sound/SoundMaker.h.
2026-11-12 16:09:04 +00:00

51 lines
1.7 KiB
C++

#include "Contents/Effects/Core/DummyEffectLauncher.h"
#include "Contents/Actors/ActorEnums.h"
#include "Contents/Effects/Core/EffectLists.h"
#include "Contents/Effects/Core/RagEffect.h"
#include <windows.h>
#include <timeapi.h>
// OFFSET: 0x00E4C1C0
// FUNCTION: fn_24281
bool CDummyEffectLauncher::OnProcess() {
const float frame = static_cast<float>(static_cast<double>(timeGetTime() - this->render.motionStartTime) / 24.0);
const float limit = static_cast<float>(this->lifeFrames);
return !(frame > limit);
}
// OFFSET: 0x00E50A60
// FUNCTION: fn_24296
__declspec(safebuffers) void CDummyEffectLauncher::SendMsg(CGameObject* sender, std::int64_t message, std::int64_t b, std::int64_t c, std::int64_t d, std::int64_t e, std::int64_t f, std::int64_t g) {
if (message != AM_SETPOS) {
this->EffectActor::SendMsg(sender, message, b, c, d, e, 0, 0);
return;
}
const vector3d* position = reinterpret_cast<const vector3d*>(static_cast<std::intptr_t>(b));
this->render.position.x = position->x;
this->render.position.y = position->y;
this->render.position.z = position->z;
this->render.visible = 0;
this->render.motionStartTime = timeGetTime();
if (g_effectMgr->Spawn(0, static_cast<int>(c), this->render.position, 0, -1, 0, 0) != nullptr) {
return;
}
CRagEffect* effect = this->LaunchEffect(static_cast<int>(c), vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
if (d != 0) {
this->lifeFrames = static_cast<int>(d);
if (d == 333) {
vector3d value;
value.y = 0.0f;
value.z = 0.0f;
value.x = static_cast<float>(e);
if (effect != nullptr) {
effect->SendMsg(nullptr, AM_SETPOS, 0, reinterpret_cast<std::intptr_t>(&value), 0, 0, 0, 0);
}
}
} else {
this->lifeFrames = 300;
}
}