2022-08-06 03:01:59 +00:00
|
|
|
#include "FvNinjaGuard.h"
|
2021-12-05 17:54:36 +00:00
|
|
|
#include "GameMessages.h"
|
|
|
|
#include "MissionComponent.h"
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
void FvNinjaGuard::OnStartup(Entity* self) {
|
|
|
|
if (self->GetLOT() == 7412) {
|
2021-12-05 17:54:36 +00:00
|
|
|
m_LeftGuard = self->GetObjectID();
|
2022-07-28 13:39:57 +00:00
|
|
|
} else if (self->GetLOT() == 11128) {
|
2021-12-05 17:54:36 +00:00
|
|
|
m_RightGuard = self->GetObjectID();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
void FvNinjaGuard::OnEmoteReceived(Entity* self, const int32_t emote, Entity* target) {
|
|
|
|
if (emote != 392) {
|
2021-12-05 17:54:36 +00:00
|
|
|
GameMessages::SendPlayAnimation(self, u"no");
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
GameMessages::SendPlayAnimation(self, u"scared");
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
if (self->GetLOT() == 7412) {
|
2021-12-05 17:54:36 +00:00
|
|
|
auto* rightGuard = EntityManager::Instance()->GetEntity(m_RightGuard);
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
if (rightGuard != nullptr) {
|
2021-12-05 17:54:36 +00:00
|
|
|
GameMessages::SendPlayAnimation(rightGuard, u"laugh_rt");
|
|
|
|
}
|
2022-07-28 13:39:57 +00:00
|
|
|
} else if (self->GetLOT() == 11128) {
|
2021-12-05 17:54:36 +00:00
|
|
|
auto* leftGuard = EntityManager::Instance()->GetEntity(m_LeftGuard);
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
if (leftGuard != nullptr) {
|
2021-12-05 17:54:36 +00:00
|
|
|
GameMessages::SendPlayAnimation(leftGuard, u"laugh_lt");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|