nil fix
torsten.philipp [03-29-18 - 22:11]
diff --git a/TaosGroupTools/util/GroupHelper.lua b/TaosGroupTools/util/GroupHelper.lua
index ed9a962..3512546 100644
--- a/TaosGroupTools/util/GroupHelper.lua
+++ b/TaosGroupTools/util/GroupHelper.lua
@@ -28,6 +28,18 @@ if (TaosGroupHelper == nil) then
function GetIsUnitGrouped()
return isUnitGrouped
end
+
+ --[[
+ Called when group updated
+ ]]--
+ local function OnGroupUpdate()
+ local isGrouped = IsUnitGrouped("player")
+
+ if (isGrouped ~= isUnitGrouped) then
+ isUnitGrouped = isGrouped
+ CALLBACK_MANAGER:FireCallbacks(TAO_UNIT_GROUPED_CHANGED, isGrouped)
+ end
+ end
--[[
Called when group member joined group
@@ -46,18 +58,6 @@ if (TaosGroupHelper == nil) then
end
--[[
- Called when group updated
- ]]--
- local function OnGroupUpdate()
- local isGrouped = IsUnitGrouped("player")
-
- if (isGrouped ~= isUnitGrouped) then
- isUnitGrouped = isGrouped
- CALLBACK_MANAGER:FireCallbacks(TAO_UNIT_GROUPED_CHANGED, isGrouped)
- end
- end
-
- --[[
Register events
]]--
EVENT_MANAGER:RegisterForEvent(name, EVENT_GROUP_MEMBER_JOINED, OnGroupMemberJoined)