Go to Page... |
Updated: | 03/17/21 02:03 PM |
Created: | 03/16/21 01:05 PM |
Monthly downloads: | 117 |
Total downloads: | 3,117 |
Favorites: | 6 |
MD5: | |
Categories: | Chat Mods, Group, Guild & Friends |
File Name |
Version |
Size |
Uploader |
Date |
1.0 |
2kB |
scorpius2k1 |
03/16/21 01:05 PM |
Comment Options |
03/17/21, 08:56 AM | ||
Appreciate the feedback and help! I am already working on version 1.1 which will also include a settings menu for better flexibility (an option to turn off notifications that something was blocked)Thanks for all the detailed clarification, I will be sure to include those options in the next release!
|
||
|
scorpius2k1 |
View Public Profile |
Send a private message to scorpius2k1 |
Find More Posts by scorpius2k1 |
Add scorpius2k1 to Your Buddy List |
03/17/21, 03:41 AM | |
|
Thanks for the addon.
One thing: You should not use the hard values like 31 for your message type but use the ZOs defined constants, as the values might change in the future (some did already). The constants can be found in the esouidocumentation_pxx.txt file, provided here: https://wiki.esoui.com/APIVersion#live_API_version Check the actual live API version and the txt link is at the line "API TXT Documentation". You have hooked the function FormatAndAddChatMessage, which is using the parameter So the constants are listed below the headline "MsgChannelType" (h5. MsgChannelType) CHAT_CHANNEL_ZONE You can find the values to the constants by either trying /tb CHAT_CHANNEL_ZONE or /zgoo CHAT_CHANNEL_ZONE ingame (if you install merTorchbug or zgoo. merTorchbug also got a total list of globals + their values! You just need to type /tb and thens elect the globals tab to see and search them). Another important hint: As you prehook the chat function FormatAndAddChatMessage, which will be used for all kind of events for the chat (not only EVENT_CHAT_MESSAGE_CHANNEL !) as you can see here https://github.com/esoui/esoui/blob/...dlers.lua#L211 At this line the different chat events will be registered to call the OnChatEvent function: https://github.com/esoui/esoui/blob/...dlers.lua#L224 It can be EVENT_CHAT_MESSAGE_CHANNEL , or any other which is passed in by eventKey via function ZO_ChatRouter:RegisterMessageFormatter(eventKey, messageFormatter). So you should make sure that you check if the eventKey in your callback function is EVENT_CHAT_MESSAGE_CHANNEL, and not any other event that fires and tries to find the messageType and text, but maybe does not provide these parameters. Third hint/compatibility issues: If you prehook a function and return true the standard code etc. won't be run anymore. Works fine to prevent such messages in the chat, right. But will most likely break other addons that want to use these texts. In your case it's valid as the addon's purpose is to suppress those messages. But there are other addons like pChat and rChar or even LibChatMessage which try to save the chat history. Maybe these entries should be kept in the history, but your addon is stripping the messages before. So you could use your txt file and entries like Code:
## OptionalDependsOn: pChat rChat I did not test pChar/rChat if anything is broken if your addon is enabled, so this is just an info to tell you what was happening in the past, and what could be done (but needs testing!).
Last edited by Baertram : 03/17/21 at 03:41 AM.
|
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.