UNIT_SPELLCAST_START event, spell names, localization issues?

by Lasse Vågsæther Karlsen   Last Updated February 13, 2018 10:13 AM

I have created a small addon for myself, SheepWhisperer which listens for me casting Polymorph on my mage or Shackle Undead on my priest.

When it detects this, and I'm in a party, it will check if I'm targetting a mob that one of the other party members are also targetting. If so then it will send them a whisper telling them about my incoming spell.

So far the addon works for me, but I'd like to publish this addon for others to use.

The event gets called with the spell names, not the spell id's, which means that my code currently looks for the following two spells by their names:

  • Polymorph
  • Shackle Undead

The question is this: If someone is running the German client (or any of the other clients, other than the English one), will they get different names or will this event still be called with "Polymorph"?

I have checked Wowhead: Polymorph but it doesn't tell me the German (as an example) name for that spell. Perhaps there is none? Perhaps all the clients use Polymorph so this is a non-starter?



Answers 1


The answer is yes, this will be a problem.

I found files from many addons that contains localized spell names, here's one such example - https://github.com/laytya/Libs2/blob/master/Babble/Babble-Spell-2.3/Babble-Spell-2.3.lua

Example:

...
["Shackle Undead"] = "Сковывание нежити",
...
["Shackle Undead"] = "Untote fesseln",
...

so yes, this has to be solved.

Lasse Vågsæther Karlsen
Lasse Vågsæther Karlsen
February 13, 2018 10:01 AM

Related Questions


Lua script for World of Warcraft: Get Quest Info

Updated April 26, 2017 00:13 AM

WoW Spell ID Question from API

Updated October 12, 2018 08:13 AM

How to edit WoW models with Blender?

Updated June 15, 2017 19:13 PM