From 24f8ea21db51cbdb1cf37adeacaf0d7b6e3b8a78 Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Thu, 20 Jan 2022 03:48:43 -0800 Subject: [PATCH] Added redundancy for smashing buff station --- dScripts/AgSurvivalBuffStation.cpp | 10 +++++++++- dScripts/AgSurvivalBuffStation.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dScripts/AgSurvivalBuffStation.cpp b/dScripts/AgSurvivalBuffStation.cpp index 0525686e..2bd8e72f 100644 --- a/dScripts/AgSurvivalBuffStation.cpp +++ b/dScripts/AgSurvivalBuffStation.cpp @@ -7,5 +7,13 @@ void AgSurvivalBuffStation::OnRebuildComplete(Entity* self, Entity* target) { 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(); + } +} \ No newline at end of file diff --git a/dScripts/AgSurvivalBuffStation.h b/dScripts/AgSurvivalBuffStation.h index 0b4d1865..0528f2ac 100644 --- a/dScripts/AgSurvivalBuffStation.h +++ b/dScripts/AgSurvivalBuffStation.h @@ -11,6 +11,7 @@ public: * @param target The target of the self that called this script. */ void OnRebuildComplete(Entity* self, Entity* target) override; + void OnTimerDone(Entity* self, std::string timerName) override; private: /** * Skill ID for the buff station.