View Single Post
02-15-14, 04:57 AM   #16
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I will add a second template to the layout showing how to do a version with static portrait textures.

Pretty awesome race screenshots can be taken from the wow game guide pages:
http://us.battle.net/wow/en/game/class/shaman

I will take the shaman image as my example.

http://us.battle.net/wow/static/imag.../bg-shaman.jpg
http://us.battle.net/wow/static/imag...bg-warrior.jpg
http://us.battle.net/wow/static/imag...s/bg-rogue.jpg
http://us.battle.net/wow/static/imag...ss/bg-monk.jpg
http://us.battle.net/wow/static/imag...ath-knight.jpg
http://us.battle.net/wow/static/imag...bg-paladin.jpg
http://us.battle.net/wow/static/imag.../bg-priest.jpg
http://us.battle.net/wow/static/imag.../bg-hunter.jpg
http://us.battle.net/wow/static/imag...ss/bg-mage.jpg
http://us.battle.net/wow/static/imag...bg-warlock.jpg
http://us.battle.net/wow/static/imag...s/bg-druid.jpg

*edit*

I updated the layout. A new template has been added that supports static textures.



You will still need an event handler though. Basically to update target portraits. Not sure how you would work with NPCs though.

Regardings the portrait function override. I thought about it and yes I think you can make use of it. But not in the sense of changing your portraits. But you can make use of the PostUpdate function. Thus what I would suggest is this:

Lua Code:
  1. --a fake portait for the oUF portrait module
  2.     local fp = self:CreateTexture()
  3.     self.Portrait = fp
  4.     self.Portrait.PostUpdate = function(...)
  5.       print(...)
  6.       print("hello portrait postupdate...")
  7.     end

Basically you can use the update trigger to change your textures manually. So you do not have to set up event handlers yourself. You only need to do the texture swap.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 02-15-14 at 05:38 AM.
  Reply With Quote