/Tukui/modules/blizzard/kill.lua

http://github.com/Asphyxia/Tukui · Lua · 79 lines · 66 code · 11 blank · 2 comment · 19 complexity · 26d0a71d40a47a51728fff7cd448df0b MD5 · raw file

  1. local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales
  2. -- here we kill all shit stuff on default UI that we don't need!
  3. local Kill = CreateFrame("Frame")
  4. Kill:RegisterEvent("ADDON_LOADED")
  5. Kill:RegisterEvent("PLAYER_LOGIN")
  6. Kill:SetScript("OnEvent", function(self, event, addon)
  7. if event == "PLAYER_LOGIN" then
  8. if IsAddOnLoaded("Tukui_Raid") or IsAddOnLoaded("Tukui_Raid_Healing") then
  9. InterfaceOptionsFrameCategoriesButton10:SetScale(0.00001)
  10. InterfaceOptionsFrameCategoriesButton10:SetAlpha(0)
  11. InterfaceOptionsFrameCategoriesButton11:SetScale(0.00001)
  12. InterfaceOptionsFrameCategoriesButton11:SetAlpha(0)
  13. CompactRaidFrameManager:Kill()
  14. CompactRaidFrameContainer:Kill()
  15. CompactUnitFrame_UpateVisible = T.dummy
  16. CompactUnitFrame_UpdateAll = T.dummy
  17. end
  18. else
  19. if addon == "Blizzard_AchievementUI" then
  20. if C.tooltip.enable then
  21. hooksecurefunc("AchievementFrameCategories_DisplayButton", function(button) button.showTooltipFunc = nil end)
  22. end
  23. end
  24. if addon ~= "Tukui" then return end
  25. StreamingIcon:Kill()
  26. Advanced_UseUIScale:Kill()
  27. Advanced_UIScaleSlider:Kill()
  28. PartyMemberBackground:Kill()
  29. TutorialFrameAlertButton:Kill()
  30. if C.auras.player or C.unitframes.playerauras then
  31. BuffFrame:Kill()
  32. TemporaryEnchantFrame:Kill()
  33. ConsolidatedBuffs:Kill()
  34. InterfaceOptionsBuffsPanelConsolidateBuffs:Kill()
  35. end
  36. InterfaceOptionsUnitFramePanelPartyBackground:Kill()
  37. -- make sure boss or arena frame is always disabled when running tukui
  38. SetCVar("showArenaEnemyFrames", 0)
  39. if C.arena.unitframes then
  40. InterfaceOptionsUnitFramePanelArenaEnemyFrames:Kill()
  41. InterfaceOptionsUnitFramePanelArenaEnemyCastBar:Kill()
  42. InterfaceOptionsUnitFramePanelArenaEnemyPets:Kill()
  43. end
  44. if C.chat.enable then
  45. SetCVar("WholeChatWindowClickable", 0)
  46. SetCVar("ConversationMode", "inline")
  47. InterfaceOptionsSocialPanelWholeChatWindowClickable:Kill()
  48. InterfaceOptionsSocialPanelConversationMode:Kill()
  49. end
  50. if C.unitframes.enable then
  51. PlayerFrame:Kill() -- Just to be sure we are safe
  52. InterfaceOptionsFrameCategoriesButton9:SetScale(0.00001)
  53. InterfaceOptionsFrameCategoriesButton9:SetAlpha(0)
  54. InterfaceOptionsFrameCategoriesButton9:SetScale(0.00001)
  55. InterfaceOptionsFrameCategoriesButton9:SetAlpha(0)
  56. end
  57. if C.actionbar.enable then
  58. InterfaceOptionsActionBarsPanelBottomLeft:Kill()
  59. InterfaceOptionsActionBarsPanelBottomRight:Kill()
  60. InterfaceOptionsActionBarsPanelRight:Kill()
  61. InterfaceOptionsActionBarsPanelRightTwo:Kill()
  62. InterfaceOptionsActionBarsPanelAlwaysShowActionBars:Kill()
  63. end
  64. if C["nameplate"].enable == true and C["nameplate"].enhancethreat == true then
  65. InterfaceOptionsDisplayPanelAggroWarningDisplay:Kill()
  66. end
  67. end
  68. end)