mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 21:47:24 +00:00
d382eb3bc2
- Give entities that have a script component ID of zero a script component still - Progress scripted entity missions within the for loop as we do for script calls Tested that Boogie Down is (finally) completable. Tested that Mission 737 is still completable Checked that missions progressed inside OnEmoteReceived scripts to not double trigger progression
36 lines
914 B
C++
36 lines
914 B
C++
#include "FvNinjaGuard.h"
|
|
#include "GameMessages.h"
|
|
#include "MissionComponent.h"
|
|
|
|
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) {
|
|
GameMessages::SendPlayAnimation(self, u"no");
|
|
|
|
return;
|
|
}
|
|
|
|
GameMessages::SendPlayAnimation(self, u"scared");
|
|
|
|
if (self->GetLOT() == 7412) {
|
|
auto* rightGuard = EntityManager::Instance()->GetEntity(m_RightGuard);
|
|
|
|
if (rightGuard != nullptr) {
|
|
GameMessages::SendPlayAnimation(rightGuard, u"laugh_rt");
|
|
}
|
|
} else if (self->GetLOT() == 11128) {
|
|
auto* leftGuard = EntityManager::Instance()->GetEntity(m_LeftGuard);
|
|
|
|
if (leftGuard != nullptr) {
|
|
GameMessages::SendPlayAnimation(leftGuard, u"laugh_lt");
|
|
}
|
|
}
|
|
}
|