mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +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 <sstream>
|
||||||
|
|
||||||
|
#include "MissionComponent.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "PropertyDataMessage.h"
|
#include "PropertyDataMessage.h"
|
||||||
#include "UserManager.h"
|
#include "UserManager.h"
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "dLogger.h"
|
#include "dLogger.h"
|
||||||
#include "CharacterComponent.h"
|
#include "CharacterComponent.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
|
#include "MissionTaskType.h"
|
||||||
|
|
||||||
#include "dServer.h"
|
#include "dServer.h"
|
||||||
#include "PacketUtils.h"
|
#include "PacketUtils.h"
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef __MISSIONSTATE__H__
|
||||||
|
#define __MISSIONSTATE__H__
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the possible states a mission can be in
|
* Represents the possible states a mission can be in
|
||||||
*/
|
*/
|
||||||
@ -49,3 +52,5 @@ enum class MissionState : int {
|
|||||||
*/
|
*/
|
||||||
MISSION_STATE_COMPLETE_READY_TO_COMPLETE = 12
|
MISSION_STATE_COMPLETE_READY_TO_COMPLETE = 12
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif //!__MISSIONSTATE__H__
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
#include "dConfig.h"
|
#include "dConfig.h"
|
||||||
#include "dServer.h"
|
#include "dServer.h"
|
||||||
#include "tinyxml2.h"
|
#include "tinyxml2.h"
|
||||||
|
#include "Game.h"
|
||||||
|
#include "dLogger.h"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
@ -2,18 +2,12 @@
|
|||||||
|
|
||||||
void ActNinjaTurret::OnRebuildNotifyState(Entity* self, eRebuildState state)
|
void ActNinjaTurret::OnRebuildNotifyState(Entity* self, eRebuildState state)
|
||||||
{
|
{
|
||||||
Game::logger->Log("ActNinjaTurret", "Rebuild state: %i\n", state);
|
|
||||||
|
|
||||||
if (state == eRebuildState::REBUILD_COMPLETED)
|
if (state == eRebuildState::REBUILD_COMPLETED)
|
||||||
{
|
{
|
||||||
Game::logger->Log("ActNinjaTurret", "I am build\n");
|
|
||||||
|
|
||||||
self->SetVar(u"AmBuilt", true);
|
self->SetVar(u"AmBuilt", true);
|
||||||
}
|
}
|
||||||
else if (state == eRebuildState::REBUILD_RESETTING)
|
else if (state == eRebuildState::REBUILD_RESETTING)
|
||||||
{
|
{
|
||||||
Game::logger->Log("ActNinjaTurret", "I am not build\n");
|
|
||||||
|
|
||||||
self->SetVar(u"AmBuilt", false);
|
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,
|
ActNinjaTurret::OnFireEventServerSide(Entity *self, Entity *sender, std::string args, int32_t param1, int32_t param2,
|
||||||
int32_t param3)
|
int32_t param3)
|
||||||
{
|
{
|
||||||
Game::logger->Log("ActNinjaTurret", "Got server side event %s\n", args.c_str());
|
|
||||||
|
|
||||||
if (args == "ISpawned" && self->GetVar<bool>(u"AmBuilt"))
|
if (args == "ISpawned" && self->GetVar<bool>(u"AmBuilt"))
|
||||||
{
|
{
|
||||||
sender->Smash();
|
sender->Smash();
|
||||||
|
@ -1,25 +1,18 @@
|
|||||||
#include "ActSharkPlayerDeathTrigger.h"
|
#include "ActSharkPlayerDeathTrigger.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
|
#include "MissionTaskType.h"
|
||||||
#include "Entity.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,
|
void ActSharkPlayerDeathTrigger::OnFireEventServerSide(Entity *self, Entity *sender, std::string args, int32_t param1,
|
||||||
int32_t param2, int32_t param3) {
|
int32_t param2, int32_t param3) {
|
||||||
if (args == "achieve") {
|
if (args == "achieve") {
|
||||||
MissionComponent* mis = static_cast<MissionComponent*>(sender->GetComponent(COMPONENT_TYPE_MISSION));
|
auto missionComponent = sender->GetComponent<MissionComponent>();
|
||||||
if (!mis) return;
|
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
|
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()) {
|
if (sender->GetCharacter()) {
|
||||||
sender->Smash(self->GetObjectID(), eKillType::VIOLENT, u"big-shark-death");
|
sender->Smash(self->GetObjectID(), eKillType::VIOLENT, u"big-shark-death");
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,7 @@
|
|||||||
class ActSharkPlayerDeathTrigger : public CppScripts::Script
|
class ActSharkPlayerDeathTrigger : public CppScripts::Script
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void OnCollisionPhantom(Entity* self, Entity* target);
|
|
||||||
void OnFireEventServerSide(Entity *self, Entity *sender, std::string args, int32_t param1, int32_t param2,
|
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 "LeaderboardManager.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include "dLogger.h"
|
||||||
|
|
||||||
bool ActivityManager::IsPlayerInActivity(Entity *self, LWOOBJID playerID) {
|
bool ActivityManager::IsPlayerInActivity(Entity *self, LWOOBJID playerID) {
|
||||||
const auto* sac = self->GetComponent<ScriptedActivityComponent>();
|
const auto* sac = self->GetComponent<ScriptedActivityComponent>();
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "AgBugsprayer.h"
|
#include "AgBugsprayer.h"
|
||||||
#include "SkillComponent.h"
|
#include "SkillComponent.h"
|
||||||
|
|
||||||
|
|
||||||
void AgBugsprayer::OnRebuildComplete(Entity* self, Entity* target)
|
void AgBugsprayer::OnRebuildComplete(Entity* self, Entity* target)
|
||||||
{
|
{
|
||||||
self->AddTimer("castSkill", 1);
|
self->AddTimer("castSkill", 1);
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#include "AgBusDoor.h"
|
#include "AgBusDoor.h"
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "Game.h"
|
|
||||||
#include "dLogger.h"
|
|
||||||
#include "ProximityMonitorComponent.h"
|
#include "ProximityMonitorComponent.h"
|
||||||
|
|
||||||
void AgBusDoor::OnStartup(Entity* self) {
|
void AgBusDoor::OnStartup(Entity* self) {
|
||||||
|
@ -12,7 +12,11 @@ void AgCagedBricksServer::OnUse(Entity* self, Entity* user) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Set the flag & mission status:
|
//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:
|
//Remove the maelstrom cube:
|
||||||
auto inv = static_cast<InventoryComponent*>(user->GetComponent(COMPONENT_TYPE_INVENTORY));
|
auto inv = static_cast<InventoryComponent*>(user->GetComponent(COMPONENT_TYPE_INVENTORY));
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#include "AgFans.h"
|
#include "AgFans.h"
|
||||||
|
|
||||||
|
#include "EntityManager.h"
|
||||||
|
#include "GameMessages.h"
|
||||||
|
#include "PhantomPhysicsComponent.h"
|
||||||
#include "RenderComponent.h"
|
#include "RenderComponent.h"
|
||||||
|
|
||||||
void AgFans::OnStartup(Entity* self) {
|
void AgFans::OnStartup(Entity* self) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
#include "GameMessages.h"
|
|
||||||
#include "EntityManager.h"
|
|
||||||
#include "PhantomPhysicsComponent.h"
|
|
||||||
|
|
||||||
class AgFans : public CppScripts::Script
|
class AgFans : public CppScripts::Script
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
class AgImagSmashable : public CppScripts::Script {
|
class AgImagSmashable : public CppScripts::Script {
|
||||||
public:
|
public:
|
||||||
void OnDie(Entity* self, Entity* killer);
|
void OnDie(Entity* self, Entity* killer);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CrateAnimal(Entity* self);
|
void CrateAnimal(Entity* self);
|
||||||
};
|
};
|
@ -1,15 +1,8 @@
|
|||||||
#include "AgJetEffectServer.h"
|
#include "AgJetEffectServer.h"
|
||||||
|
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "PhantomPhysicsComponent.h"
|
|
||||||
#include "SkillComponent.h"
|
#include "SkillComponent.h"
|
||||||
|
|
||||||
|
|
||||||
void AgJetEffectServer::OnStartup(Entity* self)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void AgJetEffectServer::OnUse(Entity* self, Entity* user)
|
void AgJetEffectServer::OnUse(Entity* self, Entity* user)
|
||||||
{
|
{
|
||||||
if (inUse)
|
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);
|
GameMessages::SendPlayFXEffect(effect, 641, u"create", "radarDish", LWOOBJID_EMPTY, 1, 1, true);
|
||||||
|
|
||||||
self->AddTimer("radarDish", 2);
|
self->AddTimer("radarDish", 2);
|
||||||
//self->AddTimer("PlayEffect", 2.5f);
|
|
||||||
self->AddTimer("CineDone", 9);
|
self->AddTimer("CineDone", 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,16 +4,12 @@
|
|||||||
class AgJetEffectServer final : public CppScripts::Script
|
class AgJetEffectServer final : public CppScripts::Script
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void OnStartup(Entity* self) override;
|
|
||||||
|
|
||||||
void OnUse(Entity* self, Entity* user) override;
|
void OnUse(Entity* self, Entity* user) override;
|
||||||
|
|
||||||
void OnRebuildComplete(Entity* self, Entity* target) override;
|
void OnRebuildComplete(Entity* self, Entity* target) override;
|
||||||
|
|
||||||
void OnTimerDone(Entity* self, std::string timerName) override;
|
void OnTimerDone(Entity* self, std::string timerName) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LWOOBJID builder;
|
LWOOBJID builder;
|
||||||
|
|
||||||
bool inUse;
|
bool inUse;
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
#include "AgLaserSensorServer.h"
|
#include "AgLaserSensorServer.h"
|
||||||
|
|
||||||
|
#include "PhantomPhysicsComponent.h"
|
||||||
|
#include "SkillComponent.h"
|
||||||
|
#include "EntityManager.h"
|
||||||
|
#include "AgMonumentLaserServer.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
|
|
||||||
void AgLaserSensorServer::OnStartup(Entity* self) {
|
void AgLaserSensorServer::OnStartup(Entity* self) {
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
#include "PhantomPhysicsComponent.h"
|
|
||||||
#include "SkillComponent.h"
|
class SkillComponent;
|
||||||
#include "EntityManager.h"
|
|
||||||
#include "AgMonumentLaserServer.h"
|
|
||||||
|
|
||||||
class AgLaserSensorServer : public CppScripts::Script {
|
class AgLaserSensorServer : public CppScripts::Script {
|
||||||
public:
|
public:
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "AgMonumentBirds.h"
|
#include "AgMonumentBirds.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "DestroyableComponent.h"
|
|
||||||
|
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
//Makes the ag birds fly away when you get close and smashes them.
|
//Makes the ag birds fly away when you get close and smashes them.
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#include "AgPropGuard.h"
|
#include "AgPropGuard.h"
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "Character.h"
|
#include "Character.h"
|
||||||
#include "GameMessages.h"
|
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "InventoryComponent.h"
|
#include "InventoryComponent.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
#include "Item.h"
|
#include "Item.h"
|
||||||
|
|
||||||
void AgPropGuard::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState)
|
void AgPropGuard::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include "AgSalutingNpcs.h"
|
#include "AgSalutingNpcs.h"
|
||||||
|
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
#include "AgShipPlayerDeathTrigger.h"
|
#include "AgShipPlayerDeathTrigger.h"
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "GameMessages.h"
|
|
||||||
#include "Game.h"
|
|
||||||
#include "dLogger.h"
|
|
||||||
|
|
||||||
void AgShipPlayerDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) {
|
void AgShipPlayerDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||||
if (target->GetLOT() == 1 && !target->GetIsDead()) {
|
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");
|
target->Smash(self->GetObjectID(), eKillType::VIOLENT, u"electro-shock-death");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,9 +1,7 @@
|
|||||||
#include "AgSpaceStuff.h"
|
#include "AgSpaceStuff.h"
|
||||||
#include "GeneralUtils.h"
|
#include "GeneralUtils.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "dZoneManager.h"
|
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "Game.h"
|
|
||||||
|
|
||||||
void AgSpaceStuff::OnStartup(Entity* self) {
|
void AgSpaceStuff::OnStartup(Entity* self) {
|
||||||
self->AddTimer("FloaterScale", 5.0f);
|
self->AddTimer("FloaterScale", 5.0f);
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "SkillComponent.h"
|
#include "SkillComponent.h"
|
||||||
#include "dLogger.h"
|
|
||||||
#include "TeamManager.h"
|
#include "TeamManager.h"
|
||||||
|
|
||||||
void AgSurvivalBuffStation::OnRebuildComplete(Entity* self, Entity* target) {
|
void AgSurvivalBuffStation::OnRebuildComplete(Entity* self, Entity* target) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "AgSurvivalSpiderling.h"
|
#include "AgSurvivalSpiderling.h"
|
||||||
#include "BaseCombatAIComponent.h"
|
#include "BaseCombatAIComponent.h"
|
||||||
#include "GameMessages.h"
|
|
||||||
|
|
||||||
void AgSurvivalSpiderling::OnStartup(Entity *self) {
|
void AgSurvivalSpiderling::OnStartup(Entity *self) {
|
||||||
BaseWavesGenericEnemy::OnStartup(self);
|
BaseWavesGenericEnemy::OnStartup(self);
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#include "AgTurret.h"
|
#include "AgTurret.h"
|
||||||
#include "EntityManager.h"
|
|
||||||
#include "RebuildComponent.h"
|
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
|
|
||||||
void AgTurret::OnStartup(Entity* self) {
|
void AgTurret::OnStartup(Entity* self) {
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#include "AllCrateChicken.h"
|
#include "AllCrateChicken.h"
|
||||||
#include "dCommonVars.h"
|
|
||||||
#include "EntityManager.h"
|
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
|
|
||||||
void AllCrateChicken::OnStartup(Entity* self) {
|
void AllCrateChicken::OnStartup(Entity* self) {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "AmConsoleTeleportServer.h"
|
#include "AmConsoleTeleportServer.h"
|
||||||
|
#include "ChooseYourDestinationNsToNt.h"
|
||||||
|
#include "AMFFormat.h"
|
||||||
|
|
||||||
void AmConsoleTeleportServer::OnStartup(Entity* self)
|
void AmConsoleTeleportServer::OnStartup(Entity* self)
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
#include "ChooseYourDestinationNsToNt.h"
|
|
||||||
#include "BaseConsoleTeleportServer.h"
|
#include "BaseConsoleTeleportServer.h"
|
||||||
#include "AMFFormat.h"
|
|
||||||
|
|
||||||
class AmConsoleTeleportServer : public CppScripts::Script, BaseConsoleTeleportServer
|
class AmConsoleTeleportServer : public CppScripts::Script, BaseConsoleTeleportServer
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include "SkillComponent.h"
|
#include "SkillComponent.h"
|
||||||
#include "BaseCombatAIComponent.h"
|
#include "BaseCombatAIComponent.h"
|
||||||
|
|
||||||
|
|
||||||
void AmDarklingDragon::OnStartup(Entity* self) {
|
void AmDarklingDragon::OnStartup(Entity* self) {
|
||||||
self->SetVar<int32_t>(u"weakspot", 0);
|
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>();
|
auto* destroyableComponent = self->GetComponent<DestroyableComponent>();
|
||||||
|
|
||||||
if (destroyableComponent != nullptr) {
|
if (destroyableComponent != nullptr) {
|
||||||
Game::logger->Log("AmDarklingDragon", "Armor is %i\n", destroyableComponent->GetArmor());
|
|
||||||
|
|
||||||
if (destroyableComponent->GetArmor() > 0) return;
|
if (destroyableComponent->GetArmor() > 0) return;
|
||||||
|
|
||||||
auto weakpoint = self->GetVar<int32_t>(u"weakpoint");
|
auto weakpoint = self->GetVar<int32_t>(u"weakpoint");
|
||||||
|
|
||||||
if (weakpoint == 0) {
|
if (weakpoint == 0) {
|
||||||
Game::logger->Log("AmDarklingDragon", "Activating weakpoint\n");
|
|
||||||
|
|
||||||
self->AddTimer("ReviveTimer", 12);
|
self->AddTimer("ReviveTimer", 12);
|
||||||
|
|
||||||
auto* baseCombatAIComponent = self->GetComponent<BaseCombatAIComponent>();
|
auto* baseCombatAIComponent = self->GetComponent<BaseCombatAIComponent>();
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include "AmDarklingMech.h"
|
#include "AmDarklingMech.h"
|
||||||
#include "DestroyableComponent.h"
|
|
||||||
|
|
||||||
void AmDarklingMech::OnStartup(Entity* self)
|
void AmDarklingMech::OnStartup(Entity* self)
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
#include "ChooseYourDestinationNsToNt.h"
|
|
||||||
#include "BaseConsoleTeleportServer.h"
|
|
||||||
#include "AMFFormat.h"
|
|
||||||
#include "BaseEnemyMech.h"
|
#include "BaseEnemyMech.h"
|
||||||
|
|
||||||
class AmDarklingMech : public BaseEnemyMech
|
class AmDarklingMech : public BaseEnemyMech
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "SimplePhysicsComponent.h"
|
#include "SimplePhysicsComponent.h"
|
||||||
|
|
||||||
|
|
||||||
void AmDrawBridge::OnStartup(Entity* self)
|
void AmDrawBridge::OnStartup(Entity* self)
|
||||||
{
|
{
|
||||||
self->SetNetworkVar(u"InUse", false);
|
self->SetNetworkVar(u"InUse", false);
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#include "MissionComponent.h"
|
#include "MissionComponent.h"
|
||||||
#include "RebuildComponent.h"
|
#include "RebuildComponent.h"
|
||||||
#include "InventoryComponent.h"
|
#include "InventoryComponent.h"
|
||||||
#include "GameMessages.h"
|
|
||||||
#include "dZoneManager.h"
|
#include "dZoneManager.h"
|
||||||
|
|
||||||
void AmDropshipComputer::OnStartup(Entity* self)
|
void AmDropshipComputer::OnStartup(Entity* self)
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include "BaseCombatAIComponent.h"
|
#include "BaseCombatAIComponent.h"
|
||||||
#include "SkillComponent.h"
|
#include "SkillComponent.h"
|
||||||
|
|
||||||
|
|
||||||
void AmShieldGenerator::OnStartup(Entity* self)
|
void AmShieldGenerator::OnStartup(Entity* self)
|
||||||
{
|
{
|
||||||
self->SetProximityRadius(20, "shield");
|
self->SetProximityRadius(20, "shield");
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include "RebuildComponent.h"
|
#include "RebuildComponent.h"
|
||||||
#include "MissionComponent.h"
|
#include "MissionComponent.h"
|
||||||
|
|
||||||
|
|
||||||
void AmShieldGeneratorQuickbuild::OnStartup(Entity* self)
|
void AmShieldGeneratorQuickbuild::OnStartup(Entity* self)
|
||||||
{
|
{
|
||||||
self->SetProximityRadius(20, "shield");
|
self->SetProximityRadius(20, "shield");
|
||||||
|
@ -87,8 +87,6 @@ void AmSkullkinDrill::TriggerDrill(Entity* self)
|
|||||||
|
|
||||||
if (standObj != nullptr)
|
if (standObj != nullptr)
|
||||||
{
|
{
|
||||||
Game::logger->Log("AmSkullkinDrill", "Disabling knockback\n");
|
|
||||||
|
|
||||||
standObj->SetVar(u"bActive", false);
|
standObj->SetVar(u"bActive", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,8 +211,6 @@ void AmSkullkinDrill::OnArrived(Entity* self, uint32_t waypointIndex)
|
|||||||
|
|
||||||
if (standObj != nullptr)
|
if (standObj != nullptr)
|
||||||
{
|
{
|
||||||
Game::logger->Log("AmSkullkinDrill", "Disabling knockback\n");
|
|
||||||
|
|
||||||
standObj->SetVar(u"bActive", false);
|
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)
|
void AmSkullkinDrill::OnTimerDone(Entity* self, std::string timerName)
|
||||||
{
|
{
|
||||||
Game::logger->Log("AmSkullkinDrill", "Timer: %s\n", timerName.c_str());
|
|
||||||
|
|
||||||
if (timerName == "killDrill")
|
if (timerName == "killDrill")
|
||||||
{
|
{
|
||||||
const auto childID = self->GetVar<LWOOBJID>(u"ChildSmash");
|
const auto childID = self->GetVar<LWOOBJID>(u"ChildSmash");
|
||||||
@ -323,8 +317,6 @@ void AmSkullkinDrill::OnTimerDone(Entity* self, std::string timerName)
|
|||||||
|
|
||||||
if (standObj != nullptr)
|
if (standObj != nullptr)
|
||||||
{
|
{
|
||||||
Game::logger->Log("AmSkullkinDrill", "Enabling knockback\n");
|
|
||||||
|
|
||||||
standObj->SetVar(u"bActive", true);
|
standObj->SetVar(u"bActive", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,8 +343,6 @@ void AmSkullkinDrill::OnTimerDone(Entity* self, std::string timerName)
|
|||||||
{
|
{
|
||||||
const auto& animName = data[1];
|
const auto& animName = data[1];
|
||||||
|
|
||||||
Game::logger->Log("AmSkullkinDrill", "Anim done: %s\n", animName.c_str());
|
|
||||||
|
|
||||||
const auto playerID = self->GetVar<LWOOBJID>(u"userID");
|
const auto playerID = self->GetVar<LWOOBJID>(u"userID");
|
||||||
|
|
||||||
auto* player = EntityManager::Instance()->GetEntity(playerID);
|
auto* player = EntityManager::Instance()->GetEntity(playerID);
|
||||||
@ -364,8 +354,6 @@ void AmSkullkinDrill::OnTimerDone(Entity* self, std::string timerName)
|
|||||||
|
|
||||||
if (animName == "spinjitzu-staff-windup")
|
if (animName == "spinjitzu-staff-windup")
|
||||||
{
|
{
|
||||||
Game::logger->Log("AmSkullkinDrill", "Triggering drill\n");
|
|
||||||
|
|
||||||
TriggerDrill(self);
|
TriggerDrill(self);
|
||||||
|
|
||||||
GameMessages::SendPlayAnimation(player, u"spinjitzu-staff-loop");
|
GameMessages::SendPlayAnimation(player, u"spinjitzu-staff-loop");
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "DestroyableComponent.h"
|
#include "DestroyableComponent.h"
|
||||||
#include "MovingPlatformComponent.h"
|
#include "MovingPlatformComponent.h"
|
||||||
#include "dCommonVars.h"
|
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "MissionComponent.h"
|
#include "MissionComponent.h"
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#include "BaseConsoleTeleportServer.h"
|
#include "BaseConsoleTeleportServer.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "RocketLaunchpadControlComponent.h"
|
|
||||||
|
|
||||||
|
|
||||||
void BaseConsoleTeleportServer::BaseOnUse(Entity* self, Entity* user)
|
void BaseConsoleTeleportServer::BaseOnUse(Entity* self, Entity* user)
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#include "BaseEnemyMech.h"
|
#include "BaseEnemyMech.h"
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "GameMessages.h"
|
|
||||||
#include "Game.h"
|
|
||||||
#include "dLogger.h"
|
|
||||||
#include "ControllablePhysicsComponent.h"
|
#include "ControllablePhysicsComponent.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "dpWorld.h"
|
#include "dpWorld.h"
|
||||||
@ -21,7 +18,6 @@ void BaseEnemyMech::OnDie(Entity* self, Entity* killer) {
|
|||||||
if (!controlPhys) return;
|
if (!controlPhys) return;
|
||||||
|
|
||||||
NiPoint3 newLoc = {controlPhys->GetPosition().x, dpWorld::Instance().GetHeightAtPoint(controlPhys->GetPosition()), controlPhys->GetPosition().z };
|
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();
|
EntityInfo info = EntityInfo();
|
||||||
std::vector<LDFBaseData*> cfg;
|
std::vector<LDFBaseData*> cfg;
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#include "BasePropertyServer.h"
|
#include "BasePropertyServer.h"
|
||||||
#include <utility>
|
|
||||||
#include "dCommonVars.h"
|
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "dZoneManager.h"
|
#include "dZoneManager.h"
|
||||||
@ -8,7 +6,8 @@
|
|||||||
#include "DestroyableComponent.h"
|
#include "DestroyableComponent.h"
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "RenderComponent.h"
|
#include "RenderComponent.h"
|
||||||
#include "dServer.h"
|
#include "PropertyManagementComponent.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
|
|
||||||
void BasePropertyServer::SetGameVariables(Entity *self) {
|
void BasePropertyServer::SetGameVariables(Entity *self) {
|
||||||
self->SetVar<std::string>(ClaimMarkerGroup, "");
|
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();
|
const auto zoneId = dZoneManager::Instance()->GetZone()->GetWorldID();
|
||||||
|
|
||||||
// No guard for the spider instance fight
|
// No guard for the spider instance fight
|
||||||
if (Game::server->GetZoneID() == 1150)
|
if (dZoneManager::Instance()->GetZoneID().GetMapID() == 1150)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto entities = EntityManager::Instance()->GetEntitiesInGroup(self->GetVar<std::string>(GuardGroup));
|
const auto entities = EntityManager::Instance()->GetEntitiesInGroup(self->GetVar<std::string>(GuardGroup));
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
#include "PropertyManagementComponent.h"
|
|
||||||
#include "PropertyVendorComponent.h"
|
|
||||||
|
|
||||||
class BasePropertyServer : public CppScripts::Script {
|
class BasePropertyServer : public CppScripts::Script {
|
||||||
public:
|
public:
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#include "BaseRandomServer.h"
|
#include "BaseRandomServer.h"
|
||||||
#include "EntityManager.h"
|
|
||||||
#include "dZoneManager.h"
|
#include "dZoneManager.h"
|
||||||
#include "DestroyableComponent.h"
|
|
||||||
#include "Spawner.h"
|
#include "Spawner.h"
|
||||||
|
#include "dLogger.h"
|
||||||
|
#include "Entity.h"
|
||||||
|
|
||||||
void BaseRandomServer::BaseStartup(Entity* self)
|
void BaseRandomServer::BaseStartup(Entity* self)
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
|
||||||
#include "Entity.h"
|
|
||||||
#include "dCommonVars.h"
|
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
class Spawner;
|
||||||
class BaseRandomServer
|
class BaseRandomServer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "dZoneManager.h"
|
#include "dZoneManager.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
|
#include "MissionTaskType.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
#include "Character.h"
|
#include "Character.h"
|
||||||
|
|
||||||
void BaseSurvivalServer::SetGameVariables(Entity *self) {
|
void BaseSurvivalServer::SetGameVariables(Entity *self) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "ActivityManager.h"
|
#include "ActivityManager.h"
|
||||||
#include "CppScripts.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* State for each active game
|
* State for each active game
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "dZoneManager.h"
|
#include "dZoneManager.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
|
#include "MissionTaskType.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
#include "Character.h"
|
#include "Character.h"
|
||||||
|
|
||||||
// Done
|
// Done
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "ActivityManager.h"
|
#include "ActivityManager.h"
|
||||||
#include "CppScripts.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* State for each active game
|
* State for each active game
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#include "BootyDigServer.h"
|
#include "BootyDigServer.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "RenderComponent.h"
|
#include "RenderComponent.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
|
#include "MissionTaskType.h"
|
||||||
|
|
||||||
void BootyDigServer::OnStartup(Entity *self) {
|
void BootyDigServer::OnStartup(Entity *self) {
|
||||||
auto* zoneControlObject = EntityManager::Instance()->GetZoneControlEntity();
|
auto* zoneControlObject = EntityManager::Instance()->GetZoneControlEntity();
|
||||||
|
@ -6,7 +6,10 @@
|
|||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "dZoneManager.h"
|
#include "dZoneManager.h"
|
||||||
#include "dServer.h"
|
|
||||||
|
#include "DestroyableComponent.h"
|
||||||
|
#include "ControllablePhysicsComponent.h"
|
||||||
|
#include "BaseCombatAIComponent.h"
|
||||||
|
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "SkillComponent.h"
|
#include "SkillComponent.h"
|
||||||
@ -49,7 +52,7 @@ void BossSpiderQueenEnemyServer::OnStartup(Entity* self) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BossSpiderQueenEnemyServer::OnDie(Entity* self, Entity* killer) {
|
void BossSpiderQueenEnemyServer::OnDie(Entity* self, Entity* killer) {
|
||||||
if (Game::server->GetZoneID() == instanceZoneID) {
|
if (dZoneManager::Instance()->GetZoneID().GetMapID() == instanceZoneID) {
|
||||||
auto* missionComponent = killer->GetComponent<MissionComponent>();
|
auto* missionComponent = killer->GetComponent<MissionComponent>();
|
||||||
if (missionComponent == nullptr)
|
if (missionComponent == nullptr)
|
||||||
return;
|
return;
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
#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 {
|
class BossSpiderQueenEnemyServer final : public CppScripts::Script {
|
||||||
public:
|
public:
|
||||||
void OnStartup(Entity* self) override;
|
void OnStartup(Entity* self) override;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "BuccaneerValiantShip.h"
|
#include "BuccaneerValiantShip.h"
|
||||||
#include "SkillComponent.h"
|
#include "SkillComponent.h"
|
||||||
#include "dLogger.h"
|
|
||||||
|
|
||||||
void BuccaneerValiantShip::OnStartup(Entity* self) {
|
void BuccaneerValiantShip::OnStartup(Entity* self) {
|
||||||
self->AddCallbackTimer(1.0F, [self]() {
|
self->AddCallbackTimer(1.0F, [self]() {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#include "BurningTile.h"
|
#include "BurningTile.h"
|
||||||
|
|
||||||
#include "SkillComponent.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)
|
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 "CatapultBaseServer.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "dZoneManager.h"
|
|
||||||
|
|
||||||
|
|
||||||
void CatapultBaseServer::OnNotifyObject(Entity *self, Entity *sender, const std::string& name, int32_t param1, int32_t param2)
|
void CatapultBaseServer::OnNotifyObject(Entity *self, Entity *sender, const std::string& name, int32_t param1, int32_t param2)
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
#include "Spawner.h"
|
|
||||||
#include "dZoneManager.h"
|
|
||||||
#include "dCommonVars.h"
|
|
||||||
|
|
||||||
class CatapultBaseServer : public CppScripts::Script {
|
class CatapultBaseServer : public CppScripts::Script {
|
||||||
public:
|
public:
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "CatapultBouncerServer.h"
|
#include "CatapultBouncerServer.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "dZoneManager.h"
|
|
||||||
|
|
||||||
void CatapultBouncerServer::OnRebuildComplete(Entity* self, Entity* target)
|
void CatapultBouncerServer::OnRebuildComplete(Entity* self, Entity* target)
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
#include "Spawner.h"
|
|
||||||
#include "dZoneManager.h"
|
|
||||||
#include "dCommonVars.h"
|
|
||||||
|
|
||||||
class CatapultBouncerServer : public CppScripts::Script {
|
class CatapultBouncerServer : public CppScripts::Script {
|
||||||
public:
|
public:
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#include "CavePrisonCage.h"
|
#include "CavePrisonCage.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "RebuildComponent.h"
|
#include "RebuildComponent.h"
|
||||||
#include "MovingPlatformComponent.h"
|
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "Character.h"
|
#include "Character.h"
|
||||||
|
#include "dZoneManager.h"
|
||||||
|
|
||||||
void CavePrisonCage::OnStartup(Entity *self)
|
void CavePrisonCage::OnStartup(Entity *self)
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
#include "Spawner.h"
|
|
||||||
#include "dZoneManager.h"
|
|
||||||
#include "dCommonVars.h"
|
|
||||||
|
|
||||||
class CavePrisonCage : public CppScripts::Script {
|
class CavePrisonCage : public CppScripts::Script {
|
||||||
public:
|
public:
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#include "ChooseYourDestinationNsToNt.h"
|
#include "ChooseYourDestinationNsToNt.h"
|
||||||
#include "Character.h"
|
#include "Character.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "dZoneManager.h"
|
|
||||||
#include "EntityManager.h"
|
|
||||||
|
|
||||||
bool ChooseYourDestinationNsToNt::CheckChoice(Entity* self, Entity* player)
|
bool ChooseYourDestinationNsToNt::CheckChoice(Entity* self, Entity* player)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
|
||||||
|
|
||||||
class ChooseYourDestinationNsToNt
|
class ChooseYourDestinationNsToNt
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#include "ClRing.h"
|
#include "ClRing.h"
|
||||||
#include "EntityManager.h"
|
|
||||||
#include "Character.h"
|
|
||||||
|
|
||||||
void ClRing::OnCollisionPhantom(Entity* self, Entity* target)
|
void ClRing::OnCollisionPhantom(Entity* self, Entity* target)
|
||||||
{
|
{
|
||||||
|
@ -4,10 +4,8 @@
|
|||||||
|
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "dpWorld.h"
|
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "ScriptComponent.h"
|
#include "ScriptComponent.h"
|
||||||
#include "EntityManager.h"
|
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "dLogger.h"
|
#include "dLogger.h"
|
||||||
#include "InvalidScript.h"
|
#include "InvalidScript.h"
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "dCommonVars.h"
|
#include "dCommonVars.h"
|
||||||
#include "RakNetTypes.h"
|
|
||||||
#include <string>
|
|
||||||
#include "MissionComponent.h"
|
|
||||||
#include "MissionState.h"
|
#include "MissionState.h"
|
||||||
#include "Game.h"
|
#include <string>
|
||||||
#include "dLogger.h"
|
#include <vector>
|
||||||
#include "Loot.h"
|
|
||||||
|
|
||||||
class User;
|
class User;
|
||||||
class Entity;
|
class Entity;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "DLUVanityNPC.h"
|
#include "DLUVanityNPC.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "dServer.h"
|
#include "dServer.h"
|
||||||
|
#include "VanityUtilities.h"
|
||||||
|
|
||||||
void DLUVanityNPC::OnStartup(Entity* self)
|
void DLUVanityNPC::OnStartup(Entity* self)
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
#include "VanityUtilities.h"
|
|
||||||
|
|
||||||
|
class VanityNPC;
|
||||||
class DLUVanityNPC : public CppScripts::Script
|
class DLUVanityNPC : public CppScripts::Script
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
class Entity;
|
class Entity;
|
||||||
|
|
||||||
class Darkitect
|
class Darkitect
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
#include "EnemySpiderSpawner.h"
|
#include "EnemySpiderSpawner.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "SimplePhysicsComponent.h"
|
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "DestroyableComponent.h"
|
#include "DestroyableComponent.h"
|
||||||
#include "MovementAIComponent.h"
|
|
||||||
|
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
//--Initiate egg hatching on call
|
//--Initiate egg hatching on call
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "ExplodingAsset.h"
|
#include "ExplodingAsset.h"
|
||||||
|
|
||||||
#include "DestroyableComponent.h"
|
#include "DestroyableComponent.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
#include "SkillComponent.h"
|
#include "SkillComponent.h"
|
||||||
|
|
||||||
//TODO: this has to be updated so that you only get killed if you're in a certain radius.
|
//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 "MovingPlatformComponent.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
|
|
||||||
|
|
||||||
void FallingTile::OnStartup(Entity* self)
|
void FallingTile::OnStartup(Entity* self)
|
||||||
{
|
{
|
||||||
auto* movingPlatfromComponent = self->GetComponent<MovingPlatformComponent>();
|
auto* movingPlatfromComponent = self->GetComponent<MovingPlatformComponent>();
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include "FlameJetServer.h"
|
#include "FlameJetServer.h"
|
||||||
|
|
||||||
#include "SkillComponent.h"
|
#include "SkillComponent.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
|
|
||||||
|
@ -2,17 +2,11 @@
|
|||||||
#include "PhantomPhysicsComponent.h"
|
#include "PhantomPhysicsComponent.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
|
|
||||||
|
|
||||||
void ForceVolumeServer::OnStartup(Entity* self)
|
void ForceVolumeServer::OnStartup(Entity* self)
|
||||||
{
|
{
|
||||||
auto* phantomPhysicsComponent = self->GetComponent<PhantomPhysicsComponent>();
|
auto* phantomPhysicsComponent = self->GetComponent<PhantomPhysicsComponent>();
|
||||||
|
|
||||||
if (phantomPhysicsComponent == nullptr)
|
if (phantomPhysicsComponent == nullptr) return;
|
||||||
{
|
|
||||||
Game::logger->Log("ForceVolumeServer", "Failed to find PhantomPhysicsComponent\n");
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto forceAmount = self->GetVar<float>(u"ForceAmt");
|
const auto forceAmount = self->GetVar<float>(u"ForceAmt");
|
||||||
const auto forceX = self->GetVar<float>(u"ForceX");
|
const auto forceX = self->GetVar<float>(u"ForceX");
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
#include "FountainOfImagination.h"
|
#include "FountainOfImagination.h"
|
||||||
|
#include "dCommonVars.h"
|
||||||
|
#include "Entity.h"
|
||||||
|
|
||||||
void FountainOfImagination::OnStartup(Entity *self) {
|
void FountainOfImagination::OnStartup(Entity *self) {
|
||||||
self->SetVar<uint32_t>(u"numCycles", 6);
|
self->SetVar<uint32_t>(u"numCycles", 6);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "FvBounceOverWall.h"
|
#include "FvBounceOverWall.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
|
|
||||||
void FvBounceOverWall::OnCollisionPhantom(Entity* self, Entity* target) {
|
void FvBounceOverWall::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||||
auto missionComponent = target->GetComponent<MissionComponent>();
|
auto missionComponent = target->GetComponent<MissionComponent>();
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "FvCandle.h"
|
#include "FvCandle.h"
|
||||||
#include "MissionComponent.h"
|
#include "MissionComponent.h"
|
||||||
|
#include "RenderComponent.h"
|
||||||
|
|
||||||
std::vector<int32_t> FvCandle::m_Missions = {850, 1431, 1529, 1566, 1603};
|
std::vector<int32_t> FvCandle::m_Missions = {850, 1431, 1529, 1566, 1603};
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
#include "RenderComponent.h"
|
|
||||||
|
|
||||||
class FvCandle : public CppScripts::Script
|
class FvCandle : public CppScripts::Script
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
#include "FvConsoleLeftQuickbuild.h"
|
#include "FvConsoleLeftQuickbuild.h"
|
||||||
#include "RebuildComponent.h"
|
|
||||||
#include "GeneralUtils.h"
|
|
||||||
#include "dZoneManager.h"
|
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
|
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
#include "FvConsoleRightQuickbuild.h"
|
#include "FvConsoleRightQuickbuild.h"
|
||||||
#include "RebuildComponent.h"
|
|
||||||
#include "GeneralUtils.h"
|
|
||||||
#include "dZoneManager.h"
|
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
|
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
#include "FvFacilityBrick.h"
|
#include "FvFacilityBrick.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "GeneralUtils.h"
|
|
||||||
#include "dZoneManager.h"
|
#include "dZoneManager.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
|
|
||||||
|
|
||||||
void FvFacilityBrick::OnStartup(Entity* self)
|
void FvFacilityBrick::OnStartup(Entity* self)
|
||||||
{
|
{
|
||||||
self->SetVar(u"ConsoleLEFTActive", false);
|
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)
|
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* brickSpawner = dZoneManager::Instance()->GetSpawnersByName("ImaginationBrick")[0];
|
||||||
auto* bugSpawner = dZoneManager::Instance()->GetSpawnersByName("MaelstromBug")[0];
|
auto* bugSpawner = dZoneManager::Instance()->GetSpawnersByName("MaelstromBug")[0];
|
||||||
auto* canisterSpawner = dZoneManager::Instance()->GetSpawnersByName("BrickCanister")[0];
|
auto* canisterSpawner = dZoneManager::Instance()->GetSpawnersByName("BrickCanister")[0];
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "FvFong.h"
|
#include "FvFong.h"
|
||||||
#include "Darkitect.h"
|
#include "Darkitect.h"
|
||||||
#include "MissionComponent.h"
|
#include "MissionState.h"
|
||||||
|
|
||||||
void FvFong::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState)
|
void FvFong::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, MissionState missionState)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "FvFreeGfNinjas.h"
|
#include "FvFreeGfNinjas.h"
|
||||||
#include "Character.h"
|
#include "Character.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
|
|
||||||
void FvFreeGfNinjas::OnMissionDialogueOK(Entity *self, Entity *target, int missionID, MissionState missionState) {
|
void FvFreeGfNinjas::OnMissionDialogueOK(Entity *self, Entity *target, int missionID, MissionState missionState) {
|
||||||
if (missionID == 705 && missionState == MissionState::MISSION_STATE_AVAILABLE) {
|
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)
|
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())
|
if (name != "horsemenTrigger" || !entering->IsPlayer())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -24,12 +22,10 @@ void FvHorsemenTrigger::OnProximityUpdate(Entity* self, Entity* entering, std::s
|
|||||||
|
|
||||||
if (status == "ENTER" && iter == players.end())
|
if (status == "ENTER" && iter == players.end())
|
||||||
{
|
{
|
||||||
Game::logger->Log("FvHorsemenTrigger", "Proximity enter\n");
|
|
||||||
players.push_back(entering->GetObjectID());
|
players.push_back(entering->GetObjectID());
|
||||||
}
|
}
|
||||||
else if (status == "LEAVE" && iter != players.end())
|
else if (status == "LEAVE" && iter != players.end())
|
||||||
{
|
{
|
||||||
Game::logger->Log("FvHorsemenTrigger", "Proximity leave\n");
|
|
||||||
players.erase(iter);
|
players.erase(iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +38,6 @@ FvHorsemenTrigger::OnFireEventServerSide(Entity *self, Entity *sender, std::stri
|
|||||||
{
|
{
|
||||||
auto players = self->GetVar<std::vector<LWOOBJID>>(u"players");
|
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")
|
if (args == "HorsemenDeath")
|
||||||
{
|
{
|
||||||
for (const auto& playerId : self->GetVar<std::vector<LWOOBJID>>(u"players"))
|
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())
|
for (const auto& group : self->GetGroups())
|
||||||
{
|
{
|
||||||
Game::logger->Log("FvMaelstromCavalry", "Got group: %s\n", group.c_str());
|
|
||||||
|
|
||||||
const auto& objects = EntityManager::Instance()->GetEntitiesInGroup(group);
|
const auto& objects = EntityManager::Instance()->GetEntitiesInGroup(group);
|
||||||
|
|
||||||
for (auto* obj : objects)
|
for (auto* obj : objects)
|
||||||
{
|
{
|
||||||
if (obj->GetLOT() != 8551) continue;
|
if (obj->GetLOT() != 8551) continue;
|
||||||
|
|
||||||
Game::logger->Log("FvMaelstromCavalry", "Trigger in group: %s\n", group.c_str());
|
|
||||||
|
|
||||||
obj->OnFireEventServerSide(self, "ISpawned");
|
obj->OnFireEventServerSide(self, "ISpawned");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -27,8 +23,6 @@ void FvMaelstromCavalry::OnDie(Entity* self, Entity* killer)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Game::logger->Log("FvMaelstromCavalry", "Killer: %i\n", killer->GetLOT());
|
|
||||||
|
|
||||||
if (killer->GetLOT() != 8665)
|
if (killer->GetLOT() != 8665)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -38,8 +32,6 @@ void FvMaelstromCavalry::OnDie(Entity* self, Entity* killer)
|
|||||||
|
|
||||||
for (auto* trigger : triggers)
|
for (auto* trigger : triggers)
|
||||||
{
|
{
|
||||||
Game::logger->Log("FvMaelstromCavalry", "Trigger for: %i\n", killer->GetLOT());
|
|
||||||
|
|
||||||
trigger->OnFireEventServerSide(self, "HorsemenDeath");
|
trigger->OnFireEventServerSide(self, "HorsemenDeath");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
#include "RenderComponent.h"
|
|
||||||
|
|
||||||
class FvMaelstromCavalry : public CppScripts::Script
|
class FvMaelstromCavalry : public CppScripts::Script
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "SkillComponent.h"
|
#include "SkillComponent.h"
|
||||||
#include "BaseCombatAIComponent.h"
|
#include "BaseCombatAIComponent.h"
|
||||||
#include "RenderComponent.h"
|
|
||||||
#include "DestroyableComponent.h"
|
#include "DestroyableComponent.h"
|
||||||
|
|
||||||
void FvMaelstromDragon::OnStartup(Entity* self)
|
void FvMaelstromDragon::OnStartup(Entity* self)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
#include "RenderComponent.h"
|
|
||||||
|
|
||||||
class FvMaelstromDragon : public CppScripts::Script
|
class FvMaelstromDragon : public CppScripts::Script
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "FvPassThroughWall.h"
|
#include "FvPassThroughWall.h"
|
||||||
#include "InventoryComponent.h"
|
#include "InventoryComponent.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
|
|
||||||
void FvPassThroughWall::OnCollisionPhantom(Entity* self, Entity* target) {
|
void FvPassThroughWall::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||||
auto missionComponent = target->GetComponent<MissionComponent>();
|
auto missionComponent = target->GetComponent<MissionComponent>();
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
|
#include "FvRaceSmashEggImagineServer.h"
|
||||||
#include "CharacterComponent.h"
|
#include "CharacterComponent.h"
|
||||||
#include "DestroyableComponent.h"
|
#include "DestroyableComponent.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "FvRaceSmashEggImagineServer.h"
|
|
||||||
#include "PossessableComponent.h"
|
#include "PossessableComponent.h"
|
||||||
#include "RacingTaskParam.h"
|
#include "RacingTaskParam.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
|
|
||||||
void FvRaceSmashEggImagineServer::OnDie(Entity *self, Entity *killer) {
|
void FvRaceSmashEggImagineServer::OnDie(Entity *self, Entity *killer) {
|
||||||
if (killer != nullptr) {
|
if (killer != nullptr) {
|
||||||
|
@ -3,12 +3,9 @@
|
|||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "DestroyableComponent.h"
|
#include "DestroyableComponent.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "dLogger.h"
|
|
||||||
|
|
||||||
void GfBanana::SpawnBanana(Entity* self)
|
void GfBanana::SpawnBanana(Entity* self)
|
||||||
{
|
{
|
||||||
Game::logger->Log("GfBanana", "Spawning banana\n");
|
|
||||||
|
|
||||||
auto position = self->GetPosition();
|
auto position = self->GetPosition();
|
||||||
const auto rotation = self->GetRotation();
|
const auto rotation = self->GetRotation();
|
||||||
|
|
||||||
@ -44,8 +41,6 @@ void GfBanana::OnStartup(Entity* self)
|
|||||||
|
|
||||||
void GfBanana::OnHit(Entity* self, Entity* attacker)
|
void GfBanana::OnHit(Entity* self, Entity* attacker)
|
||||||
{
|
{
|
||||||
Game::logger->Log("GfBanana", "Spawning cluster\n");
|
|
||||||
|
|
||||||
auto* destroyable = self->GetComponent<DestroyableComponent>();
|
auto* destroyable = self->GetComponent<DestroyableComponent>();
|
||||||
|
|
||||||
destroyable->SetHealth(9999);
|
destroyable->SetHealth(9999);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "GfBananaCluster.h"
|
#include "GfBananaCluster.h"
|
||||||
|
#include "Entity.h"
|
||||||
|
|
||||||
void GfBananaCluster::OnStartup(Entity* self)
|
void GfBananaCluster::OnStartup(Entity* self)
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
#include "GfCampfire.h"
|
#include "GfCampfire.h"
|
||||||
#include "GameMessages.h"
|
|
||||||
|
|
||||||
#include "RenderComponent.h"
|
#include "RenderComponent.h"
|
||||||
#include "SkillComponent.h"
|
#include "SkillComponent.h"
|
||||||
#include "MissionComponent.h"
|
#include "MissionComponent.h"
|
||||||
#include "RenderComponent.h"
|
#include "RenderComponent.h"
|
||||||
#include "ProximityMonitorComponent.h"
|
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
|
|
||||||
void GfCampfire::OnStartup(Entity* self) {
|
void GfCampfire::OnStartup(Entity* self) {
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include "GfJailWalls.h"
|
#include "GfJailWalls.h"
|
||||||
#include "EntityManager.h"
|
|
||||||
#include "dZoneManager.h"
|
#include "dZoneManager.h"
|
||||||
#include "GeneralUtils.h"
|
#include "GeneralUtils.h"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "GfTikiTorch.h"
|
#include "GfTikiTorch.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
#include "RenderComponent.h"
|
#include "RenderComponent.h"
|
||||||
|
|
||||||
void GfTikiTorch::OnStartup(Entity* self) {
|
void GfTikiTorch::OnStartup(Entity* self) {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "ImaginationBackpackHealServer.h"
|
#include "ImaginationBackpackHealServer.h"
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
|
|
||||||
void ImaginationBackpackHealServer::OnSkillEventFired(Entity *self, Entity *caster, const std::string &message) {
|
void ImaginationBackpackHealServer::OnSkillEventFired(Entity *self, Entity *caster, const std::string &message) {
|
||||||
if (message == "CastImaginationBackpack") {
|
if (message == "CastImaginationBackpack") {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "ImaginationShrineServer.h"
|
#include "ImaginationShrineServer.h"
|
||||||
#include "RebuildComponent.h"
|
#include "RebuildComponent.h"
|
||||||
|
|
||||||
|
|
||||||
void ImaginationShrineServer::OnUse(Entity* self, Entity* user)
|
void ImaginationShrineServer::OnUse(Entity* self, Entity* user)
|
||||||
{
|
{
|
||||||
// If the rebuild component is complete, use the shrine
|
// 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);
|
self->SetVar(u"Died", true);
|
||||||
|
|
||||||
Game::logger->Log("ImgBrickConsoleQB", "On Die...\n");
|
|
||||||
|
|
||||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||||
|
|
||||||
if (rebuildComponent->GetState() == REBUILD_COMPLETED)
|
if (rebuildComponent->GetState() == REBUILD_COMPLETED)
|
||||||
@ -266,16 +264,12 @@ void ImgBrickConsoleQB::OnDie(Entity* self, Entity* killer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
self->SetNetworkVar(u"used", false);
|
self->SetNetworkVar(u"used", false);
|
||||||
|
|
||||||
Game::logger->Log("ImgBrickConsoleQB", "Died...\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImgBrickConsoleQB::OnTimerDone(Entity* self, std::string timerName)
|
void ImgBrickConsoleQB::OnTimerDone(Entity* self, std::string timerName)
|
||||||
{
|
{
|
||||||
if (timerName == "reset")
|
if (timerName == "reset")
|
||||||
{
|
{
|
||||||
Game::logger->Log("ImgBrickConsoleQB", "Resetting...\n");
|
|
||||||
|
|
||||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||||
|
|
||||||
if (rebuildComponent->GetState() == REBUILD_OPEN)
|
if (rebuildComponent->GetState() == REBUILD_OPEN)
|
||||||
@ -285,8 +279,6 @@ void ImgBrickConsoleQB::OnTimerDone(Entity* self, std::string timerName)
|
|||||||
}
|
}
|
||||||
else if (timerName == "Die")
|
else if (timerName == "Die")
|
||||||
{
|
{
|
||||||
Game::logger->Log("ImgBrickConsoleQB", "Die...\n");
|
|
||||||
|
|
||||||
const auto consoles = EntityManager::Instance()->GetEntitiesInGroup("Console");
|
const auto consoles = EntityManager::Instance()->GetEntitiesInGroup("Console");
|
||||||
|
|
||||||
for (auto* console : consoles)
|
for (auto* console : consoles)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
#include <map>
|
|
||||||
|
|
||||||
class ImgBrickConsoleQB : public CppScripts::Script
|
class ImgBrickConsoleQB : public CppScripts::Script
|
||||||
{
|
{
|
||||||
|
@ -2,13 +2,10 @@
|
|||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "Character.h"
|
#include "Character.h"
|
||||||
#include "Game.h"
|
|
||||||
#include "dServer.h"
|
#include "dServer.h"
|
||||||
|
|
||||||
void InstanceExitTransferPlayerToLastNonInstance::OnUse(Entity* self, Entity* user)
|
void InstanceExitTransferPlayerToLastNonInstance::OnUse(Entity* self, Entity* user)
|
||||||
{
|
{
|
||||||
Game::logger->Log("Instance", "OnUse\n");
|
|
||||||
|
|
||||||
auto transferText = self->GetVar<std::u16string>(u"transferText");
|
auto transferText = self->GetVar<std::u16string>(u"transferText");
|
||||||
if (transferText.empty())
|
if (transferText.empty())
|
||||||
transferText = u"DRAGON_EXIT_QUESTION";
|
transferText = u"DRAGON_EXIT_QUESTION";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "LegoDieRoll.h"
|
#include "LegoDieRoll.h"
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "dLogger.h"
|
|
||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
|
|
||||||
void LegoDieRoll::OnStartup(Entity* self) {
|
void LegoDieRoll::OnStartup(Entity* self) {
|
||||||
self->AddTimer("DoneRolling", 10.0f);
|
self->AddTimer("DoneRolling", 10.0f);
|
||||||
@ -48,7 +48,6 @@ void LegoDieRoll::OnTimerDone(Entity* self, std::string timerName) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
Game::logger->LogDebug("LegoDieRoll", "Invalid animation: roll-die-%i\n", dieRoll);
|
|
||||||
break;
|
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