DarkflameServer/dScripts/BasePropertyServer.h

118 lines
5.2 KiB
C
Raw Permalink Normal View History

#pragma once
#include "CppScripts.h"
class BasePropertyServer : public CppScripts::Script {
public:
2022-07-28 13:39:57 +00:00
virtual void SetGameVariables(Entity* self);
virtual void CheckForOwner(Entity* self);
virtual void PropGuardCheck(Entity* self, Entity* player);
2022-07-28 13:39:57 +00:00
void OnStartup(Entity* self) override;
void OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2,
int32_t param3) override;
void OnPlayerLoaded(Entity* self, Entity* player) override { BasePlayerLoaded(self, player); };
void OnPlayerExit(Entity* self, Entity* player) override { BasePlayerExit(self, player); };
void OnZonePropertyModelPlaced(Entity* self, Entity* player) override { BaseZonePropertyModelPlaced(self, player); }
void OnZonePropertyRented(Entity* self, Entity* renter) override { BaseZonePropertyRented(self, renter); };
void OnTimerDone(Entity* self, std::string timerName) override { BaseTimerDone(self, timerName); };
virtual void BasePlayerLoaded(Entity* self, Entity* player);
virtual void BaseZonePropertyRented(Entity* self, Entity* player) const;
virtual void BaseZonePropertyModelPlaced(Entity* self, Entity* player) const;
2022-07-28 13:39:57 +00:00
virtual void BasePlayerExit(Entity* self, Entity* player);
virtual void BaseTimerDone(Entity* self, const std::string& timerName);
void KillClouds(Entity* self);
virtual void SpawnSpots(Entity* self);
virtual void KillSpots(Entity* self);
virtual void StartMaelstrom(Entity* self, Entity* player);
virtual void StartTornadoFx(Entity* self) const;
virtual void KillGuard(Entity* self);
static void RequestDie(Entity* self, Entity* other);
void DeactivateSpawner(const std::string& spawnerName);
static void ResetSpawner(const std::string& spawnerName);
static void DestroySpawner(const std::string& spawnerName);
static void ActivateSpawner(const std::string& spawnerName);
static void TriggerSpawner(const std::string& spawnerNamstatic);
static LWOOBJID GetOwner();
protected:
2022-07-28 13:39:57 +00:00
void HandleOrbsTimer(Entity* self);
void HandleGeneratorTimer(Entity* self);
void HandleQuickBuildTimer(Entity* self);
2022-07-28 13:39:57 +00:00
// GUIDs
std::string GUIDMaelstrom = "{7881e0a1-ef6d-420c-8040-f59994aa3357}";
std::string GUIDPeaceful = "{c5725665-58d0-465f-9e11-aeb1d21842ba}";
2022-07-28 13:39:57 +00:00
// Groups
std::u16string PropertyPlaqueGroup = u"PropertyPlaqueGroup";
std::u16string PropertyVendorGroup = u"PropertyVendorGroup";
std::u16string PropertyBorderGroup = u"PropertyBorderGroup";
std::u16string SpotsGroup = u"SpotsGroup";
std::u16string MSCloudsGroup = u"MSCloudsGroup";
std::u16string GeneratorFXGroup = u"GeneratorFXGroup";
std::u16string GeneratorGroup = u"GeneratorGroup";
std::u16string ImagOrbGroup = u"ImagOrbGroup";
std::u16string FXManagerGroup = u"FXManagerGroup";
std::u16string ClaimMarkerGroup = u"ClaimMarkerGroup";
std::u16string GuardGroup = u"GuardGroup";
std::u16string EnemiesGroup = u"EnemiesGroup";
2022-07-28 13:39:57 +00:00
// Spawners
std::u16string EnemiesSpawner = u"EnemiesSpawner";
std::u16string PropObjsSpawner = u"PropObjsSpawner";
std::u16string PropertyMGSpawner = u"PropertyMGSpawner";
std::u16string DamageFXSpawner = u"DamageFXSpawner";
std::u16string FXSpotsSpawner = u"FXSpotsSpawner";
std::u16string GeneratorSpawner = u"GeneratorSpawner";
std::u16string GeneratorFXSpawner = u"GeneratorFXSpawner";
std::u16string FXManagerSpawner = u"FXManagerSpawner";
std::u16string ImageOrbSpawner = u"ImageOrbSpawner";
std::u16string AmbientFXSpawner = u"AmbientFXSpawners";
std::u16string SmashablesSpawner = u"SmashablesSpawner";
std::u16string ClaimMarkerSpawner = u"ClaimMarkerSpawner";
std::u16string BehaviorObjsSpawner = u"BehaviorObjsSpawner";
2022-07-28 13:39:57 +00:00
//Flags / constants
std::u16string guardFirstMissionFlag = u"guardFirstMissionFlag";
std::u16string guardMissionFlag = u"guardMissionFlag";
std::u16string brickLinkMissionIDFlag = u"brickLinkMissionIDFlag";
std::u16string placedModelFlag = u"placedModelFlag";
std::u16string generatorIdFlag = u"generatorIdFlag";
std::u16string defeatedProperyFlag = u"defeatedProperyFlag";
std::u16string passwordFlag = u"passwordFlag";
std::u16string orbIDFlag = u"orbIDFlag";
std::u16string behaviorQBID = u"behaviorQBID";
2022-07-28 13:39:57 +00:00
// Variables
std::u16string PlayerIDVariable = u"playerID";
std::u16string CollidedVariable = u"collided";
std::u16string PropertyOwnerVariable = u"PropertyOwner";
std::u16string PropertyOwnerIDVariable = u"PropertyOwnerID";
std::u16string FXObjectsGoneVariable = u"FXObjectGone";
std::u16string RenterVariable = u"renter";
std::u16string UnclaimedVariable = u"unclaimed";
2022-07-28 13:39:57 +00:00
// Events
std::string CheckForPropertyOwnerEvent = "CheckForPropertyOwner";
2022-07-28 13:39:57 +00:00
// Timers
std::string StartGeneratorTimer = "startGenerator";
std::string StartOrbTimer = "startOrb";
std::string StartQuickbuildTimer = "startQuickbuild";
std::string TornadoOffTimer = "tornadoOff";
std::string KillMarkerTimer = "killMarker";
std::string KillGuardTimer = "KillGuard";
std::string ShowClearEffectsTimer = "ShowClearEffects";
std::string TurnSkyOffTimer = "turnSkyOff";
std::string KillStrombiesTimer = "killStrombies";
std::string KillFXObjectTimer = "killFXObject";
std::string ShowVendorTimer = "ShowVendor";
std::string BoundsVisOnTimer = "BoundsVisOn";
std::string RunPlayerLoadedAgainTimer = "runPlayerLoadedAgain";
std::string PollTornadoFXTimer = "pollTornadoFX";
};