DarkflameServer/dScripts/BaseWavesGenericEnemy.cpp

14 lines
437 B
C++
Raw Permalink Normal View History

#include "BaseWavesGenericEnemy.h"
#include "dZoneManager.h"
2022-07-28 13:39:57 +00:00
void BaseWavesGenericEnemy::OnStartup(Entity* self) {
self->SetNetworkVar<uint32_t>(u"points", GetPoints());
}
2022-07-28 13:39:57 +00:00
void BaseWavesGenericEnemy::OnDie(Entity* self, Entity* killer) {
auto* zoneControlObject = Game::zoneManager->GetZoneControlObject();
2022-07-28 13:39:57 +00:00
if (zoneControlObject != nullptr) {
zoneControlObject->OnFireEventServerSide(killer, "Survival_Update", GetPoints());
}
}