mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-04-27 17:16:31 +00:00
parent
bc132487e9
commit
500b7885e2
@ -195,6 +195,7 @@ set(DSCRIPT_SOURCES "ActivityManager.cpp"
|
||||
"PetDigServer.cpp"
|
||||
"PetFromDigServer.cpp"
|
||||
"PetFromObjectServer.cpp"
|
||||
"PirateRep.cpp"
|
||||
"PropertyBankInteract.cpp"
|
||||
"PropertyDeathPlane.cpp"
|
||||
"PropertyDevice.cpp"
|
||||
|
@ -118,6 +118,7 @@
|
||||
#include "ZoneGfProperty.h"
|
||||
#include "GfArchway.h"
|
||||
#include "GfMaelstromGeyser.h"
|
||||
#include "PirateRep.h"
|
||||
|
||||
// SG Scripts
|
||||
#include "SGCannon.h"
|
||||
@ -501,6 +502,8 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr
|
||||
script = new GfArchway();
|
||||
else if (scriptName == "scripts\\ai\\GF\\L_GF_MAELSTROM_GEYSER.lua")
|
||||
script = new GfMaelstromGeyser();
|
||||
else if (scriptName == "scripts\\ai\\GF\\L_PIRATE_REP.lua")
|
||||
script = new PirateRep();
|
||||
|
||||
// SG
|
||||
else if (scriptName == "scripts\\ai\\MINIGAME\\SG_GF\\SERVER\\SG_CANNON.lua")
|
||||
|
11
dScripts/PirateRep.cpp
Normal file
11
dScripts/PirateRep.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include "PirateRep.h"
|
||||
#include "Character.h"
|
||||
|
||||
void PirateRep::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState) {
|
||||
if (missionID == m_PirateRepMissionID && missionState >= MissionState::MISSION_STATE_READY_TO_COMPLETE) {
|
||||
auto* character = target->GetCharacter();
|
||||
if (character) {
|
||||
character->SetPlayerFlag(ePlayerFlags::GF_PIRATE_REP, true);
|
||||
}
|
||||
}
|
||||
}
|
9
dScripts/PirateRep.h
Normal file
9
dScripts/PirateRep.h
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
|
||||
class PirateRep : public CppScripts::Script {
|
||||
public:
|
||||
void OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState) override;
|
||||
private:
|
||||
const int m_PirateRepMissionID = 301;
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user