lost-ark-dev / loa-details

LOA Details allows you to track real-time stats of the game Lost Ark and view and parse its logged data.
GNU General Public License v3.0
130 stars 42 forks source link

Fix summoner's identity skill icons. #2

Closed jiawei-zheng-0 closed 1 year ago

jiawei-zheng-0 commented 1 year ago

Summoner's identity skill icons were missing from logger. I added them from meter-data. image Code_2022-12-26_16-45-48

One of these identity skills, 'Osh', needed extra code to get it working. To explain, summoner's identity skills have 2 different skill ids, depending on whether the summoner used them with/without master summoner engraving. These skills usually have consecutive skill ids, like 'Akir' which are 20310 and 20311. Both of these skills will use the icon with 20310 via this line. if (id % 5 && !s?.icon) return getSkillImage(id - (id % 5)); The issue with 'Osh' is that, for some reason, it has skill id of 20170 and 20181. If meter sees 20181, it will try and use 20180, which is a totally different skill, 'Sticky Moss Swamp'. So I added new field 'baseSkill' in skills.js to easier manage skills with multiple skill ids. When a skill has 'baseSkill' field present, it will use the base skill's icon instead.

Side note: the dps-meter skill breakdown is currently very unusable for Communication Overflow Summoner as pet auto attacks and skills are being counted as different skill entries, with these entries having no English translation. It seems each combination of pet skill tripods = unique skill id and name which causes parser to think its a new skill. It seems the parser is matching skills via name as if I change the name of a pet skill from its KR name to its pet name, the skill will appear under the pet skill entry. image