mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 17:58:20 +00:00
Added comments
This commit is contained in:
parent
15831e8d6c
commit
6fc0683ce9
@ -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<SkillComponent>();
|
||||
|
||||
if (skillComponent == nullptr) return;
|
||||
|
||||
skillComponent->CalculateBehavior(201, 1784, self->GetObjectID());
|
||||
skillComponent->CalculateBehavior(skillIdForBuffStation, behaviorIdForBuffStation, self->GetObjectID());
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
Loading…
Reference in New Issue
Block a user