Add FV Geyser script (#748)

* Add FV Geyser script

* remove uneeded include

* const
This commit is contained in:
Aaron Kimbrell
2022-08-25 15:50:13 -05:00
committed by GitHub
parent ceb374591f
commit e707207ffa
4 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
#include "FvMaelstromGeyser.h"
#include "SkillComponent.h"
void FvMaelstromGeyser::OnStartup(Entity* self) {
self->AddTimer(m_StartSkillTimerName, m_StartSkillTimerTime);
self->AddTimer(m_KillSelfTimerName, m_KillSelfTimerTime);
}
void FvMaelstromGeyser::OnTimerDone(Entity* self, std::string timerName) {
if (timerName == m_StartSkillTimerName) {
auto* skillComponent = self->GetComponent<SkillComponent>();
skillComponent->CalculateBehavior(m_SkillID, m_BehaviorID, LWOOBJID_EMPTY, true);
}
if (timerName == m_KillSelfTimerName) {
self->Smash(LWOOBJID_EMPTY, eKillType::SILENT);
}
}