Class: Wowlog::DamageParser

Inherits:
ColumnParser show all
Defined in:
lib/wowlog.rb

Overview


Suffix Parser Set


Constant Summary

Constants inherited from ColumnParser

ColumnParser::OBJECT_SPECIAL_MASK, ColumnParser::PT_MAP, ColumnParser::SCHOOL_FLAG_MAP, ColumnParser::UNIT_FLAG_MAP, ColumnParser::UNIT_SPECIAL_FLAG_MAP

Instance Method Summary collapse

Methods inherited from ColumnParser

#initialize, #int, #parse_school_flag, #parse_unit_flag, #resolv_power_type

Constructor Details

This class inherits a constructor from Wowlog::ColumnParser

Instance Method Details

#parse(cols, obj) ⇒ Object



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/wowlog.rb', line 192

def parse(cols, obj)
  cols, obj = super(cols, obj)
  cols.shift(8) # shift 8 columns because unknown parameters

  obj['amount']   = int(cols.shift)
  obj['overkill'] = cols.shift
  obj['school']   = parse_school_flag(cols.shift)
  obj['resisted'] =  int(cols.shift)
  obj['blocked'] =  int(cols.shift)
  obj['absorbed'] =  int(cols.shift)
  obj['critical'] =  (cols.shift != 'nil')
  obj['glancing'] =  (cols.shift != 'nil')
  obj['crushing'] =  (cols.shift != 'nil')
  return cols, obj
end