DarkflameServer/dScripts/AgSurvivalBuffStation.cpp

21 lines
616 B
C++
Raw Normal View History

#include "AgSurvivalBuffStation.h"
#include "SkillComponent.h"
#include "dLogger.h"
2022-02-07 05:32:36 +00:00
#include "DestroyableComponent.h"
void AgSurvivalBuffStation::OnRebuildComplete(Entity* self, Entity* target) {
2022-02-07 05:32:36 +00:00
auto destroyableComponent = self->GetComponent<DestroyableComponent>();
if (destroyableComponent != nullptr) destroyableComponent->SetFaction(6);
auto skillComponent = self->GetComponent<SkillComponent>();
if (skillComponent == nullptr) return;
skillComponent->CalculateBehavior(201, 1784, self->GetObjectID());
2022-01-21 00:00:45 +00:00
self->AddCallbackTimer(10.0f, [self]() {
self->Smash();
2022-01-21 00:00:45 +00:00
});
}