Decompile fn_21079 (CGameActor::ReleaseAttachments)
Batch #6580 by gordaoprogramas: 0 byte-identical, 1 confirmed by peer review. - fn_21079 CGameActor::ReleaseAttachments: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, meitogi, 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
fb430a594d
commit
258e22b4fd
2 changed files with 80 additions and 0 deletions
|
|
@ -1,10 +1,15 @@
|
|||
#include "Contents/Actors/GameActor.h"
|
||||
|
||||
#include "Client/Mode/CGameMode.h"
|
||||
#include "Client/Mode/ModeMgr.h"
|
||||
#include "Client/Session.h"
|
||||
#include "Contents/Actors/ActorStateFlags.h"
|
||||
#include "Contents/Actors/GroundScope.h"
|
||||
#include "Contents/Actors/MercenaryAI.h"
|
||||
#include "Contents/Actors/Pc.h"
|
||||
#include "Contents/Configuration/ServiceOptions.h"
|
||||
#include "Contents/Jobs/JobInheritance.h"
|
||||
#include "Contents/Effects/EffectTypes.h"
|
||||
#include "Contents/MapSkyMgr.h"
|
||||
#include "Utility/Math/AffineMatrix.h"
|
||||
#include "Render/Renderer.h"
|
||||
|
|
@ -209,6 +214,79 @@ void CGameActor::UpdateGaugePositions() {
|
|||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CAF260
|
||||
// FUNCTION: fn_21079
|
||||
void CGameActor::ReleaseAttachments() {
|
||||
if (this->unknown_030C && reinterpret_cast<CMercenaryAI*>(this->unknown_030C)->state) {
|
||||
reinterpret_cast<CMercenaryAI*>(this->unknown_030C)->Shutdown();
|
||||
delete reinterpret_cast<CMercenaryAI*>(this->unknown_030C);
|
||||
this->unknown_030C = 0;
|
||||
}
|
||||
|
||||
if (this->unknown_0310 && reinterpret_cast<CMercenaryAI*>(this->unknown_0310)->state) {
|
||||
reinterpret_cast<CMercenaryAI*>(this->unknown_0310)->Shutdown();
|
||||
delete reinterpret_cast<CMercenaryAI*>(this->unknown_0310);
|
||||
this->unknown_0310 = 0;
|
||||
}
|
||||
|
||||
for (int index = 0; index < 5; ++index) {
|
||||
if (this->unknown_0264[index]) {
|
||||
g_windowMgr.Schedule(reinterpret_cast<UIWindow*>(this->unknown_0264[index]));
|
||||
this->unknown_0264[index] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->unknown_0300) {
|
||||
g_windowMgr.Schedule(reinterpret_cast<UIWindow*>(this->unknown_0300));
|
||||
this->unknown_0300 = 0;
|
||||
}
|
||||
|
||||
for (CGameObject* object : this->unknown_03B0) {
|
||||
object->SendMsg(nullptr, 0x31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
this->unknown_03B0.clear();
|
||||
|
||||
if (g_session.GetSceneUnknown004C() && this->unknown_0188) {
|
||||
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->RemoveUnknown0604(this->unknown_0188);
|
||||
g_windowMgr.Schedule(reinterpret_cast<UIWindow*>(this->unknown_0188));
|
||||
this->unknown_0188 = 0;
|
||||
}
|
||||
|
||||
if (this->unknown_018C) {
|
||||
g_windowMgr.Schedule(reinterpret_cast<UIWindow*>(this->unknown_018C));
|
||||
this->unknown_018C = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CB0220
|
||||
// FUNCTION: fn_21092
|
||||
void CGameActor::UpdateStateEffects() {
|
||||
if (g_updateTick > 0 && this->render.unknown_00ECBytes[0] == 1) {
|
||||
this->render.flags = 0;
|
||||
this->render.unknown_00ECBytes[0] = 0;
|
||||
}
|
||||
|
||||
if (StateFlagsClear(this->stateFlags)) {
|
||||
this->unknown_02D8 = 36000;
|
||||
return;
|
||||
}
|
||||
|
||||
timeGetTime();
|
||||
if (StateFlag00(this->stateFlags) && static_cast<unsigned>(this->unknown_02D8) >= static_cast<unsigned>(EffectLifetime(22))) {
|
||||
this->unknown_02D8 = 0;
|
||||
this->LaunchEffect(22, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
if (StateFlag13(this->stateFlags) && static_cast<unsigned>(this->unknown_02D8) >= static_cast<unsigned>(EffectLifetime(33))) {
|
||||
this->unknown_02D8 = 0;
|
||||
this->LaunchEffect(33, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
++this->unknown_02D8;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CB03E0
|
||||
// FUNCTION: fn_21093
|
||||
void CGameActor::UpdateHpGauge() {
|
||||
|
|
|
|||
|
|
@ -260,6 +260,8 @@ public:
|
|||
void ResetState();
|
||||
void UpdateGaugePositions();
|
||||
void UpdateHpGauge();
|
||||
void UpdateStateEffects();
|
||||
void ReleaseAttachments();
|
||||
void ClearUnknown0188();
|
||||
void RefreshGuildEmblemWindow();
|
||||
void NotifyCellMove(const float* x, const float* z);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue