forked from nebularg/PitBull4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTemplates.xml
executable file
·9 lines (9 loc) · 946 Bytes
/
Templates.xml
1
2
3
4
5
6
7
8
9
<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/
..\FrameXML\UI.xsd">
<Button name="PitBull4_UnitTemplate" virtual="true" inherits="SecureUnitButtonTemplate,SecureHandlerStateTemplate">
<Attributes>
<Attribute name="refreshUnitChange" type="string" value="local unit = self:GetAttribute('unit'); if unit then RegisterStateDriver(self, 'vehicleui', ('[@%s,unithasvehicleui]vehicle; novehicle'):format(unit)) else UnregisterStateDriver(self, 'vehicleui') end"/>
<Attribute name="_onstate-vehicleui" type="string" value="local unit = self:GetAttribute('unit'); if unit and newstate == 'vehicle' and UnitPlayerOrPetInRaid(unit) and not UnitTargetsVehicleInRaidUI(unit) then self:SetAttribute('toggleForVehicle', false) else self:SetAttribute('toggleForVehicle', self:GetAttribute('pb4-vehicleswap')) end"/>
</Attributes>
</Button>
</Ui>