class Game_Party < Game_Unit
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
alias old_init initialize
def initialize
old_init
@bag_id = 0
@bags = {}
@bags[@bag_id] = {}
end
#--------------------------------------------------------------------------
# ● 当前选择背包id
#--------------------------------------------------------------------------
def bag_id
@bag_id
end
#--------------------------------------------------------------------------
# ● 背包组
#--------------------------------------------------------------------------
def bags
@bags
end
#--------------------------------------------------------------------------
# ● 背包更改
#--------------------------------------------------------------------------
def bag_change(new_bag_id)
all_items.each{|item|
bags[bag_id][item]=item_number(item)
gain_item(item,-max_item_number(item))
}
@bag_id=new_bag_id
if bags[new_bag_id]
bags[new_bag_id].each{|k,v|gain_item(k,v)}
end
bags[new_bag_id]||={}
end
end