Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local USS="UNIT_SPELLCAST_SUCCEEDED"
- local OE="OnEvent"
- local PvP="Interface\\Icons\\inv_jewelry_trinketpvp_01"
- local F="Frame"
- local CF=CreateFrame
- local BO="Border"
- local PvPT="PvP Trinket"
- local EMFH="Every Man For Himself"
- local UC=UnitClass
- local SCM=SendChatMessage
- local RW="RAID_WARNING"
- function TrS(f,x,y,cd,T,s,h)
- f:SetPoint("BOTTOMLEFT",x,y)
- f:SetSize(s,s)
- f.c=CF("Cooldown",cd)
- f.c:SetAllPoints(f)
- f.t=f:CreateTexture(nil,BO)
- f.t:SetAllPoints()
- f.t:SetTexture(T);
- if not h then
- f:Hide();
- end
- f:RegisterEvent(USS)
- end
- function Ts(f,cd,U,N,S,TI)
- if CPz(N,S,U) then
- CooldownFrame_SetTimer(cd,GetTime(),TI,1)
- f:Show();
- f.elapsed = 0
- f:SetScript('OnUpdate', function(self, elapsed)
- if self.elapsed > TI then
- self:SetScript('OnUpdate', nil)
- self:Hide();
- else
- self.elapsed = self.elapsed + elapsed
- end
- end)
- end
- end
- function CPz(N,S,U)
- if(N==S and
- (U=="arena1"
- or U=="arena2"
- or U=="arena3"
- or U=="arenapet1"
- or U=="arenapet2"
- or U=="arenapet3"
- or U=="target"
- or U=="focus"))then
- return true
- else
- return false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement