mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-17 12:14:21 +00:00
feat: implement a bunch of basic scripts that don't really do anything (#1999)
* feat: implement a bunch of basic scripts that don't really do anything None of these do anything noticeable or break anything * fixes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
set(DSCRIPTS_SOURCES_02_SERVER_DLU
|
||||
"DLUVanityTeleportingObject.cpp"
|
||||
"RegisterWithZoneControl.cpp"
|
||||
PARENT_SCOPE)
|
||||
|
||||
12
dScripts/02_server/DLU/RegisterWithZoneControl.cpp
Normal file
12
dScripts/02_server/DLU/RegisterWithZoneControl.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "RegisterWithZoneControl.h"
|
||||
|
||||
#include "Entity.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
|
||||
void RegisterWithZoneControl::OnStartup(Entity* self) {
|
||||
GameMessages::ObjectLoaded objLoaded;
|
||||
objLoaded.objectID = self->GetObjectID();
|
||||
objLoaded.lot = self->GetLOT();
|
||||
objLoaded.Send(Game::entityManager->GetZoneControlEntity()->GetObjectID());
|
||||
}
|
||||
14
dScripts/02_server/DLU/RegisterWithZoneControl.h
Normal file
14
dScripts/02_server/DLU/RegisterWithZoneControl.h
Normal file
@@ -0,0 +1,14 @@
|
||||
// Darkflame Universe
|
||||
// Copyright 2026
|
||||
|
||||
#ifndef REGISTERWITHZONECONTROL_H
|
||||
#define REGISTERWITHZONECONTROL_H
|
||||
|
||||
#include "CppScripts.h"
|
||||
|
||||
class RegisterWithZoneControl : public CppScripts::Script {
|
||||
public:
|
||||
void OnStartup(Entity* self) override;
|
||||
};
|
||||
|
||||
#endif //!REGISTERWITHZONECONTROL_H
|
||||
@@ -13,7 +13,6 @@ void ResetMissions(Entity& user) {
|
||||
}
|
||||
|
||||
void OldManNPC::OnUse(Entity* self, Entity* user) {
|
||||
LOG("");
|
||||
const auto* const missionComponent = user->GetComponent<MissionComponent>();
|
||||
if (!missionComponent) return;
|
||||
|
||||
@@ -24,7 +23,6 @@ void OldManNPC::OnUse(Entity* self, Entity* user) {
|
||||
}
|
||||
|
||||
const auto missionState = mission->GetMissionState();
|
||||
LOG("mission state %i", missionState);
|
||||
if (missionState == eMissionState::AVAILABLE || missionState == eMissionState::COMPLETE_AVAILABLE) {
|
||||
ResetMissions(*user);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user