Public release of the DLU server code!

Have fun!
This commit is contained in:
Unknown
2021-12-05 18:54:36 +01:00
parent 5f7270e4ad
commit 0545adfac3
1146 changed files with 368646 additions and 1 deletions

50
dScripts/Lieutenant.cpp Normal file
View File

@@ -0,0 +1,50 @@
#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();
}
}