Reconstruct readable C++ and organize cohesive source subsystems
Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.
Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
This commit is contained in:
parent
35d2a8cb36
commit
a47d20f8be
890 changed files with 11796 additions and 16664 deletions
52
Source/Contents/Effects/PartyMemberEffects.cpp
Normal file
52
Source/Contents/Effects/PartyMemberEffects.cpp
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#include "Contents/Effects/AttachedEffect.h"
|
||||
#include "Contents/Effects/EffectActor.h"
|
||||
#include "Contents/Effects/PartyMemberEffects.h"
|
||||
#include "Contents/Effects/RagEffectInitialization.h"
|
||||
#include "Script/LuaScript.h"
|
||||
#include "Utility/Math/AffineMatrix.h"
|
||||
|
||||
namespace {
|
||||
// OFFSET: 0x00CADD60
|
||||
// FUNCTION: fn_21069
|
||||
AttachedEffect* CreatePartyEffect(EffectActor& actor, PartyEffectMode& mode) {
|
||||
mode.lastEffectId = 160;
|
||||
auto* effect = new AttachedEffect(mode.resources, mode.names);
|
||||
bool force = false;
|
||||
mode.effectScript.Call("IsForceRenderEffect", "d>b", 160, &force);
|
||||
effect->state.forceRender = force;
|
||||
|
||||
const float sine = ClientSine(0);
|
||||
const float cosine = ClientCosine(0);
|
||||
const float x = 0.0f * cosine - 0.0f * sine;
|
||||
const float z = 0.0f * cosine + 0.0f * sine;
|
||||
InitializeRagEffect(effect->state, effect->render, &actor, actor.render, 160, x, 0, z, mode.options, mode.resources);
|
||||
mode.objects.push_back(effect);
|
||||
actor.state.effects.push_back(&effect->state);
|
||||
|
||||
return effect;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00DD70B0
|
||||
// FUNCTION: fn_23283
|
||||
bool PartyMemberEffects::Enabled() const {
|
||||
const auto* mode = this->activeMode;
|
||||
return mode && (mode->playerOption48 != 0 || mode->playerOption54 != 0);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00DD70B0
|
||||
// FUNCTION: fn_23283
|
||||
|
||||
void PartyMemberEffects::EnsurePartyEffect(std::uint32_t accountId) {
|
||||
PartyEffectMode& mode = *this->activeMode;
|
||||
|
||||
for (EffectActor* actor : mode.actors) {
|
||||
if (actor->render.accountId == accountId) {
|
||||
if (!actor->state.Attachments().HasId(160)) {
|
||||
CreatePartyEffect(*actor, mode);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue