class Game_Actor
def class
equips.compact.each {|equip| return $data_classes[equip.laoganma] if equip.laoganma}
$data_classes[class_id_]
end
def class_id_
@class_id_ ||= @class_id
end
def change_class(class_id, keep_exp = false)
@exp[class_id] = exp if keep_exp
@class_id_ = class_id
change_exp(@exp[@class_id] || 0, false)
refresh
end
def exp
@exp[@class_id] ||= 0
end
alias refresh_lgm refresh
def refresh
@class_id = self.class.id
level_up while !max_level? && self.exp >= next_level_exp
level_down while self.exp < current_level_exp
refresh_lgm
end
end
class RPG::EquipItem
def laoganma
/<LGM\s*(\d+)>/ =~ note ? $1.to_i : nil
end
end
class Game_Actor
def class
equips.compact.each {|equip| return $data_classes[equip.laoganma] if equip.laoganma}
$data_classes[class_id_]
end
def class_id_
@class_id_ ||= @class_id
end
def change_class(class_id, keep_exp = false)
@exp[class_id] = exp if keep_exp
@class_id_ = class_id
change_exp(@exp[@class_id] || 0, false)
refresh
end
def exp
@exp[@class_id] ||= 0
end
alias refresh_lgm refresh
def refresh
@class_id = self.class.id
level_up while !max_level? && self.exp >= next_level_exp
level_down while self.exp < current_level_exp
refresh_lgm
end
end
class RPG::EquipItem
def laoganma
/<LGM\s*(\d+)>/ =~ note ? $1.to_i : nil
end
end