Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Darken all the graphics Ibo/Lorti UI style:
- local frame=CreateFrame("Frame")
- frame:RegisterEvent("ADDON_LOADED")
- frame:SetScript("OnEvent", function(self, event, addon)
- if (addon == "Blizzard_TimeManager") then
- for i, v in pairs({PlayerFrameTexture, TargetFrameTextureFrameTexture, PetFrameTexture, PartyMemberFrame1Texture, PartyMemberFrame2Texture, PartyMemberFrame3Texture, PartyMemberFrame4Texture,
- PartyMemberFrame1PetFrameTexture, PartyMemberFrame2PetFrameTexture, PartyMemberFrame3PetFrameTexture, PartyMemberFrame4PetFrameTexture, FocusFrameTextureFrameTexture,
- TargetFrameToTTextureFrameTexture, FocusFrameToTTextureFrameTexture, BonusActionBarFrameTexture0, BonusActionBarFrameTexture1, BonusActionBarFrameTexture2, BonusActionBarFrameTexture3,
- BonusActionBarFrameTexture4, MainMenuBarTexture0, MainMenuBarTexture1, MainMenuBarTexture2, MainMenuBarTexture3, MainMenuMaxLevelBar0, MainMenuMaxLevelBar1, MainMenuMaxLevelBar2,
- MainMenuMaxLevelBar3, MinimapBorder, CastingBarFrameBorder, FocusFrameSpellBarBorder, TargetFrameSpellBarBorder, MiniMapTrackingButtonBorder, MiniMapLFGFrameBorder, MiniMapBattlefieldBorder,
- MiniMapMailBorder, MinimapBorderTop,
- select(1, TimeManagerClockButton:GetRegions())
- }) do
- v:SetVertexColor(.4, .4, .4)
- end
- for i,v in pairs({ select(2, TimeManagerClockButton:GetRegions()) }) do
- v:SetVertexColor(1, 1, 1)
- end
- self:UnregisterEvent("ADDON_LOADED")
- frame:SetScript("OnEvent", nil)
- end
- end)
- for i, v in pairs({ MainMenuBarLeftEndCap, MainMenuBarRightEndCap }) do
- v:SetVertexColor(.35, .35, .35)
- end
- -- Class icons instead of portraits:
- hooksecurefunc("UnitFramePortrait_Update",function(self)
- if self.portrait then
- if UnitIsPlayer(self.unit) then
- local t = CLASS_ICON_TCOORDS[select(2, UnitClass(self.unit))]
- if t then
- self.portrait:SetTexture("Interface\\TargetingFrame\\UI-Classes-Circles")
- self.portrait:SetTexCoord(unpack(t))
- end
- else
- self.portrait:SetTexCoord(0,1,0,1)
- end
- end
- end)
- -- Disable healing / damage spam over player / pet frame:
- PlayerHitIndicator:SetText(nil)
- PlayerHitIndicator.SetText = function() end
- PetHitIndicator:SetText(nil)
- PetHitIndicator.SetText = function() end
- -- Change the format of hp/ mana text to absolute values ("140k"):
- hooksecurefunc("TextStatusBar_UpdateTextStringWithValues", function()
- PlayerFrameHealthBar.TextString:SetText(AbbreviateLargeNumbers(UnitHealth("player")))
- PlayerFrameManaBar.TextString:SetText(AbbreviateLargeNumbers(UnitMana("player")))
- TargetFrameHealthBar.TextString:SetText(AbbreviateLargeNumbers(UnitHealth("target")))
- TargetFrameManaBar.TextString:SetText(AbbreviateLargeNumbers(UnitMana("target")))
- FocusFrameHealthBar.TextString:SetText(AbbreviateLargeNumbers(UnitHealth("focus")))
- FocusFrameManaBar.TextString:SetText(AbbreviateLargeNumbers(UnitMana("focus")))
- end)
- -- Hide faction / PVP icon:
- PlayerPVPIcon:SetAlpha(0)
- TargetFrameTextureFramePVPIcon:SetAlpha(0)
- FocusFrameTextureFramePVPIcon:SetAlpha(0)
- -- Disable the group number frame:
- PlayerFrameGroupIndicator.Show = function() return end
- -- Hide Gryphons
- MainMenuBarLeftEndCap:Hide()
- MainMenuBarRightEndCap:Hide()
- -- Minimap tweaks:
- MinimapZoomIn:Hide()
- MinimapZoomOut:Hide()
- Minimap:EnableMouseWheel(true)
- Minimap:SetScript('OnMouseWheel', function(self, delta)
- if delta > 0 then
- Minimap_ZoomIn()
- else
- Minimap_ZoomOut()
- end
- end)
- MiniMapTracking:ClearAllPoints()
- MiniMapTracking:SetPoint("TOPRIGHT", -26, 7)
- -- Hide sPriest Shadow Orb Bar
- PriestBarFrame:SetScale(0.00001)
- -- Minimap Enlargement
- MinimapCluster:SetScale(1.20)
- -- Hide Calender Frame
- GameTimeFrame:SetAlpha(0);
- PlayerPVPIcon:SetAlpha(0)
- MiniMapWorldMapButton:Hide()
- -- Player frames and target frames
- PlayerFrame:SetScale(1.03)
- TargetFrame:SetScale(1.03)
- -- Class Colored
- local UnitIsPlayer, UnitIsConnected, UnitClass, RAID_CLASS_COLORS =
- UnitIsPlayer, UnitIsConnected, UnitClass, RAID_CLASS_COLORS
- local _, class, c
- local function colour(statusbar, unit)
- if UnitIsPlayer(unit) and UnitIsConnected(unit) and unit == statusbar.unit and UnitClass(unit) then
- _, class = UnitClass(unit)
- c = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
- statusbar:SetStatusBarColor(c.r, c.g, c.b)
- end
- end
- hooksecurefunc("UnitFrameHealthBar_Update", colour)
- hooksecurefunc("HealthBar_OnValueChanged", function(self)
- colour(self, self.unit)
- end)
- local sb = _G.GameTooltipStatusBar
- local addon = CreateFrame("Frame", "StatusColour")
- addon:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
- addon:SetScript("OnEvent", function()
- colour(sb, "mouseover")
- end)
- --Flashy Spells
- local animationsCount, animations = 10, {}
- local animationNum = 1
- local replace = string.gsub
- local frame, texture, animationGroup, alpha1, scale1, scale2, rotation2
- for i = 1, animationsCount do
- frame = CreateFrame("Frame")
- texture = frame:CreateTexture()
- texture:SetTexture([[Interface\Cooldown\star4]])
- texture:SetAlpha(0)
- texture:SetAllPoints()
- texture:SetBlendMode("ADD")
- animationGroup = texture:CreateAnimationGroup()
- alpha1 = animationGroup:CreateAnimation("Alpha")
- alpha1:SetChange(1)
- alpha1:SetDuration(0)
- alpha1:SetOrder(1)
- scale1 = animationGroup:CreateAnimation("Scale")
- scale1:SetScale(1.5, 1.5)
- scale1:SetDuration(0)
- scale1:SetOrder(1)
- scale2 = animationGroup:CreateAnimation("Scale")
- scale2:SetScale(0, 0)
- scale2:SetDuration(0.3)
- scale2:SetOrder(2)
- rotation2 = animationGroup:CreateAnimation("Rotation")
- rotation2:SetDegrees(90)
- rotation2:SetDuration(0.3)
- rotation2:SetOrder(2)
- animations[i] = {frame = frame, animationGroup = animationGroup}
- end
- local animate = function(button)
- if not button:IsVisible() then return true end
- local animation = animations[animationNum]
- local frame = animation.frame
- local animationGroup = animation.animationGroup
- frame:SetFrameStrata(button:GetFrameStrata())
- frame:SetFrameLevel(button:GetFrameLevel() + 10)
- frame:SetAllPoints(button)
- animationGroup:Stop()
- animationGroup:Play()
- animationNum = (animationNum % animationsCount) + 1
- return true
- end
- hooksecurefunc('ActionButton_UpdateHotkeys', function(button, buttonType)
- if InCombatLockdown() then return end
- if not button.hooked then
- local id, actionButtonType, key
- if not actionButtonType then
- actionButtonType = string.upper(button:GetName())
- actionButtonType = replace(actionButtonType, 'BOTTOMLEFT', '1')
- actionButtonType = replace(actionButtonType, 'BOTTOMRIGHT', '2')
- actionButtonType = replace(actionButtonType, 'RIGHT', '3')
- actionButtonType = replace(actionButtonType, 'LEFT', '4')
- actionButtonType = replace(actionButtonType, 'MULTIBAR', 'MULTIACTIONBAR')
- end
- local key = GetBindingKey(actionButtonType)
- if key then
- button:RegisterForClicks("AnyDown")
- SetOverrideBinding(button, true, key, 'CLICK '..button:GetName()..':LeftButton')
- end
- button.AnimateThis = animate
- SecureHandlerWrapScript(button, "OnClick", button, [[ control:CallMethod("AnimateThis", self) ]])
- button.hooked = true
- end
- end)
- local frame = CreateFrame("FRAME")
- frame:RegisterEvent("GROUP_ROSTER_UPDATE")
- frame:RegisterEvent("PLAYER_TARGET_CHANGED")
- frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
- frame:RegisterEvent("UNIT_FACTION")
- local function eventHandler(self, event, ...)
- if UnitIsPlayer("target") then
- c = RAID_CLASS_COLORS[select(2, UnitClass("target"))]
- TargetFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
- end
- if UnitIsPlayer("focus") then
- c = RAID_CLASS_COLORS[select(2, UnitClass("focus"))]
- FocusFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
- end
- end
- frame:SetScript("OnEvent", eventHandler)
- for _, BarTextures in pairs({TargetFrameNameBackground, FocusFrameNameBackground}) do
- BarTextures:SetTexture("Interface\\TargetingFrame\\UI-StatusBar")
- end
- -- Show Keybinds
- for i=1, 12 do
- _G["ActionButton"..i.."HotKey"]:SetAlpha(0) -- main bar
- _G["MultiBarBottomRightButton"..i.."HotKey"]:SetAlpha(0) -- bottom right bar
- _G["MultiBarBottomLeftButton"..i.."HotKey"]:SetAlpha(0) -- bottom left bar
- _G["MultiBarRightButton"..i.."HotKey"]:SetAlpha(0) -- right bar
- _G["MultiBarLeftButton"..i.."HotKey"]:SetAlpha(0) -- left bar
- end
- -- Show Macro Names
- for i=1, 12 do
- _G["ActionButton"..i.."Name"]:SetAlpha(0) -- main bar
- _G["MultiBarBottomRightButton"..i.."Name"]:SetAlpha(0) -- bottom right bar
- _G["MultiBarBottomLeftButton"..i.."Name"]:SetAlpha(0) -- bottom left bar
- _G["MultiBarRightButton"..i.."Name"]:SetAlpha(0) -- right bar
- _G["MultiBarLeftButton"..i.."Name"]:SetAlpha(0) -- left bar
- end
- --Move Cast bar and enlarge
- CastingBarFrame:ClearAllPoints()
- CastingBarFrame:SetPoint("CENTER",UIParent,"CENTER", 0, -200)
- CastingBarFrame.SetPoint = function() end
- CastingBarFrame:SetScale(1.1)
- -- Cast Bar Adjustment
- local CF=CreateFrame("Frame")
- CF:RegisterEvent("PLAYER_ENTERING_WORLD")
- CF:SetScript("OnEvent", function(self, event)
- if not (IsAddOnLoaded("Shadowed Unit Frames") or IsAddOnLoaded("PitBull Unit Frames 4.0") or IsAddOnLoaded("X-Perl UnitFrames")) then
- for i,v in pairs({
- CastingBarFrameBorder,
- FocusFrameSpellBarBorder,
- TargetFrameSpellBarBorder,
- }) do
- v:SetVertexColor(.05, .05, .05)
- end
- for i,v in pairs({
- PlayerPVPIcon,
- TargetFrameTextureFramePVPIcon,
- FocusFrameTextureFramePVPIcon,
- }) do
- v:SetAlpha(0)
- end
- for i=1,4 do
- _G["PartyMemberFrame"..i.."PVPIcon"]:SetAlpha(0)
- _G["PartyMemberFrame"..i.."NotPresentIcon"]:Hide()
- _G["PartyMemberFrame"..i.."NotPresentIcon"].Show = function() end
- end
- PlayerFrameGroupIndicator:SetAlpha(0)
- PlayerHitIndicator:SetText(nil)
- PlayerHitIndicator.SetText = function() end
- PetHitIndicator:SetText(nil)
- PetHitIndicator.SetText = function() end
- else
- CastingBarFrameBorder:SetVertexColor(.05,.05,.05)
- end
- self:UnregisterEvent("PLAYER_ENTERING_WORLD")
- CF:SetScript("OnEvent", nil)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement