diff --git a/dScripts/CMakeLists.txt b/dScripts/CMakeLists.txt index 50b41a14..4476ad7c 100644 --- a/dScripts/CMakeLists.txt +++ b/dScripts/CMakeLists.txt @@ -106,6 +106,7 @@ set(DSCRIPT_SOURCES "ActivityManager.cpp" "FvPassThroughWall.cpp" "FvRaceSmashEggImagineServer.cpp" "GfApeSmashingQB.cpp" + "GfArchway.cpp" "GfBanana.cpp" "GfBananaCluster.cpp" "GfCampfire.cpp" diff --git a/dScripts/CppScripts.cpp b/dScripts/CppScripts.cpp index de39fbb7..82cd2ebc 100644 --- a/dScripts/CppScripts.cpp +++ b/dScripts/CppScripts.cpp @@ -116,6 +116,7 @@ #include "BaseEnemyApe.h" #include "GfApeSmashingQB.h" #include "ZoneGfProperty.h" +#include "GfArchway.h" // SG Scripts #include "SGCannon.h" @@ -494,6 +495,9 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr script = new GfApeSmashingQB(); else if (scriptName == "scripts\\zone\\PROPERTY\\GF\\L_ZONE_GF_PROPERTY.lua") script = new ZoneGfProperty(); + else if (scriptName == "scripts\\ai\\GF\\L_GF_ARCHWAY.lua") { + script = new GfArchway(); + } // SG else if (scriptName == "scripts\\ai\\MINIGAME\\SG_GF\\SERVER\\SG_CANNON.lua") diff --git a/dScripts/GfArchway.cpp b/dScripts/GfArchway.cpp new file mode 100644 index 00000000..429f62ae --- /dev/null +++ b/dScripts/GfArchway.cpp @@ -0,0 +1,8 @@ +#include "GfArchway.h" +#include "Entity.h" +#include "SkillComponent.h" + +void GfArchway::OnRebuildComplete(Entity* self, Entity* target) { + auto* skillComponent = target->GetComponent(); + if (skillComponent) skillComponent->CalculateBehavior(SHIELDING_SKILL, SHIELDING_BEHAVIOR, target->GetObjectID(), true); +} diff --git a/dScripts/GfArchway.h b/dScripts/GfArchway.h new file mode 100644 index 00000000..b60b2a9f --- /dev/null +++ b/dScripts/GfArchway.h @@ -0,0 +1,10 @@ +#pragma once +#include "CppScripts.h" + +class GfArchway : public CppScripts::Script { +public: + void OnRebuildComplete(Entity* self, Entity* target) override; +private: + const uint32_t SHIELDING_SKILL = 863; + const uint32_t SHIELDING_BEHAVIOR = 3788; +};