I plan to do them myself by photoshop and have currently finished the warlock's one.
But here's the problem, I can't figure out my mistake. I beg u for help xD
Here's my xml code:
Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
<Script file="ElitePlayerFrame.lua"/>
<Frame name="ElitePlayerFrameCore">
<Scripts>
<OnLoad>
this:RegisterEvent("PLAYER_ENTERING_WORLD");
this:RegisterEvent("PLAYER_TARGET_CHANGED");
this:RegisterEvent("VARIABLES_LOADED");
this:RegisterEvent("PLAYER_LEVEL_UP");
</OnLoad>
<OnEvent>
if (event == "PLAYER_ENTERING_WORLD" or event == "PLAYER_LEVEL_UP") then
if (UnitClass("player") == Deathknight) then
PlayerFrameTexture:SetTexture("Interface\\Addons\\ClassPortrait\\classframes\\deathknight1.tga");
elseif (UnitClass("player") == "warlock") then
PlayerFrameTexture:SetTexture("Interface\\Addons\\ClassPortrait\\classframes\\warlock.tga");
elseif (UnitClass("player") == Hunter) then
PlayerFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare-Elite.blp");
elseif (UnitClass("player") == Priest) then
PlayerFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare-Elite.blp");
elseif (UnitClass("player") == Shaman) then
PlayerFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare-Elite.blp");
elseif (UnitClass("player") == Druid) then
PlayerFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare-Elite.blp");
elseif (UnitClass("player") == Warrior) then
PlayerFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare.blp");
elseif (UnitClass("player") == Rogue) then
PlayerFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare.blp");
elseif (UnitClass("player") == Paladin) then
PlayerFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare.blp");
elseif (UnitClass("player") == Mage) then
PlayerFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare.blp");
end
end
if (event == "PLAYER_TARGET_CHANGED") then
if (UnitIsPlayer("target")) then
if (UnitClass("target") == Deathknight) then
TargetFrameTexture:SetTexture("Interface\\Addons\\ClassPortrait\\classframes\\deathknight1.tga");
elseif (UnitClass("target") == warlock) then
TargetFrameTexture:SetTexture("Interface\\Addons\\ClassPortrait\\classframes\\warlock.tga");
elseif (UnitClass("target") == Hunter) then
TargetFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare-Elite.blp");
elseif (UnitClass("target") == Priest) then
TargetFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare-Elite.blp");
elseif (UnitClass("target") == Shaman) then
TargetFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare-Elite.blp");
elseif (UnitClass("target") == Druid) then
TargetFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare-Elite.blp");
elseif (UnitClass("target") == Warrior) then
TargetFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare-Elite.blp");
elseif (UnitClass("target") == Rogue) then
TargetFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare-Elite.blp");
elseif (UnitClass("target") == Mage) then
TargetFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare-Elite.blp");
elseif (UnitClass("target") == Paladin) then
TargetFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Rare-Elite.blp");
end
else
TargetFrameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame.blp");
end
end
end
</OnEvent>
</Scripts>
</Frame>
</Ui>
Edit: typos (written at 1.01 xD)|||Your 'warlock' is not title case. Change it to Warlock.
http://www.wowwiki.com/API_UnitClass|||Thank you!!
Finally, after a couple of tweakings I managed to get it xD
That page u posted was the clue.
Now working on Rogue and Paladin portraits ;)
No comments:
Post a Comment