DarkflameServer/dScripts/BaseWavesGenericEnemy.cpp
2021-12-05 18:54:36 +01:00

14 lines
462 B
C++

#include "BaseWavesGenericEnemy.h"
#include "dZoneManager.h"
void BaseWavesGenericEnemy::OnStartup(Entity *self) {
self->SetNetworkVar<uint32_t>(u"points", GetPoints());
}
void BaseWavesGenericEnemy::OnDie(Entity *self, Entity *killer) {
auto* zoneControlObject = dZoneManager::Instance()->GetZoneControlObject();
if (zoneControlObject != nullptr) {
zoneControlObject->OnFireEventServerSide(killer, "Survival_Update", GetPoints());
}
}