From 15831e8d6c75324650c34bc4424ee45c8dd3e7e3 Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Thu, 20 Jan 2022 03:20:39 -0800 Subject: [PATCH] Added Script files for Avant Gardens Buff Station --- dScripts/AgSurvivalBuffStation.cpp | 15 +++++++++++++++ dScripts/AgSurvivalBuffStation.h | 9 +++++++++ 2 files changed, 24 insertions(+) create mode 100644 dScripts/AgSurvivalBuffStation.cpp create mode 100644 dScripts/AgSurvivalBuffStation.h diff --git a/dScripts/AgSurvivalBuffStation.cpp b/dScripts/AgSurvivalBuffStation.cpp new file mode 100644 index 00000000..a792a9d0 --- /dev/null +++ b/dScripts/AgSurvivalBuffStation.cpp @@ -0,0 +1,15 @@ +#include "AgSurvivalBuffStation.h" +#include "SkillComponent.h" +#include "dLogger.h" + +void AgSurvivalBuffStation::OnStartup(Entity* self) { + Game::logger->Log("AgSurvivalBuffStation", "Spawning survival buff station!\n"); +} + +void AgSurvivalBuffStation::OnRebuildComplete(Entity* self, Entity* target) { + auto skillComponent = self->GetComponent(); + + if (skillComponent == nullptr) return; + + skillComponent->CalculateBehavior(201, 1784, self->GetObjectID()); +} diff --git a/dScripts/AgSurvivalBuffStation.h b/dScripts/AgSurvivalBuffStation.h new file mode 100644 index 00000000..abddbdcd --- /dev/null +++ b/dScripts/AgSurvivalBuffStation.h @@ -0,0 +1,9 @@ +#pragma once +#include "CppScripts.h" + +class AgSurvivalBuffStation : public CppScripts::Script +{ +public: + void OnStartup(Entity* self) override; + void OnRebuildComplete(Entity* self, Entity* target) override; +}; \ No newline at end of file