From 6fc0683ce969dd40f1a4a1c787442482ef412089 Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Thu, 20 Jan 2022 03:26:41 -0800 Subject: [PATCH] Added comments --- dScripts/AgSurvivalBuffStation.cpp | 6 +----- dScripts/AgSurvivalBuffStation.h | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/dScripts/AgSurvivalBuffStation.cpp b/dScripts/AgSurvivalBuffStation.cpp index a792a9d0..0525686e 100644 --- a/dScripts/AgSurvivalBuffStation.cpp +++ b/dScripts/AgSurvivalBuffStation.cpp @@ -2,14 +2,10 @@ #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()); + skillComponent->CalculateBehavior(skillIdForBuffStation, behaviorIdForBuffStation, self->GetObjectID()); } diff --git a/dScripts/AgSurvivalBuffStation.h b/dScripts/AgSurvivalBuffStation.h index abddbdcd..0b4d1865 100644 --- a/dScripts/AgSurvivalBuffStation.h +++ b/dScripts/AgSurvivalBuffStation.h @@ -4,6 +4,20 @@ class AgSurvivalBuffStation : public CppScripts::Script { public: - void OnStartup(Entity* self) override; + /** + * @brief When the rebuild of self is complete, we calculate the behavior that is assigned to self in the database. + * + * @param self The Entity that called this script. + * @param target The target of the self that called this script. + */ void OnRebuildComplete(Entity* self, Entity* target) override; +private: + /** + * Skill ID for the buff station. + */ + uint32_t skillIdForBuffStation = 201; + /** + * Behavior ID for the buff station. + */ + uint32_t behaviorIdForBuffStation = 1784; }; \ No newline at end of file