1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-25 18:20:36 +01:00

fix crash with xdecor enchanting armor(if we add xdecor 1 day)

This commit is contained in:
crabman77 2016-11-18 18:29:42 +01:00
parent 4e091cdbd2
commit 8efb1887a5

View File

@ -483,7 +483,7 @@ function hbhunger.handle_node_actions(pos, oldnode, player, ext)
if stack:get_count() > 0 and (stack:get_name():split(":")[1] == "3d_armor" or stack:get_name():split(":")[1] == "shields") then if stack:get_count() > 0 and (stack:get_name():split(":")[1] == "3d_armor" or stack:get_name():split(":")[1] == "shields") then
local itemname = stack:get_name():split(":")[2]:split("_")[1] local itemname = stack:get_name():split(":")[2]:split("_")[1]
local itemmaterial = stack:get_name():split(":")[2]:split("_")[2] local itemmaterial = stack:get_name():split(":")[2]:split("_")[2]
exhaus = exhaus + (exhausting_items[itemname][itemmaterial] or 0)/10 -- 0 is admin armor exhaus = exhaus + ((exhausting_items[itemname] and exhausting_items[itemname][itemmaterial]) or 0)/10 -- 0 is admin armor
-- Value is divided by 5 to give a larger scale to our values, without having to high nor -- Value is divided by 5 to give a larger scale to our values, without having to high nor
-- too low exhausting factor -- too low exhausting factor
end end