#--------------------------------------------------------------------------
# ● 卸下无法装备的物品
# item_gain : 卸下的装备是否保留
#--------------------------------------------------------------------------
def release_unequippable_items(item_gain = true)
@equips.each_with_index do |item, i|
if item.object!=nil
cetid = item.is_a?(RPG::Weapon)? -item.object.id : item.object.id
a=Chd114::Equip::Etype[cetid].include?(0)? 0 : nil
cet=Chd114::Equip::Etype[cetid]
cet.push(item.object.etype_id).uniq
p item.object.name
p a
if !equippable?(item.object) || !cet.include?(equip_slots[i])
trade_item_with_party(nil, item.object) if item_gain
item.object = nil
end
end
end
end
#--------------------------------------------------------------------------
# ● 卸下无法装备的物品
# item_gain : 卸下的装备是否保留
#--------------------------------------------------------------------------
def release_unequippable_items(item_gain = true)
@equips.each_with_index do |item, i|
if item.object!=nil
cetid = item.is_a?(RPG::Weapon)? -item.object.id : item.object.id
a=Chd114::Equip::Etype[cetid].include?(0)? 0 : nil
cet=Chd114::Equip::Etype[cetid]
cet.push(item.object.etype_id).uniq
p item.object.name
p a
if !equippable?(item.object) || !cet.include?(equip_slots[i])
trade_item_with_party(nil, item.object) if item_gain
item.object = nil
end
end
end
end