mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-23 05:57:20 +00:00
15954413ae
* rename rebuild to quickbuild * fix includes
16 lines
511 B
C++
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");
|
|
}
|
|
}
|
|
}
|
|
}
|