Skip to content

Commit

Permalink
fix: wrong params in creatureSetIcon function (opentibiabr#2835)
Browse files Browse the repository at this point in the history
  • Loading branch information
luanluciano93 authored and s2leandro155 committed Sep 26, 2024
1 parent a5d2470 commit 8b248ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lua/functions/creatures/creature_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1020,11 +1020,11 @@ int CreatureFunctions::luaCreatureSetIcon(lua_State* L) {
return 1;
}
const auto key = getString(L, 2);
auto category = getNumber<CreatureIconCategory_t>(L, 3);
auto count = getNumber<uint16_t>(L, 5, 0);
const auto category = getNumber<CreatureIconCategory_t>(L, 3);
const auto count = getNumber<uint16_t>(L, 5, 0);
CreatureIcon creatureIcon;
if (category == CreatureIconCategory_t::Modifications) {
auto icon = getNumber<CreatureIconModifications_t>(L, 5);
auto icon = getNumber<CreatureIconModifications_t>(L, 4);
creatureIcon = CreatureIcon(icon, count);
} else {
auto icon = getNumber<CreatureIconQuests_t>(L, 4);
Expand Down

0 comments on commit 8b248ec

Please sign in to comment.