Chat Cleaner

Chat Cleaner

22.9k Downloads

NPC Dialogue missing

Simstroy opened this issue ยท 7 comments

commented

Npcs won't print their dialogue in chat when using the addon

commented

Same issue for me and its a big deal breaker.

commented

It's brute force, but I removed the load line for the Creatures module in the ChatCleaner.xml file to work around this. It needs to be done whenever the addon is updated. Trying the disable command provided in another issue did not work, unfortunately. There may be something cleaner/easier, but I'm not skilled enough to figure it out. Everything else this addon does is so valuable, that this workaround was a better deal for me than just not using the addon.

commented

I noticed that in the latest changelog it says that the issue should be gone, no? But for me still no NPC dialogue appears in the chat with the latest version downloaded through CurseForge app (without the addon in appears correctly)

commented

Also experiencing the same as edvodas stated, the module line is still in the main .xml

commented

There's some lines at the bottom of creature.lua that can be edited to disable the NPC filter.

  1. either remove or comment out the Module.OnEnable section (between Module.OnEnable and the next End statement 7 lines down, I see line 62 through 68.

  2. change Module.OnDisable to read Module.OnEnable in the next (very last) section of code.

This effectively disables the creature module.

I'm not sure line 57 is correctly detecting the conditions to disable the filter.

commented

The detection is fine - when you install the add-on from anywhere but a direct git checkout, the placeholder in the source code is replaced and Private.version will not be set to "Development".

However the actual call to disable the module does not have any effect:

return self:SetUserDisabled()

That is because the actual check for disabled modules requires a true value to be returned:

if (self:IsUserDisabled()) then

This check would skip enabling the module (it will be initialised, because the implicit disabling happens during initialisation), but the function returns the value of disabledModules[creatures], which is set to nil above. But to pass the check it would need to be true, so it is never considered "disabled".

The "correct" way would be to call self:SetUserDisabled(true) to ensure that the getter method returns a true value for being disabled.


From what I could tell there is unused code for a GUI and configurations that also take enabled/disabled states into consideration, because the check for self.db["DisableFilter:<name of module>"] should always yield nil, as nothing seems to be saved to SavedVariables.

commented

Closing this as the addon hasn't hidden creature messages in quite some time, and also the code structure changed a lot in version 2.x, so nothing here is really relevant anymore.