Chat Event with wrong parameters in api docs?
Hello,
i've developed a few smaller WoW AddOns years ago and now wanted to start with ESO again. While fooling around with the API, i guess i found a few mistakes: EVENT_CHAT_MESSAGE_CHANNEL (integer messageType, string fromName, string text) is wrong. I get more parameters in my event handler function, sth like EVENT_CHAT_MESSAGE_CHANNEL (integer messageType, integer channelId, string fromName, string text) Another thing i found out: The channelId values slightly differ from the wiki page Raw_globals_dump. While CHAT_CHANNEL_ZONE is correctly 31 in my handler, the guild chat channelIds seem to be different. CHAT_CATEGORY_GUILD_1 is 12 instead of 10, CHAT_CATEGORY_GUILD_2 is 13 instead of 11 (couldn't test more) Can anyone confirm this? :) |
Afaik when you provide a callback to that event, *that* function gets the following args passed along:
(integer eventCode, integer messageType, string fromName, string text) messageType *should* actually be the channelId and eventCode is actually unique* for that specific channel (messageType) ...hence the discrepancy between 10 vs 12 for category vs. event. :) |
ah i see... the eventCode confused me because it didn't show up in the api and i didn't know messageType should be the channelId - okay ;)
thanks! |
My pleasure, happy to help! :)
|
Let's compare methods between WoW and ESO so that you can get your bearings. :)
In WoW: Lua Code:
In ESO: Lua Code:
or, you can do it this way in ESO (register your event through the game's EVENT_MANAGER instead of through a frame) Lua Code:
As you can see, both WoW and ESO pass the event name/code through the event handler before the args that come with the event. |
Quote:
|
thank you seerah :D
|
All times are GMT -6. The time now is 01:03 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI