mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-22 13:33:35 +00:00
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 commitd79d8d4991
. * Revert "Revert "Implement Precompiled Headers"" This reverts commit0597faf308
. * Add back in PCH Add back in PCH * Fix CMake Whitespace Remove duplicate file glob Remove newline
This commit is contained in:
parent
cc25ec0151
commit
8cdb388915
@ -2,6 +2,7 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "MissionComponent.h"
|
||||
#include "EntityManager.h"
|
||||
#include "PropertyDataMessage.h"
|
||||
#include "UserManager.h"
|
||||
|
@ -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"
|
||||
|
@ -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__
|
||||
|
@ -11,6 +11,8 @@
|
||||
#include "dConfig.h"
|
||||
#include "dServer.h"
|
||||
#include "tinyxml2.h"
|
||||
#include "Game.h"
|
||||
#include "dLogger.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
|
@ -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<bool>(u"AmBuilt"))
|
||||
{
|
||||
sender->Smash();
|
||||
|
@ -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<MissionComponent*>(sender->GetComponent(COMPONENT_TYPE_MISSION));
|
||||
if (!mis) return;
|
||||
auto missionComponent = sender->GetComponent<MissionComponent>();
|
||||
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");
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "LeaderboardManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include <algorithm>
|
||||
#include "dLogger.h"
|
||||
|
||||
bool ActivityManager::IsPlayerInActivity(Entity *self, LWOOBJID playerID) {
|
||||
const auto* sac = self->GetComponent<ScriptedActivityComponent>();
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "AgBugsprayer.h"
|
||||
#include "SkillComponent.h"
|
||||
|
||||
|
||||
void AgBugsprayer::OnRebuildComplete(Entity* self, Entity* target)
|
||||
{
|
||||
self->AddTimer("castSkill", 1);
|
||||
|
@ -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) {
|
||||
|
@ -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<InventoryComponent*>(user->GetComponent(COMPONENT_TYPE_INVENTORY));
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include "AgFans.h"
|
||||
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "PhantomPhysicsComponent.h"
|
||||
#include "RenderComponent.h"
|
||||
|
||||
void AgFans::OnStartup(Entity* self) {
|
||||
|
@ -1,8 +1,5 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "PhantomPhysicsComponent.h"
|
||||
|
||||
class AgFans : public CppScripts::Script
|
||||
{
|
||||
|
@ -4,7 +4,6 @@
|
||||
class AgImagSmashable : public CppScripts::Script {
|
||||
public:
|
||||
void OnDie(Entity* self, Entity* killer);
|
||||
|
||||
private:
|
||||
void CrateAnimal(Entity* self);
|
||||
};
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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) {
|
||||
|
@ -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:
|
||||
|
@ -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.
|
||||
|
@ -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)
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "AgSalutingNpcs.h"
|
||||
|
||||
#include "GameMessages.h"
|
||||
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "AgSurvivalSpiderling.h"
|
||||
#include "BaseCombatAIComponent.h"
|
||||
#include "GameMessages.h"
|
||||
|
||||
void AgSurvivalSpiderling::OnStartup(Entity *self) {
|
||||
BaseWavesGenericEnemy::OnStartup(self);
|
||||
|
@ -1,6 +1,4 @@
|
||||
#include "AgTurret.h"
|
||||
#include "EntityManager.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "GameMessages.h"
|
||||
|
||||
void AgTurret::OnStartup(Entity* self) {
|
||||
|
@ -1,6 +1,4 @@
|
||||
#include "AllCrateChicken.h"
|
||||
#include "dCommonVars.h"
|
||||
#include "EntityManager.h"
|
||||
#include "Entity.h"
|
||||
|
||||
void AllCrateChicken::OnStartup(Entity* self) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "AmConsoleTeleportServer.h"
|
||||
|
||||
#include "ChooseYourDestinationNsToNt.h"
|
||||
#include "AMFFormat.h"
|
||||
|
||||
void AmConsoleTeleportServer::OnStartup(Entity* self)
|
||||
{
|
||||
|
@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
#include "ChooseYourDestinationNsToNt.h"
|
||||
#include "BaseConsoleTeleportServer.h"
|
||||
#include "AMFFormat.h"
|
||||
|
||||
class AmConsoleTeleportServer : public CppScripts::Script, BaseConsoleTeleportServer
|
||||
{
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include "SkillComponent.h"
|
||||
#include "BaseCombatAIComponent.h"
|
||||
|
||||
|
||||
void AmDarklingDragon::OnStartup(Entity* self) {
|
||||
self->SetVar<int32_t>(u"weakspot", 0);
|
||||
|
||||
@ -48,15 +47,11 @@ void AmDarklingDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t
|
||||
auto* destroyableComponent = self->GetComponent<DestroyableComponent>();
|
||||
|
||||
if (destroyableComponent != nullptr) {
|
||||
Game::logger->Log("AmDarklingDragon", "Armor is %i\n", destroyableComponent->GetArmor());
|
||||
|
||||
if (destroyableComponent->GetArmor() > 0) return;
|
||||
|
||||
auto weakpoint = self->GetVar<int32_t>(u"weakpoint");
|
||||
|
||||
if (weakpoint == 0) {
|
||||
Game::logger->Log("AmDarklingDragon", "Activating weakpoint\n");
|
||||
|
||||
self->AddTimer("ReviveTimer", 12);
|
||||
|
||||
auto* baseCombatAIComponent = self->GetComponent<BaseCombatAIComponent>();
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "AmDarklingMech.h"
|
||||
#include "DestroyableComponent.h"
|
||||
|
||||
void AmDarklingMech::OnStartup(Entity* self)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include "GameMessages.h"
|
||||
#include "SimplePhysicsComponent.h"
|
||||
|
||||
|
||||
void AmDrawBridge::OnStartup(Entity* self)
|
||||
{
|
||||
self->SetNetworkVar(u"InUse", false);
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include "MissionComponent.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "dZoneManager.h"
|
||||
|
||||
void AmDropshipComputer::OnStartup(Entity* self)
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include "BaseCombatAIComponent.h"
|
||||
#include "SkillComponent.h"
|
||||
|
||||
|
||||
void AmShieldGenerator::OnStartup(Entity* self)
|
||||
{
|
||||
self->SetProximityRadius(20, "shield");
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "RebuildComponent.h"
|
||||
#include "MissionComponent.h"
|
||||
|
||||
|
||||
void AmShieldGeneratorQuickbuild::OnStartup(Entity* self)
|
||||
{
|
||||
self->SetProximityRadius(20, "shield");
|
||||
|
@ -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<LWOOBJID>(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<LWOOBJID>(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");
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include "EntityManager.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "MovingPlatformComponent.h"
|
||||
#include "dCommonVars.h"
|
||||
#include "GameMessages.h"
|
||||
#include "MissionComponent.h"
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
#include "BaseConsoleTeleportServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "Player.h"
|
||||
#include "RocketLaunchpadControlComponent.h"
|
||||
|
||||
|
||||
void BaseConsoleTeleportServer::BaseOnUse(Entity* self, Entity* user)
|
||||
{
|
||||
|
@ -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<LDFBaseData*> cfg;
|
||||
|
@ -1,6 +1,4 @@
|
||||
#include "BasePropertyServer.h"
|
||||
#include <utility>
|
||||
#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<std::string>(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<std::string>(GuardGroup));
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
#include "PropertyManagementComponent.h"
|
||||
#include "PropertyVendorComponent.h"
|
||||
|
||||
class BasePropertyServer : public CppScripts::Script {
|
||||
public:
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
#include "Entity.h"
|
||||
#include "dCommonVars.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
class Spawner;
|
||||
class BaseRandomServer
|
||||
{
|
||||
public:
|
||||
|
@ -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) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include "ActivityManager.h"
|
||||
#include "CppScripts.h"
|
||||
|
||||
/**
|
||||
* State for each active game
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include "EntityManager.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "Player.h"
|
||||
#include "MissionTaskType.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "Character.h"
|
||||
|
||||
// Done
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include "ActivityManager.h"
|
||||
#include "CppScripts.h"
|
||||
|
||||
/**
|
||||
* State for each active game
|
||||
|
@ -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();
|
||||
|
@ -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<MissionComponent>();
|
||||
if (missionComponent == nullptr)
|
||||
return;
|
||||
|
@ -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;
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "BuccaneerValiantShip.h"
|
||||
#include "SkillComponent.h"
|
||||
#include "dLogger.h"
|
||||
|
||||
void BuccaneerValiantShip::OnStartup(Entity* self) {
|
||||
self->AddCallbackTimer(1.0F, [self]() {
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -1,8 +1,5 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
#include "Spawner.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "dCommonVars.h"
|
||||
|
||||
class CatapultBaseServer : public CppScripts::Script {
|
||||
public:
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "CatapultBouncerServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "dZoneManager.h"
|
||||
|
||||
void CatapultBouncerServer::OnRebuildComplete(Entity* self, Entity* target)
|
||||
{
|
||||
|
@ -1,8 +1,5 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
#include "Spawner.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "dCommonVars.h"
|
||||
|
||||
class CatapultBouncerServer : public CppScripts::Script {
|
||||
public:
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -1,8 +1,5 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
#include "Spawner.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "dCommonVars.h"
|
||||
|
||||
class CavePrisonCage : public CppScripts::Script {
|
||||
public:
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
|
||||
class ChooseYourDestinationNsToNt
|
||||
{
|
||||
|
@ -1,6 +1,4 @@
|
||||
#include "ClRing.h"
|
||||
#include "EntityManager.h"
|
||||
#include "Character.h"
|
||||
|
||||
void ClRing::OnCollisionPhantom(Entity* self, Entity* target)
|
||||
{
|
||||
|
@ -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"
|
||||
|
@ -1,12 +1,8 @@
|
||||
#pragma once
|
||||
#include "dCommonVars.h"
|
||||
#include "RakNetTypes.h"
|
||||
#include <string>
|
||||
#include "MissionComponent.h"
|
||||
#include "MissionState.h"
|
||||
#include "Game.h"
|
||||
#include "dLogger.h"
|
||||
#include "Loot.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class User;
|
||||
class Entity;
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "DLUVanityNPC.h"
|
||||
#include "GameMessages.h"
|
||||
#include "dServer.h"
|
||||
#include "VanityUtilities.h"
|
||||
|
||||
void DLUVanityNPC::OnStartup(Entity* self)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
#include "VanityUtilities.h"
|
||||
|
||||
class VanityNPC;
|
||||
class DLUVanityNPC : public CppScripts::Script
|
||||
{
|
||||
public:
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include "CppScripts.h"
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
class Entity;
|
||||
|
||||
class Darkitect
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include "MovingPlatformComponent.h"
|
||||
#include "GameMessages.h"
|
||||
|
||||
|
||||
void FallingTile::OnStartup(Entity* self)
|
||||
{
|
||||
auto* movingPlatfromComponent = self->GetComponent<MovingPlatformComponent>();
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "FlameJetServer.h"
|
||||
|
||||
#include "SkillComponent.h"
|
||||
#include "GameMessages.h"
|
||||
|
||||
|
@ -2,17 +2,11 @@
|
||||
#include "PhantomPhysicsComponent.h"
|
||||
#include "EntityManager.h"
|
||||
|
||||
|
||||
void ForceVolumeServer::OnStartup(Entity* self)
|
||||
{
|
||||
auto* phantomPhysicsComponent = self->GetComponent<PhantomPhysicsComponent>();
|
||||
|
||||
if (phantomPhysicsComponent == nullptr)
|
||||
{
|
||||
Game::logger->Log("ForceVolumeServer", "Failed to find PhantomPhysicsComponent\n");
|
||||
|
||||
return;
|
||||
}
|
||||
if (phantomPhysicsComponent == nullptr) return;
|
||||
|
||||
const auto forceAmount = self->GetVar<float>(u"ForceAmt");
|
||||
const auto forceX = self->GetVar<float>(u"ForceX");
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "FountainOfImagination.h"
|
||||
#include "dCommonVars.h"
|
||||
#include "Entity.h"
|
||||
|
||||
void FountainOfImagination::OnStartup(Entity *self) {
|
||||
self->SetVar<uint32_t>(u"numCycles", 6);
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "FvBounceOverWall.h"
|
||||
#include "MissionComponent.h"
|
||||
|
||||
void FvBounceOverWall::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
auto missionComponent = target->GetComponent<MissionComponent>();
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "FvCandle.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "RenderComponent.h"
|
||||
|
||||
std::vector<int32_t> FvCandle::m_Missions = {850, 1431, 1529, 1566, 1603};
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
#include "RenderComponent.h"
|
||||
|
||||
class FvCandle : public CppScripts::Script
|
||||
{
|
||||
|
@ -1,7 +1,4 @@
|
||||
#include "FvConsoleLeftQuickbuild.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "GeneralUtils.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
|
||||
|
@ -1,7 +1,4 @@
|
||||
#include "FvConsoleRightQuickbuild.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "GeneralUtils.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
|
||||
|
@ -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];
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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) {
|
||||
|
@ -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<std::vector<LWOOBJID>>(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<std::vector<LWOOBJID>>(u"players"))
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
#include "RenderComponent.h"
|
||||
|
||||
class FvMaelstromCavalry : public CppScripts::Script
|
||||
{
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include "EntityManager.h"
|
||||
#include "SkillComponent.h"
|
||||
#include "BaseCombatAIComponent.h"
|
||||
#include "RenderComponent.h"
|
||||
#include "DestroyableComponent.h"
|
||||
|
||||
void FvMaelstromDragon::OnStartup(Entity* self)
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
#include "RenderComponent.h"
|
||||
|
||||
class FvMaelstromDragon : public CppScripts::Script
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "FvPassThroughWall.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "MissionComponent.h"
|
||||
|
||||
void FvPassThroughWall::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
auto missionComponent = target->GetComponent<MissionComponent>();
|
||||
|
@ -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) {
|
||||
|
@ -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<DestroyableComponent>();
|
||||
|
||||
destroyable->SetHealth(9999);
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "GfBananaCluster.h"
|
||||
#include "Entity.h"
|
||||
|
||||
void GfBananaCluster::OnStartup(Entity* self)
|
||||
{
|
||||
|
@ -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) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "GfJailWalls.h"
|
||||
#include "EntityManager.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "GeneralUtils.h"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "GfTikiTorch.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EntityManager.h"
|
||||
|
||||
#include "MissionComponent.h"
|
||||
#include "RenderComponent.h"
|
||||
|
||||
void GfTikiTorch::OnStartup(Entity* self) {
|
||||
|
@ -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") {
|
||||
|
@ -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
|
||||
|
@ -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<RebuildComponent>();
|
||||
|
||||
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<RebuildComponent>();
|
||||
|
||||
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)
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
#include <map>
|
||||
|
||||
class ImgBrickConsoleQB : public CppScripts::Script
|
||||
{
|
||||
|
@ -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<std::u16string>(u"transferText");
|
||||
if (transferText.empty())
|
||||
transferText = u"DRAGON_EXIT_QUESTION";
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user