1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

fix typo in shield

update armor_inventory only when switch class
we can not be equipped with reserved armor another class
This commit is contained in:
2015-11-27 00:17:33 +01:00
parent e44dd3e74b
commit a0f2f09e90
3 changed files with 15 additions and 9 deletions

View File

@ -486,6 +486,10 @@ minetest.register_on_joinplayer(function(player)
if not (name:split(":")[1] == "3d_armor" or name:split(":")[1] == "shields") then
return 0
end
if not pclasses.api.util.can_have_item(player:get_player_name(), name) then
return 0
end
if name:find("shield") then
for i=1, size do
local stack = player_inv:get_stack(listname, i)