From ca24aed201837fcdbf342705b6096acf7b379a16 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Tue, 20 Aug 2024 21:11:40 -0300 Subject: [PATCH 1/2] Update creature_functions.cpp --- src/lua/functions/creatures/creature_functions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua/functions/creatures/creature_functions.cpp b/src/lua/functions/creatures/creature_functions.cpp index 6b09945971a..5a26667cd38 100644 --- a/src/lua/functions/creatures/creature_functions.cpp +++ b/src/lua/functions/creatures/creature_functions.cpp @@ -1024,7 +1024,7 @@ int CreatureFunctions::luaCreatureSetIcon(lua_State* L) { auto count = getNumber(L, 5, 0); CreatureIcon creatureIcon; if (category == CreatureIconCategory_t::Modifications) { - auto icon = getNumber(L, 5); + auto icon = getNumber(L, 4); creatureIcon = CreatureIcon(icon, count); } else { auto icon = getNumber(L, 4); From 7949904d06ad33a582e9f5974e1987db30093981 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Tue, 20 Aug 2024 21:15:17 -0300 Subject: [PATCH 2/2] Update creature_functions.cpp --- src/lua/functions/creatures/creature_functions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lua/functions/creatures/creature_functions.cpp b/src/lua/functions/creatures/creature_functions.cpp index 5a26667cd38..81a4a0b5304 100644 --- a/src/lua/functions/creatures/creature_functions.cpp +++ b/src/lua/functions/creatures/creature_functions.cpp @@ -1020,8 +1020,8 @@ int CreatureFunctions::luaCreatureSetIcon(lua_State* L) { return 1; } const auto key = getString(L, 2); - auto category = getNumber(L, 3); - auto count = getNumber(L, 5, 0); + const auto category = getNumber(L, 3); + const auto count = getNumber(L, 5, 0); CreatureIcon creatureIcon; if (category == CreatureIconCategory_t::Modifications) { auto icon = getNumber(L, 4);