mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-23 23:24:21 +00:00
* feat: dragon instance script * Update FvDragonInstanceServer.h * feat: implement ronin script * Update CountdownDestroyAI.cpp * default initialize Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * remove unused handlers Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * use float Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fixes * Update ScriptComponent.h --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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);
|
|
}
|
|
}
|