Quantcast

Allow registering a script for all classes.

Johnny C. Lam [11-10-13 - 00:30]
Allow registering a script for all classes.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1141 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleScripts.lua
diff --git a/OvaleScripts.lua b/OvaleScripts.lua
index 6d982e6..9e2cd2d 100644
--- a/OvaleScripts.lua
+++ b/OvaleScripts.lua
@@ -37,7 +37,7 @@ function OvaleScripts:GetDescriptions(scriptType)
 end

 function OvaleScripts:RegisterScript(class, name, description, code, scriptType)
-	if class == OvalePaperDoll.class then
+	if not class or class == OvalePaperDoll.class then
 		self.script[name] = self.script[name] or {}
 		local script = self.script[name]
 		script.type = scriptType or "script"