WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   vehicle switch problem (https://www.wowinterface.com/forums/showthread.php?t=30995)

coree 03-01-10 05:37 AM

vehicle switch problem
 
Hello,
when entering a vehicle and having self.disallowVehicleSwap set false my healthframe change properly with the pet frame. but the vehicle name still belongs to the pet frame (the new player frame) and not to the vehicle healthbar.

i tried to handle this issue with a funtion where i move the petname, but this doesnt work. only when i already am on a vehicle and reload my ui the position will change. just entering doesnt change anything.

Code:

local petVehicle = function(self, event)
  if event == "UNIT_ENTERED_VEHICLE" then
    self.Info:ClearAllPoints()
    self.Info:SetPoint("LEFT", "oUF_coree_player", 1, -23)
    self.Auras:Hide()
  elseif event == "UNIT_EXITED_VEHICLE" then
    self.Info:SetPoint("LEFT", self.Health, 1, -23)
    self.Info:SetPoint("RIGHT", self.Health.Text2, "LEFT")
    self.Auras:Show()
  end
end

Code:

if (unit == "pet") then
          self:RegisterEvent("UNIT_ENTERED_VEHICLE", petVehicle)
          self:RegisterEvent("UNIT_EXITED_VEHICLE", petVehicle)       
end

for party and partypets switching on a vehicle doesn't change name etc aswell, only for raidmembers it works.

tia

haste 03-01-10 09:17 AM

commit 08d7d64a9c838067f52a8597fb5a6f8c8b25292b on oUF_Lily.

coree 03-01-10 10:35 AM

Quote:

Originally Posted by haste (Post 180229)

yeah, thank you. works great now


All times are GMT -6. The time now is 12:17 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI