Added redundancy for smashing buff station

This commit is contained in:
EmosewaMC 2022-01-20 03:48:43 -08:00
parent 6fc0683ce9
commit 24f8ea21db
2 changed files with 10 additions and 1 deletions

View File

@ -7,5 +7,13 @@ void AgSurvivalBuffStation::OnRebuildComplete(Entity* self, Entity* target) {
if (skillComponent == nullptr) return; if (skillComponent == nullptr) return;
skillComponent->CalculateBehavior(skillIdForBuffStation, behaviorIdForBuffStation, self->GetObjectID()); skillComponent->CalculateBehavior(201, 1784, self->GetObjectID());
self->AddTimer("DestroyAfter10Seconds", 10.0f);
}
void AgSurvivalBuffStation::OnTimerDone(Entity* self, std::string timerName) {
if (timerName == "DestroyAfter10Seconds") {
self->Smash();
}
} }

View File

@ -11,6 +11,7 @@ public:
* @param target The target of the self that called this script. * @param target The target of the self that called this script.
*/ */
void OnRebuildComplete(Entity* self, Entity* target) override; void OnRebuildComplete(Entity* self, Entity* target) override;
void OnTimerDone(Entity* self, std::string timerName) override;
private: private:
/** /**
* Skill ID for the buff station. * Skill ID for the buff station.