2021-12-05 17:54:36 +00:00
|
|
|
#include "FvNinjaGuard.h"
|
|
|
|
#include "GameMessages.h"
|
|
|
|
#include "MissionComponent.h"
|
2023-03-20 13:10:52 +00:00
|
|
|
#include "RenderComponent.h"
|
|
|
|
#include "EntityManager.h"
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
void FvNinjaGuard::OnStartup(Entity* self) {
|
|
|
|
if (self->GetLOT() == 7412) {
|
|
|
|
m_LeftGuard = self->GetObjectID();
|
|
|
|
} else if (self->GetLOT() == 11128) {
|
|
|
|
m_RightGuard = self->GetObjectID();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void FvNinjaGuard::OnEmoteReceived(Entity* self, const int32_t emote, Entity* target) {
|
|
|
|
if (emote != 392) {
|
2023-03-20 13:10:52 +00:00
|
|
|
RenderComponent::PlayAnimation(self, u"no");
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2023-03-20 13:10:52 +00:00
|
|
|
RenderComponent::PlayAnimation(self, u"scared");
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
if (self->GetLOT() == 7412) {
|
2023-07-15 20:56:33 +00:00
|
|
|
auto* rightGuard = Game::entityManager->GetEntity(m_RightGuard);
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
if (rightGuard != nullptr) {
|
2023-03-20 13:10:52 +00:00
|
|
|
RenderComponent::PlayAnimation(rightGuard, u"laugh_rt");
|
2021-12-05 17:54:36 +00:00
|
|
|
}
|
|
|
|
} else if (self->GetLOT() == 11128) {
|
2023-07-15 20:56:33 +00:00
|
|
|
auto* leftGuard = Game::entityManager->GetEntity(m_LeftGuard);
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
if (leftGuard != nullptr) {
|
2023-03-20 13:10:52 +00:00
|
|
|
RenderComponent::PlayAnimation(leftGuard, u"laugh_lt");
|
2021-12-05 17:54:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|