mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
Scripts A-B
Gonna be doing this in alphabetical order now.
This commit is contained in:
parent
cb746f2a96
commit
a91309c5f8
@ -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,7 +1,6 @@
|
||||
#include "AgPropGuard.h"
|
||||
#include "Entity.h"
|
||||
#include "Character.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "Item.h"
|
||||
|
@ -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");
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include "MovingPlatformComponent.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "ProximityMonitorComponent.h"
|
||||
#include "dLogger.h"
|
||||
#include "MissionComponent.h"
|
||||
|
||||
void AmSkullkinDrill::OnStartup(Entity* self)
|
||||
@ -88,8 +87,6 @@ void AmSkullkinDrill::TriggerDrill(Entity* self)
|
||||
|
||||
if (standObj != nullptr)
|
||||
{
|
||||
Game::logger->Log("AmSkullkinDrill", "Disabling knockback\n");
|
||||
|
||||
standObj->SetVar(u"bActive", false);
|
||||
}
|
||||
|
||||
@ -214,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);
|
||||
}
|
||||
|
||||
@ -303,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");
|
||||
@ -324,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);
|
||||
}
|
||||
|
||||
@ -352,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);
|
||||
@ -365,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,7 @@
|
||||
#include "DestroyableComponent.h"
|
||||
#include "Entity.h"
|
||||
#include "RenderComponent.h"
|
||||
#include "dServer.h"
|
||||
#include "PropertyManagementComponent.h"
|
||||
|
||||
void BasePropertyServer::SetGameVariables(Entity *self) {
|
||||
self->SetVar<std::string>(ClaimMarkerGroup, "");
|
||||
@ -337,7 +335,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,9 +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,7 +1,4 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
#include "Entity.h"
|
||||
#include "dCommonVars.h"
|
||||
|
||||
class BaseRandomServer
|
||||
{
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include "ActivityManager.h"
|
||||
#include "CppScripts.h"
|
||||
|
||||
/**
|
||||
* State for each active game
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include "ActivityManager.h"
|
||||
#include "CppScripts.h"
|
||||
|
||||
/**
|
||||
* State for each active game
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user