Decompile 3 functions in Source/Contents/Effects/Competentia.cpp, Source/Contents/Effects/Competentia.h
Batch #3420 by Lumen: 0 byte-identical, 3 confirmed by peer review. - fn_07076 CCompetentia::Slot04: logic confirmed by peer review - fn_07079 CCompetentia::Close: logic confirmed by peer review - fn_07080 CCompetentia::Slot01: logic confirmed by peer review Peer-reviewed-by: eAthena, Yommy, superintelligence Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
c26095ec64
commit
dd8bbf42c2
2 changed files with 57 additions and 0 deletions
|
|
@ -1,10 +1,64 @@
|
|||
#include "Contents/Effects/Competentia.h"
|
||||
|
||||
#include "Client/Mode/CGameMode.h"
|
||||
#include "Client/Mode/ModeMgr.h"
|
||||
#include "Contents/Camera/Camera.h"
|
||||
#include "Contents/Effects/Particle.h"
|
||||
#include "Contents/Ground/TerrainHeight.h"
|
||||
#include "Contents/World/World.h"
|
||||
#include "Resource/World/TerrainResource.h"
|
||||
|
||||
CParticle* sub_B82ED0(const vector3d* position, int flags);
|
||||
void sub_B82FD0(CParticle* particle);
|
||||
|
||||
// OFFSET: 0x007088B0
|
||||
// FUNCTION: fn_07076
|
||||
void CCompetentia::Slot04() {
|
||||
for (CParticle* particle : this->particles) {
|
||||
if (particle != nullptr) {
|
||||
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
||||
static_cast<CEZ2STRParticle*>(particle)->DrawBillboards(mode->camera->frame.view);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00708930
|
||||
// FUNCTION: fn_07077
|
||||
CCompetentia::CCompetentia() : CEffect(1851) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x00708A90
|
||||
// FUNCTION: fn_07079
|
||||
void CCompetentia::Close() {
|
||||
for (CParticle* particle : this->particles) {
|
||||
sub_B82FD0(particle);
|
||||
}
|
||||
|
||||
this->particles.clear();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00708AD0
|
||||
// FUNCTION: fn_07080
|
||||
void CCompetentia::Slot01() {
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
const vector2d point = RandomDiscPoint(this->position[0], this->position[2], 50);
|
||||
vector3d pos;
|
||||
pos.x = point.x;
|
||||
pos.z = point.y;
|
||||
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
||||
pos.y = mode->scene->terrain->Grid().Height(pos.x, pos.z);
|
||||
|
||||
CParticle* particle = sub_B82ED0(&pos, 5);
|
||||
if (particle != nullptr) {
|
||||
static_cast<CEZ2STRParticle*>(particle)->Open("competentia\\competentia_cast_particle\\competentia_cast_particle.str");
|
||||
static_cast<CEZ2STRParticle*>(particle)->m_loop = true;
|
||||
this->particles.push_back(particle);
|
||||
}
|
||||
}
|
||||
|
||||
this->AddEvent(0, "effect\\EF_BeginSpell.wav", 0, 0);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00708CB0
|
||||
// FUNCTION: fn_07081
|
||||
bool CCompetentia::Slot06() {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ class CCompetentia : public CEffect {
|
|||
public:
|
||||
CCompetentia();
|
||||
|
||||
void Slot01() override;
|
||||
void Slot04() override;
|
||||
void Close() override;
|
||||
bool Slot06() override;
|
||||
|
||||
/* 00CC */ std::vector<CParticle*> particles;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue