mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
Organize dScripts (#814)
* Organize dScripts whitespace Remove parent scope Remove parent scope from initial setter Remove debug Remove helper programs * Fix NtImagimeterVisibility script Co-authored-by: aronwk-aaron <aronwk.aaron@gmail.com>
This commit is contained in:
22
dScripts/02_server/Enemy/General/GfApeSmashingQB.cpp
Normal file
22
dScripts/02_server/Enemy/General/GfApeSmashingQB.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "GfApeSmashingQB.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
|
||||
void GfApeSmashingQB::OnStartup(Entity* self) {
|
||||
self->SetNetworkVar<LWOOBJID>(u"lootTagOwner", self->GetVar<LWOOBJID>(u"lootTagOwner"));
|
||||
}
|
||||
|
||||
void GfApeSmashingQB::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "anchorBreakTime") {
|
||||
self->Smash();
|
||||
}
|
||||
}
|
||||
|
||||
void GfApeSmashingQB::OnRebuildComplete(Entity* self, Entity* target) {
|
||||
auto* ape = EntityManager::Instance()->GetEntity(self->GetVar<LWOOBJID>(u"ape"));
|
||||
if (ape != nullptr) {
|
||||
ape->OnFireEventServerSide(target, "rebuildDone");
|
||||
GameMessages::SendPlayAnimation(self, u"smash", 1.7f);
|
||||
self->AddTimer("anchorBreakTime", 1.0f);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user