Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-13-15, 08:38 AM   #1
gempir
A Black Drake
 
gempir's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 84
Objective Tracker

So Zork wrote a cool addon "rObjectiveTrackerMover"

The problem is me and another guy are having a bug where the ObjectiveTracker jumps in combat around. Weirdly, its not in every combat, I feel like its random, I couldn't figure how I recreate the problem.

Zork said he had problems before, he said it was fixed but the Issue is still sometimes occurring so I wanted to ask this smart forum.

This is basicly the important part of the code, I think

Lua Code:
  1. local function AdjustSetPoint(self,...)
  2.     local a1,af,a2,x,y = ...
  3.     if a1 and af == "MinimapCluster" and y ~= cfg.y then
  4.       if InCombatLockdown() then
  5.         self:SetPoint(a1,af,a2,x,cfg.y)
  6.       else
  7.         frame.point = {a1,af,a2,x,cfg.y}
  8.         frame:RegisterEvent("PLAYER_REGEN_ENABLED")
  9.       end
  10.     end
  11.   end
  12.  
  13.   frame:SetScript("OnEvent", function(self,event)
  14.     self:UnregisterEvent(event)
  15.     if event == "PLAYER_LOGIN" then
  16.       self.point = {ObjectiveTrackerFrame:GetPoint()}
  17.       hooksecurefunc(ObjectiveTrackerFrame, "SetPoint", AdjustSetPoint)
  18.     end
  19.     if InCombatLockdown() then
  20.       ObjectiveTrackerFrame:SetPoint(unpack(self.point))
  21.     end
  22.   end)


I think the problem is something with "If InCombatLockdown()" so my question is, how do I fix this bug of the ObjectiveTracker moving back to its position in Combat.

Last edited by gempir : 06-13-15 at 08:44 AM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Objective Tracker


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off