diff --git a/src/lua/functions/core/game/game_functions.cpp b/src/lua/functions/core/game/game_functions.cpp index a9074525f3f..12a7e005ef8 100644 --- a/src/lua/functions/core/game/game_functions.cpp +++ b/src/lua/functions/core/game/game_functions.cpp @@ -996,26 +996,26 @@ int GameFunctions::luaGameGetAchievements(lua_State* L) { } int luaGameGetOutfits(lua_State* L) { - // Game.getOutfits() - lua_createtable(L, 0, 0); - - const auto &maleOutfits = Outfits::getInstance().getOutfits(PLAYERSEX_MALE); - int index = 0; - for (const auto &outfit : maleOutfits) { - lua_createtable(L, 0, 3); - Lua::setField(L, "id", outfit->lookType); - Lua::setField(L, "name", outfit->name); - Lua::setField(L, "sex", PLAYERSEX_MALE); - lua_rawseti(L, -2, ++index); - } - - const auto &femaleOutfits = Outfits::getInstance().getOutfits(PLAYERSEX_FEMALE); - for (const auto &outfit : femaleOutfits) { - lua_createtable(L, 0, 3); - Lua::setField(L, "id", outfit->lookType); - Lua::setField(L, "name", outfit->name); - Lua::setField(L, "sex", PLAYERSEX_FEMALE); - lua_rawseti(L, -2, ++index); - } - return 1; + // Game.getOutfits() + lua_createtable(L, 0, 0); + + const auto &maleOutfits = Outfits::getInstance().getOutfits(PLAYERSEX_MALE); + int index = 0; + for (const auto &outfit : maleOutfits) { + lua_createtable(L, 0, 3); + Lua::setField(L, "id", outfit->lookType); + Lua::setField(L, "name", outfit->name); + Lua::setField(L, "sex", PLAYERSEX_MALE); + lua_rawseti(L, -2, ++index); + } + + const auto &femaleOutfits = Outfits::getInstance().getOutfits(PLAYERSEX_FEMALE); + for (const auto &outfit : femaleOutfits) { + lua_createtable(L, 0, 3); + Lua::setField(L, "id", outfit->lookType); + Lua::setField(L, "name", outfit->name); + Lua::setField(L, "sex", PLAYERSEX_FEMALE); + lua_rawseti(L, -2, ++index); + } + return 1; }