mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-14 20:28:21 +00:00
16 lines
420 B
C++
16 lines
420 B
C++
|
#include "NTPipeVisibilityServer.h"
|
||
|
#include "Entity.h"
|
||
|
#include "Character.h"
|
||
|
|
||
|
void NTPipeVisibilityServer::OnRebuildComplete(Entity* self, Entity* target) {
|
||
|
const auto flag = self->GetVar<int32_t>(u"flag");
|
||
|
if (flag == 0) return;
|
||
|
|
||
|
auto* character = target->GetCharacter();
|
||
|
if (!character) return;
|
||
|
|
||
|
character->SetPlayerFlag(flag, true);
|
||
|
|
||
|
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"PipeBuilt");
|
||
|
}
|