2022-09-02 02:44:26 +00:00
|
|
|
#include "AgQbWall.h"
|
|
|
|
|
2023-12-29 04:24:30 +00:00
|
|
|
void AgQbWall::OnQuickBuildComplete(Entity* self, Entity* player) {
|
2022-09-02 02:44:26 +00:00
|
|
|
self->SetVar(u"player", player->GetObjectID());
|
|
|
|
auto targetWallSpawners = GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(u"spawner"));
|
|
|
|
if (targetWallSpawners != "") {
|
2023-07-15 20:56:33 +00:00
|
|
|
auto groupObjs = Game::entityManager->GetEntitiesInGroup(targetWallSpawners);
|
2022-09-02 02:44:26 +00:00
|
|
|
for (auto* obj : groupObjs) {
|
|
|
|
if (obj) {
|
|
|
|
obj->SetVar(u"player", player->GetObjectID());
|
|
|
|
obj->OnFireEventServerSide(self, "spawnMobs");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|