Thread Tools Display Modes
11-24-22, 08:48 AM   #1
martigan30
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Sep 2021
Posts: 6
language variable in OnEvent function is blank with 10.0

Since I have been playing Wrath Classic, I have neglected to see if 10.0 had broken any of my addons. Alas, it has. Skip Shadowlands is an addon I created just for the purpose of not being forced to take the Shadowlands quest at 48. I went ahead and retired that one because it had a sole purpose and it is not necessary anymore.

I come here seeking help on another issue. I have an addon that checks for specific events and uses the "language" variable from the OnEvent function. The variable used to contain the language of the person yelling or saying something, but now it is just blank. This totally destroys one of the features in the addon. I created this feature in an older addon back in 2010 and this part of the code has been roughly the same. I haven't chaged it in many years. I have a WotLK version that works fine still.

I looked through the list of API changes with 10.0 and could not find anything related.

Please help if you can.

Code:
function KhadgarsJunkDrawer_OnEvent(self, event, ...)

	local message, sender, language, channelString, target, flags, unknown, channelNumber, channelName, zero, counter = ...;

	if (event==KJD_SAY) then 
		DoTheTranslation(self, event, sender, language);
		return;
	elseif (event==KJD_YELL) then
		DoTheTranslation(self, event, sender, language);
		return;
	elseif (event==KJD_EMOTE) then
		DoTheEmoteReply(self, event, message, sender);
		return;
	elseif (event==KJD_HEALTH) then
		DoTheHealthReply();
		return;
	end

end
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » language variable in OnEvent function is blank with 10.0


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off