Skip to content

Commit

Permalink
Merge pull request #514 from elanthia-online/parser.rb-bugfix
Browse files Browse the repository at this point in the history
[parser.rb] negative TNL exp value
  • Loading branch information
mrhoribu authored Nov 29, 2023
2 parents bf820d8 + 71837d3 commit e878acf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/infomon/infomon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ def self.get(key)
end
end
rescue StandardError
respond "--- Lich: error: self.get(key): #{$!}"
Lich.log "error: self.get(key): #{$!}\n\t#{$!.backtrace.join("\n\t")}"
respond "--- Lich: error: self.get(#{key}): #{$!}"
Lich.log "error: self.get(#{key}): #{$!}\n\t#{$!.backtrace.join("\n\t")}"
end
}
return self._value(val)
Expand Down
6 changes: 3 additions & 3 deletions lib/infomon/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ module Pattern
CharRaceProf = /^Name:\s+(?<name>[A-z\s'-]+)\s+Race:\s+(?<race>[A-z]+|[A-z]+(?: |-)[A-z]+)\s+Profession:\s+(?<profession>[-A-z]+)/.freeze
CharGenderAgeExpLevel = /^Gender:\s+(?<gender>[A-z]+)\s+Age:\s+(?<age>[,0-9]+)\s+Expr:\s+(?<experience>[0-9,]+)\s+Level:\s+(?<level>[0-9]+)/.freeze
Stat = /^\s*(?<stat>[A-z]+)\s\((?:STR|CON|DEX|AGI|DIS|AUR|LOG|INT|WIS|INF)\):\s+(?<value>[0-9]+)\s\((?<bonus>-?[0-9]+)\)\s+[.]{3}\s+(?<enhanced_value>\d+)\s+\((?<enhanced_bonus>-?\d+)\)/.freeze
StatEnd = /^Mana:\s+-?\d+\s+Silver:\s(?<silver>[-\d,]+)$/.freeze
Fame = /^\s+Level: \d+\s+Fame: (?<fame>[-\d,]+)$/.freeze # serves as ExprStart
StatEnd = /^Mana:\s+-?\d+\s+Silver:\s(?<silver>-?[\d,]+)$/.freeze
Fame = /^\s+Level: \d+\s+Fame: (?<fame>-?[\d,]+)$/.freeze # serves as ExprStart
RealExp = %r{^\s+Experience: [\d,]+\s+Field Exp: (?<fxp_current>[\d,]+)/(?<fxp_max>[\d,]+)$}.freeze
AscExp = /^\s+Ascension Exp: (?<ascension_experience>[\d,]+)\s+Recent Deaths: [\d,]+$/.freeze
TotalExp = /^\s+Total Exp: (?<total_experience>[\d,]+)\s+Death's Sting: (?<deaths_sting>None|Light|Moderate|Sharp|Harsh|Piercing|Crushing)$/.freeze
LTE = /^\s+Long-Term Exp: (?<long_term_experience>[\d,]+)\s+Deeds: (?<deeds>\d+)$/.freeze
ExprEnd = /^\s+Exp (?:until lvl|to next TP): [\d,]+/.freeze
ExprEnd = /^\s+Exp (?:until lvl|to next TP): -?[\d,]+/.freeze
SkillStart = /^\s\w+\s\(at level \d+\), your current skill bonuses and ranks/.freeze
Skill = /^\s+(?<name>[[a-zA-Z]\s\-']+)\.+\|\s+(?<bonus>\d+)\s+(?<ranks>\d+)/.freeze
SpellRanks = /^\s+(?<name>[\w\s\-']+)\.+\|\s+(?<rank>\d+).*$/.freeze
Expand Down

0 comments on commit e878acf

Please sign in to comment.