From 8cdb3889153142bddb9f6bdbf52b020c70f36af0 Mon Sep 17 00:00:00 2001 From: David Markowitz <39972741+EmosewaMC@users.noreply.github.com> Date: Mon, 4 Jul 2022 23:00:10 -0700 Subject: [PATCH] Optimize scripts for faster compilation (#597) * Implement Precompiled Headers * First volume of optimizations * Scripts A-B Gonna be doing this in alphabetical order now. * C Scripts and remove unneeded includes from base cppscripts header Remove the MissionComponent and Loot includes from all base scripts and place their needed includes in the respective scripts. * D scripts * F scripts * F scripts 2 Finish up removing extraneous includes from scripts that start with the letter F * G scripts Removing extraneous includes from scripts that start with the letter G * I scripts Removing extraneous includes from scripts that start with the letter I * M-Z scripts Removing extraneous includes from scripts that start with the letter M-Z * Revert "Implement Precompiled Headers" This reverts commit d79d8d499135207e5510184628f4f59f4002e1a5. * Revert "Revert "Implement Precompiled Headers"" This reverts commit 0597faf308fb405f424c6e545b9ed70765e3c797. * Add back in PCH Add back in PCH * Fix CMake Whitespace Remove duplicate file glob Remove newline --- .../dComponents/PropertyManagementComponent.cpp | 1 + dGame/dComponents/RebuildComponent.cpp | 2 ++ dGame/dMission/MissionState.h | 5 +++++ dGame/dUtilities/VanityUtilities.cpp | 2 ++ dScripts/ActNinjaTurret.cpp | 8 -------- dScripts/ActSharkPlayerDeathTrigger.cpp | 17 +++++------------ dScripts/ActSharkPlayerDeathTrigger.h | 3 +-- dScripts/ActivityManager.cpp | 1 + dScripts/AgBugsprayer.cpp | 1 - dScripts/AgBusDoor.cpp | 2 -- dScripts/AgCagedBricksServer.cpp | 6 +++++- dScripts/AgFans.cpp | 3 +++ dScripts/AgFans.h | 3 --- dScripts/AgImagSmashable.h | 1 - dScripts/AgJetEffectServer.cpp | 8 -------- dScripts/AgJetEffectServer.h | 4 ---- dScripts/AgLaserSensorServer.cpp | 4 ++++ dScripts/AgLaserSensorServer.h | 6 ++---- dScripts/AgMonumentBirds.cpp | 1 - dScripts/AgPropGuard.cpp | 2 +- dScripts/AgSalutingNpcs.cpp | 1 - dScripts/AgShipPlayerDeathTrigger.cpp | 4 ---- dScripts/AgSpaceStuff.cpp | 2 -- dScripts/AgSurvivalBuffStation.cpp | 1 - dScripts/AgSurvivalSpiderling.cpp | 1 - dScripts/AgTurret.cpp | 2 -- dScripts/AllCrateChicken.cpp | 2 -- dScripts/AmConsoleTeleportServer.cpp | 3 ++- dScripts/AmConsoleTeleportServer.h | 2 -- dScripts/AmDarklingDragon.cpp | 5 ----- dScripts/AmDarklingMech.cpp | 1 - dScripts/AmDarklingMech.h | 3 --- dScripts/AmDrawBridge.cpp | 1 - dScripts/AmDropshipComputer.cpp | 1 - dScripts/AmShieldGenerator.cpp | 1 - dScripts/AmShieldGeneratorQuickbuild.cpp | 1 - dScripts/AmSkullkinDrill.cpp | 12 ------------ dScripts/AmSkullkinTower.cpp | 1 - dScripts/BaseConsoleTeleportServer.cpp | 2 -- dScripts/BaseEnemyMech.cpp | 4 ---- dScripts/BasePropertyServer.cpp | 7 +++---- dScripts/BasePropertyServer.h | 2 -- dScripts/BaseRandomServer.cpp | 4 ++-- dScripts/BaseRandomServer.h | 6 +++--- dScripts/BaseSurvivalServer.cpp | 2 ++ dScripts/BaseSurvivalServer.h | 1 - dScripts/BaseWavesServer.cpp | 2 ++ dScripts/BaseWavesServer.h | 1 - dScripts/BootyDigServer.cpp | 2 ++ dScripts/BossSpiderQueenEnemyServer.cpp | 7 +++++-- dScripts/BossSpiderQueenEnemyServer.h | 8 +++----- dScripts/BuccaneerValiantShip.cpp | 1 - dScripts/BurningTile.cpp | 2 -- dScripts/CatapultBaseServer.cpp | 2 -- dScripts/CatapultBaseServer.h | 3 --- dScripts/CatapultBouncerServer.cpp | 1 - dScripts/CatapultBouncerServer.h | 3 --- dScripts/CavePrisonCage.cpp | 2 +- dScripts/CavePrisonCage.h | 3 --- dScripts/ChooseYourDestinationNsToNt.cpp | 2 -- dScripts/ChooseYourDestinationNsToNt.h | 1 - dScripts/ClRing.cpp | 2 -- dScripts/CppScripts.cpp | 2 -- dScripts/CppScripts.h | 8 ++------ dScripts/DLUVanityNPC.cpp | 1 + dScripts/DLUVanityNPC.h | 2 +- dScripts/DamagingPets.h | 1 - dScripts/Darkitect.h | 1 - dScripts/EnemySpiderSpawner.cpp | 2 -- dScripts/ExplodingAsset.cpp | 2 +- dScripts/FallingTile.cpp | 1 - dScripts/FlameJetServer.cpp | 1 - dScripts/ForceVolumeServer.cpp | 8 +------- dScripts/FountainOfImagination.cpp | 2 ++ dScripts/FvBounceOverWall.cpp | 1 + dScripts/FvCandle.cpp | 1 + dScripts/FvCandle.h | 1 - dScripts/FvConsoleLeftQuickbuild.cpp | 3 --- dScripts/FvConsoleRightQuickbuild.cpp | 3 --- dScripts/FvFacilityBrick.cpp | 4 ---- dScripts/FvFong.cpp | 2 +- dScripts/FvFreeGfNinjas.cpp | 1 + dScripts/FvHorsemenTrigger.cpp | 5 ----- dScripts/FvMaelstromCavalry.cpp | 8 -------- dScripts/FvMaelstromCavalry.h | 1 - dScripts/FvMaelstromDragon.cpp | 1 - dScripts/FvMaelstromDragon.h | 1 - dScripts/FvPassThroughWall.cpp | 1 + dScripts/FvRaceSmashEggImagineServer.cpp | 3 ++- dScripts/GfBanana.cpp | 5 ----- dScripts/GfBananaCluster.cpp | 1 + dScripts/GfCampfire.cpp | 3 --- dScripts/GfJailWalls.cpp | 1 - dScripts/GfTikiTorch.cpp | 2 +- dScripts/ImaginationBackpackHealServer.cpp | 1 + dScripts/ImaginationShrineServer.cpp | 1 - dScripts/ImgBrickConsoleQB.cpp | 8 -------- dScripts/ImgBrickConsoleQB.h | 1 - ...tanceExitTransferPlayerToLastNonInstance.cpp | 3 --- dScripts/LegoDieRoll.cpp | 3 +-- dScripts/MastTeleport.cpp | 1 - dScripts/MinigameTreasureChestServer.cpp | 3 +-- dScripts/MissionConsoleServer.cpp | 1 - dScripts/MissionConsoleServer.h | 6 ------ dScripts/MonCoreNookDoors.cpp | 2 -- dScripts/MonCoreSmashableDoors.cpp | 2 -- dScripts/NjEarthDragonPetServer.cpp | 1 + dScripts/NjEarthDragonPetServer.h | 1 - dScripts/NjJayMissionItems.h | 2 ++ dScripts/NjMonastryBossInstance.cpp | 5 ++--- dScripts/NjNPCMissionSpinjitzuServer.h | 1 + dScripts/NjNyaMissionitems.h | 2 ++ dScripts/NjPetSpawnerServer.cpp | 5 ----- dScripts/NjPetSpawnerServer.h | 6 ------ dScripts/NjhubLavaPlayerDeathTrigger.cpp | 1 + dScripts/NjhubLavaPlayerDeathTrigger.h | 1 - dScripts/NpcAgCourseStarter.cpp | 11 +---------- dScripts/NpcCowboyServer.cpp | 2 +- dScripts/NpcNjAssistantServer.cpp | 1 + dScripts/NpcNpSpacemanBob.cpp | 6 +----- dScripts/NpcWispServer.cpp | 2 -- dScripts/NsConcertChoiceBuildManager.cpp | 1 - dScripts/NsConcertInstrument.cpp | 1 + dScripts/NsConcertQuickBuild.cpp | 2 +- dScripts/NsJohnnyMissionServer.cpp | 1 + dScripts/NsLegoClubDoor.cpp | 3 +-- dScripts/NsLegoClubDoor.h | 1 - dScripts/NsLupTeleport.cpp | 3 +-- dScripts/NsLupTeleport.h | 1 - dScripts/NsModularBuild.cpp | 3 +-- dScripts/NsQbImaginationStatue.cpp | 3 --- dScripts/NsTokenConsoleServer.cpp | 1 - dScripts/NtAssemblyTubeServer.cpp | 6 +----- dScripts/NtCombatChallengeDummy.cpp | 1 - dScripts/NtCombatChallengeExplodingDummy.cpp | 1 - dScripts/NtCombatChallengeServer.cpp | 17 ----------------- dScripts/NtConsoleTeleportServer.cpp | 3 ++- dScripts/NtConsoleTeleportServer.h | 1 - dScripts/NtDirtCloudServer.cpp | 1 - dScripts/NtDukeServer.cpp | 1 + dScripts/NtFactionSpyServer.cpp | 1 + dScripts/NtHaelServer.cpp | 1 + dScripts/NtParadoxTeleServer.cpp | 6 +----- dScripts/NtSentinelWalkwayServer.cpp | 6 +----- dScripts/NtVentureCannonServer.cpp | 1 - dScripts/NtVentureSpeedPadServer.cpp | 1 - dScripts/NtXRayServer.cpp | 2 -- dScripts/PetDigBuild.cpp | 1 + dScripts/PetDigServer.cpp | 3 +-- dScripts/PrSeagullFly.cpp | 1 + dScripts/PrWhistle.cpp | 2 +- dScripts/PropertyDeathPlane.cpp | 4 ---- dScripts/PropertyDevice.cpp | 1 + dScripts/QbEnemyStunner.cpp | 2 -- dScripts/RaceImagineCrateServer.cpp | 2 +- dScripts/RaceImaginePowerup.cpp | 4 +--- dScripts/RaceMaelstromGeiser.cpp | 8 -------- dScripts/RaceSmashServer.cpp | 1 + dScripts/SGCannon.cpp | 2 +- dScripts/ScriptComponent.cpp | 1 - dScripts/ScriptComponent.h | 1 - dScripts/ScriptedPowerupSpawner.cpp | 1 - dScripts/SpawnGryphonServer.cpp | 1 + dScripts/SpawnLionServer.cpp | 1 + dScripts/SpawnSaberCatServer.cpp | 1 + dScripts/SpawnShrakeServer.cpp | 1 + dScripts/SpawnStegoServer.cpp | 1 + dScripts/SpecialImaginePowerupSpawner.cpp | 1 - dScripts/SsModularBuildServer.cpp | 3 +-- dScripts/StoryBoxInteractServer.cpp | 1 - dScripts/Sunflower.cpp | 1 + dScripts/TokenConsoleServer.cpp | 2 -- dScripts/TreasureChestDragonServer.cpp | 1 - dScripts/TriggerAmbush.cpp | 7 ------- dScripts/VeBricksampleServer.cpp | 1 + dScripts/WaveBossApe.cpp | 1 + dScripts/WaveBossHammerling.cpp | 1 + dScripts/WaveBossHorsemen.cpp | 1 + dScripts/WaveBossSpiderling.cpp | 1 + dScripts/WhFans.cpp | 3 +++ dScripts/WhFans.h | 4 ---- dScripts/WildAmbients.cpp | 2 -- dScripts/WishingWellServer.cpp | 2 -- dScripts/ZoneAgMedProperty.cpp | 2 +- dScripts/ZoneAgProperty.cpp | 4 +--- dScripts/ZoneAgProperty.h | 1 - dScripts/ZoneAgSpiderQueen.cpp | 2 -- dScripts/ZoneAgSurvival.h | 1 + dScripts/ZoneFvProperty.cpp | 1 + dScripts/ZoneGfProperty.cpp | 1 + dScripts/ZoneNsMedProperty.cpp | 1 + dScripts/ZoneNsProperty.cpp | 1 + 192 files changed, 135 insertions(+), 371 deletions(-) delete mode 100644 dScripts/MissionConsoleServer.cpp delete mode 100644 dScripts/MissionConsoleServer.h delete mode 100644 dScripts/NjPetSpawnerServer.cpp delete mode 100644 dScripts/NjPetSpawnerServer.h diff --git a/dGame/dComponents/PropertyManagementComponent.cpp b/dGame/dComponents/PropertyManagementComponent.cpp index 7faf9394..04e2f633 100644 --- a/dGame/dComponents/PropertyManagementComponent.cpp +++ b/dGame/dComponents/PropertyManagementComponent.cpp @@ -2,6 +2,7 @@ #include +#include "MissionComponent.h" #include "EntityManager.h" #include "PropertyDataMessage.h" #include "UserManager.h" diff --git a/dGame/dComponents/RebuildComponent.cpp b/dGame/dComponents/RebuildComponent.cpp index 5e313a7a..603a18cc 100644 --- a/dGame/dComponents/RebuildComponent.cpp +++ b/dGame/dComponents/RebuildComponent.cpp @@ -6,6 +6,8 @@ #include "Game.h" #include "dLogger.h" #include "CharacterComponent.h" +#include "MissionComponent.h" +#include "MissionTaskType.h" #include "dServer.h" #include "PacketUtils.h" diff --git a/dGame/dMission/MissionState.h b/dGame/dMission/MissionState.h index 161a4021..c189c708 100644 --- a/dGame/dMission/MissionState.h +++ b/dGame/dMission/MissionState.h @@ -1,5 +1,8 @@ #pragma once +#ifndef __MISSIONSTATE__H__ +#define __MISSIONSTATE__H__ + /** * Represents the possible states a mission can be in */ @@ -49,3 +52,5 @@ enum class MissionState : int { */ MISSION_STATE_COMPLETE_READY_TO_COMPLETE = 12 }; + +#endif //!__MISSIONSTATE__H__ diff --git a/dGame/dUtilities/VanityUtilities.cpp b/dGame/dUtilities/VanityUtilities.cpp index e8fd4cf0..c3f8f6b4 100644 --- a/dGame/dUtilities/VanityUtilities.cpp +++ b/dGame/dUtilities/VanityUtilities.cpp @@ -11,6 +11,8 @@ #include "dConfig.h" #include "dServer.h" #include "tinyxml2.h" +#include "Game.h" +#include "dLogger.h" #include diff --git a/dScripts/ActNinjaTurret.cpp b/dScripts/ActNinjaTurret.cpp index 4aecd327..8c361ad7 100644 --- a/dScripts/ActNinjaTurret.cpp +++ b/dScripts/ActNinjaTurret.cpp @@ -2,18 +2,12 @@ void ActNinjaTurret::OnRebuildNotifyState(Entity* self, eRebuildState state) { - Game::logger->Log("ActNinjaTurret", "Rebuild state: %i\n", state); - if (state == eRebuildState::REBUILD_COMPLETED) { - Game::logger->Log("ActNinjaTurret", "I am build\n"); - self->SetVar(u"AmBuilt", true); } else if (state == eRebuildState::REBUILD_RESETTING) { - Game::logger->Log("ActNinjaTurret", "I am not build\n"); - self->SetVar(u"AmBuilt", false); } } @@ -22,8 +16,6 @@ void ActNinjaTurret::OnFireEventServerSide(Entity *self, Entity *sender, std::string args, int32_t param1, int32_t param2, int32_t param3) { - Game::logger->Log("ActNinjaTurret", "Got server side event %s\n", args.c_str()); - if (args == "ISpawned" && self->GetVar(u"AmBuilt")) { sender->Smash(); diff --git a/dScripts/ActSharkPlayerDeathTrigger.cpp b/dScripts/ActSharkPlayerDeathTrigger.cpp index 4185496c..a8aaac8b 100644 --- a/dScripts/ActSharkPlayerDeathTrigger.cpp +++ b/dScripts/ActSharkPlayerDeathTrigger.cpp @@ -1,24 +1,17 @@ #include "ActSharkPlayerDeathTrigger.h" +#include "MissionComponent.h" +#include "MissionTaskType.h" #include "Entity.h" -#include "GameMessages.h" -#include "Game.h" -#include "dLogger.h" - -void ActSharkPlayerDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) { - -} void ActSharkPlayerDeathTrigger::OnFireEventServerSide(Entity *self, Entity *sender, std::string args, int32_t param1, int32_t param2, int32_t param3) { if (args == "achieve") { - MissionComponent* mis = static_cast(sender->GetComponent(COMPONENT_TYPE_MISSION)); - if (!mis) return; + auto missionComponent = sender->GetComponent(); + if (!missionComponent) return; - mis->Progress(MissionTaskType::MISSION_TASK_TYPE_SCRIPT, 8419); + missionComponent->Progress(MissionTaskType::MISSION_TASK_TYPE_SCRIPT, 8419); if (sender->GetIsDead() || !sender->GetPlayerReadyForUpdates()) return; //Don't kill already dead players or players not ready - - Game::logger->Log("ActSharkPlayerDeathTrigger", "%i\n", self->GetLOT()); if (sender->GetCharacter()) { sender->Smash(self->GetObjectID(), eKillType::VIOLENT, u"big-shark-death"); diff --git a/dScripts/ActSharkPlayerDeathTrigger.h b/dScripts/ActSharkPlayerDeathTrigger.h index 6f00fd00..cbd3c960 100644 --- a/dScripts/ActSharkPlayerDeathTrigger.h +++ b/dScripts/ActSharkPlayerDeathTrigger.h @@ -4,8 +4,7 @@ class ActSharkPlayerDeathTrigger : public CppScripts::Script { public: - void OnCollisionPhantom(Entity* self, Entity* target); void OnFireEventServerSide(Entity *self, Entity *sender, std::string args, int32_t param1, int32_t param2, - int32_t param3); + int32_t param3) override; }; diff --git a/dScripts/ActivityManager.cpp b/dScripts/ActivityManager.cpp index f84963df..e464b20d 100644 --- a/dScripts/ActivityManager.cpp +++ b/dScripts/ActivityManager.cpp @@ -4,6 +4,7 @@ #include "LeaderboardManager.h" #include "GameMessages.h" #include +#include "dLogger.h" bool ActivityManager::IsPlayerInActivity(Entity *self, LWOOBJID playerID) { const auto* sac = self->GetComponent(); diff --git a/dScripts/AgBugsprayer.cpp b/dScripts/AgBugsprayer.cpp index 26e2880c..cfea5cf4 100644 --- a/dScripts/AgBugsprayer.cpp +++ b/dScripts/AgBugsprayer.cpp @@ -1,7 +1,6 @@ #include "AgBugsprayer.h" #include "SkillComponent.h" - void AgBugsprayer::OnRebuildComplete(Entity* self, Entity* target) { self->AddTimer("castSkill", 1); diff --git a/dScripts/AgBusDoor.cpp b/dScripts/AgBusDoor.cpp index 8c22dc8c..4453fcad 100644 --- a/dScripts/AgBusDoor.cpp +++ b/dScripts/AgBusDoor.cpp @@ -1,8 +1,6 @@ #include "AgBusDoor.h" #include "Entity.h" #include "GameMessages.h" -#include "Game.h" -#include "dLogger.h" #include "ProximityMonitorComponent.h" void AgBusDoor::OnStartup(Entity* self) { diff --git a/dScripts/AgCagedBricksServer.cpp b/dScripts/AgCagedBricksServer.cpp index 7ad6858c..ec9f5306 100644 --- a/dScripts/AgCagedBricksServer.cpp +++ b/dScripts/AgCagedBricksServer.cpp @@ -12,7 +12,11 @@ void AgCagedBricksServer::OnUse(Entity* self, Entity* user) { } //Set the flag & mission status: - user->GetCharacter()->SetPlayerFlag(74, true); + auto character = user->GetCharacter(); + + if (!character) return; + + character->SetPlayerFlag(74, true); //Remove the maelstrom cube: auto inv = static_cast(user->GetComponent(COMPONENT_TYPE_INVENTORY)); diff --git a/dScripts/AgFans.cpp b/dScripts/AgFans.cpp index 996a58e7..dbc09547 100644 --- a/dScripts/AgFans.cpp +++ b/dScripts/AgFans.cpp @@ -1,5 +1,8 @@ #include "AgFans.h" +#include "EntityManager.h" +#include "GameMessages.h" +#include "PhantomPhysicsComponent.h" #include "RenderComponent.h" void AgFans::OnStartup(Entity* self) { diff --git a/dScripts/AgFans.h b/dScripts/AgFans.h index 09cc89d9..800267af 100644 --- a/dScripts/AgFans.h +++ b/dScripts/AgFans.h @@ -1,8 +1,5 @@ #pragma once #include "CppScripts.h" -#include "GameMessages.h" -#include "EntityManager.h" -#include "PhantomPhysicsComponent.h" class AgFans : public CppScripts::Script { diff --git a/dScripts/AgImagSmashable.h b/dScripts/AgImagSmashable.h index 88efe3fe..fd047c34 100644 --- a/dScripts/AgImagSmashable.h +++ b/dScripts/AgImagSmashable.h @@ -4,7 +4,6 @@ class AgImagSmashable : public CppScripts::Script { public: void OnDie(Entity* self, Entity* killer); - private: void CrateAnimal(Entity* self); }; \ No newline at end of file diff --git a/dScripts/AgJetEffectServer.cpp b/dScripts/AgJetEffectServer.cpp index 0572fb46..599f4d01 100644 --- a/dScripts/AgJetEffectServer.cpp +++ b/dScripts/AgJetEffectServer.cpp @@ -1,15 +1,8 @@ #include "AgJetEffectServer.h" - #include "GameMessages.h" #include "EntityManager.h" -#include "PhantomPhysicsComponent.h" #include "SkillComponent.h" - -void AgJetEffectServer::OnStartup(Entity* self) -{ -} - void AgJetEffectServer::OnUse(Entity* self, Entity* user) { if (inUse) @@ -41,7 +34,6 @@ void AgJetEffectServer::OnUse(Entity* self, Entity* user) GameMessages::SendPlayFXEffect(effect, 641, u"create", "radarDish", LWOOBJID_EMPTY, 1, 1, true); self->AddTimer("radarDish", 2); - //self->AddTimer("PlayEffect", 2.5f); self->AddTimer("CineDone", 9); } diff --git a/dScripts/AgJetEffectServer.h b/dScripts/AgJetEffectServer.h index 0069d0bb..094c73d2 100644 --- a/dScripts/AgJetEffectServer.h +++ b/dScripts/AgJetEffectServer.h @@ -4,16 +4,12 @@ class AgJetEffectServer final : public CppScripts::Script { public: - void OnStartup(Entity* self) override; - void OnUse(Entity* self, Entity* user) override; void OnRebuildComplete(Entity* self, Entity* target) override; void OnTimerDone(Entity* self, std::string timerName) override; - private: LWOOBJID builder; - bool inUse; }; diff --git a/dScripts/AgLaserSensorServer.cpp b/dScripts/AgLaserSensorServer.cpp index f1d87468..342cc7e1 100644 --- a/dScripts/AgLaserSensorServer.cpp +++ b/dScripts/AgLaserSensorServer.cpp @@ -1,5 +1,9 @@ #include "AgLaserSensorServer.h" +#include "PhantomPhysicsComponent.h" +#include "SkillComponent.h" +#include "EntityManager.h" +#include "AgMonumentLaserServer.h" #include "EntityManager.h" void AgLaserSensorServer::OnStartup(Entity* self) { diff --git a/dScripts/AgLaserSensorServer.h b/dScripts/AgLaserSensorServer.h index 92d33efb..72e09dd8 100644 --- a/dScripts/AgLaserSensorServer.h +++ b/dScripts/AgLaserSensorServer.h @@ -1,9 +1,7 @@ #pragma once #include "CppScripts.h" -#include "PhantomPhysicsComponent.h" -#include "SkillComponent.h" -#include "EntityManager.h" -#include "AgMonumentLaserServer.h" + +class SkillComponent; class AgLaserSensorServer : public CppScripts::Script { public: diff --git a/dScripts/AgMonumentBirds.cpp b/dScripts/AgMonumentBirds.cpp index 212a0631..5870cfff 100644 --- a/dScripts/AgMonumentBirds.cpp +++ b/dScripts/AgMonumentBirds.cpp @@ -1,6 +1,5 @@ #include "AgMonumentBirds.h" #include "GameMessages.h" -#include "DestroyableComponent.h" //-------------------------------------------------------------- //Makes the ag birds fly away when you get close and smashes them. diff --git a/dScripts/AgPropGuard.cpp b/dScripts/AgPropGuard.cpp index 18fcd7c2..b05eef4f 100644 --- a/dScripts/AgPropGuard.cpp +++ b/dScripts/AgPropGuard.cpp @@ -1,9 +1,9 @@ #include "AgPropGuard.h" #include "Entity.h" #include "Character.h" -#include "GameMessages.h" #include "EntityManager.h" #include "InventoryComponent.h" +#include "MissionComponent.h" #include "Item.h" void AgPropGuard::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState) diff --git a/dScripts/AgSalutingNpcs.cpp b/dScripts/AgSalutingNpcs.cpp index 6a39f06f..618dc631 100644 --- a/dScripts/AgSalutingNpcs.cpp +++ b/dScripts/AgSalutingNpcs.cpp @@ -1,5 +1,4 @@ #include "AgSalutingNpcs.h" - #include "GameMessages.h" diff --git a/dScripts/AgShipPlayerDeathTrigger.cpp b/dScripts/AgShipPlayerDeathTrigger.cpp index 6ba2d193..d20edee7 100644 --- a/dScripts/AgShipPlayerDeathTrigger.cpp +++ b/dScripts/AgShipPlayerDeathTrigger.cpp @@ -1,12 +1,8 @@ #include "AgShipPlayerDeathTrigger.h" #include "Entity.h" -#include "GameMessages.h" -#include "Game.h" -#include "dLogger.h" void AgShipPlayerDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) { if (target->GetLOT() == 1 && !target->GetIsDead()) { - Game::logger->Log("CppScripts::AgShipPlayerDeathTrigger", "Attempting to kill %llu\n", target->GetObjectID()); target->Smash(self->GetObjectID(), eKillType::VIOLENT, u"electro-shock-death"); } } \ No newline at end of file diff --git a/dScripts/AgSpaceStuff.cpp b/dScripts/AgSpaceStuff.cpp index 507b908f..18e4eb47 100644 --- a/dScripts/AgSpaceStuff.cpp +++ b/dScripts/AgSpaceStuff.cpp @@ -1,9 +1,7 @@ #include "AgSpaceStuff.h" #include "GeneralUtils.h" #include "GameMessages.h" -#include "dZoneManager.h" #include "EntityManager.h" -#include "Game.h" void AgSpaceStuff::OnStartup(Entity* self) { self->AddTimer("FloaterScale", 5.0f); diff --git a/dScripts/AgSurvivalBuffStation.cpp b/dScripts/AgSurvivalBuffStation.cpp index 86a2f653..8a6cfb05 100644 --- a/dScripts/AgSurvivalBuffStation.cpp +++ b/dScripts/AgSurvivalBuffStation.cpp @@ -3,7 +3,6 @@ #include "EntityManager.h" #include "GameMessages.h" #include "SkillComponent.h" -#include "dLogger.h" #include "TeamManager.h" void AgSurvivalBuffStation::OnRebuildComplete(Entity* self, Entity* target) { diff --git a/dScripts/AgSurvivalSpiderling.cpp b/dScripts/AgSurvivalSpiderling.cpp index ebb0395b..d44455d8 100644 --- a/dScripts/AgSurvivalSpiderling.cpp +++ b/dScripts/AgSurvivalSpiderling.cpp @@ -1,6 +1,5 @@ #include "AgSurvivalSpiderling.h" #include "BaseCombatAIComponent.h" -#include "GameMessages.h" void AgSurvivalSpiderling::OnStartup(Entity *self) { BaseWavesGenericEnemy::OnStartup(self); diff --git a/dScripts/AgTurret.cpp b/dScripts/AgTurret.cpp index a439ecf1..6db493d5 100644 --- a/dScripts/AgTurret.cpp +++ b/dScripts/AgTurret.cpp @@ -1,6 +1,4 @@ #include "AgTurret.h" -#include "EntityManager.h" -#include "RebuildComponent.h" #include "GameMessages.h" void AgTurret::OnStartup(Entity* self) { diff --git a/dScripts/AllCrateChicken.cpp b/dScripts/AllCrateChicken.cpp index c4aeec80..1a368a80 100644 --- a/dScripts/AllCrateChicken.cpp +++ b/dScripts/AllCrateChicken.cpp @@ -1,6 +1,4 @@ #include "AllCrateChicken.h" -#include "dCommonVars.h" -#include "EntityManager.h" #include "Entity.h" void AllCrateChicken::OnStartup(Entity* self) { diff --git a/dScripts/AmConsoleTeleportServer.cpp b/dScripts/AmConsoleTeleportServer.cpp index 5c60e827..5087aae2 100644 --- a/dScripts/AmConsoleTeleportServer.cpp +++ b/dScripts/AmConsoleTeleportServer.cpp @@ -1,5 +1,6 @@ #include "AmConsoleTeleportServer.h" - +#include "ChooseYourDestinationNsToNt.h" +#include "AMFFormat.h" void AmConsoleTeleportServer::OnStartup(Entity* self) { diff --git a/dScripts/AmConsoleTeleportServer.h b/dScripts/AmConsoleTeleportServer.h index ac241ee5..8236e67e 100644 --- a/dScripts/AmConsoleTeleportServer.h +++ b/dScripts/AmConsoleTeleportServer.h @@ -1,8 +1,6 @@ #pragma once #include "CppScripts.h" -#include "ChooseYourDestinationNsToNt.h" #include "BaseConsoleTeleportServer.h" -#include "AMFFormat.h" class AmConsoleTeleportServer : public CppScripts::Script, BaseConsoleTeleportServer { diff --git a/dScripts/AmDarklingDragon.cpp b/dScripts/AmDarklingDragon.cpp index be87f466..94066167 100644 --- a/dScripts/AmDarklingDragon.cpp +++ b/dScripts/AmDarklingDragon.cpp @@ -6,7 +6,6 @@ #include "SkillComponent.h" #include "BaseCombatAIComponent.h" - void AmDarklingDragon::OnStartup(Entity* self) { self->SetVar(u"weakspot", 0); @@ -48,15 +47,11 @@ void AmDarklingDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t auto* destroyableComponent = self->GetComponent(); if (destroyableComponent != nullptr) { - Game::logger->Log("AmDarklingDragon", "Armor is %i\n", destroyableComponent->GetArmor()); - if (destroyableComponent->GetArmor() > 0) return; auto weakpoint = self->GetVar(u"weakpoint"); if (weakpoint == 0) { - Game::logger->Log("AmDarklingDragon", "Activating weakpoint\n"); - self->AddTimer("ReviveTimer", 12); auto* baseCombatAIComponent = self->GetComponent(); diff --git a/dScripts/AmDarklingMech.cpp b/dScripts/AmDarklingMech.cpp index 59eb6b45..33c3fcbf 100644 --- a/dScripts/AmDarklingMech.cpp +++ b/dScripts/AmDarklingMech.cpp @@ -1,5 +1,4 @@ #include "AmDarklingMech.h" -#include "DestroyableComponent.h" void AmDarklingMech::OnStartup(Entity* self) { diff --git a/dScripts/AmDarklingMech.h b/dScripts/AmDarklingMech.h index 363e4db8..cc179795 100644 --- a/dScripts/AmDarklingMech.h +++ b/dScripts/AmDarklingMech.h @@ -1,8 +1,5 @@ #pragma once #include "CppScripts.h" -#include "ChooseYourDestinationNsToNt.h" -#include "BaseConsoleTeleportServer.h" -#include "AMFFormat.h" #include "BaseEnemyMech.h" class AmDarklingMech : public BaseEnemyMech diff --git a/dScripts/AmDrawBridge.cpp b/dScripts/AmDrawBridge.cpp index 2c774ca1..8e52e3e4 100644 --- a/dScripts/AmDrawBridge.cpp +++ b/dScripts/AmDrawBridge.cpp @@ -3,7 +3,6 @@ #include "GameMessages.h" #include "SimplePhysicsComponent.h" - void AmDrawBridge::OnStartup(Entity* self) { self->SetNetworkVar(u"InUse", false); diff --git a/dScripts/AmDropshipComputer.cpp b/dScripts/AmDropshipComputer.cpp index dfc17474..d25bd4f2 100644 --- a/dScripts/AmDropshipComputer.cpp +++ b/dScripts/AmDropshipComputer.cpp @@ -2,7 +2,6 @@ #include "MissionComponent.h" #include "RebuildComponent.h" #include "InventoryComponent.h" -#include "GameMessages.h" #include "dZoneManager.h" void AmDropshipComputer::OnStartup(Entity* self) diff --git a/dScripts/AmShieldGenerator.cpp b/dScripts/AmShieldGenerator.cpp index 1f9b5f9c..0e942612 100644 --- a/dScripts/AmShieldGenerator.cpp +++ b/dScripts/AmShieldGenerator.cpp @@ -6,7 +6,6 @@ #include "BaseCombatAIComponent.h" #include "SkillComponent.h" - void AmShieldGenerator::OnStartup(Entity* self) { self->SetProximityRadius(20, "shield"); diff --git a/dScripts/AmShieldGeneratorQuickbuild.cpp b/dScripts/AmShieldGeneratorQuickbuild.cpp index a2d99ad2..aa80148c 100644 --- a/dScripts/AmShieldGeneratorQuickbuild.cpp +++ b/dScripts/AmShieldGeneratorQuickbuild.cpp @@ -8,7 +8,6 @@ #include "RebuildComponent.h" #include "MissionComponent.h" - void AmShieldGeneratorQuickbuild::OnStartup(Entity* self) { self->SetProximityRadius(20, "shield"); diff --git a/dScripts/AmSkullkinDrill.cpp b/dScripts/AmSkullkinDrill.cpp index 8b4986d0..d5b7e7e6 100644 --- a/dScripts/AmSkullkinDrill.cpp +++ b/dScripts/AmSkullkinDrill.cpp @@ -87,8 +87,6 @@ void AmSkullkinDrill::TriggerDrill(Entity* self) if (standObj != nullptr) { - Game::logger->Log("AmSkullkinDrill", "Disabling knockback\n"); - standObj->SetVar(u"bActive", false); } @@ -213,8 +211,6 @@ void AmSkullkinDrill::OnArrived(Entity* self, uint32_t waypointIndex) if (standObj != nullptr) { - Game::logger->Log("AmSkullkinDrill", "Disabling knockback\n"); - standObj->SetVar(u"bActive", false); } @@ -302,8 +298,6 @@ void AmSkullkinDrill::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t void AmSkullkinDrill::OnTimerDone(Entity* self, std::string timerName) { - Game::logger->Log("AmSkullkinDrill", "Timer: %s\n", timerName.c_str()); - if (timerName == "killDrill") { const auto childID = self->GetVar(u"ChildSmash"); @@ -323,8 +317,6 @@ void AmSkullkinDrill::OnTimerDone(Entity* self, std::string timerName) if (standObj != nullptr) { - Game::logger->Log("AmSkullkinDrill", "Enabling knockback\n"); - standObj->SetVar(u"bActive", true); } @@ -351,8 +343,6 @@ void AmSkullkinDrill::OnTimerDone(Entity* self, std::string timerName) { const auto& animName = data[1]; - Game::logger->Log("AmSkullkinDrill", "Anim done: %s\n", animName.c_str()); - const auto playerID = self->GetVar(u"userID"); auto* player = EntityManager::Instance()->GetEntity(playerID); @@ -364,8 +354,6 @@ void AmSkullkinDrill::OnTimerDone(Entity* self, std::string timerName) if (animName == "spinjitzu-staff-windup") { - Game::logger->Log("AmSkullkinDrill", "Triggering drill\n"); - TriggerDrill(self); GameMessages::SendPlayAnimation(player, u"spinjitzu-staff-loop"); diff --git a/dScripts/AmSkullkinTower.cpp b/dScripts/AmSkullkinTower.cpp index 6869b94b..1b9e8c6d 100644 --- a/dScripts/AmSkullkinTower.cpp +++ b/dScripts/AmSkullkinTower.cpp @@ -2,7 +2,6 @@ #include "EntityManager.h" #include "DestroyableComponent.h" #include "MovingPlatformComponent.h" -#include "dCommonVars.h" #include "GameMessages.h" #include "MissionComponent.h" diff --git a/dScripts/BaseConsoleTeleportServer.cpp b/dScripts/BaseConsoleTeleportServer.cpp index ef2d00e0..6475e025 100644 --- a/dScripts/BaseConsoleTeleportServer.cpp +++ b/dScripts/BaseConsoleTeleportServer.cpp @@ -1,8 +1,6 @@ #include "BaseConsoleTeleportServer.h" #include "GameMessages.h" #include "Player.h" -#include "RocketLaunchpadControlComponent.h" - void BaseConsoleTeleportServer::BaseOnUse(Entity* self, Entity* user) { diff --git a/dScripts/BaseEnemyMech.cpp b/dScripts/BaseEnemyMech.cpp index eb95095a..17c7a347 100644 --- a/dScripts/BaseEnemyMech.cpp +++ b/dScripts/BaseEnemyMech.cpp @@ -1,8 +1,5 @@ #include "BaseEnemyMech.h" #include "Entity.h" -#include "GameMessages.h" -#include "Game.h" -#include "dLogger.h" #include "ControllablePhysicsComponent.h" #include "EntityManager.h" #include "dpWorld.h" @@ -21,7 +18,6 @@ void BaseEnemyMech::OnDie(Entity* self, Entity* killer) { if (!controlPhys) return; NiPoint3 newLoc = {controlPhys->GetPosition().x, dpWorld::Instance().GetHeightAtPoint(controlPhys->GetPosition()), controlPhys->GetPosition().z }; - //NiPoint3 newLoc = { controlPhys->GetPosition().x, controlPhys->GetPosition().y, controlPhys->GetPosition().z }; EntityInfo info = EntityInfo(); std::vector cfg; diff --git a/dScripts/BasePropertyServer.cpp b/dScripts/BasePropertyServer.cpp index 27e3767b..e7a95844 100644 --- a/dScripts/BasePropertyServer.cpp +++ b/dScripts/BasePropertyServer.cpp @@ -1,6 +1,4 @@ #include "BasePropertyServer.h" -#include -#include "dCommonVars.h" #include "GameMessages.h" #include "EntityManager.h" #include "dZoneManager.h" @@ -8,7 +6,8 @@ #include "DestroyableComponent.h" #include "Entity.h" #include "RenderComponent.h" -#include "dServer.h" +#include "PropertyManagementComponent.h" +#include "MissionComponent.h" void BasePropertyServer::SetGameVariables(Entity *self) { self->SetVar(ClaimMarkerGroup, ""); @@ -337,7 +336,7 @@ void BasePropertyServer::BaseTimerDone(Entity* self, const std::string& timerNam const auto zoneId = dZoneManager::Instance()->GetZone()->GetWorldID(); // No guard for the spider instance fight - if (Game::server->GetZoneID() == 1150) + if (dZoneManager::Instance()->GetZoneID().GetMapID() == 1150) return; const auto entities = EntityManager::Instance()->GetEntitiesInGroup(self->GetVar(GuardGroup)); diff --git a/dScripts/BasePropertyServer.h b/dScripts/BasePropertyServer.h index 8d9a2d7e..79a52f54 100644 --- a/dScripts/BasePropertyServer.h +++ b/dScripts/BasePropertyServer.h @@ -1,7 +1,5 @@ #pragma once #include "CppScripts.h" -#include "PropertyManagementComponent.h" -#include "PropertyVendorComponent.h" class BasePropertyServer : public CppScripts::Script { public: diff --git a/dScripts/BaseRandomServer.cpp b/dScripts/BaseRandomServer.cpp index 182544be..7026178c 100644 --- a/dScripts/BaseRandomServer.cpp +++ b/dScripts/BaseRandomServer.cpp @@ -1,8 +1,8 @@ #include "BaseRandomServer.h" -#include "EntityManager.h" #include "dZoneManager.h" -#include "DestroyableComponent.h" #include "Spawner.h" +#include "dLogger.h" +#include "Entity.h" void BaseRandomServer::BaseStartup(Entity* self) { diff --git a/dScripts/BaseRandomServer.h b/dScripts/BaseRandomServer.h index d04414f1..68aadf30 100644 --- a/dScripts/BaseRandomServer.h +++ b/dScripts/BaseRandomServer.h @@ -1,8 +1,8 @@ #pragma once -#include "CppScripts.h" -#include "Entity.h" -#include "dCommonVars.h" +#include + +class Spawner; class BaseRandomServer { public: diff --git a/dScripts/BaseSurvivalServer.cpp b/dScripts/BaseSurvivalServer.cpp index dd9b9365..f6a326e8 100644 --- a/dScripts/BaseSurvivalServer.cpp +++ b/dScripts/BaseSurvivalServer.cpp @@ -4,6 +4,8 @@ #include "EntityManager.h" #include "dZoneManager.h" #include "Player.h" +#include "MissionTaskType.h" +#include "MissionComponent.h" #include "Character.h" void BaseSurvivalServer::SetGameVariables(Entity *self) { diff --git a/dScripts/BaseSurvivalServer.h b/dScripts/BaseSurvivalServer.h index 55e1f8f9..c85f1bbf 100644 --- a/dScripts/BaseSurvivalServer.h +++ b/dScripts/BaseSurvivalServer.h @@ -1,6 +1,5 @@ #pragma once #include "ActivityManager.h" -#include "CppScripts.h" /** * State for each active game diff --git a/dScripts/BaseWavesServer.cpp b/dScripts/BaseWavesServer.cpp index 29706f52..2c8a2edd 100644 --- a/dScripts/BaseWavesServer.cpp +++ b/dScripts/BaseWavesServer.cpp @@ -4,6 +4,8 @@ #include "EntityManager.h" #include "dZoneManager.h" #include "Player.h" +#include "MissionTaskType.h" +#include "MissionComponent.h" #include "Character.h" // Done diff --git a/dScripts/BaseWavesServer.h b/dScripts/BaseWavesServer.h index cb04f50b..3dc90da8 100644 --- a/dScripts/BaseWavesServer.h +++ b/dScripts/BaseWavesServer.h @@ -1,6 +1,5 @@ #pragma once #include "ActivityManager.h" -#include "CppScripts.h" /** * State for each active game diff --git a/dScripts/BootyDigServer.cpp b/dScripts/BootyDigServer.cpp index eeb3bfd4..50d873e0 100644 --- a/dScripts/BootyDigServer.cpp +++ b/dScripts/BootyDigServer.cpp @@ -1,6 +1,8 @@ #include "BootyDigServer.h" #include "EntityManager.h" #include "RenderComponent.h" +#include "MissionComponent.h" +#include "MissionTaskType.h" void BootyDigServer::OnStartup(Entity *self) { auto* zoneControlObject = EntityManager::Instance()->GetZoneControlEntity(); diff --git a/dScripts/BossSpiderQueenEnemyServer.cpp b/dScripts/BossSpiderQueenEnemyServer.cpp index 9896fd45..dd0b80c8 100644 --- a/dScripts/BossSpiderQueenEnemyServer.cpp +++ b/dScripts/BossSpiderQueenEnemyServer.cpp @@ -6,7 +6,10 @@ #include "EntityManager.h" #include "Entity.h" #include "dZoneManager.h" -#include "dServer.h" + +#include "DestroyableComponent.h" +#include "ControllablePhysicsComponent.h" +#include "BaseCombatAIComponent.h" #include "GameMessages.h" #include "SkillComponent.h" @@ -49,7 +52,7 @@ void BossSpiderQueenEnemyServer::OnStartup(Entity* self) { } void BossSpiderQueenEnemyServer::OnDie(Entity* self, Entity* killer) { - if (Game::server->GetZoneID() == instanceZoneID) { + if (dZoneManager::Instance()->GetZoneID().GetMapID() == instanceZoneID) { auto* missionComponent = killer->GetComponent(); if (missionComponent == nullptr) return; diff --git a/dScripts/BossSpiderQueenEnemyServer.h b/dScripts/BossSpiderQueenEnemyServer.h index 34faf055..f3219cf7 100644 --- a/dScripts/BossSpiderQueenEnemyServer.h +++ b/dScripts/BossSpiderQueenEnemyServer.h @@ -1,10 +1,6 @@ #pragma once #include "CppScripts.h" -#include "DestroyableComponent.h" -#include "ControllablePhysicsComponent.h" -#include "BaseCombatAIComponent.h" - /* -------------------------------------------------------------- @@ -17,7 +13,9 @@ -------------------------------------------------------------- */ - +class DestroyableComponent; +class ControllablePhysicsComponent; +class BaseCombatAIComponent; class BossSpiderQueenEnemyServer final : public CppScripts::Script { public: void OnStartup(Entity* self) override; diff --git a/dScripts/BuccaneerValiantShip.cpp b/dScripts/BuccaneerValiantShip.cpp index 1cc1e633..710a0d1a 100644 --- a/dScripts/BuccaneerValiantShip.cpp +++ b/dScripts/BuccaneerValiantShip.cpp @@ -1,6 +1,5 @@ #include "BuccaneerValiantShip.h" #include "SkillComponent.h" -#include "dLogger.h" void BuccaneerValiantShip::OnStartup(Entity* self) { self->AddCallbackTimer(1.0F, [self]() { diff --git a/dScripts/BurningTile.cpp b/dScripts/BurningTile.cpp index 95a0bf17..b9a05391 100644 --- a/dScripts/BurningTile.cpp +++ b/dScripts/BurningTile.cpp @@ -1,7 +1,5 @@ #include "BurningTile.h" - #include "SkillComponent.h" -#include "GameMessages.h" void BurningTile::OnFireEventServerSide(Entity *self, Entity *sender, std::string args, int32_t param1, int32_t param2, int32_t param3) { diff --git a/dScripts/CatapultBaseServer.cpp b/dScripts/CatapultBaseServer.cpp index 81db8abd..33539de8 100644 --- a/dScripts/CatapultBaseServer.cpp +++ b/dScripts/CatapultBaseServer.cpp @@ -1,8 +1,6 @@ #include "CatapultBaseServer.h" #include "GameMessages.h" #include "EntityManager.h" -#include "dZoneManager.h" - void CatapultBaseServer::OnNotifyObject(Entity *self, Entity *sender, const std::string& name, int32_t param1, int32_t param2) { diff --git a/dScripts/CatapultBaseServer.h b/dScripts/CatapultBaseServer.h index ad949022..a174fcaf 100644 --- a/dScripts/CatapultBaseServer.h +++ b/dScripts/CatapultBaseServer.h @@ -1,8 +1,5 @@ #pragma once #include "CppScripts.h" -#include "Spawner.h" -#include "dZoneManager.h" -#include "dCommonVars.h" class CatapultBaseServer : public CppScripts::Script { public: diff --git a/dScripts/CatapultBouncerServer.cpp b/dScripts/CatapultBouncerServer.cpp index 0952a7ff..098f38ac 100644 --- a/dScripts/CatapultBouncerServer.cpp +++ b/dScripts/CatapultBouncerServer.cpp @@ -1,7 +1,6 @@ #include "CatapultBouncerServer.h" #include "GameMessages.h" #include "EntityManager.h" -#include "dZoneManager.h" void CatapultBouncerServer::OnRebuildComplete(Entity* self, Entity* target) { diff --git a/dScripts/CatapultBouncerServer.h b/dScripts/CatapultBouncerServer.h index 1178a46f..06f03bf4 100644 --- a/dScripts/CatapultBouncerServer.h +++ b/dScripts/CatapultBouncerServer.h @@ -1,8 +1,5 @@ #pragma once #include "CppScripts.h" -#include "Spawner.h" -#include "dZoneManager.h" -#include "dCommonVars.h" class CatapultBouncerServer : public CppScripts::Script { public: diff --git a/dScripts/CavePrisonCage.cpp b/dScripts/CavePrisonCage.cpp index 793050b3..5fe47f2d 100644 --- a/dScripts/CavePrisonCage.cpp +++ b/dScripts/CavePrisonCage.cpp @@ -1,9 +1,9 @@ #include "CavePrisonCage.h" #include "EntityManager.h" #include "RebuildComponent.h" -#include "MovingPlatformComponent.h" #include "GameMessages.h" #include "Character.h" +#include "dZoneManager.h" void CavePrisonCage::OnStartup(Entity *self) { diff --git a/dScripts/CavePrisonCage.h b/dScripts/CavePrisonCage.h index 47f95a98..5ae357d5 100644 --- a/dScripts/CavePrisonCage.h +++ b/dScripts/CavePrisonCage.h @@ -1,8 +1,5 @@ #pragma once #include "CppScripts.h" -#include "Spawner.h" -#include "dZoneManager.h" -#include "dCommonVars.h" class CavePrisonCage : public CppScripts::Script { public: diff --git a/dScripts/ChooseYourDestinationNsToNt.cpp b/dScripts/ChooseYourDestinationNsToNt.cpp index 2ed8ebdc..823d7c85 100644 --- a/dScripts/ChooseYourDestinationNsToNt.cpp +++ b/dScripts/ChooseYourDestinationNsToNt.cpp @@ -1,8 +1,6 @@ #include "ChooseYourDestinationNsToNt.h" #include "Character.h" #include "GameMessages.h" -#include "dZoneManager.h" -#include "EntityManager.h" bool ChooseYourDestinationNsToNt::CheckChoice(Entity* self, Entity* player) { diff --git a/dScripts/ChooseYourDestinationNsToNt.h b/dScripts/ChooseYourDestinationNsToNt.h index 7a02b38b..cbf3709e 100644 --- a/dScripts/ChooseYourDestinationNsToNt.h +++ b/dScripts/ChooseYourDestinationNsToNt.h @@ -1,5 +1,4 @@ #pragma once -#include "CppScripts.h" class ChooseYourDestinationNsToNt { diff --git a/dScripts/ClRing.cpp b/dScripts/ClRing.cpp index 5b2910d3..5de3e683 100644 --- a/dScripts/ClRing.cpp +++ b/dScripts/ClRing.cpp @@ -1,6 +1,4 @@ #include "ClRing.h" -#include "EntityManager.h" -#include "Character.h" void ClRing::OnCollisionPhantom(Entity* self, Entity* target) { diff --git a/dScripts/CppScripts.cpp b/dScripts/CppScripts.cpp index 26bde33e..420394bb 100644 --- a/dScripts/CppScripts.cpp +++ b/dScripts/CppScripts.cpp @@ -4,10 +4,8 @@ #include "CppScripts.h" #include "GameMessages.h" -#include "dpWorld.h" #include "Entity.h" #include "ScriptComponent.h" -#include "EntityManager.h" #include "Game.h" #include "dLogger.h" #include "InvalidScript.h" diff --git a/dScripts/CppScripts.h b/dScripts/CppScripts.h index 9cd014b5..bf30017c 100644 --- a/dScripts/CppScripts.h +++ b/dScripts/CppScripts.h @@ -1,12 +1,8 @@ #pragma once #include "dCommonVars.h" -#include "RakNetTypes.h" -#include -#include "MissionComponent.h" #include "MissionState.h" -#include "Game.h" -#include "dLogger.h" -#include "Loot.h" +#include +#include class User; class Entity; diff --git a/dScripts/DLUVanityNPC.cpp b/dScripts/DLUVanityNPC.cpp index ec8a0574..c219a5f9 100644 --- a/dScripts/DLUVanityNPC.cpp +++ b/dScripts/DLUVanityNPC.cpp @@ -1,6 +1,7 @@ #include "DLUVanityNPC.h" #include "GameMessages.h" #include "dServer.h" +#include "VanityUtilities.h" void DLUVanityNPC::OnStartup(Entity* self) { diff --git a/dScripts/DLUVanityNPC.h b/dScripts/DLUVanityNPC.h index baacf5dd..4eba3554 100644 --- a/dScripts/DLUVanityNPC.h +++ b/dScripts/DLUVanityNPC.h @@ -1,7 +1,7 @@ #pragma once #include "CppScripts.h" -#include "VanityUtilities.h" +class VanityNPC; class DLUVanityNPC : public CppScripts::Script { public: diff --git a/dScripts/DamagingPets.h b/dScripts/DamagingPets.h index d0044fb5..04c4e6bf 100644 --- a/dScripts/DamagingPets.h +++ b/dScripts/DamagingPets.h @@ -1,5 +1,4 @@ #pragma once - #include "CppScripts.h" /** diff --git a/dScripts/Darkitect.h b/dScripts/Darkitect.h index f0d19648..56b1c832 100644 --- a/dScripts/Darkitect.h +++ b/dScripts/Darkitect.h @@ -1,5 +1,4 @@ #pragma once - class Entity; class Darkitect diff --git a/dScripts/EnemySpiderSpawner.cpp b/dScripts/EnemySpiderSpawner.cpp index 96f5e6c8..98524ae1 100644 --- a/dScripts/EnemySpiderSpawner.cpp +++ b/dScripts/EnemySpiderSpawner.cpp @@ -1,9 +1,7 @@ #include "EnemySpiderSpawner.h" #include "GameMessages.h" -#include "SimplePhysicsComponent.h" #include "EntityManager.h" #include "DestroyableComponent.h" -#include "MovementAIComponent.h" //---------------------------------------------- //--Initiate egg hatching on call diff --git a/dScripts/ExplodingAsset.cpp b/dScripts/ExplodingAsset.cpp index 929d2082..b4bd6913 100644 --- a/dScripts/ExplodingAsset.cpp +++ b/dScripts/ExplodingAsset.cpp @@ -1,7 +1,7 @@ #include "ExplodingAsset.h" - #include "DestroyableComponent.h" #include "GameMessages.h" +#include "MissionComponent.h" #include "SkillComponent.h" //TODO: this has to be updated so that you only get killed if you're in a certain radius. diff --git a/dScripts/FallingTile.cpp b/dScripts/FallingTile.cpp index 5bd8adc6..2dd8c7bc 100644 --- a/dScripts/FallingTile.cpp +++ b/dScripts/FallingTile.cpp @@ -2,7 +2,6 @@ #include "MovingPlatformComponent.h" #include "GameMessages.h" - void FallingTile::OnStartup(Entity* self) { auto* movingPlatfromComponent = self->GetComponent(); diff --git a/dScripts/FlameJetServer.cpp b/dScripts/FlameJetServer.cpp index 9ecf4fa2..0e6d91cc 100644 --- a/dScripts/FlameJetServer.cpp +++ b/dScripts/FlameJetServer.cpp @@ -1,5 +1,4 @@ #include "FlameJetServer.h" - #include "SkillComponent.h" #include "GameMessages.h" diff --git a/dScripts/ForceVolumeServer.cpp b/dScripts/ForceVolumeServer.cpp index ce3e0bd6..e9320527 100644 --- a/dScripts/ForceVolumeServer.cpp +++ b/dScripts/ForceVolumeServer.cpp @@ -2,17 +2,11 @@ #include "PhantomPhysicsComponent.h" #include "EntityManager.h" - void ForceVolumeServer::OnStartup(Entity* self) { auto* phantomPhysicsComponent = self->GetComponent(); - if (phantomPhysicsComponent == nullptr) - { - Game::logger->Log("ForceVolumeServer", "Failed to find PhantomPhysicsComponent\n"); - - return; - } + if (phantomPhysicsComponent == nullptr) return; const auto forceAmount = self->GetVar(u"ForceAmt"); const auto forceX = self->GetVar(u"ForceX"); diff --git a/dScripts/FountainOfImagination.cpp b/dScripts/FountainOfImagination.cpp index 2d752db4..43351e18 100644 --- a/dScripts/FountainOfImagination.cpp +++ b/dScripts/FountainOfImagination.cpp @@ -1,4 +1,6 @@ #include "FountainOfImagination.h" +#include "dCommonVars.h" +#include "Entity.h" void FountainOfImagination::OnStartup(Entity *self) { self->SetVar(u"numCycles", 6); diff --git a/dScripts/FvBounceOverWall.cpp b/dScripts/FvBounceOverWall.cpp index 348bc36c..1c85ffbd 100644 --- a/dScripts/FvBounceOverWall.cpp +++ b/dScripts/FvBounceOverWall.cpp @@ -1,4 +1,5 @@ #include "FvBounceOverWall.h" +#include "MissionComponent.h" void FvBounceOverWall::OnCollisionPhantom(Entity* self, Entity* target) { auto missionComponent = target->GetComponent(); diff --git a/dScripts/FvCandle.cpp b/dScripts/FvCandle.cpp index 2081faf3..63f90f0b 100644 --- a/dScripts/FvCandle.cpp +++ b/dScripts/FvCandle.cpp @@ -1,5 +1,6 @@ #include "FvCandle.h" #include "MissionComponent.h" +#include "RenderComponent.h" std::vector FvCandle::m_Missions = {850, 1431, 1529, 1566, 1603}; diff --git a/dScripts/FvCandle.h b/dScripts/FvCandle.h index 1df63675..362d2a05 100644 --- a/dScripts/FvCandle.h +++ b/dScripts/FvCandle.h @@ -1,6 +1,5 @@ #pragma once #include "CppScripts.h" -#include "RenderComponent.h" class FvCandle : public CppScripts::Script { diff --git a/dScripts/FvConsoleLeftQuickbuild.cpp b/dScripts/FvConsoleLeftQuickbuild.cpp index 4b0a4f6c..ef281f15 100644 --- a/dScripts/FvConsoleLeftQuickbuild.cpp +++ b/dScripts/FvConsoleLeftQuickbuild.cpp @@ -1,7 +1,4 @@ #include "FvConsoleLeftQuickbuild.h" -#include "RebuildComponent.h" -#include "GeneralUtils.h" -#include "dZoneManager.h" #include "EntityManager.h" #include "GameMessages.h" diff --git a/dScripts/FvConsoleRightQuickbuild.cpp b/dScripts/FvConsoleRightQuickbuild.cpp index d72658b0..0bf9849a 100644 --- a/dScripts/FvConsoleRightQuickbuild.cpp +++ b/dScripts/FvConsoleRightQuickbuild.cpp @@ -1,7 +1,4 @@ #include "FvConsoleRightQuickbuild.h" -#include "RebuildComponent.h" -#include "GeneralUtils.h" -#include "dZoneManager.h" #include "EntityManager.h" #include "GameMessages.h" diff --git a/dScripts/FvFacilityBrick.cpp b/dScripts/FvFacilityBrick.cpp index 639265a7..fce9e630 100644 --- a/dScripts/FvFacilityBrick.cpp +++ b/dScripts/FvFacilityBrick.cpp @@ -1,10 +1,8 @@ #include "FvFacilityBrick.h" #include "GameMessages.h" -#include "GeneralUtils.h" #include "dZoneManager.h" #include "EntityManager.h" - void FvFacilityBrick::OnStartup(Entity* self) { self->SetVar(u"ConsoleLEFTActive", false); @@ -13,8 +11,6 @@ void FvFacilityBrick::OnStartup(Entity* self) void FvFacilityBrick::OnNotifyObject(Entity *self, Entity *sender, const std::string& name, int32_t param1, int32_t param2) { - Game::logger->Log("FvFacilityBrick", "Notify: %s\n", name.c_str()); - auto* brickSpawner = dZoneManager::Instance()->GetSpawnersByName("ImaginationBrick")[0]; auto* bugSpawner = dZoneManager::Instance()->GetSpawnersByName("MaelstromBug")[0]; auto* canisterSpawner = dZoneManager::Instance()->GetSpawnersByName("BrickCanister")[0]; diff --git a/dScripts/FvFong.cpp b/dScripts/FvFong.cpp index 890bf0ff..9a3de0b2 100644 --- a/dScripts/FvFong.cpp +++ b/dScripts/FvFong.cpp @@ -1,6 +1,6 @@ #include "FvFong.h" #include "Darkitect.h" -#include "MissionComponent.h" +#include "MissionState.h" void FvFong::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState) { diff --git a/dScripts/FvFreeGfNinjas.cpp b/dScripts/FvFreeGfNinjas.cpp index 0d749b01..8022b32f 100644 --- a/dScripts/FvFreeGfNinjas.cpp +++ b/dScripts/FvFreeGfNinjas.cpp @@ -1,5 +1,6 @@ #include "FvFreeGfNinjas.h" #include "Character.h" +#include "MissionComponent.h" void FvFreeGfNinjas::OnMissionDialogueOK(Entity *self, Entity *target, int missionID, MissionState missionState) { if (missionID == 705 && missionState == MissionState::MISSION_STATE_AVAILABLE) { diff --git a/dScripts/FvHorsemenTrigger.cpp b/dScripts/FvHorsemenTrigger.cpp index e984ab99..541c11e0 100644 --- a/dScripts/FvHorsemenTrigger.cpp +++ b/dScripts/FvHorsemenTrigger.cpp @@ -11,8 +11,6 @@ void FvHorsemenTrigger::OnStartup(Entity* self) void FvHorsemenTrigger::OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) { - Game::logger->Log("FvHorsemenTrigger", "Proximity update\n"); - if (name != "horsemenTrigger" || !entering->IsPlayer()) { return; @@ -24,12 +22,10 @@ void FvHorsemenTrigger::OnProximityUpdate(Entity* self, Entity* entering, std::s if (status == "ENTER" && iter == players.end()) { - Game::logger->Log("FvHorsemenTrigger", "Proximity enter\n"); players.push_back(entering->GetObjectID()); } else if (status == "LEAVE" && iter != players.end()) { - Game::logger->Log("FvHorsemenTrigger", "Proximity leave\n"); players.erase(iter); } @@ -42,7 +38,6 @@ FvHorsemenTrigger::OnFireEventServerSide(Entity *self, Entity *sender, std::stri { auto players = self->GetVar>(u"players"); - Game::logger->Log("FvHorsemenTrigger", "Got event %s with %i players\n", args.c_str(), players.size()); if (args == "HorsemenDeath") { for (const auto& playerId : self->GetVar>(u"players")) diff --git a/dScripts/FvMaelstromCavalry.cpp b/dScripts/FvMaelstromCavalry.cpp index d4d93645..b4a32991 100644 --- a/dScripts/FvMaelstromCavalry.cpp +++ b/dScripts/FvMaelstromCavalry.cpp @@ -5,16 +5,12 @@ void FvMaelstromCavalry::OnStartup(Entity* self) { for (const auto& group : self->GetGroups()) { - Game::logger->Log("FvMaelstromCavalry", "Got group: %s\n", group.c_str()); - const auto& objects = EntityManager::Instance()->GetEntitiesInGroup(group); for (auto* obj : objects) { if (obj->GetLOT() != 8551) continue; - Game::logger->Log("FvMaelstromCavalry", "Trigger in group: %s\n", group.c_str()); - obj->OnFireEventServerSide(self, "ISpawned"); } } @@ -27,8 +23,6 @@ void FvMaelstromCavalry::OnDie(Entity* self, Entity* killer) return; } - Game::logger->Log("FvMaelstromCavalry", "Killer: %i\n", killer->GetLOT()); - if (killer->GetLOT() != 8665) { return; @@ -38,8 +32,6 @@ void FvMaelstromCavalry::OnDie(Entity* self, Entity* killer) for (auto* trigger : triggers) { - Game::logger->Log("FvMaelstromCavalry", "Trigger for: %i\n", killer->GetLOT()); - trigger->OnFireEventServerSide(self, "HorsemenDeath"); } } diff --git a/dScripts/FvMaelstromCavalry.h b/dScripts/FvMaelstromCavalry.h index cfa9ff4b..0fc3e840 100644 --- a/dScripts/FvMaelstromCavalry.h +++ b/dScripts/FvMaelstromCavalry.h @@ -1,6 +1,5 @@ #pragma once #include "CppScripts.h" -#include "RenderComponent.h" class FvMaelstromCavalry : public CppScripts::Script { diff --git a/dScripts/FvMaelstromDragon.cpp b/dScripts/FvMaelstromDragon.cpp index e67ce815..afdfa4ae 100644 --- a/dScripts/FvMaelstromDragon.cpp +++ b/dScripts/FvMaelstromDragon.cpp @@ -2,7 +2,6 @@ #include "EntityManager.h" #include "SkillComponent.h" #include "BaseCombatAIComponent.h" -#include "RenderComponent.h" #include "DestroyableComponent.h" void FvMaelstromDragon::OnStartup(Entity* self) diff --git a/dScripts/FvMaelstromDragon.h b/dScripts/FvMaelstromDragon.h index 993306d3..52af80c4 100644 --- a/dScripts/FvMaelstromDragon.h +++ b/dScripts/FvMaelstromDragon.h @@ -1,6 +1,5 @@ #pragma once #include "CppScripts.h" -#include "RenderComponent.h" class FvMaelstromDragon : public CppScripts::Script { diff --git a/dScripts/FvPassThroughWall.cpp b/dScripts/FvPassThroughWall.cpp index 66130a9f..e894f923 100644 --- a/dScripts/FvPassThroughWall.cpp +++ b/dScripts/FvPassThroughWall.cpp @@ -1,5 +1,6 @@ #include "FvPassThroughWall.h" #include "InventoryComponent.h" +#include "MissionComponent.h" void FvPassThroughWall::OnCollisionPhantom(Entity* self, Entity* target) { auto missionComponent = target->GetComponent(); diff --git a/dScripts/FvRaceSmashEggImagineServer.cpp b/dScripts/FvRaceSmashEggImagineServer.cpp index 8e0d0897..696504e2 100644 --- a/dScripts/FvRaceSmashEggImagineServer.cpp +++ b/dScripts/FvRaceSmashEggImagineServer.cpp @@ -1,9 +1,10 @@ +#include "FvRaceSmashEggImagineServer.h" #include "CharacterComponent.h" #include "DestroyableComponent.h" #include "EntityManager.h" -#include "FvRaceSmashEggImagineServer.h" #include "PossessableComponent.h" #include "RacingTaskParam.h" +#include "MissionComponent.h" void FvRaceSmashEggImagineServer::OnDie(Entity *self, Entity *killer) { if (killer != nullptr) { diff --git a/dScripts/GfBanana.cpp b/dScripts/GfBanana.cpp index 65c434ba..346c9ad7 100644 --- a/dScripts/GfBanana.cpp +++ b/dScripts/GfBanana.cpp @@ -3,12 +3,9 @@ #include "Entity.h" #include "DestroyableComponent.h" #include "EntityManager.h" -#include "dLogger.h" void GfBanana::SpawnBanana(Entity* self) { - Game::logger->Log("GfBanana", "Spawning banana\n"); - auto position = self->GetPosition(); const auto rotation = self->GetRotation(); @@ -44,8 +41,6 @@ void GfBanana::OnStartup(Entity* self) void GfBanana::OnHit(Entity* self, Entity* attacker) { - Game::logger->Log("GfBanana", "Spawning cluster\n"); - auto* destroyable = self->GetComponent(); destroyable->SetHealth(9999); diff --git a/dScripts/GfBananaCluster.cpp b/dScripts/GfBananaCluster.cpp index 8ccc3be6..aacba224 100644 --- a/dScripts/GfBananaCluster.cpp +++ b/dScripts/GfBananaCluster.cpp @@ -1,4 +1,5 @@ #include "GfBananaCluster.h" +#include "Entity.h" void GfBananaCluster::OnStartup(Entity* self) { diff --git a/dScripts/GfCampfire.cpp b/dScripts/GfCampfire.cpp index caeaa6da..48170c66 100644 --- a/dScripts/GfCampfire.cpp +++ b/dScripts/GfCampfire.cpp @@ -1,11 +1,8 @@ #include "GfCampfire.h" -#include "GameMessages.h" - #include "RenderComponent.h" #include "SkillComponent.h" #include "MissionComponent.h" #include "RenderComponent.h" -#include "ProximityMonitorComponent.h" #include "EntityManager.h" void GfCampfire::OnStartup(Entity* self) { diff --git a/dScripts/GfJailWalls.cpp b/dScripts/GfJailWalls.cpp index 184fbd69..da547d0b 100644 --- a/dScripts/GfJailWalls.cpp +++ b/dScripts/GfJailWalls.cpp @@ -1,5 +1,4 @@ #include "GfJailWalls.h" -#include "EntityManager.h" #include "dZoneManager.h" #include "GeneralUtils.h" diff --git a/dScripts/GfTikiTorch.cpp b/dScripts/GfTikiTorch.cpp index d0e5d58d..dd1c14a7 100644 --- a/dScripts/GfTikiTorch.cpp +++ b/dScripts/GfTikiTorch.cpp @@ -1,7 +1,7 @@ #include "GfTikiTorch.h" #include "GameMessages.h" #include "EntityManager.h" - +#include "MissionComponent.h" #include "RenderComponent.h" void GfTikiTorch::OnStartup(Entity* self) { diff --git a/dScripts/ImaginationBackpackHealServer.cpp b/dScripts/ImaginationBackpackHealServer.cpp index 3f572a8f..1d7da2c5 100644 --- a/dScripts/ImaginationBackpackHealServer.cpp +++ b/dScripts/ImaginationBackpackHealServer.cpp @@ -1,5 +1,6 @@ #include "ImaginationBackpackHealServer.h" #include "GameMessages.h" +#include "MissionComponent.h" void ImaginationBackpackHealServer::OnSkillEventFired(Entity *self, Entity *caster, const std::string &message) { if (message == "CastImaginationBackpack") { diff --git a/dScripts/ImaginationShrineServer.cpp b/dScripts/ImaginationShrineServer.cpp index 0b40b44f..54c02614 100644 --- a/dScripts/ImaginationShrineServer.cpp +++ b/dScripts/ImaginationShrineServer.cpp @@ -1,7 +1,6 @@ #include "ImaginationShrineServer.h" #include "RebuildComponent.h" - void ImaginationShrineServer::OnUse(Entity* self, Entity* user) { // If the rebuild component is complete, use the shrine diff --git a/dScripts/ImgBrickConsoleQB.cpp b/dScripts/ImgBrickConsoleQB.cpp index 4d2d1e96..0dfb6288 100644 --- a/dScripts/ImgBrickConsoleQB.cpp +++ b/dScripts/ImgBrickConsoleQB.cpp @@ -197,8 +197,6 @@ void ImgBrickConsoleQB::OnDie(Entity* self, Entity* killer) self->SetVar(u"Died", true); - Game::logger->Log("ImgBrickConsoleQB", "On Die...\n"); - auto* rebuildComponent = self->GetComponent(); if (rebuildComponent->GetState() == REBUILD_COMPLETED) @@ -266,16 +264,12 @@ void ImgBrickConsoleQB::OnDie(Entity* self, Entity* killer) } self->SetNetworkVar(u"used", false); - - Game::logger->Log("ImgBrickConsoleQB", "Died...\n"); } void ImgBrickConsoleQB::OnTimerDone(Entity* self, std::string timerName) { if (timerName == "reset") { - Game::logger->Log("ImgBrickConsoleQB", "Resetting...\n"); - auto* rebuildComponent = self->GetComponent(); if (rebuildComponent->GetState() == REBUILD_OPEN) @@ -285,8 +279,6 @@ void ImgBrickConsoleQB::OnTimerDone(Entity* self, std::string timerName) } else if (timerName == "Die") { - Game::logger->Log("ImgBrickConsoleQB", "Die...\n"); - const auto consoles = EntityManager::Instance()->GetEntitiesInGroup("Console"); for (auto* console : consoles) diff --git a/dScripts/ImgBrickConsoleQB.h b/dScripts/ImgBrickConsoleQB.h index 1fdcf84a..f51f8e6c 100644 --- a/dScripts/ImgBrickConsoleQB.h +++ b/dScripts/ImgBrickConsoleQB.h @@ -1,6 +1,5 @@ #pragma once #include "CppScripts.h" -#include class ImgBrickConsoleQB : public CppScripts::Script { diff --git a/dScripts/InstanceExitTransferPlayerToLastNonInstance.cpp b/dScripts/InstanceExitTransferPlayerToLastNonInstance.cpp index 4bd99f7f..307c6c73 100644 --- a/dScripts/InstanceExitTransferPlayerToLastNonInstance.cpp +++ b/dScripts/InstanceExitTransferPlayerToLastNonInstance.cpp @@ -2,13 +2,10 @@ #include "GameMessages.h" #include "Player.h" #include "Character.h" -#include "Game.h" #include "dServer.h" void InstanceExitTransferPlayerToLastNonInstance::OnUse(Entity* self, Entity* user) { - Game::logger->Log("Instance", "OnUse\n"); - auto transferText = self->GetVar(u"transferText"); if (transferText.empty()) transferText = u"DRAGON_EXIT_QUESTION"; diff --git a/dScripts/LegoDieRoll.cpp b/dScripts/LegoDieRoll.cpp index 4b375a38..386313be 100644 --- a/dScripts/LegoDieRoll.cpp +++ b/dScripts/LegoDieRoll.cpp @@ -1,7 +1,7 @@ #include "LegoDieRoll.h" #include "Entity.h" -#include "dLogger.h" #include "GameMessages.h" +#include "MissionComponent.h" void LegoDieRoll::OnStartup(Entity* self) { self->AddTimer("DoneRolling", 10.0f); @@ -48,7 +48,6 @@ void LegoDieRoll::OnTimerDone(Entity* self, std::string timerName) { break; } default: - Game::logger->LogDebug("LegoDieRoll", "Invalid animation: roll-die-%i\n", dieRoll); break; } } diff --git a/dScripts/MastTeleport.cpp b/dScripts/MastTeleport.cpp index 601f7dbf..94d5f552 100644 --- a/dScripts/MastTeleport.cpp +++ b/dScripts/MastTeleport.cpp @@ -1,7 +1,6 @@ #include "MastTeleport.h" #include "EntityManager.h" #include "GameMessages.h" -#include "Game.h" #include "Preconditions.h" #ifdef _WIN32 diff --git a/dScripts/MinigameTreasureChestServer.cpp b/dScripts/MinigameTreasureChestServer.cpp index ff32b527..fc3f14c0 100644 --- a/dScripts/MinigameTreasureChestServer.cpp +++ b/dScripts/MinigameTreasureChestServer.cpp @@ -3,7 +3,6 @@ #include "TeamManager.h" #include "EntityManager.h" #include "dZoneManager.h" -#include "dServer.h" void MinigameTreasureChestServer::OnUse(Entity *self, Entity *user) { auto* sac = self->GetComponent(); @@ -56,7 +55,7 @@ uint32_t MinigameTreasureChestServer::CalculateActivityRating(Entity *self, LWOO void MinigameTreasureChestServer::OnStartup(Entity *self) { // BONS treasure chest thinks it's on FV, causing it to start a lobby - if (Game::server->GetZoneID() == 1204) { + if (dZoneManager::Instance()->GetZoneID().GetMapID() == 1204) { auto* sac = self->GetComponent(); if (sac != nullptr) { sac->SetInstanceMapID(1204); diff --git a/dScripts/MissionConsoleServer.cpp b/dScripts/MissionConsoleServer.cpp deleted file mode 100644 index 136f2cb6..00000000 --- a/dScripts/MissionConsoleServer.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "MissionConsoleServer.h" diff --git a/dScripts/MissionConsoleServer.h b/dScripts/MissionConsoleServer.h deleted file mode 100644 index c502fc00..00000000 --- a/dScripts/MissionConsoleServer.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once -#include "CppScripts.h" - -class MissionConsoleServer : public CppScripts::Script { -}; - diff --git a/dScripts/MonCoreNookDoors.cpp b/dScripts/MonCoreNookDoors.cpp index c038c1dd..c3fcf9be 100644 --- a/dScripts/MonCoreNookDoors.cpp +++ b/dScripts/MonCoreNookDoors.cpp @@ -1,6 +1,4 @@ #include "MonCoreNookDoors.h" -#include "GameMessages.h" -#include "EntityManager.h" #include "dZoneManager.h" void MonCoreNookDoors::OnStartup(Entity* self) diff --git a/dScripts/MonCoreSmashableDoors.cpp b/dScripts/MonCoreSmashableDoors.cpp index 1ea1bef9..0e7950f5 100644 --- a/dScripts/MonCoreSmashableDoors.cpp +++ b/dScripts/MonCoreSmashableDoors.cpp @@ -1,7 +1,5 @@ #include "MonCoreSmashableDoors.h" -#include "GameMessages.h" #include "EntityManager.h" -#include "dZoneManager.h" void MonCoreSmashableDoors::OnDie(Entity* self, Entity* killer) { diff --git a/dScripts/NjEarthDragonPetServer.cpp b/dScripts/NjEarthDragonPetServer.cpp index 3be5c63a..2b91f33c 100644 --- a/dScripts/NjEarthDragonPetServer.cpp +++ b/dScripts/NjEarthDragonPetServer.cpp @@ -1,4 +1,5 @@ #include "NjEarthDragonPetServer.h" +#include "Entity.h" void NjEarthDragonPetServer::SetVariables(Entity *self) { self->SetVar(u"petLOT", 16210); diff --git a/dScripts/NjEarthDragonPetServer.h b/dScripts/NjEarthDragonPetServer.h index 41c068f4..2227bbb6 100644 --- a/dScripts/NjEarthDragonPetServer.h +++ b/dScripts/NjEarthDragonPetServer.h @@ -1,5 +1,4 @@ #pragma once -//#include "NjPetSpawnerServer.h" #include "SpawnPetBaseServer.h" class NjEarthDragonPetServer : public SpawnPetBaseServer { diff --git a/dScripts/NjJayMissionItems.h b/dScripts/NjJayMissionItems.h index 7f30d7f0..19cb4f40 100644 --- a/dScripts/NjJayMissionItems.h +++ b/dScripts/NjJayMissionItems.h @@ -1,6 +1,8 @@ #pragma once #include "NjNPCMissionSpinjitzuServer.h" #include "NPCAddRemoveItem.h" +#include +#include class NjJayMissionItems : public NjNPCMissionSpinjitzuServer, NPCAddRemoveItem { void OnMissionDialogueOK(Entity *self, Entity *target, int missionID, MissionState missionState) override; diff --git a/dScripts/NjMonastryBossInstance.cpp b/dScripts/NjMonastryBossInstance.cpp index 27de7439..cd34ea2c 100644 --- a/dScripts/NjMonastryBossInstance.cpp +++ b/dScripts/NjMonastryBossInstance.cpp @@ -1,15 +1,14 @@ -#include -#include "RebuildComponent.h" #include "NjMonastryBossInstance.h" +#include "RebuildComponent.h" #include "DestroyableComponent.h" #include "EntityManager.h" -#include "GameMessages.h" #include "dZoneManager.h" #include "GameMessages.h" #include "BaseCombatAIComponent.h" #include "BuffComponent.h" #include "SkillComponent.h" #include "TeamManager.h" +#include // // // // // // // // Event handling // diff --git a/dScripts/NjNPCMissionSpinjitzuServer.h b/dScripts/NjNPCMissionSpinjitzuServer.h index 51150373..5b346ee7 100644 --- a/dScripts/NjNPCMissionSpinjitzuServer.h +++ b/dScripts/NjNPCMissionSpinjitzuServer.h @@ -1,5 +1,6 @@ #pragma once #include "CppScripts.h" +#include static std::map ElementFlags = { {u"earth", ePlayerFlags::NJ_EARTH_SPINJITZU}, diff --git a/dScripts/NjNyaMissionitems.h b/dScripts/NjNyaMissionitems.h index 91681126..5e2bbc7b 100644 --- a/dScripts/NjNyaMissionitems.h +++ b/dScripts/NjNyaMissionitems.h @@ -1,5 +1,7 @@ #pragma once #include "NPCAddRemoveItem.h" +#include +#include class NjNyaMissionitems : public NPCAddRemoveItem { std::map> GetSettings() override; diff --git a/dScripts/NjPetSpawnerServer.cpp b/dScripts/NjPetSpawnerServer.cpp deleted file mode 100644 index d09e5f01..00000000 --- a/dScripts/NjPetSpawnerServer.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// -// Created by Mick Vermeulen on 23/08/2021. -// - -#include "NjPetSpawnerServer.h" diff --git a/dScripts/NjPetSpawnerServer.h b/dScripts/NjPetSpawnerServer.h deleted file mode 100644 index 56b6c147..00000000 --- a/dScripts/NjPetSpawnerServer.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once -#include "SpawnPetBaseServer.h" - -class NjPetSpawnerServer : public SpawnPetBaseServer { - -}; diff --git a/dScripts/NjhubLavaPlayerDeathTrigger.cpp b/dScripts/NjhubLavaPlayerDeathTrigger.cpp index ff31df2c..af47f99b 100644 --- a/dScripts/NjhubLavaPlayerDeathTrigger.cpp +++ b/dScripts/NjhubLavaPlayerDeathTrigger.cpp @@ -1,4 +1,5 @@ #include "NjhubLavaPlayerDeathTrigger.h" +#include "Entity.h" void NjhubLavaPlayerDeathTrigger::OnCollisionPhantom(Entity *self, Entity *target) { diff --git a/dScripts/NjhubLavaPlayerDeathTrigger.h b/dScripts/NjhubLavaPlayerDeathTrigger.h index d7e78604..48ff85d0 100644 --- a/dScripts/NjhubLavaPlayerDeathTrigger.h +++ b/dScripts/NjhubLavaPlayerDeathTrigger.h @@ -1,7 +1,6 @@ #pragma once #include "CppScripts.h" - class NjhubLavaPlayerDeathTrigger : public CppScripts::Script { void OnCollisionPhantom(Entity *self, Entity *target) override; }; diff --git a/dScripts/NpcAgCourseStarter.cpp b/dScripts/NpcAgCourseStarter.cpp index 4e6dd5c5..188186fb 100644 --- a/dScripts/NpcAgCourseStarter.cpp +++ b/dScripts/NpcAgCourseStarter.cpp @@ -1,11 +1,9 @@ #include "NpcAgCourseStarter.h" #include "EntityManager.h" -#include "GeneralUtils.h" #include "ScriptedActivityComponent.h" #include "GameMessages.h" #include "LeaderboardManager.h" -#include "Game.h" -#include "dLogger.h" +#include "MissionComponent.h" #include void NpcAgCourseStarter::OnStartup(Entity* self) { @@ -35,8 +33,6 @@ void NpcAgCourseStarter::OnMessageBoxResponse(Entity* self, Entity* sender, int3 } if (identifier == u"player_dialog_cancel_course" && button == 1) { - Game::logger->Log("OnMessageBoxResponse", "Removing player %llu\n", sender->GetObjectID()); - GameMessages::SendNotifyClientObject(self->GetObjectID(), u"stop_timer", 0, 0, LWOOBJID_EMPTY, "", sender->GetSystemAddress()); GameMessages::SendNotifyClientObject(self->GetObjectID(), u"cancel_timer", 0, 0, LWOOBJID_EMPTY, "", sender->GetSystemAddress()); @@ -58,8 +54,6 @@ void NpcAgCourseStarter::OnMessageBoxResponse(Entity* self, Entity* sender, int3 data->values[1] = *(float*)&startTime; - Game::logger->Log("NpcAgCourseStarter", "Start time: %llu / %f\n", startTime, data->values[1]); - EntityManager::Instance()->SerializeEntity(self); } else if (identifier == u"FootRaceCancel") { @@ -94,9 +88,6 @@ void NpcAgCourseStarter::OnFireEventServerSide(Entity *self, Entity *sender, std time_t endTime = std::time(0); time_t finish = (endTime - *(time_t *) &data->values[1]); - Game::logger->Log("NpcAgCourseStarter", "End time: %llu, start time %llu, finish: %llu\n", endTime, - *(time_t *) &data->values[1], finish); - data->values[2] = *(float *) &finish; auto *missionComponent = sender->GetComponent(); diff --git a/dScripts/NpcCowboyServer.cpp b/dScripts/NpcCowboyServer.cpp index 9223dcd4..f4986045 100644 --- a/dScripts/NpcCowboyServer.cpp +++ b/dScripts/NpcCowboyServer.cpp @@ -1,5 +1,5 @@ #include "NpcCowboyServer.h" -#include "MissionComponent.h" +#include "MissionState.h" #include "InventoryComponent.h" void NpcCowboyServer::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState) diff --git a/dScripts/NpcNjAssistantServer.cpp b/dScripts/NpcNjAssistantServer.cpp index 7ff21c8e..b9743756 100644 --- a/dScripts/NpcNjAssistantServer.cpp +++ b/dScripts/NpcNjAssistantServer.cpp @@ -1,6 +1,7 @@ #include "NpcNjAssistantServer.h" #include "GameMessages.h" #include "InventoryComponent.h" +#include "MissionComponent.h" #include "Item.h" void NpcNjAssistantServer::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState) { diff --git a/dScripts/NpcNpSpacemanBob.cpp b/dScripts/NpcNpSpacemanBob.cpp index 2893e039..91fe0f95 100644 --- a/dScripts/NpcNpSpacemanBob.cpp +++ b/dScripts/NpcNpSpacemanBob.cpp @@ -1,10 +1,6 @@ #include "NpcNpSpacemanBob.h" #include "DestroyableComponent.h" -#include "Entity.h" -#include "GameMessages.h" -#include "MissionState.h" -#include "Game.h" -#include "dLogger.h" +#include "MissionComponent.h" void NpcNpSpacemanBob::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState) { diff --git a/dScripts/NpcWispServer.cpp b/dScripts/NpcWispServer.cpp index 03c8f071..0f573d65 100644 --- a/dScripts/NpcWispServer.cpp +++ b/dScripts/NpcWispServer.cpp @@ -1,10 +1,8 @@ #include "NpcWispServer.h" #include "InventoryComponent.h" - #include "EntityManager.h" #include "Entity.h" #include "GameMessages.h" -#include "Item.h" void NpcWispServer::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState) { if (missionID != 1849 && missionID != 1883) diff --git a/dScripts/NsConcertChoiceBuildManager.cpp b/dScripts/NsConcertChoiceBuildManager.cpp index 562ff61a..8875beed 100644 --- a/dScripts/NsConcertChoiceBuildManager.cpp +++ b/dScripts/NsConcertChoiceBuildManager.cpp @@ -1,6 +1,5 @@ #include "NsConcertChoiceBuildManager.h" #include "EntityManager.h" -#include "Player.h" const std::vector NsConcertChoiceBuildManager::crates { { "laser", 11203, 5.0, "Concert_Laser_QB_" }, diff --git a/dScripts/NsConcertInstrument.cpp b/dScripts/NsConcertInstrument.cpp index bfd35083..a449a6a4 100644 --- a/dScripts/NsConcertInstrument.cpp +++ b/dScripts/NsConcertInstrument.cpp @@ -5,6 +5,7 @@ #include "EntityManager.h" #include "RebuildComponent.h" #include "SoundTriggerComponent.h" +#include "MissionComponent.h" // Constants are at the bottom diff --git a/dScripts/NsConcertQuickBuild.cpp b/dScripts/NsConcertQuickBuild.cpp index 6bf501c4..ba7b4010 100644 --- a/dScripts/NsConcertQuickBuild.cpp +++ b/dScripts/NsConcertQuickBuild.cpp @@ -2,9 +2,9 @@ #include "EntityManager.h" #include "NsConcertChoiceBuildManager.h" #include "DestroyableComponent.h" -#include "RenderComponent.h" #include "GameMessages.h" #include "MovingPlatformComponent.h" +#include "MissionComponent.h" const float NsConcertQuickBuild::resetTime = 40.0f; const float NsConcertQuickBuild::resetBlinkTime = 6.0f; diff --git a/dScripts/NsJohnnyMissionServer.cpp b/dScripts/NsJohnnyMissionServer.cpp index 435f50c8..6fc73a82 100644 --- a/dScripts/NsJohnnyMissionServer.cpp +++ b/dScripts/NsJohnnyMissionServer.cpp @@ -1,4 +1,5 @@ #include "NsJohnnyMissionServer.h" +#include "MissionComponent.h" void NsJohnnyMissionServer::OnMissionDialogueOK(Entity *self, Entity *target, int missionID, MissionState missionState) { if (missionID == 773 && missionState <= MissionState::MISSION_STATE_ACTIVE) { diff --git a/dScripts/NsLegoClubDoor.cpp b/dScripts/NsLegoClubDoor.cpp index 1e575c54..0b773b09 100644 --- a/dScripts/NsLegoClubDoor.cpp +++ b/dScripts/NsLegoClubDoor.cpp @@ -1,8 +1,7 @@ #include "NsLegoClubDoor.h" #include "dZoneManager.h" -#include "EntityManager.h" -#include "GeneralUtils.h" #include "GameMessages.h" +#include "AMFFormat.h" void NsLegoClubDoor::OnStartup(Entity* self) { diff --git a/dScripts/NsLegoClubDoor.h b/dScripts/NsLegoClubDoor.h index 480c9250..7f17692d 100644 --- a/dScripts/NsLegoClubDoor.h +++ b/dScripts/NsLegoClubDoor.h @@ -2,7 +2,6 @@ #include "CppScripts.h" #include "ChooseYourDestinationNsToNt.h" #include "BaseConsoleTeleportServer.h" -#include "AMFFormat.h" class NsLegoClubDoor : public CppScripts::Script, ChooseYourDestinationNsToNt, BaseConsoleTeleportServer { diff --git a/dScripts/NsLupTeleport.cpp b/dScripts/NsLupTeleport.cpp index 28f598a4..4c196d01 100644 --- a/dScripts/NsLupTeleport.cpp +++ b/dScripts/NsLupTeleport.cpp @@ -1,8 +1,7 @@ #include "NsLupTeleport.h" #include "dZoneManager.h" -#include "EntityManager.h" -#include "GeneralUtils.h" #include "GameMessages.h" +#include "AMFFormat.h" void NsLupTeleport::OnStartup(Entity* self) { diff --git a/dScripts/NsLupTeleport.h b/dScripts/NsLupTeleport.h index 3ace6698..833f5f0a 100644 --- a/dScripts/NsLupTeleport.h +++ b/dScripts/NsLupTeleport.h @@ -2,7 +2,6 @@ #include "CppScripts.h" #include "ChooseYourDestinationNsToNt.h" #include "BaseConsoleTeleportServer.h" -#include "AMFFormat.h" class NsLupTeleport : public CppScripts::Script, ChooseYourDestinationNsToNt, BaseConsoleTeleportServer { diff --git a/dScripts/NsModularBuild.cpp b/dScripts/NsModularBuild.cpp index 09d3d695..065d061e 100644 --- a/dScripts/NsModularBuild.cpp +++ b/dScripts/NsModularBuild.cpp @@ -1,6 +1,5 @@ #include "NsModularBuild.h" -#include "EntityManager.h" -#include "Character.h" +#include "MissionComponent.h" void NsModularBuild::OnModularBuildExit(Entity* self, Entity* player, bool bCompleted, std::vector modules) { if (bCompleted) { diff --git a/dScripts/NsQbImaginationStatue.cpp b/dScripts/NsQbImaginationStatue.cpp index 6b512119..4404ba5f 100644 --- a/dScripts/NsQbImaginationStatue.cpp +++ b/dScripts/NsQbImaginationStatue.cpp @@ -1,9 +1,6 @@ #include "NsQbImaginationStatue.h" #include "EntityManager.h" -#include "Loot.h" #include "GameMessages.h" -#include "ScriptedActivityComponent.h" -#include "RebuildComponent.h" void NsQbImaginationStatue::OnStartup(Entity* self) { diff --git a/dScripts/NsTokenConsoleServer.cpp b/dScripts/NsTokenConsoleServer.cpp index 0e9ac09e..976b9bc8 100644 --- a/dScripts/NsTokenConsoleServer.cpp +++ b/dScripts/NsTokenConsoleServer.cpp @@ -1,6 +1,5 @@ #include "NsTokenConsoleServer.h" #include "InventoryComponent.h" -#include "EntityManager.h" #include "GameMessages.h" #include "Character.h" #include "MissionComponent.h" diff --git a/dScripts/NtAssemblyTubeServer.cpp b/dScripts/NtAssemblyTubeServer.cpp index 5f05f54e..935993f4 100644 --- a/dScripts/NtAssemblyTubeServer.cpp +++ b/dScripts/NtAssemblyTubeServer.cpp @@ -1,9 +1,7 @@ #include "NtAssemblyTubeServer.h" #include "GameMessages.h" -#include "dZoneManager.h" #include "EntityManager.h" -#include "SkillComponent.h" -#include "DestroyableComponent.h" +#include "MissionComponent.h" void NtAssemblyTubeServer::OnStartup(Entity* self) { @@ -17,8 +15,6 @@ void NtAssemblyTubeServer::OnPlayerLoaded(Entity* self, Entity* player) void NtAssemblyTubeServer::OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) { - Game::logger->Log("NtAssemblyTubeServer", "Entering\n"); - if (status != "ENTER" || !entering->IsPlayer() || name != "teleport") return; auto* player = entering; diff --git a/dScripts/NtCombatChallengeDummy.cpp b/dScripts/NtCombatChallengeDummy.cpp index 76f8576f..a391e00f 100644 --- a/dScripts/NtCombatChallengeDummy.cpp +++ b/dScripts/NtCombatChallengeDummy.cpp @@ -1,7 +1,6 @@ #include "NtCombatChallengeDummy.h" #include "EntityManager.h" - void NtCombatChallengeDummy::OnDie(Entity* self, Entity* killer) { const auto challengeObjectID = self->GetVar(u"challengeObjectID"); diff --git a/dScripts/NtCombatChallengeExplodingDummy.cpp b/dScripts/NtCombatChallengeExplodingDummy.cpp index dd61817d..24494939 100644 --- a/dScripts/NtCombatChallengeExplodingDummy.cpp +++ b/dScripts/NtCombatChallengeExplodingDummy.cpp @@ -1,5 +1,4 @@ #include "NtCombatChallengeExplodingDummy.h" -#include "NtCombatChallengeDummy.h" #include "EntityManager.h" #include "SkillComponent.h" diff --git a/dScripts/NtCombatChallengeServer.cpp b/dScripts/NtCombatChallengeServer.cpp index 2c6a5426..4bf5dffc 100644 --- a/dScripts/NtCombatChallengeServer.cpp +++ b/dScripts/NtCombatChallengeServer.cpp @@ -1,27 +1,16 @@ #include "NtCombatChallengeServer.h" -#include "Character.h" #include "GameMessages.h" #include "EntityManager.h" #include "InventoryComponent.h" #include "MissionComponent.h" - void NtCombatChallengeServer::OnUse(Entity* self, Entity* user) { - auto* character = user->GetCharacter(); - - if (character == nullptr) - { - return; - } - GameMessages::SendNotifyClientObject(self->GetObjectID(), u"UI_Open", 0, 0, user->GetObjectID(), "", user->GetSystemAddress()); } void NtCombatChallengeServer::OnDie(Entity* self, Entity* killer) { - Game::logger->Log("NtCombatChallengeServer", "Smashed\n"); - if (killer != self && killer != nullptr) { SpawnTargetDummy(self); @@ -47,8 +36,6 @@ void NtCombatChallengeServer::OnHitOrHealResult(Entity* self, Entity* attacker, self->SetVar(u"totalDmg", totalDmg); self->SetNetworkVar(u"totalDmg", totalDmg); - Game::logger->Log("NtCombatChallengeServer", "Damage %i -> %i\n", damage, totalDmg); - GameMessages::SendPlayNDAudioEmitter(self, attacker->GetSystemAddress(), scoreSound); } @@ -169,12 +156,8 @@ void NtCombatChallengeServer::ResetGame(Entity* self) { for (const auto& mission : tMissions) { - Game::logger->Log("NtCombatChallengeServer", "Mission %i, %i\n", mission.mission, mission.damage); - if (totalDmg >= mission.damage) { - Game::logger->Log("NtCombatChallengeServer", "Progressing Mission %i, %i\n", mission.mission, mission.damage); - missionComponent->ForceProgressTaskType(mission.mission, 1, 1); } } diff --git a/dScripts/NtConsoleTeleportServer.cpp b/dScripts/NtConsoleTeleportServer.cpp index 91354c0b..b03ae34e 100644 --- a/dScripts/NtConsoleTeleportServer.cpp +++ b/dScripts/NtConsoleTeleportServer.cpp @@ -1,5 +1,6 @@ #include "NtConsoleTeleportServer.h" - +#include "Entity.h" +#include "AMFFormat.h" void NtConsoleTeleportServer::OnStartup(Entity* self) { diff --git a/dScripts/NtConsoleTeleportServer.h b/dScripts/NtConsoleTeleportServer.h index 0d834cd6..7bba7ee1 100644 --- a/dScripts/NtConsoleTeleportServer.h +++ b/dScripts/NtConsoleTeleportServer.h @@ -2,7 +2,6 @@ #include "CppScripts.h" #include "ChooseYourDestinationNsToNt.h" #include "BaseConsoleTeleportServer.h" -#include "AMFFormat.h" class NtConsoleTeleportServer : public CppScripts::Script, BaseConsoleTeleportServer { diff --git a/dScripts/NtDirtCloudServer.cpp b/dScripts/NtDirtCloudServer.cpp index ee011dd8..82572703 100644 --- a/dScripts/NtDirtCloudServer.cpp +++ b/dScripts/NtDirtCloudServer.cpp @@ -1,5 +1,4 @@ #include "NtDirtCloudServer.h" -#include "dZoneManager.h" #include "MissionComponent.h" std::map> NtDirtCloudServer::m_Missions = diff --git a/dScripts/NtDukeServer.cpp b/dScripts/NtDukeServer.cpp index fe196811..df3f39d6 100644 --- a/dScripts/NtDukeServer.cpp +++ b/dScripts/NtDukeServer.cpp @@ -1,5 +1,6 @@ #include "NtDukeServer.h" #include "InventoryComponent.h" +#include "MissionComponent.h" void NtDukeServer::SetVariables(Entity *self) { self->SetVar(m_SpyProximityVariable, 35.0f); diff --git a/dScripts/NtFactionSpyServer.cpp b/dScripts/NtFactionSpyServer.cpp index b99990c0..f1104e34 100644 --- a/dScripts/NtFactionSpyServer.cpp +++ b/dScripts/NtFactionSpyServer.cpp @@ -3,6 +3,7 @@ #include "ProximityMonitorComponent.h" #include "InventoryComponent.h" #include "GameMessages.h" +#include "MissionComponent.h" void NtFactionSpyServer::OnStartup(Entity *self) { SetVariables(self); diff --git a/dScripts/NtHaelServer.cpp b/dScripts/NtHaelServer.cpp index 2e2643fe..a4c16e1f 100644 --- a/dScripts/NtHaelServer.cpp +++ b/dScripts/NtHaelServer.cpp @@ -1,4 +1,5 @@ #include "NtHaelServer.h" +#include "Entity.h" void NtHaelServer::SetVariables(Entity *self) { self->SetVar(m_SpyProximityVariable, 25.0f); diff --git a/dScripts/NtParadoxTeleServer.cpp b/dScripts/NtParadoxTeleServer.cpp index 41d21cb7..84222374 100644 --- a/dScripts/NtParadoxTeleServer.cpp +++ b/dScripts/NtParadoxTeleServer.cpp @@ -1,9 +1,7 @@ #include "NtParadoxTeleServer.h" #include "GameMessages.h" -#include "dZoneManager.h" #include "EntityManager.h" -#include "SkillComponent.h" -#include "DestroyableComponent.h" +#include "MissionComponent.h" void NtParadoxTeleServer::OnStartup(Entity* self) { @@ -17,8 +15,6 @@ void NtParadoxTeleServer::OnPlayerLoaded(Entity* self, Entity* player) void NtParadoxTeleServer::OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) { - Game::logger->Log("NtParadoxTeleServer", "Entering\n"); - if (status != "ENTER" || !entering->IsPlayer() || name != "teleport") return; auto* player = entering; diff --git a/dScripts/NtSentinelWalkwayServer.cpp b/dScripts/NtSentinelWalkwayServer.cpp index 5f4b50e2..3d7c75a3 100644 --- a/dScripts/NtSentinelWalkwayServer.cpp +++ b/dScripts/NtSentinelWalkwayServer.cpp @@ -1,7 +1,7 @@ #include "NtSentinelWalkwayServer.h" #include "PhantomPhysicsComponent.h" #include "EntityManager.h" - +#include "MissionComponent.h" void NtSentinelWalkwayServer::OnStartup(Entity* self) { @@ -9,8 +9,6 @@ void NtSentinelWalkwayServer::OnStartup(Entity* self) if (phantomPhysicsComponent == nullptr) { - Game::logger->Log("NtSentinelWalkwayServer", "Failed to find PhantomPhysicsComponent\n"); - return; } @@ -21,8 +19,6 @@ void NtSentinelWalkwayServer::OnStartup(Entity* self) force = 115; } - Game::logger->Log("NtSentinelWalkwayServer", "Setting force to %i\n", force); - const auto forward = self->GetRotation().GetRightVector() * -1; phantomPhysicsComponent->SetEffectType(0); // PUSH diff --git a/dScripts/NtVentureCannonServer.cpp b/dScripts/NtVentureCannonServer.cpp index 0b72c8b7..66172733 100644 --- a/dScripts/NtVentureCannonServer.cpp +++ b/dScripts/NtVentureCannonServer.cpp @@ -2,7 +2,6 @@ #include "GameMessages.h" #include "EntityManager.h" - void NtVentureCannonServer::OnUse(Entity* self, Entity* user) { auto* player = user; diff --git a/dScripts/NtVentureSpeedPadServer.cpp b/dScripts/NtVentureSpeedPadServer.cpp index 1f44ec04..19a752d2 100644 --- a/dScripts/NtVentureSpeedPadServer.cpp +++ b/dScripts/NtVentureSpeedPadServer.cpp @@ -2,7 +2,6 @@ #include "SkillComponent.h" #include "MissionComponent.h" - void NtVentureSpeedPadServer::OnStartup(Entity* self) { self->SetProximityRadius(3, "speedboost"); diff --git a/dScripts/NtXRayServer.cpp b/dScripts/NtXRayServer.cpp index 7fae01c6..b65cf65b 100644 --- a/dScripts/NtXRayServer.cpp +++ b/dScripts/NtXRayServer.cpp @@ -1,6 +1,4 @@ #include "NtXRayServer.h" -#include "PhantomPhysicsComponent.h" -#include "EntityManager.h" #include "SkillComponent.h" void NtXRayServer::OnCollisionPhantom(Entity* self, Entity* target) diff --git a/dScripts/PetDigBuild.cpp b/dScripts/PetDigBuild.cpp index 31b3db06..7ff88fff 100644 --- a/dScripts/PetDigBuild.cpp +++ b/dScripts/PetDigBuild.cpp @@ -1,5 +1,6 @@ #include "PetDigBuild.h" #include "EntityManager.h" +#include "MissionComponent.h" void PetDigBuild::OnRebuildComplete(Entity* self, Entity* target) { auto flagNumber = self->GetVar(u"flagNum"); diff --git a/dScripts/PetDigServer.cpp b/dScripts/PetDigServer.cpp index a78c0881..dc7e85dd 100644 --- a/dScripts/PetDigServer.cpp +++ b/dScripts/PetDigServer.cpp @@ -1,7 +1,6 @@ -#include +#include "dZoneManager.h" #include "PetDigServer.h" #include "MissionComponent.h" -#include "InventoryComponent.h" #include "EntityManager.h" #include "Character.h" #include "PetComponent.h" diff --git a/dScripts/PrSeagullFly.cpp b/dScripts/PrSeagullFly.cpp index 728b245f..a4dd5fcd 100644 --- a/dScripts/PrSeagullFly.cpp +++ b/dScripts/PrSeagullFly.cpp @@ -1,4 +1,5 @@ #include "PrSeagullFly.h" +#include "Entity.h" void PrSeagullFly::OnStartup(Entity* self) { diff --git a/dScripts/PrWhistle.cpp b/dScripts/PrWhistle.cpp index 850059d2..4d4d0708 100644 --- a/dScripts/PrWhistle.cpp +++ b/dScripts/PrWhistle.cpp @@ -1,6 +1,6 @@ #include "PrWhistle.h" #include "Character.h" -#include "CharacterComponent.h" +#include "Entity.h" void PrWhistle::OnFireEventServerSide(Entity *self, Entity *sender, std::string args, int32_t param1, int32_t param2, int32_t param3) diff --git a/dScripts/PropertyDeathPlane.cpp b/dScripts/PropertyDeathPlane.cpp index b682be67..93981dac 100644 --- a/dScripts/PropertyDeathPlane.cpp +++ b/dScripts/PropertyDeathPlane.cpp @@ -1,8 +1,6 @@ #include "PropertyDeathPlane.h" #include "Entity.h" #include "GameMessages.h" -#include "Game.h" -#include "dLogger.h" #include "EntityManager.h" void PropertyDeathPlane::OnCollisionPhantom(Entity* self, Entity* target) @@ -16,7 +14,5 @@ void PropertyDeathPlane::OnCollisionPhantom(Entity* self, Entity* target) auto* teleport = teleportGroup[0]; - Game::logger->Log("PropertyDeathPlane", "Teleporting!\n"); - GameMessages::SendTeleport(target->GetObjectID(), teleport->GetPosition(), teleport->GetRotation(), target->GetSystemAddress()); } diff --git a/dScripts/PropertyDevice.cpp b/dScripts/PropertyDevice.cpp index 6d8e2c0a..ed0d7b81 100644 --- a/dScripts/PropertyDevice.cpp +++ b/dScripts/PropertyDevice.cpp @@ -1,6 +1,7 @@ #include "PropertyDevice.h" #include "GameMessages.h" #include "EntityManager.h" +#include "MissionComponent.h" void PropertyDevice::OnStartup(Entity *self) { auto* zoneControl = EntityManager::Instance()->GetZoneControlEntity(); diff --git a/dScripts/QbEnemyStunner.cpp b/dScripts/QbEnemyStunner.cpp index 9f0cb8fc..a3dfa94b 100644 --- a/dScripts/QbEnemyStunner.cpp +++ b/dScripts/QbEnemyStunner.cpp @@ -1,7 +1,5 @@ #include "QbEnemyStunner.h" -#include "EntityManager.h" #include "SkillComponent.h" -#include "GameMessages.h" #include "DestroyableComponent.h" void QbEnemyStunner::OnRebuildComplete(Entity* self, Entity* target) diff --git a/dScripts/RaceImagineCrateServer.cpp b/dScripts/RaceImagineCrateServer.cpp index 166b3363..3729004a 100644 --- a/dScripts/RaceImagineCrateServer.cpp +++ b/dScripts/RaceImagineCrateServer.cpp @@ -1,10 +1,10 @@ #include "CharacterComponent.h" #include "DestroyableComponent.h" #include "EntityManager.h" -#include "GameMessages.h" #include "PossessableComponent.h" #include "RaceImagineCrateServer.h" #include "RacingTaskParam.h" +#include "MissionComponent.h" #include "SkillComponent.h" void RaceImagineCrateServer::OnDie(Entity* self, Entity* killer) diff --git a/dScripts/RaceImaginePowerup.cpp b/dScripts/RaceImaginePowerup.cpp index 43e20e9d..a940b88d 100644 --- a/dScripts/RaceImaginePowerup.cpp +++ b/dScripts/RaceImaginePowerup.cpp @@ -1,11 +1,9 @@ -#include "CharacterComponent.h" #include "DestroyableComponent.h" #include "EntityManager.h" -#include "PossessableComponent.h" #include "PossessorComponent.h" #include "RaceImaginePowerup.h" #include "RacingTaskParam.h" - +#include "MissionComponent.h" void RaceImaginePowerup::OnFireEventServerSide(Entity *self, Entity *sender, std::string args, int32_t param1, int32_t param2, int32_t param3) diff --git a/dScripts/RaceMaelstromGeiser.cpp b/dScripts/RaceMaelstromGeiser.cpp index 8e91c5fe..88a45bbd 100644 --- a/dScripts/RaceMaelstromGeiser.cpp +++ b/dScripts/RaceMaelstromGeiser.cpp @@ -1,14 +1,10 @@ #include "RaceMaelstromGeiser.h" -#include "DestroyableComponent.h" #include "GameMessages.h" #include "PossessableComponent.h" #include "PossessorComponent.h" #include "EntityManager.h" #include "RacingControlComponent.h" #include "dZoneManager.h" -#include "Game.h" -#include "dLogger.h" - void RaceMaelstromGeiser::OnStartup(Entity* self) { @@ -26,15 +22,11 @@ void RaceMaelstromGeiser::OnProximityUpdate(Entity* self, Entity* entering, std: return; } - Game::logger->Log("RaceMaelstromGeiser", "Entered\n"); - if (!self->GetVar(u"AmFiring")) { return; } - Game::logger->Log("RaceMaelstromGeiser", "Smashing!\n"); - auto* possessableComponent = entering->GetComponent(); Entity* vehicle; diff --git a/dScripts/RaceSmashServer.cpp b/dScripts/RaceSmashServer.cpp index 582a8ed3..8c8b3f79 100644 --- a/dScripts/RaceSmashServer.cpp +++ b/dScripts/RaceSmashServer.cpp @@ -3,6 +3,7 @@ #include "PossessableComponent.h" #include "RaceSmashServer.h" #include "RacingTaskParam.h" +#include "MissionComponent.h" void RaceSmashServer::OnDie(Entity *self, Entity *killer) { // Crate is smashed by the car diff --git a/dScripts/SGCannon.cpp b/dScripts/SGCannon.cpp index 2deacdde..b1f64b64 100644 --- a/dScripts/SGCannon.cpp +++ b/dScripts/SGCannon.cpp @@ -9,8 +9,8 @@ #include "CharacterComponent.h" #include "SimplePhysicsComponent.h" #include "MovementAIComponent.h" -#include "ControllablePhysicsComponent.h" #include "../dWorldServer/ObjectIDManager.h" +#include "MissionComponent.h" void SGCannon::OnStartup(Entity *self) { Game::logger->Log("SGCannon", "OnStartup\n"); diff --git a/dScripts/ScriptComponent.cpp b/dScripts/ScriptComponent.cpp index 6b3304a3..3c5c2584 100644 --- a/dScripts/ScriptComponent.cpp +++ b/dScripts/ScriptComponent.cpp @@ -5,7 +5,6 @@ #include "Entity.h" #include "ScriptComponent.h" -#include "InvalidScript.h" ScriptComponent::ScriptComponent(Entity* parent, std::string scriptName, bool serialized, bool client) : Component(parent) { m_Serialized = serialized; diff --git a/dScripts/ScriptComponent.h b/dScripts/ScriptComponent.h index 3c8597ed..82d1f648 100644 --- a/dScripts/ScriptComponent.h +++ b/dScripts/ScriptComponent.h @@ -6,7 +6,6 @@ #ifndef SCRIPTCOMPONENT_H #define SCRIPTCOMPONENT_H -#include "BitStream.h" #include "CppScripts.h" #include "Component.h" #include diff --git a/dScripts/ScriptedPowerupSpawner.cpp b/dScripts/ScriptedPowerupSpawner.cpp index fe35dfed..91c25856 100644 --- a/dScripts/ScriptedPowerupSpawner.cpp +++ b/dScripts/ScriptedPowerupSpawner.cpp @@ -1,6 +1,5 @@ #include "ScriptedPowerupSpawner.h" #include "RenderComponent.h" -#include "GameMessages.h" #include "EntityManager.h" void ScriptedPowerupSpawner::OnTemplateStartup(Entity *self) { diff --git a/dScripts/SpawnGryphonServer.cpp b/dScripts/SpawnGryphonServer.cpp index 93cbbac9..d411569c 100644 --- a/dScripts/SpawnGryphonServer.cpp +++ b/dScripts/SpawnGryphonServer.cpp @@ -1,6 +1,7 @@ #include "SpawnGryphonServer.h" #include "InventoryComponent.h" #include "GameMessages.h" +#include "MissionComponent.h" void SpawnGryphonServer::SetVariables(Entity *self) { self->SetVar(u"petLOT", 12433); diff --git a/dScripts/SpawnLionServer.cpp b/dScripts/SpawnLionServer.cpp index 5c6b79d3..b19531a4 100644 --- a/dScripts/SpawnLionServer.cpp +++ b/dScripts/SpawnLionServer.cpp @@ -1,4 +1,5 @@ #include "SpawnLionServer.h" +#include "Entity.h" void SpawnLionServer::SetVariables(Entity *self) { self->SetVar(u"petLOT", 3520); diff --git a/dScripts/SpawnSaberCatServer.cpp b/dScripts/SpawnSaberCatServer.cpp index 1d3a5df8..e89d9df7 100644 --- a/dScripts/SpawnSaberCatServer.cpp +++ b/dScripts/SpawnSaberCatServer.cpp @@ -1,4 +1,5 @@ #include "SpawnSaberCatServer.h" +#include "Entity.h" void SpawnSaberCatServer::SetVariables(Entity *self) { self->SetVar(u"petLOT", 12432); diff --git a/dScripts/SpawnShrakeServer.cpp b/dScripts/SpawnShrakeServer.cpp index 954cbc3f..5be55ebc 100644 --- a/dScripts/SpawnShrakeServer.cpp +++ b/dScripts/SpawnShrakeServer.cpp @@ -1,4 +1,5 @@ #include "SpawnShrakeServer.h" +#include "Entity.h" void SpawnShrakeServer::SetVariables(Entity *self) { self->SetVar(u"petLOT", 12434); diff --git a/dScripts/SpawnStegoServer.cpp b/dScripts/SpawnStegoServer.cpp index ef79d889..d845ff45 100644 --- a/dScripts/SpawnStegoServer.cpp +++ b/dScripts/SpawnStegoServer.cpp @@ -1,4 +1,5 @@ #include "SpawnStegoServer.h" +#include "Entity.h" void SpawnStegoServer::SetVariables(Entity *self) { self->SetVar(u"petLOT", 12431); diff --git a/dScripts/SpecialImaginePowerupSpawner.cpp b/dScripts/SpecialImaginePowerupSpawner.cpp index f19b8d28..8417efa2 100644 --- a/dScripts/SpecialImaginePowerupSpawner.cpp +++ b/dScripts/SpecialImaginePowerupSpawner.cpp @@ -5,7 +5,6 @@ #include "DestroyableComponent.h" #include "EntityManager.h" - void SpecialImaginePowerupSpawner::OnStartup(Entity* self) { self->SetProximityRadius(1.5f, "powerupEnter"); diff --git a/dScripts/SsModularBuildServer.cpp b/dScripts/SsModularBuildServer.cpp index ff05d0e4..33f8db47 100644 --- a/dScripts/SsModularBuildServer.cpp +++ b/dScripts/SsModularBuildServer.cpp @@ -1,6 +1,5 @@ #include "SsModularBuildServer.h" -#include "EntityManager.h" -#include "Character.h" +#include "MissionComponent.h" void SsModularBuildServer::OnModularBuildExit(Entity* self, Entity* player, bool bCompleted, std::vector modules) { int missionNum = 1732; diff --git a/dScripts/StoryBoxInteractServer.cpp b/dScripts/StoryBoxInteractServer.cpp index 12cb6815..e5899f5d 100644 --- a/dScripts/StoryBoxInteractServer.cpp +++ b/dScripts/StoryBoxInteractServer.cpp @@ -1,7 +1,6 @@ #include "StoryBoxInteractServer.h" #include "Character.h" #include "GameMessages.h" -#include "Game.h" #include "dServer.h" #include "AMFFormat.h" diff --git a/dScripts/Sunflower.cpp b/dScripts/Sunflower.cpp index ac3134d5..436ca5f4 100644 --- a/dScripts/Sunflower.cpp +++ b/dScripts/Sunflower.cpp @@ -1,4 +1,5 @@ #include "Sunflower.h" +#include "Entity.h" void Sunflower::OnStartup(Entity *self) { self->SetVar(u"numCycles", 6); diff --git a/dScripts/TokenConsoleServer.cpp b/dScripts/TokenConsoleServer.cpp index 58565869..378cc17f 100644 --- a/dScripts/TokenConsoleServer.cpp +++ b/dScripts/TokenConsoleServer.cpp @@ -1,9 +1,7 @@ #include "TokenConsoleServer.h" #include "InventoryComponent.h" -#include "Item.h" #include "GameMessages.h" #include "Character.h" -#include "dCommonVars.h" //2021-05-03 - max - added script, omitted some parts related to inheritance in lua which we don't need diff --git a/dScripts/TreasureChestDragonServer.cpp b/dScripts/TreasureChestDragonServer.cpp index d0e8eaec..80f8aa48 100644 --- a/dScripts/TreasureChestDragonServer.cpp +++ b/dScripts/TreasureChestDragonServer.cpp @@ -1,7 +1,6 @@ #include "TreasureChestDragonServer.h" #include "ScriptedActivityComponent.h" #include "TeamManager.h" -#include "Loot.h" #include "EntityManager.h" void TreasureChestDragonServer::OnStartup(Entity* self) diff --git a/dScripts/TriggerAmbush.cpp b/dScripts/TriggerAmbush.cpp index 42b1ea8f..f9fb8cf7 100644 --- a/dScripts/TriggerAmbush.cpp +++ b/dScripts/TriggerAmbush.cpp @@ -1,7 +1,6 @@ #include "TriggerAmbush.h" #include "dZoneManager.h" -#include "EntityManager.h" void TriggerAmbush::OnStartup(Entity* self) { @@ -11,21 +10,15 @@ void TriggerAmbush::OnStartup(Entity* self) void TriggerAmbush::OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) { if (name != "ambush" || status != "ENTER" || !entering->IsPlayer()) return; - - Game::logger->Log("TriggerAmbush", "Got ambush collision!\n"); if (self->GetVar(u"triggered")) return; self->SetVar(u"triggered", true); - Game::logger->Log("TriggerAmbush", "Triggering ambush!\n"); - const auto spawners = dZoneManager::Instance()->GetSpawnersByName("Ambush"); for (auto* spawner : spawners) { - Game::logger->Log("TriggerAmbush", "Triggering ambush on spawner!\n"); - spawner->Activate(); } diff --git a/dScripts/VeBricksampleServer.cpp b/dScripts/VeBricksampleServer.cpp index f42cd9a4..76486d78 100644 --- a/dScripts/VeBricksampleServer.cpp +++ b/dScripts/VeBricksampleServer.cpp @@ -1,6 +1,7 @@ #include "VeBricksampleServer.h" #include "InventoryComponent.h" #include "EntityManager.h" +#include "MissionComponent.h" #include "GameMessages.h" void VeBricksampleServer::OnUse(Entity *self, Entity *user) { diff --git a/dScripts/WaveBossApe.cpp b/dScripts/WaveBossApe.cpp index c7fdccf2..f4d8a132 100644 --- a/dScripts/WaveBossApe.cpp +++ b/dScripts/WaveBossApe.cpp @@ -1,5 +1,6 @@ #include "WaveBossApe.h" #include "BaseCombatAIComponent.h" +#include "Entity.h" void WaveBossApe::OnStartup(Entity *self) { BaseWavesGenericEnemy::OnStartup(self); diff --git a/dScripts/WaveBossHammerling.cpp b/dScripts/WaveBossHammerling.cpp index 6dce0ae3..4775bf42 100644 --- a/dScripts/WaveBossHammerling.cpp +++ b/dScripts/WaveBossHammerling.cpp @@ -1,5 +1,6 @@ #include "WaveBossHammerling.h" #include "BaseCombatAIComponent.h" +#include "Entity.h" void WaveBossHammerling::OnStartup(Entity *self) { BaseWavesGenericEnemy::OnStartup(self); diff --git a/dScripts/WaveBossHorsemen.cpp b/dScripts/WaveBossHorsemen.cpp index 75bffa5b..c129d654 100644 --- a/dScripts/WaveBossHorsemen.cpp +++ b/dScripts/WaveBossHorsemen.cpp @@ -1,5 +1,6 @@ #include "WaveBossHorsemen.h" #include "BaseCombatAIComponent.h" +#include "Entity.h" void WaveBossHorsemen::OnStartup(Entity *self) { BaseWavesGenericEnemy::OnStartup(self); diff --git a/dScripts/WaveBossSpiderling.cpp b/dScripts/WaveBossSpiderling.cpp index f168cb7b..5c8f8766 100644 --- a/dScripts/WaveBossSpiderling.cpp +++ b/dScripts/WaveBossSpiderling.cpp @@ -1,5 +1,6 @@ #include "WaveBossSpiderling.h" #include "BaseCombatAIComponent.h" +#include "Entity.h" void WaveBossSpiderling::OnStartup(Entity *self) { BaseWavesGenericEnemy::OnStartup(self); diff --git a/dScripts/WhFans.cpp b/dScripts/WhFans.cpp index 3a594a4c..f71383cf 100644 --- a/dScripts/WhFans.cpp +++ b/dScripts/WhFans.cpp @@ -1,6 +1,9 @@ #include "WhFans.h" #include "RenderComponent.h" +#include "GameMessages.h" +#include "EntityManager.h" +#include "PhantomPhysicsComponent.h" void WhFans::OnStartup(Entity* self) { self->SetVar(u"alive", true); diff --git a/dScripts/WhFans.h b/dScripts/WhFans.h index 91aaa9d8..d41eed5b 100644 --- a/dScripts/WhFans.h +++ b/dScripts/WhFans.h @@ -1,9 +1,5 @@ #pragma once #include "CppScripts.h" -#include "GameMessages.h" -#include "EntityManager.h" -#include "PhantomPhysicsComponent.h" - class WhFans : public CppScripts::Script { public: diff --git a/dScripts/WildAmbients.cpp b/dScripts/WildAmbients.cpp index 8ad0f04a..f6414ee8 100644 --- a/dScripts/WildAmbients.cpp +++ b/dScripts/WildAmbients.cpp @@ -1,6 +1,4 @@ #include "WildAmbients.h" -#include "EntityManager.h" -#include "Character.h" #include "GameMessages.h" void WildAmbients::OnUse(Entity* self, Entity* user) diff --git a/dScripts/WishingWellServer.cpp b/dScripts/WishingWellServer.cpp index 36bca973..09e953ac 100644 --- a/dScripts/WishingWellServer.cpp +++ b/dScripts/WishingWellServer.cpp @@ -1,8 +1,6 @@ #include "WishingWellServer.h" -#include "Loot.h" #include "ScriptedActivityComponent.h" #include "GameMessages.h" -#include "Game.h" void WishingWellServer::OnStartup(Entity* self) { diff --git a/dScripts/ZoneAgMedProperty.cpp b/dScripts/ZoneAgMedProperty.cpp index 7fdca69b..da8214b1 100644 --- a/dScripts/ZoneAgMedProperty.cpp +++ b/dScripts/ZoneAgMedProperty.cpp @@ -1,7 +1,7 @@ #include "ZoneAgMedProperty.h" +#include "Entity.h" void ZoneAgMedProperty::SetGameVariables(Entity *self) { - Game::logger->Log("Properties", "Setting variables in instance\n"); self->SetVar(ClaimMarkerGroup, "ClaimMarker"); self->SetVar(GeneratorGroup, "Generator"); diff --git a/dScripts/ZoneAgProperty.cpp b/dScripts/ZoneAgProperty.cpp index ce30af68..44650a35 100644 --- a/dScripts/ZoneAgProperty.cpp +++ b/dScripts/ZoneAgProperty.cpp @@ -1,12 +1,11 @@ #include "ZoneAgProperty.h" #include "EntityManager.h" -#include "BasePropertyServer.h" #include "Character.h" #include "Entity.h" #include "GameMessages.h" #include "dZoneManager.h" -#include "LDFFormat.h" #include "RenderComponent.h" +#include "MissionComponent.h" void ZoneAgProperty::SetGameVariables(Entity *self) { self->SetVar(GuardGroup, "Guard"); @@ -340,7 +339,6 @@ void ZoneAgProperty::OnZonePropertyModelPickedUp(Entity* self, Entity* player) { } void ZoneAgProperty::OnZonePropertyModelRemoved(Entity* self, Entity* player) { - Game::logger->Log("OnZonePropertyModelRemoved", "Removed flag updated!\n"); auto* character = player->GetCharacter(); character->SetPlayerFlag(111, true); } diff --git a/dScripts/ZoneAgProperty.h b/dScripts/ZoneAgProperty.h index 3d88215b..4044be57 100644 --- a/dScripts/ZoneAgProperty.h +++ b/dScripts/ZoneAgProperty.h @@ -1,5 +1,4 @@ #pragma once -#include "CppScripts.h" #include "BasePropertyServer.h" class ZoneAgProperty : public BasePropertyServer { diff --git a/dScripts/ZoneAgSpiderQueen.cpp b/dScripts/ZoneAgSpiderQueen.cpp index 57f93698..27c11aa7 100644 --- a/dScripts/ZoneAgSpiderQueen.cpp +++ b/dScripts/ZoneAgSpiderQueen.cpp @@ -1,10 +1,8 @@ #include "ZoneAgSpiderQueen.h" #include "GameMessages.h" #include "EntityManager.h" -#include "Character.h" #include "ZoneAgProperty.h" #include "DestroyableComponent.h" -#include "dZoneManager.h" void ZoneAgSpiderQueen::SetGameVariables(Entity *self) { ZoneAgProperty::SetGameVariables(self); diff --git a/dScripts/ZoneAgSurvival.h b/dScripts/ZoneAgSurvival.h index 3f84c6d0..c5d803ae 100644 --- a/dScripts/ZoneAgSurvival.h +++ b/dScripts/ZoneAgSurvival.h @@ -1,6 +1,7 @@ #pragma once #include "CppScripts.h" #include "BaseSurvivalServer.h" +#include class ZoneAgSurvival : public BaseSurvivalServer { Constants GetConstants() override; diff --git a/dScripts/ZoneFvProperty.cpp b/dScripts/ZoneFvProperty.cpp index bc573667..64aaad9e 100644 --- a/dScripts/ZoneFvProperty.cpp +++ b/dScripts/ZoneFvProperty.cpp @@ -1,4 +1,5 @@ #include "ZoneFvProperty.h" +#include "Entity.h" void ZoneFvProperty::SetGameVariables(Entity *self) { self->SetVar(ClaimMarkerGroup, "Platform"); diff --git a/dScripts/ZoneGfProperty.cpp b/dScripts/ZoneGfProperty.cpp index 630e915a..925320c3 100644 --- a/dScripts/ZoneGfProperty.cpp +++ b/dScripts/ZoneGfProperty.cpp @@ -1,4 +1,5 @@ #include "ZoneGfProperty.h" +#include "Entity.h" void ZoneGfProperty::SetGameVariables(Entity *self) { self->SetVar(ClaimMarkerGroup, "BehavQB"); diff --git a/dScripts/ZoneNsMedProperty.cpp b/dScripts/ZoneNsMedProperty.cpp index 92675815..feaadf31 100644 --- a/dScripts/ZoneNsMedProperty.cpp +++ b/dScripts/ZoneNsMedProperty.cpp @@ -1,4 +1,5 @@ #include "ZoneNsMedProperty.h" +#include "Entity.h" void ZoneNsMedProperty::SetGameVariables(Entity *self) { self->SetVar(ClaimMarkerGroup, "ClaimMarker"); diff --git a/dScripts/ZoneNsProperty.cpp b/dScripts/ZoneNsProperty.cpp index eec62aa5..72eb1ead 100644 --- a/dScripts/ZoneNsProperty.cpp +++ b/dScripts/ZoneNsProperty.cpp @@ -1,4 +1,5 @@ #include "ZoneNsProperty.h" +#include "Entity.h" void ZoneNsProperty::SetGameVariables(Entity *self) { self->SetVar(ClaimMarkerGroup, "Rhino");