DarkflameServer/dScripts/EquipmentScripts/BuccaneerValiantShip.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
518 B
C++
Raw Normal View History

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