minor fixes

torsten.philipp [03-29-18 - 22:42]
minor fixes
Filename
TaosGroupTools/TaosGroupTools.lua
TaosGroupTools/communication/Communicator.lua
TaosGroupTools/util/GroupHelper.lua
diff --git a/TaosGroupTools/TaosGroupTools.lua b/TaosGroupTools/TaosGroupTools.lua
index 124f60b..378c1aa 100644
--- a/TaosGroupTools/TaosGroupTools.lua
+++ b/TaosGroupTools/TaosGroupTools.lua
@@ -29,8 +29,8 @@ local ISMOCKED = false

 local LOG_NAME = "TGT-DebugLogger"
 local LOG_COMMAND = "/tgtlogs"
-local TRACE_ACTIVE = false
-local DEBUG_ACTIVE = false
+local TRACE_ACTIVE = true
+local DEBUG_ACTIVE = true
 local ERROR_ACTIVE = true
 local DIRECT_PRINT = true
 local CATCH_LUA_ERRORS = false
diff --git a/TaosGroupTools/communication/Communicator.lua b/TaosGroupTools/communication/Communicator.lua
index 5372c93..c8bd0f2 100644
--- a/TaosGroupTools/communication/Communicator.lua
+++ b/TaosGroupTools/communication/Communicator.lua
@@ -47,7 +47,7 @@ function TGT_Communicator.OnMapPing(pingType, pingTag, offsetX, offsetY, isLocal

 	if (pingType == MAP_PIN_TYPE_PING) then
         LGPS:PushCurrentMap()
-	    SetMapToMapListIndex(lib:GetMapIndexForUnit(pingTag))
+	    SetMapToMapListIndex(GetUnitZoneIndex(pingTag))

 	    offsetX, offsetY = LMP:GetMapPing(pingType, pingTag)
         if (LOG_ACTIVE) then _logger:logDebug("MapPing coords; offsetX; offsetY", offsetX, offsetY) end
diff --git a/TaosGroupTools/util/GroupHelper.lua b/TaosGroupTools/util/GroupHelper.lua
index 3512546..0a3f85c 100644
--- a/TaosGroupTools/util/GroupHelper.lua
+++ b/TaosGroupTools/util/GroupHelper.lua
@@ -58,9 +58,18 @@ if (TaosGroupHelper == nil) then
     end

     --[[
+	    Called when loading UI finished
+    ]]--
+    local function OnPlayerActivated(eventCode)
+        CALLBACK_MANAGER:FireCallbacks(TAO_UNIT_GROUPED_CHANGED, isUnitGrouped)
+        CALLBACK_MANAGER:FireCallbacks(TAO_GROUP_CHANGED)
+    end
+
+    --[[
         Register events
     ]]--
 	EVENT_MANAGER:RegisterForEvent(name, EVENT_GROUP_MEMBER_JOINED, OnGroupMemberJoined)
 	EVENT_MANAGER:RegisterForEvent(name, EVENT_GROUP_MEMBER_LEFT, OnGroupMemberLeft)
+    EVENT_MANAGER:RegisterForEvent(name, EVENT_PLAYER_ACTIVATED, OnPlayerActivated)

 end
\ No newline at end of file