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

36
dScripts/GfJailWalls.cpp Normal file
View File

@@ -0,0 +1,36 @@
#include "GfJailWalls.h"
#include "EntityManager.h"
#include "dZoneManager.h"
#include "GeneralUtils.h"
void GfJailWalls::OnRebuildComplete(Entity* self, Entity* target)
{
const auto wall = GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(u"Wall"));
for (auto* spawner : dZoneManager::Instance()->GetSpawnersByName("Jail0" + wall))
{
spawner->Deactivate();
}
for (auto* spawner : dZoneManager::Instance()->GetSpawnersByName("JailCaptain0" + wall))
{
spawner->Deactivate();
}
}
void GfJailWalls::OnRebuildNotifyState(Entity* self, eRebuildState state)
{
if (state != eRebuildState::REBUILD_RESETTING) return;
const auto wall = GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(u"Wall"));
for (auto* spawner : dZoneManager::Instance()->GetSpawnersByName("Jail0" + wall))
{
spawner->Activate();
}
for (auto* spawner : dZoneManager::Instance()->GetSpawnersByName("JailCaptain0" + wall))
{
spawner->Activate();
}
}