Jump to content

Arena Junkies was shut down on July 1st, 2018. You're viewing an archive of this page from 2018-06-25 at 20:17. Thank you all for your support! Please get in touch via the Curse help desk if you need any support using this archive.

Photo

Class color behind only in enemy names.


  • Please log in to reply
4 replies to this topic

#1 Beatme

Beatme
  • Junkies
  • Humanclass_name
  • US-Ragnaros
  • Vindication
  • Posts: 60
  • Talents: Discipline 1/0/1/2/2/0/1
  • 3v3: 1656
  • 5v5: 288

Posted 16 December 2015 - 03:45 AM

How I can do to make the colors of class behind the name (3.3), work only on enemy players ?

3.3. Class colors behind names:
local frame = CreateFrame("FRAME")
frame:RegisterEvent("GROUP_ROSTER_UPDATE")
frame:RegisterEvent("PLAYER_TARGET_CHANGED")
frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
frame:RegisterEvent("UNIT_FACTION")

local function eventHandler(self, event, ...)
if UnitIsPlayer("target") then
c = RAID_CLASS_COLORS[select(2, UnitClass("target"))]
TargetFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
end
if UnitIsPlayer("focus") then
c = RAID_CLASS_COLORS[select(2, UnitClass("focus"))]
FocusFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
end
end

frame:SetScript("OnEvent", eventHandler)

for _, BarTextures in pairs({TargetFrameNameBackground, FocusFrameNameBackground}) do
BarTextures:SetTexture("Interface\\TargetingFrame\\UI-StatusBar")
end
  • 0

#2 Beatme

Beatme
  • Junkies
  • Humanclass_name
  • US-Ragnaros
  • Vindication
  • Posts: 60
  • Talents: Discipline 1/0/1/2/2/0/1
  • 3v3: 1656
  • 5v5: 288

Posted 18 December 2015 - 07:46 PM

up :(?
  • 0

#3 Beatme

Beatme
  • Junkies
  • Humanclass_name
  • US-Ragnaros
  • Vindication
  • Posts: 60
  • Talents: Discipline 1/0/1/2/2/0/1
  • 3v3: 1656
  • 5v5: 288

Posted 18 December 2015 - 10:56 PM

find the solution

local frame = CreateFrame("FRAME")
frame:RegisterEvent("GROUP_ROSTER_UPDATE")
frame:RegisterEvent("PLAYER_TARGET_CHANGED")
frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
frame:RegisterEvent("UNIT_FACTION")

local function eventHandler(self, event, ...)
 local c
 if UnitIsPlayer("target") then
 if not UnitIsFriend("player", "target") then
 c = RAID_CLASS_COLORS[select(2, UnitClass("target"))]
 TargetFrameNameBackground:SetVertexColor(c.r, c.g, c.<img src='http://www.arenajunkies.com/public/style_emoticons/<#EMO_DIR#>/cool.png' class='bbc_emoticon' alt='B)' />
 else
 TargetFrameNameBackground:SetVertexColor(0, 0, 1)
 end
 end
 if UnitIsPlayer("focus") then
 if not UnitIsFriend("player", "focus") then
 c = RAID_CLASS_COLORS[select(2, UnitClass("focus"))]
 FocusFrameNameBackground:SetVertexColor(c.r, c.g, c.<img src='http://www.arenajunkies.com/public/style_emoticons/<#EMO_DIR#>/cool.png' class='bbc_emoticon' alt='B)' />
 else
 FocusFrameNameBackground:SetVertexColor(0, 1, 0)
 end
 end
end

frame:SetScript("OnEvent", eventHandler)

for _, BarTextures in pairs({TargetFrameNameBackground, FocusFrameNameBackground}) do
 BarTextures:SetTexture("Interface\\TargetingFrame\\UI-StatusBar")
end

  • 0

#4 davidmartin0

davidmartin0
  • Members
  • Posts: 12

Posted 23 March 2016 - 11:10 AM

what? :confused: ?
  • 0

#5 Highzealot

Highzealot
  • Members
  • Worgenclass_name
  • US-Frostmourne
  • Bloodlust
  • Posts: 13
  • Talents: Shadow 0/1/1/1/2/0/0
  • 3v3: 1569
  • RBG: 1855

Posted 08 October 2016 - 10:33 AM

:confused:  :confused:


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users