Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Game_Party < Game_Unit
- alias theo_invcheck_init initialize
- def initialize
- theo_invcheck_init
- init_inv_checker
- end
- def init_inv_checker
- @item_records = []
- @weapon_records = []
- @armor_records = []
- end
- alias theo_invcheck_gain_item gain_item
- def gain_item(item, amount, include_equip = false)
- add_record(item)
- theo_invcheck_gain_item(item, amount, include_equip)
- end
- def check_record(item)
- case item.class
- when RPG::Item
- return @item_records.include?(item.id)
- when RPG::Weapon
- return @weapon_records.include?(item.id)
- when RPG::Armor
- return @armor_records.include?(item.id)
- end
- end
- def add_record(item)
- case item.class
- when RPG::Item
- @item_records.push(item.id).uniq!
- when RPG::Weapon
- @weapon_records.push(item.id).uniq!
- when RPG::Armor
- @armor_records.push(item.id).uniq!
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment