Class: Wowlog::EncountParser
- Inherits:
-
EventParser
- Object
- ColumnParser
- EventParser
- Wowlog::EncountParser
- Defined in:
- lib/wowlog.rb
Constant Summary collapse
- DIFFICULTY =
{ 1 => "Normal", 2 => "Heroic", 3 => "10 Player", 4 => "25 Player", 5 => "10 Player (Heroic)", 6 => "25 Player (Heroic)", 7 => "Looking For Raid", 8 => "Challenge Mode", 9 => "40 Player", 10 => nil, 11 => "Heroic Scenario", 12 => "Normal Scenario", 13 => nil, 14 => "Flexible", }
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
358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/wowlog.rb', line 358 def parse(cols, obj) cols, obj = super(cols, obj) obj['encounterID'] = cols[0] obj['encounterName'] = cols[1] d_id = cols[2].to_i obj['difficultyID'] = d_id obj['difficulty'] = DIFFICULTY[d_id] obj['groupSize'] = cols[3] cols.shift(4) obj['success'] = (cols.shift == '1') if cols.size > 0 return cols, obj end |