1
0
Fork 0

fix possible crash

mobs_head_rotation
cora 2022-05-20 03:06:07 +02:00
parent 08b36e3eb3
commit e5806215f0
1 changed files with 2 additions and 2 deletions

View File

@ -1118,8 +1118,8 @@ local trade_inventory = {
-- First-time trade unlock all trades and unlock next trade tier
if trade.tier + 1 > trader._max_trade_tier then
trader._max_trade_tier = trader._max_trade_tier + 1
if trader._max_trade_tier > #professions[trader._profession].trades then
trader._max_trade_tier = #professions[trader._profession].trades
if trader._max_trade_tier > 5 then
trader._max_trade_tier = 5
end
set_textures(trader)
update_max_tradenum(trader)