mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 05:27:19 +00:00
15954413ae
* rename rebuild to quickbuild * fix includes
31 lines
926 B
C++
31 lines
926 B
C++
#include "GfJailWalls.h"
|
|
#include "dZoneManager.h"
|
|
#include "GeneralUtils.h"
|
|
#include "eQuickBuildState.h"
|
|
|
|
void GfJailWalls::OnQuickBuildComplete(Entity* self, Entity* target) {
|
|
const auto wall = GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(u"Wall"));
|
|
|
|
for (auto* spawner : Game::zoneManager->GetSpawnersByName("Jail0" + wall)) {
|
|
spawner->Deactivate();
|
|
}
|
|
|
|
for (auto* spawner : Game::zoneManager->GetSpawnersByName("JailCaptain0" + wall)) {
|
|
spawner->Deactivate();
|
|
}
|
|
}
|
|
|
|
void GfJailWalls::OnQuickBuildNotifyState(Entity* self, eQuickBuildState state) {
|
|
if (state != eQuickBuildState::RESETTING) return;
|
|
|
|
const auto wall = GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(u"Wall"));
|
|
|
|
for (auto* spawner : Game::zoneManager->GetSpawnersByName("Jail0" + wall)) {
|
|
spawner->Activate();
|
|
}
|
|
|
|
for (auto* spawner : Game::zoneManager->GetSpawnersByName("JailCaptain0" + wall)) {
|
|
spawner->Activate();
|
|
}
|
|
}
|