2021-12-11 10:59:29 +00:00
|
|
|
#include "BuccaneerValiantShip.h"
|
|
|
|
#include "SkillComponent.h"
|
|
|
|
|
|
|
|
void BuccaneerValiantShip::OnStartup(Entity* self) {
|
2021-12-19 13:47:03 +00:00
|
|
|
self->AddCallbackTimer(1.0F, [self]() {
|
2023-06-09 08:27:05 +00:00
|
|
|
auto* skillComponent = self->GetComponent<SkillComponent>();
|
2021-12-11 10:59:29 +00:00
|
|
|
auto* owner = self->GetOwner();
|
|
|
|
|
|
|
|
if (skillComponent != nullptr && owner != nullptr) {
|
2021-12-19 13:47:03 +00:00
|
|
|
skillComponent->CalculateBehavior(982, 20577, LWOOBJID_EMPTY, true, false, owner->GetObjectID());
|
2021-12-11 10:59:29 +00:00
|
|
|
|
|
|
|
// Kill self if missed
|
2021-12-19 13:47:03 +00:00
|
|
|
self->AddCallbackTimer(1.1F, [self]() {
|
2021-12-11 10:59:29 +00:00
|
|
|
self->Kill();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|