Skip to content

Commit

Permalink
Simplify parsing boolean in LuaScriptInterface::getOutfitClass (otlan…
Browse files Browse the repository at this point in the history
…d#3200)

Follow up to otland#3027
  • Loading branch information
nekiro authored Oct 26, 2020
1 parent 36ca28b commit b9ba8d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/luascript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,8 +790,8 @@ Outfit LuaScriptInterface::getOutfitClass(lua_State* L, int32_t arg)
{
uint16_t lookType = getField<uint16_t>(L, arg, "lookType");
const std::string& name = getFieldString(L, arg, "name");
bool premium = getField<uint8_t>(L, arg, "premium") == 1 ? true : false;
bool unlocked = getField<uint8_t>(L, arg, "unlocked") == 1 ? true : false;
bool premium = getField<uint8_t>(L, arg, "premium") == 1;
bool unlocked = getField<uint8_t>(L, arg, "unlocked") == 1;
lua_pop(L, 4);
return Outfit(name, lookType, premium, unlocked);
}
Expand Down

0 comments on commit b9ba8d2

Please sign in to comment.