Fix knight items being kept on first class change
This commit is contained in:
parent
63726848ce
commit
43b4b761cc
1 changed files with 4 additions and 0 deletions
|
@ -35,6 +35,10 @@ end
|
||||||
ctf_classes.register_on_changed(function(player, old, new)
|
ctf_classes.register_on_changed(function(player, old, new)
|
||||||
local inv = player:get_inventory()
|
local inv = player:get_inventory()
|
||||||
|
|
||||||
|
if not old then
|
||||||
|
old = ctf_classes.__classes[ctf_classes.default_class]
|
||||||
|
end
|
||||||
|
|
||||||
local blacklist = old.properties.item_blacklist
|
local blacklist = old.properties.item_blacklist
|
||||||
if old and #blacklist > 0 then
|
if old and #blacklist > 0 then
|
||||||
local blacklist_map = stack_list_to_map(blacklist)
|
local blacklist_map = stack_list_to_map(blacklist)
|
||||||
|
|
Loading…
Reference in a new issue