View Single Post
06-24-09, 05:42 AM   #4
Foxlit
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 91
Originally Posted by Slakah View Post
"FRAME" should be "Frame"
That makes no difference whatsoever.

---

Your indentation is a bit weird, and the last else clause would never run (but everything should work without changes). It can be cleaned up and shortened a bit:
Code:
local f = CreateFrame("FRAME", "Frame_fStealth");
f:RegisterEvent("UPDATE_STEALTH");

local function eventHandler(self, event, ...)
	local nStance = GetShapeshiftForm();
	EquipmentManager_EquipSet(nStance == 0 and "Normal" or "Stealth");
end
f:SetScript("OnEvent", eventHandler);
__________________
... and you do get used to it, after a while.

Last edited by Foxlit : 06-24-09 at 05:55 AM.
  Reply With Quote