Thread Tools Display Modes
01-17-10, 02:37 AM   #1
FatalEntity
A Defias Bandit
AddOn Compiler - Click to view compilations
Join Date: Oct 2008
Posts: 2
Minimap Party/Raid Blips

Hey, Does blizzard have some function that will take the english class name (like "WARRIOR" or "DEATH_KNIGHT") and preform setTexCoords on this texture http://wowprogramming.com/BlizzArt/M...yRaidBlips.png ?

Or will I just have to do this myself?

idealy it would be somthing like

BlizzardFunction_SetClassIcon(myTexture, "MAGE")

I looked around but couldn't find anything, even a table with the coords for each of the icons for each class would be good.

Thanks
  Reply With Quote
01-17-10, 04:51 AM   #2
Recluse
A Cliff Giant
 
Recluse's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 70
I'm not sure if things were ever resolved, but some developers were trying to get this to work quite some time ago. Offsite forum thread.
__________________
We'd be together, but only diamonds last forever...
  Reply With Quote
01-17-10, 05:04 AM   #3
FatalEntity
A Defias Bandit
AddOn Compiler - Click to view compilations
Join Date: Oct 2008
Posts: 2
That is a bit of a separate issue. I'm not trying to replace minimap blips or anything along those lines, I'm just trying to easily get part of that texture using SetTexCoords depending on a units class, right now I have to do something along the lines of

Code:
-- Setup raid/party icons similar too the minimap
local icon = [[Interface\MINIMAP\PartyRaidBlips]]
local classIndex = {
	WARRIOR = {0, .125, .5, .75},
	PALADIN = {.125, .25, .5, .75},
	HUNTER = {.25, .375, .5, .75},
	ROGUE = {.375, .5, .5, .75},
	PRIEST = {.5, .625, .5, .75},
	DEATH_KNIGHT = {.625, .75, .5, .75},
	SHAMAN = {.75, .875, .5, .75},
	MAGE = {.875, 1, .5, .75},
	WARLOCK = {0, .125, .75, 1},
	DRUID = {.25, .375, .75, 1},
}

function module:setIconTexture(blip)
	if not UnitExists(blip.unit) then return end
	
	local l, r, t, b = unpack(classIndex[select(2, UnitClass(blip.unit))])
	
	blip.icon:SetTexture(icon)
	if UnitInParty(blip.unit) then
		blip.icon:SetTexCoord(l, r, t - .5, b - .5)
	else
		blip.icon:SetTexCoord(l, r, t, b)
	end
end
but I would like to have a function that I just give the units class too and it handles the cropping for me. I figured blizzard might have had one because of the minimap but I don't know.

It would be similar to blizzards function
Code:
SetRaidTargetIconTexture(icon, index)
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Minimap Party/Raid Blips


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