fix counting bug

This commit is contained in:
Tai @ Flex 2016-08-31 14:51:09 +01:00
parent 07fa3f4738
commit 274ef56305

View File

@ -80,7 +80,7 @@ function staffmagic:countpower(user,staff)
for idx,x in pairs(inventory:get_list("main") ) do for idx,x in pairs(inventory:get_list("main") ) do
if x:get_name() == powerup then if x:get_name() == powerup then
local count = x:get_count() local count = x:get_count()
if count > 10 then count = 100 end if count > 100 then count = 100 end
return math.floor(count/10) return math.floor(count/10)
end end
end end