Talk:WelcomeHome - Your first Ace2 Addon
From WowAce Wiki
Thank you very much for this article! It serves as a great base for me to start developing ace2 based libraries. This is coming from an active C# developer who has never played with LUA before.
Nice Tutorial.
Tried it out and it works fine for me since I am an absolute beginner on LUA and Ace2. One thing though. Maybe someone could go deeper into that localization thing ;) or is there another Tutorial, I just haven't found yet? Freakout 04:37, 20 August 2007 (EDT)
Small Issues.
Tried it out and while it works it has issues if your hearth is set to a larger town, such as Shattrath. ZONE_CHANGED_NEW_AREA is the event that gets fired when coming into a large town like this from an outside zone such as Terokkar. Also there's ZONE_CHANGED_INDOORS which is fired when entering an indoor area, such as leaving Dun Morogh and entering Ironforge. Because we're not catching these anyone trying the tutorial out that have their hearth set in a major city are likely to think that they did something wrong. This is easy to fix by catching all three and either duplicating the code in each handler (ugly) or making it's own function and calling that function from each handler. However, this seems a bit out of scope of the project.
Also, for large cities the BindLocation is set to the city name, not the SubZone name so it will not fire the message properly. An easy fix for this is also doing a compare of GetBindLocation to GetZoneText when checking for it. The downside of this is that it will replay the home message every time you switch SubZones, such as entering the bank.
The question I have is would it be easier to change to code to handle all the cases so these issues won't happen or explain that it wont work if you are set to a major town? --Solsund 10:52, 10 November 2007 (EST)

