DarkflameServer/dScripts/BuccaneerValiantShip.cpp

19 lines
519 B
C++
Raw Normal View History

#include "BuccaneerValiantShip.h"
#include "SkillComponent.h"
void BuccaneerValiantShip::OnStartup(Entity* self) {
2022-07-28 13:39:57 +00:00
self->AddCallbackTimer(1.0F, [self]() {
auto* skillComponent = self->GetComponent<SkillComponent>();
auto* owner = self->GetOwner();
2022-07-28 13:39:57 +00:00
if (skillComponent != nullptr && owner != nullptr) {
skillComponent->CalculateBehavior(982, 20577, LWOOBJID_EMPTY, true, false, owner->GetObjectID());
2022-07-28 13:39:57 +00:00
// Kill self if missed
self->AddCallbackTimer(1.1F, [self]() {
self->Kill();
});
}
});
}