diff --git a/dScripts/AgSurvivalBuffStation.cpp b/dScripts/AgSurvivalBuffStation.cpp index 2bd8e72..41a754d 100644 --- a/dScripts/AgSurvivalBuffStation.cpp +++ b/dScripts/AgSurvivalBuffStation.cpp @@ -8,12 +8,8 @@ void AgSurvivalBuffStation::OnRebuildComplete(Entity* self, Entity* target) { if (skillComponent == nullptr) return; skillComponent->CalculateBehavior(201, 1784, self->GetObjectID()); - - self->AddTimer("DestroyAfter10Seconds", 10.0f); -} -void AgSurvivalBuffStation::OnTimerDone(Entity* self, std::string timerName) { - if (timerName == "DestroyAfter10Seconds") { + self->AddCallbackTimer(10.0f, [self]() { self->Smash(); - } -} \ No newline at end of file + }); +} diff --git a/dScripts/AgSurvivalBuffStation.h b/dScripts/AgSurvivalBuffStation.h index bddb16b..0b4d186 100644 --- a/dScripts/AgSurvivalBuffStation.h +++ b/dScripts/AgSurvivalBuffStation.h @@ -11,13 +11,6 @@ public: * @param target The target of the self that called this script. */ void OnRebuildComplete(Entity* self, Entity* target) override; - /** - * @brief When 10 seconds have passed, smash self. - * - * @param self The Entity whos timer has done. - * @param timerName The name of the done timer - */ - void OnTimerDone(Entity* self, std::string timerName) override; private: /** * Skill ID for the buff station.