2021-12-05 17:54:36 +00:00
|
|
|
#include "FvMaelstromCavalry.h"
|
|
|
|
#include "EntityManager.h"
|
|
|
|
|
|
|
|
void FvMaelstromCavalry::OnStartup(Entity* self) {
|
|
|
|
for (const auto& group : self->GetGroups()) {
|
2023-07-15 20:56:33 +00:00
|
|
|
const auto& objects = Game::entityManager->GetEntitiesInGroup(group);
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
for (auto* obj : objects) {
|
|
|
|
if (obj->GetLOT() != 8551) continue;
|
|
|
|
|
|
|
|
obj->OnFireEventServerSide(self, "ISpawned");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void FvMaelstromCavalry::OnDie(Entity* self, Entity* killer) {
|
|
|
|
if (killer == nullptr) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (killer->GetLOT() != 8665) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2023-07-15 20:56:33 +00:00
|
|
|
const auto& triggers = Game::entityManager->GetEntitiesInGroup("HorsemenTrigger");
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
for (auto* trigger : triggers) {
|
|
|
|
trigger->OnFireEventServerSide(self, "HorsemenDeath");
|
|
|
|
}
|
|
|
|
}
|