<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Frame name="WorldMapUnitTemplate" hidden="true" virtual="true">
		<Size>
			<AbsDimension x="16" y="16"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentIcon" setAllPoints="true"/>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				self:SetFrameLevel(self:GetFrameLevel() + 1);
				self.unit = "party"..self:GetID();
				getglobal(self:GetName().."Icon"):SetTexture("Interface\\WorldMap\\WorldMapPartyIcon");
			</OnLoad>
			<OnEnter>
				WorldMapUnit_OnEnter(self);
			</OnEnter>
			<OnLeave>
				WorldMapTooltip:Hide();
			</OnLeave>
			<OnMouseUp>
				MapUnit_OnMouseUp(self, button, "WorldMapRaid", "WorldMapParty");
			</OnMouseUp>
			<OnUpdate>
				MapUnit_OnUpdate(self);
			</OnUpdate>
		</Scripts>
	</Frame>
	<Frame name="WorldMapRaidUnitTemplate" inherits="WorldMapUnitTemplate" virtual="true">
		<Scripts>
			<OnLoad>
				self:SetFrameLevel(self:GetFrameLevel() + 1);
				getglobal(self:GetName().."Icon"):SetTexture("Interface\\WorldMap\\WorldMapPartyIcon");
			</OnLoad>
		</Scripts>
	</Frame>
	<Frame name="WorldMapFlagTemplate" hidden="true" virtual="true">
		<Size>
			<AbsDimension x="24" y="24"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentTexture" setAllPoints="true"/>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				self:SetFrameLevel(self:GetFrameLevel() + 2);
			</OnLoad>
		</Scripts>
	</Frame>
	<Frame name="WorldMapVehicleTemplate" hidden="true" virtual="true">
		<Size>
			<AbsDimension x="45" y="45"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>
		<HitRectInsets>
			<AbsInset left="10" right="10" top="10" bottom="10"/>
		</HitRectInsets>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentTexture" setAllPoints="true"/>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				self:SetFrameLevel(self:GetFrameLevel() + 2);
			</OnLoad>
			<OnEnter>
				WorldMapUnit_OnEnter(self);
			</OnEnter>
			<OnLeave>
				WorldMapTooltip:Hide();
			</OnLeave>
		</Scripts>
	</Frame>
	<Frame name="WorldMapCorpseTemplate" hidden="true" virtual="true">
		<Size>
			<AbsDimension x="16" y="16"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>
		<Layers>
			<Layer level="ARTWORK">
				<Texture file="Interface\Minimap\POIIcons" setAllPoints="true">
					<TexCoords left="0.5" right="0.5625" top="0" bottom="0.0625"/>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				self:SetFrameLevel(self:GetFrameLevel() + 1);
			</OnLoad>
			<OnEnter>
				local x, y = self:GetCenter();
				local parentX, parentY = self:GetParent():GetCenter();
				if x > parentX then
					WorldMapTooltip:SetOwner(self, "ANCHOR_LEFT");
				else
					WorldMapTooltip:SetOwner(self, "ANCHOR_RIGHT");
				end
				WorldMapTooltip:SetText(CORPSE_RED);
				WorldMapTooltip:Show();
			</OnEnter>
			<OnLeave>
				WorldMapTooltip:Hide();
			</OnLeave>
		</Scripts>
	</Frame>
	<Frame name="WorldMapDebugObjectTemplate" hidden="true" virtual="true">
		<Layers>
			<Layer level="ARTWORK">
				<Texture file="Interface\RaidFrame\UI-RaidFrame-Threat" setAllPoints="true"/>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				self.texture = self:GetRegions();
			</OnLoad>
			<OnEnter>
				WorldMapUnit_OnEnter(self);
			</OnEnter>
			<OnLeave>
				WorldMapTooltip:Hide();
			</OnLeave>
			<OnMouseUp>
				if IsModifierKeyDown("CTRL") then
					TeleportToDebugObject(self.index);
				else
					WorldMapButton_OnClick(WorldMapButton, button);
				end
			</OnMouseUp>
		</Scripts>
	</Frame>
</Ui>
