Originally Posted by zgrssd
The ^ makes certain only the start of the string is checked (improoving performance). Have to test that code when I am home again.
|
Improved performance is a side-effect, the important thing about ^ is that it anchors the match at the start of the string; without it, "MY_CUSTOM_CHAT_CATEGORY_WOULD_MATCH_TOO".
Now you only need to worry about them changing constant names
(like they did with ITEMTYPE_SCROLL for example)
Originally Posted by zgrssd
With the added issue that apparently the 3 "CHAT_CATEGORY_HEADER" entries use the same numbers as one other category (I asume those are deprecated/not interesting for my cocerns).
So I must now include all values that start with "CHAT_CATEGORY_" but must exclude all that start with "CHAT_CATEGORY_HEADER_".
|
Indeed they're not interesting for you, they're only references to chat categories, points where chat options UI inserts headers.
Lua Code:
[SI_CHATCHANNELCATEGORYHEADERS1] = "Channels",
[SI_CHATCHANNELCATEGORYHEADERS10] = "Guilds",
[SI_CHATCHANNELCATEGORYHEADERS45] = "Combat", -- options end before this one