2022-01-20 11:20:39 +00:00
|
|
|
#include "AgSurvivalBuffStation.h"
|
|
|
|
#include "SkillComponent.h"
|
|
|
|
#include "dLogger.h"
|
|
|
|
|
|
|
|
void AgSurvivalBuffStation::OnRebuildComplete(Entity* self, Entity* target) {
|
|
|
|
auto skillComponent = self->GetComponent<SkillComponent>();
|
|
|
|
|
|
|
|
if (skillComponent == nullptr) return;
|
|
|
|
|
2022-01-20 11:48:43 +00:00
|
|
|
skillComponent->CalculateBehavior(201, 1784, self->GetObjectID());
|
|
|
|
|
|
|
|
self->AddTimer("DestroyAfter10Seconds", 10.0f);
|
2022-01-20 11:20:39 +00:00
|
|
|
}
|
2022-01-20 11:48:43 +00:00
|
|
|
|
|
|
|
void AgSurvivalBuffStation::OnTimerDone(Entity* self, std::string timerName) {
|
|
|
|
if (timerName == "DestroyAfter10Seconds") {
|
|
|
|
self->Smash();
|
|
|
|
}
|
|
|
|
}
|