DarkflameServer/dScripts/ai/AG/AgQbWall.cpp
Aaron Kimbrell 15954413ae
chore: rename rebuild to quickbuild (#1364)
* rename rebuild to quickbuild

* fix includes
2023-12-28 22:24:30 -06:00

16 lines
511 B
C++

#include "AgQbWall.h"
void AgQbWall::OnQuickBuildComplete(Entity* self, Entity* player) {
self->SetVar(u"player", player->GetObjectID());
auto targetWallSpawners = GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(u"spawner"));
if (targetWallSpawners != "") {
auto groupObjs = Game::entityManager->GetEntitiesInGroup(targetWallSpawners);
for (auto* obj : groupObjs) {
if (obj) {
obj->SetVar(u"player", player->GetObjectID());
obj->OnFireEventServerSide(self, "spawnMobs");
}
}
}
}