elanthia-online / urnon

What is a group of liches?
BSD 3-Clause "New" or "Revised" License
1 stars 4 forks source link

Write new Effect parser based on Naijin's upcoming release #25

Open ondreian opened 3 years ago

ondreian commented 3 years ago
<dialogData id='Active Spells' clear='t'></dialogData>
<dialogData id='Active Spells'>
  <progressBar id='101' value='52' text="Spirit Warding I" left='22%' top='0' width='76%' height='15' time='02:12:24'/>
  <label id='lbl101' value='2:12 ' top='0' left='0' justify='2' anchor_right='101'/>
  <progressBar id='103' value='52' text="Spirit Defense" left='22%' top='16' width='76%' height='15' time='02:12:24'/>
  <label id='lbl103' value='2:12 ' top='16' left='0' justify='2' anchor_right='103'/>
  <progressBar id='104' value='52' text="Disease Resistance" left='22%' top='32' width='76%' height='15' time='02:12:24'/>
  <label id='lbl104' value='2:12 ' top='32' left='0' justify='2' anchor_right='104'/>
  <progressBar id='105' value='52' text="Poison Resistance" left='22%' top='48' width='76%' height='15' time='02:12:24'/>
  <label id='lbl105' value='2:12 ' top='48' left='0' justify='2' anchor_right='105'/>
  <progressBar id='107' value='52' text="Spirit Warding II" left='22%' top='64' width='76%' height='15' time='02:12:24'/>
  <label id='lbl107' value='2:12 ' top='64' left='0' justify='2' anchor_right='107'/>
  <progressBar id='112' value='52' text="Water Walking" left='22%' top='80' width='76%' height='15' time='02:12:24'/>
  <label id='lbl112' value='2:12 ' top='80' left='0' justify='2' anchor_right='112'/>
  <progressBar id='202' value='52' text="Spirit Shield" left='22%' top='96' width='76%' height='15' time='02:12:24'/>
  <label id='lbl202' value='2:12 ' top='96' left='0' justify='2' anchor_right='202'/>
  <progressBar id='401' value='52' text="Elemental Defense I" left='22%' top='112' width='76%' height='15' time='02:12:24'/>
  <label id='lbl401' value='2:12 ' top='112' left='0' justify='2' anchor_right='401'/>
  <progressBar id='406' value='52' text="Elemental Defense II" left='22%' top='128' width='76%' height='15' time='02:12:24'/>
  <label id='lbl406' value='2:12 ' top='128' left='0' justify='2' anchor_right='406'/>
  <progressBar id='414' value='52' text="Elemental Defense III" left='22%' top='144' width='76%' height='15' time='02:12:24'/>
  <label id='lbl414' value='2:12 ' top='144' left='0' justify='2' anchor_right='414'/>
  <progressBar id='425' value='52' text="Elemental Targeting" left='22%' top='160' width='76%' height='15' time='02:12:24'/>
  <label id='lbl425' value='2:12 ' top='160' left='0' justify='2' anchor_right='425'/>
  <progressBar id='430' value='52' text="Elemental Barrier" left='22%' top='176' width='76%' height='15' time='02:12:24'/>
  <label id='lbl430' value='2:12 ' top='176' left='0' justify='2' anchor_right='430'/>
  <progressBar id='503' value='52' text="Thurfel's Ward" left='22%' top='192' width='76%' height='15' time='02:12:24'/>
  <label id='lbl503' value='2:12 ' top='192' left='0' justify='2' anchor_right='503'/>
  <progressBar id='507' value='52' text="Elemental Deflection" left='22%' top='208' width='76%' height='15' time='02:12:24'/>
  <label id='lbl507' value='2:12 ' top='208' left='0' justify='2' anchor_right='507'/>
  <progressBar id='508' value='52' text="Elemental Bias" left='22%' top='224' width='76%' height='15' time='02:12:24'/>
  <label id='lbl508' value='2:12 ' top='224' left='0' justify='2' anchor_right='508'/>
  <progressBar id='509' value='52' text="Strength" left='22%' top='240' width='76%' height='15' time='02:12:24'/>
  <label id='lbl509' value='2:12 ' top='240' left='0' justify='2' anchor_right='509'/>
  <progressBar id='513' value='52' text="Elemental Focus" left='22%' top='256' width='76%' height='15' time='02:12:24'/>
  <label id='lbl513' value='2:12 ' top='256' left='0' justify='2' anchor_right='513'/>
  <progressBar id='520' value='52' text="Mage Armor - Lightning" left='22%' top='272' width='76%' height='15' time='02:12:24'/>
  <label id='lbl520' value='2:12 ' top='272' left='0' justify='2' anchor_right='520'/>
  <progressBar id='535' value='52' text="Haste" left='22%' top='288' width='76%' height='15' time='02:12:24'/>
  <label id='lbl535' value='2:12 ' top='288' left='0' justify='2' anchor_right='535'/>
  <progressBar id='540' value='52' text="Temporal Reversion" left='22%' top='304' width='76%' height='15' time='02:12:24'/>
  <label id='lbl540' value='2:12 ' top='304' left='0' justify='2' anchor_right='540'/>
  <progressBar id='601' value='52' text="Natural Colors" left='22%' top='320' width='76%' height='15' time='02:12:24'/>
  <label id='lbl601' value='2:12 ' top='320' left='0' justify='2' anchor_right='601'/>
  <progressBar id='602' value='52' text="Resist Elements" left='22%' top='336' width='76%' height='15' time='02:12:24'/>
  <label id='lbl602' value='2:12 ' top='336' left='0' justify='2' anchor_right='602'/>
  <progressBar id='618' value='52' text="Mobility" left='22%' top='352' width='76%' height='15' time='02:12:24'/>
  <label id='lbl618' value='2:12 ' top='352' left='0' justify='2' anchor_right='618'/>
  <progressBar id='905' value='52' text="Prismatic Guard" left='22%' top='368' width='76%' height='15' time='02:12:24'/>
  <label id='lbl905' value='2:12 ' top='368' left='0' justify='2' anchor_right='905'/>
  <progressBar id='911' value='52' text="Mass Blur" left='22%' top='384' width='76%' height='15' time='02:12:24'/>
  <label id='lbl911' value='2:12 ' top='384' left='0' justify='2' anchor_right='911'/>
  <progressBar id='913' value='52' text="Melgorehn's Aura" left='22%' top='400' width='76%' height='15' time='02:12:24'/>
  <label id='lbl913' value='2:12 ' top='400' left='0' justify='2' anchor_right='913'/>
  <progressBar id='1204' value='52' text="Foresight" left='22%' top='416' width='76%' height='15' time='02:12:24'/>
  <label id='lbl1204' value='2:12 ' top='416' left='0' justify='2' anchor_right='1204'/>
  <progressBar id='1208' value='52' text="Mindward" left='22%' top='432' width='76%' height='15' time='02:12:24'/>
  <label id='lbl1208' value='2:12 ' top='432' left='0' justify='2' anchor_right='1208'/>
</dialogData>

Going forward active spells dialog will have more info and be accurate, timewise. We can get rid of spell-list.xml Proposed API, going forward

# the Effect tracker instance for the current Session
Session.current.effects
# the respective dialog element parsed to a Hash(string, Effect)
Session.current.effects.spells
Session.current.effects.buffs
Session.current.effects.debuffs
Session.current.effects.cooldowns
# a custom Hash(string, Effect) which must be managed by external scripts
# providing a uniform interface for expansion to handle unique items/effects/etc
Session.current.effects.custom
ondreian commented 3 years ago

Naijin: You'll basically get 4 separate streams: Spells, Buffs, Cooldowns, and Debuffs.

OSXLich-Doug commented 3 years ago

Any word yet on how those 4 streams differ in the XML?

ondreian commented 3 years ago

the id attributes are supposed to match the categories from what Naijin said