OpenRDX Forum Index OpenRDX

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bugfix: nameplates/class icons broken for targettarget etc.

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    OpenRDX Forum Index -> Code
View previous topic :: View next topic  
Author Message
Venificus



Joined: 16 Nov 2007
Posts: 32

PostPosted: Mon 4/6/09 5:59 pm    Post subject: Bugfix: nameplates/class icons broken for targettarget etc. Reply with quote

Nameplates, hostility/class colors, and generally anything that depends on unit class doesn't work properly for non-event units like targettarget, focustarget, etc. The fix is easy. In RDAL\Unit.lua, replace the entire section between the two comments described below:
Code:
--- @return Class information about the unit
function RDX.Unit:GetClass()
   local ret = UnitClass(self.uid or "none") or "None";
   return ret;
end
function RDX.Unit:GetClassMnemonic()
   local _,ret = UnitClass(self.uid or "none");
   return ret or "NONE";
end
function RDX.Unit:GetClassID()
   return 0;
end
function RDX.Unit:GetClassColor()
   local _,mnem = UnitClass(self.uid or "none");
   if mnem then
      return RAID_CLASS_COLORS[mnem] or _grey;
   else
      return _grey;
   end
end

--- @return TRUE iff this unit is a pet
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    OpenRDX Forum Index -> Code All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 4 Hours
www.phpbb.com
© fridgid 2005-2007