DarkflameServer/dScripts/BuccaneerValiantShip.cpp
Wincent Holm c8177563e9 Fix non-standard lambda.
When this commit is applied it fixes use of non-standard lambda.
2021-12-19 14:47:03 +01:00

20 lines
616 B
C++

#include "BuccaneerValiantShip.h"
#include "SkillComponent.h"
#include "dLogger.h"
void BuccaneerValiantShip::OnStartup(Entity* self) {
self->AddCallbackTimer(1.0F, [self]() {
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();
});
}
});
}