mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-22 14:44:22 +00:00
15 lines
463 B
C++
15 lines
463 B
C++
#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());
|
|
Game::entityManager->SerializeEntity(player);
|
|
}
|
|
}
|