M-Z scripts

Removing extraneous includes from scripts that start with the letter M-Z
This commit is contained in:
EmosewaMC 2022-06-23 01:26:44 -07:00
parent e3264e545b
commit 37de00464e
85 changed files with 41 additions and 161 deletions

View File

@ -1,5 +1,8 @@
#pragma once
#include <map>
class Spawner;
class BaseRandomServer
{
public:

View File

@ -2,6 +2,7 @@
#include "dCommonVars.h"
#include "MissionState.h"
#include <string>
#include <vector>
class User;
class Entity;

View File

@ -1,6 +1,5 @@
#include "LegoDieRoll.h"
#include "Entity.h"
#include "dLogger.h"
#include "GameMessages.h"
#include "MissionComponent.h"
@ -49,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;
}
}

View File

@ -1,7 +1,6 @@
#include "MastTeleport.h"
#include "EntityManager.h"
#include "GameMessages.h"
#include "Game.h"
#include "Preconditions.h"
#ifdef _WIN32

View File

@ -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<ScriptedActivityComponent>();
@ -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<ScriptedActivityComponent>();
if (sac != nullptr) {
sac->SetInstanceMapID(1204);

View File

@ -1 +0,0 @@
#include "MissionConsoleServer.h"

View File

@ -1,6 +0,0 @@
#pragma once
#include "CppScripts.h"
class MissionConsoleServer : public CppScripts::Script {
};

View File

@ -1,6 +1,4 @@
#include "MonCoreNookDoors.h"
#include "GameMessages.h"
#include "EntityManager.h"
#include "dZoneManager.h"
void MonCoreNookDoors::OnStartup(Entity* self)

View File

@ -1,7 +1,5 @@
#include "MonCoreSmashableDoors.h"
#include "GameMessages.h"
#include "EntityManager.h"
#include "dZoneManager.h"
void MonCoreSmashableDoors::OnDie(Entity* self, Entity* killer)
{

View File

@ -1,4 +1,5 @@
#include "NjEarthDragonPetServer.h"
#include "Entity.h"
void NjEarthDragonPetServer::SetVariables(Entity *self) {
self->SetVar<LOT>(u"petLOT", 16210);

View File

@ -1,5 +1,4 @@
#pragma once
//#include "NjPetSpawnerServer.h"
#include "SpawnPetBaseServer.h"
class NjEarthDragonPetServer : public SpawnPetBaseServer {

View File

@ -1,6 +1,8 @@
#pragma once
#include "NjNPCMissionSpinjitzuServer.h"
#include "NPCAddRemoveItem.h"
#include <vector>
#include <map>
class NjJayMissionItems : public NjNPCMissionSpinjitzuServer, NPCAddRemoveItem {
void OnMissionDialogueOK(Entity *self, Entity *target, int missionID, MissionState missionState) override;

View File

@ -1,15 +1,14 @@
#include <algorithm>
#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 <algorithm>
// // // // // // //
// Event handling //

View File

@ -1,5 +1,6 @@
#pragma once
#include "CppScripts.h"
#include <map>
static std::map<std::u16string, uint32_t> ElementFlags = {
{u"earth", ePlayerFlags::NJ_EARTH_SPINJITZU},

View File

@ -1,5 +1,7 @@
#pragma once
#include "NPCAddRemoveItem.h"
#include <map>
#include <vector>
class NjNyaMissionitems : public NPCAddRemoveItem {
std::map<uint32_t, std::vector<ItemSetting>> GetSettings() override;

View File

@ -1,5 +0,0 @@
//
// Created by Mick Vermeulen on 23/08/2021.
//
#include "NjPetSpawnerServer.h"

View File

@ -1,6 +0,0 @@
#pragma once
#include "SpawnPetBaseServer.h"
class NjPetSpawnerServer : public SpawnPetBaseServer {
};

View File

@ -1,4 +1,5 @@
#include "NjhubLavaPlayerDeathTrigger.h"
#include "Entity.h"
void NjhubLavaPlayerDeathTrigger::OnCollisionPhantom(Entity *self, Entity *target)
{

View File

@ -1,7 +1,6 @@
#pragma once
#include "CppScripts.h"
class NjhubLavaPlayerDeathTrigger : public CppScripts::Script {
void OnCollisionPhantom(Entity *self, Entity *target) override;
};

View File

@ -1,11 +1,8 @@
#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 <ctime>
@ -36,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());
@ -59,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") {
@ -95,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<MissionComponent>();

View File

@ -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)

View File

@ -1,11 +1,6 @@
#include "NpcNpSpacemanBob.h"
#include "DestroyableComponent.h"
#include "Entity.h"
#include "GameMessages.h"
#include "MissionState.h"
#include "Game.h"
#include "MissionComponent.h"
#include "dLogger.h"
void NpcNpSpacemanBob::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState)
{

View File

@ -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)

View File

@ -1,6 +1,5 @@
#include "NsConcertChoiceBuildManager.h"
#include "EntityManager.h"
#include "Player.h"
const std::vector<Crate> NsConcertChoiceBuildManager::crates {
{ "laser", 11203, 5.0, "Concert_Laser_QB_" },

View File

@ -2,7 +2,6 @@
#include "EntityManager.h"
#include "NsConcertChoiceBuildManager.h"
#include "DestroyableComponent.h"
#include "RenderComponent.h"
#include "GameMessages.h"
#include "MovingPlatformComponent.h"
#include "MissionComponent.h"

View File

@ -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)
{

View File

@ -2,7 +2,6 @@
#include "CppScripts.h"
#include "ChooseYourDestinationNsToNt.h"
#include "BaseConsoleTeleportServer.h"
#include "AMFFormat.h"
class NsLegoClubDoor : public CppScripts::Script, ChooseYourDestinationNsToNt, BaseConsoleTeleportServer
{

View File

@ -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)
{

View File

@ -2,7 +2,6 @@
#include "CppScripts.h"
#include "ChooseYourDestinationNsToNt.h"
#include "BaseConsoleTeleportServer.h"
#include "AMFFormat.h"
class NsLupTeleport : public CppScripts::Script, ChooseYourDestinationNsToNt, BaseConsoleTeleportServer
{

View File

@ -1,6 +1,4 @@
#include "NsModularBuild.h"
#include "EntityManager.h"
#include "Character.h"
#include "MissionComponent.h"
void NsModularBuild::OnModularBuildExit(Entity* self, Entity* player, bool bCompleted, std::vector<LOT> modules) {

View File

@ -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)
{

View File

@ -1,6 +1,5 @@
#include "NsTokenConsoleServer.h"
#include "InventoryComponent.h"
#include "EntityManager.h"
#include "GameMessages.h"
#include "Character.h"
#include "MissionComponent.h"

View File

@ -1,9 +1,6 @@
#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)
@ -18,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;

View File

@ -1,7 +1,6 @@
#include "NtCombatChallengeDummy.h"
#include "EntityManager.h"
void NtCombatChallengeDummy::OnDie(Entity* self, Entity* killer)
{
const auto challengeObjectID = self->GetVar<LWOOBJID>(u"challengeObjectID");

View File

@ -1,5 +1,4 @@
#include "NtCombatChallengeExplodingDummy.h"
#include "NtCombatChallengeDummy.h"
#include "EntityManager.h"
#include "SkillComponent.h"

View File

@ -1,27 +1,16 @@
#include "NtCombatChallengeServer.h"
#include "Character.h"
#include "GameMessages.h"
#include "EntityManager.h"
#include "InventoryComponent.h"
#include "MissionComponent.h"
#include "dLogger.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);
}
}

View File

@ -1,5 +1,6 @@
#include "NtConsoleTeleportServer.h"
#include "Entity.h"
#include "AMFFormat.h"
void NtConsoleTeleportServer::OnStartup(Entity* self)
{

View File

@ -2,7 +2,6 @@
#include "CppScripts.h"
#include "ChooseYourDestinationNsToNt.h"
#include "BaseConsoleTeleportServer.h"
#include "AMFFormat.h"
class NtConsoleTeleportServer : public CppScripts::Script, BaseConsoleTeleportServer
{

View File

@ -1,5 +1,4 @@
#include "NtDirtCloudServer.h"
#include "dZoneManager.h"
#include "MissionComponent.h"
std::map<std::string, std::vector<int32_t>> NtDirtCloudServer::m_Missions =

View File

@ -1,4 +1,5 @@
#include "NtHaelServer.h"
#include "Entity.h"
void NtHaelServer::SetVariables(Entity *self) {
self->SetVar<float_t>(m_SpyProximityVariable, 25.0f);

View File

@ -1,9 +1,6 @@
#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)
@ -18,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;

View File

@ -1,7 +1,6 @@
#include "NtSentinelWalkwayServer.h"
#include "PhantomPhysicsComponent.h"
#include "EntityManager.h"
#include "dLogger.h"
#include "MissionComponent.h"
void NtSentinelWalkwayServer::OnStartup(Entity* self)
@ -10,8 +9,6 @@ void NtSentinelWalkwayServer::OnStartup(Entity* self)
if (phantomPhysicsComponent == nullptr)
{
Game::logger->Log("NtSentinelWalkwayServer", "Failed to find PhantomPhysicsComponent\n");
return;
}
@ -22,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

View File

@ -2,7 +2,6 @@
#include "GameMessages.h"
#include "EntityManager.h"
void NtVentureCannonServer::OnUse(Entity* self, Entity* user)
{
auto* player = user;

View File

@ -2,7 +2,6 @@
#include "SkillComponent.h"
#include "MissionComponent.h"
void NtVentureSpeedPadServer::OnStartup(Entity* self)
{
self->SetProximityRadius(3, "speedboost");

View File

@ -1,6 +1,4 @@
#include "NtXRayServer.h"
#include "PhantomPhysicsComponent.h"
#include "EntityManager.h"
#include "SkillComponent.h"
void NtXRayServer::OnCollisionPhantom(Entity* self, Entity* target)

View File

@ -1,7 +1,6 @@
#include <dZoneManager.h>
#include "dZoneManager.h"
#include "PetDigServer.h"
#include "MissionComponent.h"
#include "InventoryComponent.h"
#include "EntityManager.h"
#include "Character.h"
#include "PetComponent.h"

View File

@ -1,4 +1,5 @@
#include "PrSeagullFly.h"
#include "Entity.h"
void PrSeagullFly::OnStartup(Entity* self)
{

View File

@ -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)

View File

@ -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());
}

View File

@ -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)

View File

@ -1,7 +1,6 @@
#include "CharacterComponent.h"
#include "DestroyableComponent.h"
#include "EntityManager.h"
#include "GameMessages.h"
#include "PossessableComponent.h"
#include "RaceImagineCrateServer.h"
#include "RacingTaskParam.h"

View File

@ -1,7 +1,5 @@
#include "CharacterComponent.h"
#include "DestroyableComponent.h"
#include "EntityManager.h"
#include "PossessableComponent.h"
#include "PossessorComponent.h"
#include "RaceImaginePowerup.h"
#include "RacingTaskParam.h"

View File

@ -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<bool>(u"AmFiring"))
{
return;
}
Game::logger->Log("RaceMaelstromGeiser", "Smashing!\n");
auto* possessableComponent = entering->GetComponent<PossessableComponent>();
Entity* vehicle;

View File

@ -9,7 +9,6 @@
#include "CharacterComponent.h"
#include "SimplePhysicsComponent.h"
#include "MovementAIComponent.h"
#include "ControllablePhysicsComponent.h"
#include "../dWorldServer/ObjectIDManager.h"
#include "MissionComponent.h"

View File

@ -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;

View File

@ -6,7 +6,6 @@
#ifndef SCRIPTCOMPONENT_H
#define SCRIPTCOMPONENT_H
#include "BitStream.h"
#include "CppScripts.h"
#include "Component.h"
#include <string>

View File

@ -1,6 +1,5 @@
#include "ScriptedPowerupSpawner.h"
#include "RenderComponent.h"
#include "GameMessages.h"
#include "EntityManager.h"
void ScriptedPowerupSpawner::OnTemplateStartup(Entity *self) {

View File

@ -1,4 +1,5 @@
#include "SpawnLionServer.h"
#include "Entity.h"
void SpawnLionServer::SetVariables(Entity *self) {
self->SetVar<LOT>(u"petLOT", 3520);

View File

@ -1,4 +1,5 @@
#include "SpawnSaberCatServer.h"
#include "Entity.h"
void SpawnSaberCatServer::SetVariables(Entity *self) {
self->SetVar<LOT>(u"petLOT", 12432);

View File

@ -1,4 +1,5 @@
#include "SpawnShrakeServer.h"
#include "Entity.h"
void SpawnShrakeServer::SetVariables(Entity *self) {
self->SetVar<LOT>(u"petLOT", 12434);

View File

@ -1,4 +1,5 @@
#include "SpawnStegoServer.h"
#include "Entity.h"
void SpawnStegoServer::SetVariables(Entity *self) {
self->SetVar<LOT>(u"petLOT", 12431);

View File

@ -5,7 +5,6 @@
#include "DestroyableComponent.h"
#include "EntityManager.h"
void SpecialImaginePowerupSpawner::OnStartup(Entity* self)
{
self->SetProximityRadius(1.5f, "powerupEnter");

View File

@ -1,6 +1,4 @@
#include "SsModularBuildServer.h"
#include "EntityManager.h"
#include "Character.h"
#include "MissionComponent.h"
void SsModularBuildServer::OnModularBuildExit(Entity* self, Entity* player, bool bCompleted, std::vector<LOT> modules) {

View File

@ -1,7 +1,6 @@
#include "StoryBoxInteractServer.h"
#include "Character.h"
#include "GameMessages.h"
#include "Game.h"
#include "dServer.h"
#include "AMFFormat.h"

View File

@ -1,4 +1,5 @@
#include "Sunflower.h"
#include "Entity.h"
void Sunflower::OnStartup(Entity *self) {
self->SetVar<uint32_t>(u"numCycles", 6);

View File

@ -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

View File

@ -1,7 +1,6 @@
#include "TreasureChestDragonServer.h"
#include "ScriptedActivityComponent.h"
#include "TeamManager.h"
#include "Loot.h"
#include "EntityManager.h"
void TreasureChestDragonServer::OnStartup(Entity* self)

View File

@ -1,8 +1,6 @@
#include "TriggerAmbush.h"
#include "dZoneManager.h"
#include "dLogger.h"
#include "EntityManager.h"
void TriggerAmbush::OnStartup(Entity* self)
{
@ -12,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<bool>(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();
}

View File

@ -1,5 +1,6 @@
#include "WaveBossApe.h"
#include "BaseCombatAIComponent.h"
#include "Entity.h"
void WaveBossApe::OnStartup(Entity *self) {
BaseWavesGenericEnemy::OnStartup(self);

View File

@ -1,5 +1,6 @@
#include "WaveBossHammerling.h"
#include "BaseCombatAIComponent.h"
#include "Entity.h"
void WaveBossHammerling::OnStartup(Entity *self) {
BaseWavesGenericEnemy::OnStartup(self);

View File

@ -1,5 +1,6 @@
#include "WaveBossHorsemen.h"
#include "BaseCombatAIComponent.h"
#include "Entity.h"
void WaveBossHorsemen::OnStartup(Entity *self) {
BaseWavesGenericEnemy::OnStartup(self);

View File

@ -1,5 +1,6 @@
#include "WaveBossSpiderling.h"
#include "BaseCombatAIComponent.h"
#include "Entity.h"
void WaveBossSpiderling::OnStartup(Entity *self) {
BaseWavesGenericEnemy::OnStartup(self);

View File

@ -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<bool>(u"alive", true);

View File

@ -1,9 +1,5 @@
#pragma once
#include "CppScripts.h"
#include "GameMessages.h"
#include "EntityManager.h"
#include "PhantomPhysicsComponent.h"
class WhFans : public CppScripts::Script
{
public:

View File

@ -1,6 +1,4 @@
#include "WildAmbients.h"
#include "EntityManager.h"
#include "Character.h"
#include "GameMessages.h"
void WildAmbients::OnUse(Entity* self, Entity* user)

View File

@ -1,8 +1,6 @@
#include "WishingWellServer.h"
#include "Loot.h"
#include "ScriptedActivityComponent.h"
#include "GameMessages.h"
#include "Game.h"
void WishingWellServer::OnStartup(Entity* self)
{

View File

@ -1,8 +1,7 @@
#include "ZoneAgMedProperty.h"
#include "dLogger.h"
#include "Entity.h"
void ZoneAgMedProperty::SetGameVariables(Entity *self) {
Game::logger->Log("Properties", "Setting variables in instance\n");
self->SetVar<std::string>(ClaimMarkerGroup, "ClaimMarker");
self->SetVar<std::string>(GeneratorGroup, "Generator");

View File

@ -1,13 +1,10 @@
#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 "dLogger.h"
#include "MissionComponent.h"
void ZoneAgProperty::SetGameVariables(Entity *self) {
@ -342,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);
}

View File

@ -1,5 +1,4 @@
#pragma once
#include "CppScripts.h"
#include "BasePropertyServer.h"
class ZoneAgProperty : public BasePropertyServer {

View File

@ -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);

View File

@ -1,6 +1,7 @@
#pragma once
#include "CppScripts.h"
#include "BaseSurvivalServer.h"
#include <map>
class ZoneAgSurvival : public BaseSurvivalServer {
Constants GetConstants() override;

View File

@ -1,4 +1,5 @@
#include "ZoneFvProperty.h"
#include "Entity.h"
void ZoneFvProperty::SetGameVariables(Entity *self) {
self->SetVar<std::string>(ClaimMarkerGroup, "Platform");

View File

@ -1,4 +1,5 @@
#include "ZoneGfProperty.h"
#include "Entity.h"
void ZoneGfProperty::SetGameVariables(Entity *self) {
self->SetVar<std::string>(ClaimMarkerGroup, "BehavQB");

View File

@ -1,4 +1,5 @@
#include "ZoneNsMedProperty.h"
#include "Entity.h"
void ZoneNsMedProperty::SetGameVariables(Entity *self) {
self->SetVar<std::string>(ClaimMarkerGroup, "ClaimMarker");

View File

@ -1,4 +1,5 @@
#include "ZoneNsProperty.h"
#include "Entity.h"
void ZoneNsProperty::SetGameVariables(Entity *self) {
self->SetVar<std::string>(ClaimMarkerGroup, "Rhino");