Legacy-of-Sylvanaar / wow-instant-messenger

WIM (WoW Instant Messenger) is a World of Warcraft addon which brings an instant messenger feel to communication in game.
https://www.curseforge.com/wow/addons/wim-3
MIT License
11 stars 8 forks source link

Support for item links with a quality icon #31

Closed SanjoSolutions closed 1 year ago

SanjoSolutions commented 1 year ago

I've also added the "|r" at the end of the pattern because it seems to be part of the item links that WoW generates.

Related to https://github.com/Legacy-of-Sylvanaar/wow-instant-messenger/issues/28.

Additional info

Example of item link with quality icon: |Hitem:193223::::::::70:252:::::::::|h[Lustrous Scaled Hide |A:Professions-ChatIcon-Quality-Tier2:17:23::1|a]|h|r.

Documentation for the - pattern feature: https://www.lua.org/manual/5.1/manual.html#5.4.1 under "Pattern Item".

Pazza commented 1 year ago

I'm not sure how this would work for the |A |a sequence in the pattern as it excludes all | characters between the H and h

SanjoSolutions commented 1 year ago

I have replaced the [^|] with ., which also matches with | characters. I hope you can see it from the diff. I have also tested the changes and it has worked very well for me.