fix fatal warning (#337)

This commit is contained in:
Rochet2
2020-10-29 01:44:36 +02:00
committed by GitHub
parent 9d6b018efe
commit a143a65c19

View File

@@ -1571,10 +1571,7 @@ namespace LuaUnit
uint8 newlevel = Eluna::CHECKVAL<uint8>(L, 2);
if (newlevel < 1)
return 0;
if (newlevel > STRONG_MAX_LEVEL)
newlevel = STRONG_MAX_LEVEL;
return luaL_argerror(L, 2, "level cannot be below 1");
if (Player* player = unit->ToPlayer())
{