mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-11-24 02:08:34 +00:00
format codebase
This commit is contained in:
@@ -6,12 +6,10 @@
|
||||
#include "dLogger.h"
|
||||
#include "Game.h"
|
||||
|
||||
void RepairBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bit_stream, const BehaviorBranchContext branch)
|
||||
{
|
||||
void RepairBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bit_stream, const BehaviorBranchContext branch) {
|
||||
auto* entity = EntityManager::Instance()->GetEntity(branch.target);
|
||||
|
||||
if (entity == nullptr)
|
||||
{
|
||||
if (entity == nullptr) {
|
||||
Game::logger->Log("RepairBehavior", "Failed to find entity for (%llu)!", branch.target);
|
||||
|
||||
return;
|
||||
@@ -19,8 +17,7 @@ void RepairBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bit_str
|
||||
|
||||
auto* destroyable = static_cast<DestroyableComponent*>(entity->GetComponent(COMPONENT_TYPE_DESTROYABLE));
|
||||
|
||||
if (destroyable == nullptr)
|
||||
{
|
||||
if (destroyable == nullptr) {
|
||||
Game::logger->Log("RepairBehavior", "Failed to find destroyable component for %(llu)!", branch.target);
|
||||
|
||||
return;
|
||||
@@ -29,12 +26,10 @@ void RepairBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bit_str
|
||||
destroyable->Repair(this->m_armor);
|
||||
}
|
||||
|
||||
void RepairBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bit_stream, const BehaviorBranchContext branch)
|
||||
{
|
||||
void RepairBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bit_stream, const BehaviorBranchContext branch) {
|
||||
Handle(context, bit_stream, branch);
|
||||
}
|
||||
|
||||
void RepairBehavior::Load()
|
||||
{
|
||||
void RepairBehavior::Load() {
|
||||
this->m_armor = GetInt("armor");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user