From 4bf60a65223377f3d99f0265cca71e7778dbdafd Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Sat, 23 Mar 2024 00:36:30 -0400 Subject: [PATCH] [Bug Fix] Fix ScaleNPC() in Perl (#4196) # Notes - We were not passing `override_special_abilities` in the right parameter slot. - Default `always_scale` to `true` when using the Perl/Lua method. --- zone/lua_npc.cpp | 2 +- zone/perl_npc.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zone/lua_npc.cpp b/zone/lua_npc.cpp index 9a6581774..76520340f 100644 --- a/zone/lua_npc.cpp +++ b/zone/lua_npc.cpp @@ -758,7 +758,7 @@ void Lua_NPC::SetLDoNTrapDetected(bool is_detected) { void Lua_NPC::ScaleNPC(uint8 npc_level) { Lua_Safe_Call_Void(); - self->ScaleNPC(npc_level); + self->ScaleNPC(npc_level, true); } void Lua_NPC::ScaleNPC(uint8 npc_level, bool override_special_abilities) diff --git a/zone/perl_npc.cpp b/zone/perl_npc.cpp index 6deea5b80..531fb4fc8 100644 --- a/zone/perl_npc.cpp +++ b/zone/perl_npc.cpp @@ -758,12 +758,12 @@ void Perl_NPC_SetLDoNTrapDetected(NPC* self, bool is_detected) void Perl_NPC_ScaleNPC(NPC* self, uint8 npc_level) { - return self->ScaleNPC(npc_level); + self->ScaleNPC(npc_level, true); } void Perl_NPC_ScaleNPC(NPC* self, uint8 npc_level, bool override_special_abilities) { - return self->ScaleNPC(npc_level, override_special_abilities); + self->ScaleNPC(npc_level, true, override_special_abilities); } bool Perl_NPC_IsUnderwaterOnly(NPC* self) // @categories Script Utility