mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-23 05:57:20 +00:00
Removed test script
This commit is contained in:
parent
e5467379e1
commit
7a7bdba3e1
@ -1,72 +0,0 @@
|
||||
#include "DukeDialogueGlowingBrick.h"
|
||||
|
||||
#include "eMissionState.h"
|
||||
|
||||
#include "Recorder.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "InventoryComponent.h"
|
||||
|
||||
void DukeDialogueGlowingBrick::OnStartup(Entity* self) {
|
||||
Game::logger->Log("DukeDialogueGlowingBrick", "OnStartup");
|
||||
}
|
||||
|
||||
void DukeDialogueGlowingBrick::OnTimerDone(Entity* self, std::string timerName) {
|
||||
}
|
||||
|
||||
void DukeDialogueGlowingBrick::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) {
|
||||
if (missionID != 201453) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (missionState != eMissionState::AVAILABLE) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto* recorder = Cinema::Recording::Recorder::LoadFromFile("DukeGlowing.xml");
|
||||
|
||||
if (recorder == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto* actor = recorder->ActFor(self, target);
|
||||
|
||||
if (actor == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto targetID = target->GetObjectID();
|
||||
const auto actorID = actor->GetObjectID();
|
||||
|
||||
self->AddCallbackTimer(3.0f, [targetID] () {
|
||||
auto* target = Game::entityManager->GetEntity(targetID);
|
||||
|
||||
if (target == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto* missionComponent = target->GetComponent<MissionComponent>();
|
||||
|
||||
if (missionComponent == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
missionComponent->CompleteMission(201453);
|
||||
});
|
||||
|
||||
self->AddCallbackTimer(recorder->GetDuration() + 10.0f, [recorder, self, actorID, targetID] () {
|
||||
auto* target = Game::entityManager->GetEntity(targetID);
|
||||
auto* actor = Game::entityManager->GetEntity(actorID);
|
||||
|
||||
if (target == nullptr || actor == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
recorder->StopActingFor(actor, self, targetID);
|
||||
|
||||
delete recorder;
|
||||
});
|
||||
}
|
||||
|
||||
void DukeDialogueGlowingBrick::OnRespondToMission(Entity* self, int missionID, Entity* player, int reward) {
|
||||
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
|
||||
class DukeDialogueGlowingBrick : public CppScripts::Script
|
||||
{
|
||||
public:
|
||||
void OnStartup(Entity* self) override;
|
||||
void OnTimerDone(Entity* self, std::string timerName) override;
|
||||
void OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) override;
|
||||
void OnRespondToMission(Entity* self, int missionID, Entity* player, int reward) override;
|
||||
};
|
@ -212,7 +212,6 @@
|
||||
|
||||
// DLU Scripts
|
||||
#include "DLUVanityNPC.h"
|
||||
#include "DukeDialogueGlowingBrick.h"
|
||||
|
||||
// AM Scripts
|
||||
#include "AmConsoleTeleportServer.h"
|
||||
@ -820,8 +819,6 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr
|
||||
//DLU:
|
||||
else if (scriptName == "scripts\\02_server\\DLU\\DLUVanityNPC.lua")
|
||||
script = new DLUVanityNPC();
|
||||
else if (scriptName == "scripts\\02_server\\DLU\\DukeGlowing.lua")
|
||||
script = new DukeDialogueGlowingBrick();
|
||||
|
||||
// Survival minigame
|
||||
else if (scriptName == "scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_STROMBIE.lua")
|
||||
|
Loading…
Reference in New Issue
Block a user