Commit 689a6848 authored by mercury233's avatar mercury233

fix

parent dca14bd9
......@@ -1115,7 +1115,7 @@ int32 scriptlib::duel_damage(lua_State *L) {
uint32 playerid = lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1)
return 0;
int32 amount = lua_tointeger(L, 2);
int32 amount = std::round(lua_tonumber(L, 2));
if(amount < 0)
amount = 0;
uint32 reason = lua_tointeger(L, 3);
......@@ -1133,7 +1133,7 @@ int32 scriptlib::duel_recover(lua_State *L) {
uint32 playerid = lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1)
return 0;
int32 amount = lua_tointeger(L, 2);
int32 amount = std::round(lua_tonumber(L, 2));
if(amount < 0)
amount = 0;
uint32 reason = lua_tointeger(L, 3);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment