From 0d6d47cb742d6388b0efca4fd2da80593948af90 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Wed, 11 Nov 2026 07:08:48 -0600 Subject: [PATCH] fix(scripts): the stun immunity script path as the game spells it The CDClient script components of the summoned pets and allies (Bulper, Thwok, the Make-Shift Buddies and others) name scripts\EquipmentScripts\StunImmunity.lua. The script table had stunImmunity.lua, so those objects never got the script and were not made immune to stuns, knockbacks, interrupts and pulls. The table now has the game's path. Co-Authored-By: Claude Opus 5.5 --- dScripts/CppScripts.cpp | 2 +- tests/dGameTests/GameSpellingsTests.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dScripts/CppScripts.cpp b/dScripts/CppScripts.cpp index 0c2a30b4e..9dd355f3a 100644 --- a/dScripts/CppScripts.cpp +++ b/dScripts/CppScripts.cpp @@ -732,7 +732,7 @@ namespace { {"scripts\\equipmenttriggers\\gempack.lua", []() {return new GemPack();}}, {"scripts\\equipmenttriggers\\shardarmor.lua", []() {return new ShardArmor();}}, {"scripts\\equipmenttriggers\\coilbackpack.lua", []() {return new TeslaPack();}}, - {"scripts\\EquipmentScripts\\stunImmunity.lua", []() {return new StunImmunity();}}, + {"scripts\\EquipmentScripts\\StunImmunity.lua", []() {return new StunImmunity();}}, //FB {"scripts\\ai\\NS\\WH\\L_ROCKHYDRANT_BROKEN.lua", []() {return new RockHydrantBroken();}}, diff --git a/tests/dGameTests/GameSpellingsTests.cpp b/tests/dGameTests/GameSpellingsTests.cpp index 585bc20ac..95fb8652e 100644 --- a/tests/dGameTests/GameSpellingsTests.cpp +++ b/tests/dGameTests/GameSpellingsTests.cpp @@ -3,6 +3,7 @@ #include "GameDependencies.h" #include "Entity.h" #include "EffectsMessages.h" +#include "CppScripts.h" #include "dGameMessagesTests/GameMessageTestUtils.h" #include "02_server/Map/GF/MastTeleport.h" @@ -46,3 +47,9 @@ TEST_F(GameSpellingsTest, TheMastSwingCinematicTakesTheMastsLeadIn) { EXPECT_EQ(sent[0].pathName, u"MastSwing_01"); EXPECT_FLOAT_EQ(sent[0].leadIn, 1.0f); } + +// The summoned pets' and allies' script components (scripts\EquipmentScripts\StunImmunity.lua) +TEST_F(GameSpellingsTest, TheStunImmunityScriptLoadsByTheGamesPath) { + auto* const pet = Add(0x1000, 8563); + EXPECT_NE(CppScripts::GetScript(pet, "scripts\\EquipmentScripts\\StunImmunity.lua"), CppScripts::GetInvalidScript()); +}