feat: dragon instance script

This commit is contained in:
David Markowitz
2026-06-20 22:11:35 -07:00
parent ccc029424c
commit bfd0f1ff35
5 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
#include "FvDragonInstanceServer.h"
#include "Entity.h"
#include "DestroyableComponent.h"
void FvDragonInstanceServer::OnPlayerLoaded(Entity* self, Entity* player) {
auto* const destComp = player->GetComponent<DestroyableComponent>();
if (destComp) {
destComp->SetHealth(destComp->GetMaxHealth());
destComp->SetArmor(destComp->GetMaxArmor());
destComp->SetImagination(destComp->GetMaxImagination());
}
}