Files
DarkflameServer/dScripts/02_server/Map/FV/Racing/RaceFireballs.cpp
Aaron Kimbre 4dce512d64 rigid as heck
2023-12-02 21:03:17 -06:00

19 lines
526 B
C++

#include "RaceFireballs.h"
#include "SkillComponent.h"
void RaceFireballs::OnStartup(Entity* self) {
self->AddTimer("fire", GeneralUtils::GenerateRandomNumber<float>(3,10));
}
void RaceFireballs::OnTimerDone(Entity* self, std::string timerName) {
if (timerName == "fire") {
auto* skillComponent = self->GetComponent<SkillComponent>();
if (!skillComponent) {
self->AddComponent<SkillComponent>();
}
skillComponent->CastSkill(894);
self->AddTimer("fire", GeneralUtils::GenerateRandomNumber<float>(3,10));
}
}