| |
I dunno if this has already been posted in the past, but well better once too often =)
Bug: When not all raidmembers are on the shown map, the names in the tooltips are (sometimes) wrong.
Caused by: Every raidmemebr gets a number from 1 to 40 and these were directly bound to the XML-Frame-id in the past. With the addition of BG's and to show all players in the BG on the map, the XML-ID is no longer used in a static way and thus XML-ID = RAID-ID is wrong - but still used to generate the tooltip.
Part of WorldMapFrame.xml, this.unit set static:
<Frame name="WorldMapRaidUnitTemplate" inherits="WorldMapUnitTemplate" virtual="true">
<Scripts>
<OnLoad>
this:SetFrameLevel(this:GetFrameLevel() + 1);
this.unit = "raid"..this:GetID();
getglobal(this:GetName().."Icon"):SetTexture("Interface\\WorldMap\\WorldMapPartyIcon");
</OnLoad>
</Scripts>
</Frame>
Part of WorldMapFrame.lua:
for i=1, MAX_RAID_MEMBERS do
partyX, partyY = GetPlayerMapPosition("raid"..i);
partyMemberFrame = getglobal("WorldMapRaid"..playerCount + 1);
if ( (partyX ~= 0 or partyY ~= 0) and not UnitIsUnit("raid"..i, "player") ) then
partyX = partyX * WorldMapDetailFrame:GetWidth();
partyY = -partyY * WorldMapDetailFrame:GetHeight();
partyMemberFrame:SetPoint("CENTER", "WorldMapDetailFrame", "TOPLEFT", partyX, partyY);
partyMemberFrame.name = nil;
partyMemberFrame:Show();
playerCount = playerCount + 1;
end
end
The frame is only used if there is a player to show. If the player isn't visible, the frame gets used for the next one (in short, I know this is getting longer than it should: i ~= playerCount).
Temporily fix (works fine for me):
for i=1, MAX_RAID_MEMBERS do
partyX, partyY = GetPlayerMapPosition("raid"..i);
partyMemberFrame = getglobal("WorldMapRaid"..playerCount + 1);
if ( (partyX ~= 0 or partyY ~= 0) and not UnitIsUnit("raid"..i, "player") ) then
partyX = partyX * WorldMapDetailFrame:GetWidth();
partyY = -partyY * WorldMapDetailFrame:GetHeight();
partyMemberFrame:SetPoint("CENTER", "WorldMapDetailFrame", "TOPLEFT", partyX, partyY);
partyMemberFrame.name = nil;
partyMemberFrame.unit = "raid"..i;
partyMemberFrame:Show();
playerCount = playerCount + 1;
end
end
Mery (formerly known as Meog)
|