mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-11-23 15:11:19 +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:
44
dScripts/02_server/Map/njhub/Lieutenant.cpp
Normal file
44
dScripts/02_server/Map/njhub/Lieutenant.cpp
Normal file
@@ -0,0 +1,44 @@
|
||||
#include "Lieutenant.h"
|
||||
#include "SkillComponent.h"
|
||||
#include "dZoneManager.h"
|
||||
|
||||
void Lieutenant::OnStartup(Entity* self) {
|
||||
auto* skillComponent = self->GetComponent<SkillComponent>();
|
||||
|
||||
if (skillComponent == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
skillComponent->CalculateBehavior(1127, 24812, self->GetObjectID(), true);
|
||||
}
|
||||
|
||||
void Lieutenant::OnDie(Entity* self, Entity* killer) {
|
||||
const auto myLOT = self->GetLOT();
|
||||
|
||||
std::string spawnerName;
|
||||
|
||||
switch (myLOT) {
|
||||
case 16047:
|
||||
spawnerName = "EarthShrine_ERail";
|
||||
break;
|
||||
case 16050:
|
||||
spawnerName = "IceShrine_QBBouncer";
|
||||
break;
|
||||
case 16049:
|
||||
spawnerName = "LightningShrine_LRail";
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
const auto spawners = dZoneManager::Instance()->GetSpawnersByName(spawnerName);
|
||||
|
||||
if (spawners.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto* spawner : spawners) {
|
||||
spawner->Reset();
|
||||
spawner->Activate();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user