Thread Tools Display Modes
Prev Previous Post   Next Post Next
03-01-10, 05:37 AM   #1
coree
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 28
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

Last edited by coree : 03-01-10 at 06:14 AM.
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » vehicle switch problem


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