mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 17:58:20 +00:00
Add imagimeter visibility script (#738)
This commit is contained in:
parent
dd8091f60e
commit
e4a15a0f2e
@ -628,6 +628,7 @@ enum ePlayerFlags {
|
||||
GF_BINOC_IN_CROC_AREA = 1308,
|
||||
GF_BINOC_IN_JAIL_AREA = 1309,
|
||||
GF_BINOC_TELESCOPE_NEXT_TO_CAPTAIN_JACK = 1310,
|
||||
NT_PLINTH_REBUILD = 1919,
|
||||
NT_FACTION_SPY_DUKE = 1974,
|
||||
NT_FACTION_SPY_OVERBUILD = 1976,
|
||||
NT_FACTION_SPY_HAEL = 1977,
|
||||
|
@ -177,6 +177,7 @@ set(DSCRIPT_SOURCES "ActivityManager.cpp"
|
||||
"NtFactionSpyServer.cpp"
|
||||
"NtHaelServer.cpp"
|
||||
"NtImagBeamBuffer.cpp"
|
||||
"NtImagimeterVisibility.cpp"
|
||||
"NtOverbuildServer.cpp"
|
||||
"NtParadoxPanelServer.cpp"
|
||||
"NtParadoxTeleServer.cpp"
|
||||
|
@ -201,6 +201,7 @@
|
||||
#include "ForceVolumeServer.h"
|
||||
#include "NtXRayServer.h"
|
||||
#include "NtSleepingGuard.h"
|
||||
#include "NtImagimeterVisibility.h"
|
||||
|
||||
// DLU Scripts
|
||||
#include "DLUVanityNPC.h"
|
||||
@ -661,6 +662,9 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr
|
||||
script = new NtXRayServer();
|
||||
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_SLEEPING_GUARD.lua")
|
||||
script = new NtSleepingGuard();
|
||||
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_IMAGIMETER_VISIBILITY_SERVER.lua") {
|
||||
script = new NTImagimeterVisibility();
|
||||
}
|
||||
|
||||
//AM:
|
||||
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_AM_CONSOLE_TELEPORT_SERVER.lua")
|
||||
|
11
dScripts/NtImagimeterVisibility.cpp
Normal file
11
dScripts/NtImagimeterVisibility.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include "NtImagimeterVisibility.h"
|
||||
#include "GameMessages.h"
|
||||
#include "Entity.h"
|
||||
#include "Character.h"
|
||||
|
||||
void NTImagimeterVisibility::OnRebuildComplete(Entity* self, Entity* target) {
|
||||
auto* character = target->GetCharacter();
|
||||
if (character) character->SetPlayerFlag(ePlayerFlags::NT_PLINTH_REBUILD, true);
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"PlinthBuilt", 0, 0, LWOOBJID_EMPTY, "", target->GetSystemAddress());
|
||||
}
|
7
dScripts/NtImagimeterVisibility.h
Normal file
7
dScripts/NtImagimeterVisibility.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
|
||||
class NTImagimeterVisibility : public CppScripts::Script {
|
||||
public:
|
||||
void OnRebuildComplete(Entity* self, Entity* target) override;
|
||||
};
|
Loading…
Reference in New Issue
Block a user