mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
.github
cmake
dAuthServer
dChatFilter
dChatServer
dCommon
dDatabase
dGame
dMasterServer
dNavigation
dNet
dPhysics
dScripts
02_server
DLU
Enemy
Equipment
Map
AG
AG_Spider_Queen
AM
FV
GF
General
Ninjago
BankInteractServer.cpp
BankInteractServer.h
BaseInteractDropLootServer.cpp
BaseInteractDropLootServer.h
Binoculars.cpp
Binoculars.h
CMakeLists.txt
ExplodingAsset.cpp
ExplodingAsset.h
ForceVolumeServer.cpp
ForceVolumeServer.h
FrictionVolumeServer.cpp
FrictionVolumeServer.h
GrowingFlower.cpp
GrowingFlower.h
ImaginationBackpackHealServer.cpp
ImaginationBackpackHealServer.h
MailBoxServer.cpp
MailBoxServer.h
NTNaomiDirtServer.cpp
NTNaomiDirtServer.h
NjRailSwitch.cpp
NjRailSwitch.h
PetDigServer.cpp
PetDigServer.h
PropertyDevice.cpp
PropertyDevice.h
PropertyPlatform.cpp
PropertyPlatform.h
QbEnemyStunner.cpp
QbEnemyStunner.h
QbSpawner.cpp
QbSpawner.h
StoryBoxInteractServer.cpp
StoryBoxInteractServer.h
TokenConsoleServer.cpp
TokenConsoleServer.h
TouchMissionUpdateServer.cpp
TouchMissionUpdateServer.h
VisToggleNotifierServer.cpp
VisToggleNotifierServer.h
WishingWellServer.cpp
WishingWellServer.h
NS
NT
PR
Property
SS
VE
njhub
CMakeLists.txt
Minigame
Objects
Pets
CMakeLists.txt
EquipmentScripts
EquipmentTriggers
ai
client
zone
ActivityManager.cpp
ActivityManager.h
BaseConsoleTeleportServer.cpp
BaseConsoleTeleportServer.h
BasePropertyServer.cpp
BasePropertyServer.h
BaseRandomServer.cpp
BaseRandomServer.h
BaseSurvivalServer.cpp
BaseSurvivalServer.h
BaseWavesGenericEnemy.cpp
BaseWavesGenericEnemy.h
BaseWavesServer.cpp
BaseWavesServer.h
CMakeLists.txt
ChooseYourDestinationNsToNt.cpp
ChooseYourDestinationNsToNt.h
CppScripts.cpp
CppScripts.h
Darkitect.cpp
Darkitect.h
InvalidScript.cpp
InvalidScript.h
NPCAddRemoveItem.cpp
NPCAddRemoveItem.h
NtFactionSpyServer.cpp
NtFactionSpyServer.h
ScriptedPowerupSpawner.cpp
ScriptedPowerupSpawner.h
SpawnPetBaseServer.cpp
SpawnPetBaseServer.h
dServer
dWorldServer
dZoneManager
docs
migrations
resources
tests
thirdparty
vanity
.dockerignore
.editorconfig
.env.example
.git-blame-ignore-revs
.gitattributes
.gitignore
.gitmodules
CMakeLists.txt
CMakePresets.json
CMakeVariables.txt
CONTRIBUTING.md
Dockerfile
LICENSE
README.md
SECURITY.md
build.sh
docker-compose.yml
entrypoint.sh
logo.png
systemd.example
versions.txt

* Organize dScripts whitespace Remove parent scope Remove parent scope from initial setter Remove debug Remove helper programs * Fix NtImagimeterVisibility script Co-authored-by: aronwk-aaron <aronwk.aaron@gmail.com>
31 lines
1.2 KiB
C++
31 lines
1.2 KiB
C++
#pragma once
|
|
#include "CppScripts.h"
|
|
|
|
struct DigInfo {
|
|
LOT digLot; // The lot of the chest
|
|
LOT spawnLot; // Option lot of pet to spawn
|
|
int32_t requiredMission; // Optional mission required before pet can be spawned, if < 0 == don't use
|
|
bool specificPet; // This treasure requires a specific pet to be dug up
|
|
bool xBuild; // This treasure is retrieved from a buildable cross
|
|
bool bouncer; // This treasure spawns a bouncer
|
|
bool builderOnly; // Only the builder of this diggable may access the rewards, for example with crosses
|
|
};
|
|
|
|
class PetDigServer : public CppScripts::Script
|
|
{
|
|
public:
|
|
void OnStartup(Entity* self) override;
|
|
void OnDie(Entity* self, Entity* killer) override;
|
|
|
|
static Entity* GetClosestTresure(NiPoint3 position);
|
|
|
|
private:
|
|
static void ProgressPetDigMissions(const Entity* owner, const Entity* chest);
|
|
static void SpawnPet(Entity* self, const Entity* owner, DigInfo digInfo);
|
|
static void HandleXBuildDig(const Entity* self, Entity* owner, Entity* pet);
|
|
static void HandleBouncerDig(const Entity* self, const Entity* owner);
|
|
static std::vector<LWOOBJID> treasures;
|
|
static const DigInfo defaultDigInfo;
|
|
static const std::map<LOT, DigInfo> digInfoMap;
|
|
};
|