From a143a65c19b901fc4f2c6cdfe1a89274aad683c1 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Thu, 29 Oct 2020 01:44:36 +0200 Subject: [PATCH] fix fatal warning (#337) --- UnitMethods.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/UnitMethods.h b/UnitMethods.h index 5c42396..392c1b6 100644 --- a/UnitMethods.h +++ b/UnitMethods.h @@ -1571,10 +1571,7 @@ namespace LuaUnit uint8 newlevel = Eluna::CHECKVAL(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()) {