From 6d136d549fdc44c49726cca31c7989a933ac5699 Mon Sep 17 00:00:00 2001 From: Steven Jackson Date: Sun, 5 Oct 2014 17:30:55 -0500 Subject: [PATCH] 4.8.9 --- Interface/AddOns/SVUI/SVUI.lua | 2 +- .../LibSuperVillain-1.0/LibSuperVillain-1.0.lua | 175 +- Interface/AddOns/SVUI/packages/bag/SVBag.lua | 18 +- Interface/AddOns/SVUI/packages/dock/SVDock.lua | 20 +- Interface/AddOns/SVUI/scripts/mounts.lua | 91 +- Interface/AddOns/SVUI/scripts/spellbind.lua | 51 +- Interface/AddOns/SVUI/setup/installer.lua | 38 +- Interface/AddOns/SVUI/system/alerts.lua | 2 + Interface/AddOns/SVUI/system/common.lua | 12 +- Interface/AddOns/SVUI/system/load.lua | 11 +- Interface/AddOns/SVUI/system/mentalo.lua | 30 +- Interface/AddOns/SVUI_ChatOMatic/Loader.lua | 22 +- .../AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.lua | 932 +-------- .../AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc | 4 +- .../AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.xml | 1 + .../AddOns/SVUI_ChatOMatic/components/_load.xml | 4 + .../components/answering_service.lua | 968 +++++++++ .../SVUI_ChatOMatic/components/chat_history.lua | 154 ++ .../AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua | 1 + .../AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.xml | 2 +- .../AddOns/SVUI_ConfigOMatic/components/_load.xml | 15 + .../AddOns/SVUI_ConfigOMatic/components/aura.lua | 318 +++ .../AddOns/SVUI_ConfigOMatic/components/bag.lua | 312 +++ .../AddOns/SVUI_ConfigOMatic/components/bar.lua | 799 ++++++++ .../AddOns/SVUI_ConfigOMatic/components/chat.lua | 200 ++ .../AddOns/SVUI_ConfigOMatic/components/dock.lua | 302 +++ .../AddOns/SVUI_ConfigOMatic/components/filter.lua | 781 ++++++++ .../SVUI_ConfigOMatic/components/henchmen.lua | 186 ++ .../AddOns/SVUI_ConfigOMatic/components/map.lua | 239 +++ .../AddOns/SVUI_ConfigOMatic/components/plate.lua | 736 +++++++ .../SVUI_ConfigOMatic/components/profiles.lua | 144 ++ .../AddOns/SVUI_ConfigOMatic/components/stat.lua | 158 ++ .../AddOns/SVUI_ConfigOMatic/components/tip.lua | 179 ++ .../SVUI_ConfigOMatic/components/units/_load.xml | 11 + .../SVUI_ConfigOMatic/components/units/core.lua | 2090 ++++++++++++++++++++ .../SVUI_ConfigOMatic/components/units/focus.lua | 215 ++ .../SVUI_ConfigOMatic/components/units/grid.lua | 173 ++ .../SVUI_ConfigOMatic/components/units/other.lua | 376 ++++ .../SVUI_ConfigOMatic/components/units/party.lua | 485 +++++ .../SVUI_ConfigOMatic/components/units/pet.lua | 253 +++ .../SVUI_ConfigOMatic/components/units/player.lua | 298 +++ .../SVUI_ConfigOMatic/components/units/raid.lua | 736 +++++++ .../SVUI_ConfigOMatic/components/units/target.lua | 305 +++ .../AddOns/SVUI_ConfigOMatic/modules/_load.xml | 15 - .../AddOns/SVUI_ConfigOMatic/modules/aura.lua | 318 --- Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua | 312 --- Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua | 799 -------- .../AddOns/SVUI_ConfigOMatic/modules/chat.lua | 200 -- .../AddOns/SVUI_ConfigOMatic/modules/dock.lua | 302 --- .../AddOns/SVUI_ConfigOMatic/modules/filter.lua | 781 -------- .../AddOns/SVUI_ConfigOMatic/modules/henchmen.lua | 186 -- Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua | 239 --- .../AddOns/SVUI_ConfigOMatic/modules/plate.lua | 736 ------- .../AddOns/SVUI_ConfigOMatic/modules/profiles.lua | 144 -- .../AddOns/SVUI_ConfigOMatic/modules/stat.lua | 158 -- Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua | 179 -- .../SVUI_ConfigOMatic/modules/units/_load.xml | 11 - .../SVUI_ConfigOMatic/modules/units/core.lua | 2090 -------------------- .../SVUI_ConfigOMatic/modules/units/focus.lua | 215 -- .../SVUI_ConfigOMatic/modules/units/grid.lua | 173 -- .../SVUI_ConfigOMatic/modules/units/other.lua | 376 ---- .../SVUI_ConfigOMatic/modules/units/party.lua | 485 ----- .../AddOns/SVUI_ConfigOMatic/modules/units/pet.lua | 253 --- .../SVUI_ConfigOMatic/modules/units/player.lua | 298 --- .../SVUI_ConfigOMatic/modules/units/raid.lua | 736 ------- .../SVUI_ConfigOMatic/modules/units/target.lua | 305 --- .../AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua | 1 + .../AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.xml | 5 +- .../AddOns/SVUI_CraftOMatic/components/_load.xml | 6 + .../SVUI_CraftOMatic/components/archaeology.lua | 515 +++++ .../AddOns/SVUI_CraftOMatic/components/cooking.lua | 230 +++ .../AddOns/SVUI_CraftOMatic/components/farming.lua | 622 ++++++ .../AddOns/SVUI_CraftOMatic/components/fishing.lua | 382 ++++ .../AddOns/SVUI_CraftOMatic/modes/archaeology.lua | 515 ----- .../AddOns/SVUI_CraftOMatic/modes/cooking.lua | 230 --- .../AddOns/SVUI_CraftOMatic/modes/farming.lua | 615 ------ .../AddOns/SVUI_CraftOMatic/modes/fishing.lua | 382 ---- .../AddOns/SVUI_FightOMatic/SVUI_FightOMatic.xml | 1 + .../AddOns/SVUI_FightOMatic/components/_load.xml | 3 + Interface/AddOns/SVUI_LogOMatic/Loader.lua | 14 - Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua | 93 - .../AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.xml | 3 +- Interface/AddOns/SVUI_StyleOMatic/addons/_load.xml | 53 - .../AddOns/SVUI_StyleOMatic/addons/achievement.lua | 454 ----- Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua | 329 --- .../AddOns/SVUI_StyleOMatic/addons/archeology.lua | 88 - .../SVUI_StyleOMatic/addons/auctionhouse.lua | 331 ---- .../AddOns/SVUI_StyleOMatic/addons/barbershop.lua | 67 - .../AddOns/SVUI_StyleOMatic/addons/battlefield.lua | 94 - .../AddOns/SVUI_StyleOMatic/addons/blackmarket.lua | 93 - .../AddOns/SVUI_StyleOMatic/addons/calendar.lua | 188 -- .../AddOns/SVUI_StyleOMatic/addons/challenges.lua | 60 - .../AddOns/SVUI_StyleOMatic/addons/character.lua | 382 ---- Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua | 481 ----- .../AddOns/SVUI_StyleOMatic/addons/dressup.lua | 51 - .../SVUI_StyleOMatic/addons/encounterjournal.lua | 229 --- .../AddOns/SVUI_StyleOMatic/addons/friends.lua | 283 --- .../AddOns/SVUI_StyleOMatic/addons/gossip.lua | 67 - Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua | 699 ------- Interface/AddOns/SVUI_StyleOMatic/addons/help.lua | 175 -- .../AddOns/SVUI_StyleOMatic/addons/inspect.lua | 100 - .../SVUI_StyleOMatic/addons/itemsocketing.lua | 67 - .../AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua | 55 - .../AddOns/SVUI_StyleOMatic/addons/keybinding.lua | 66 - Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua | 412 ---- .../AddOns/SVUI_StyleOMatic/addons/loothistory.lua | 132 -- .../SVUI_StyleOMatic/addons/lossofcontrol.lua | 63 - Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua | 126 -- .../AddOns/SVUI_StyleOMatic/addons/mailbox.lua | 144 -- .../AddOns/SVUI_StyleOMatic/addons/merchant.lua | 91 - .../AddOns/SVUI_StyleOMatic/addons/petbattle.lua | 379 ---- .../AddOns/SVUI_StyleOMatic/addons/petition.lua | 54 - .../AddOns/SVUI_StyleOMatic/addons/petjournal.lua | 275 --- .../AddOns/SVUI_StyleOMatic/addons/petstable.lua | 51 - Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua | 164 -- Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua | 279 --- Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua | 102 - .../AddOns/SVUI_StyleOMatic/addons/reforging.lua | 59 - .../AddOns/SVUI_StyleOMatic/addons/spellbook.lua | 330 ---- Interface/AddOns/SVUI_StyleOMatic/addons/store.lua | 38 - .../SVUI_StyleOMatic/addons/supervillain.lua | 306 --- .../AddOns/SVUI_StyleOMatic/addons/system.lua | 726 ------- .../AddOns/SVUI_StyleOMatic/addons/tabard.lua | 93 - .../AddOns/SVUI_StyleOMatic/addons/talents.lua | 386 ---- Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua | 42 - .../SVUI_StyleOMatic/addons/thirdparty/ACP.lua | 105 - .../SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua | 74 - .../addons/thirdparty/Altoholic.lua | 283 --- .../addons/thirdparty/AtlasLoot.lua | 225 --- .../addons/thirdparty/AuctionLite.lua | 88 - .../SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua | 147 -- .../SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua | 58 - .../SVUI_StyleOMatic/addons/thirdparty/Clique.lua | 152 -- .../SVUI_StyleOMatic/addons/thirdparty/Cooline.lua | 58 - .../SVUI_StyleOMatic/addons/thirdparty/DBM.lua | 212 -- .../SVUI_StyleOMatic/addons/thirdparty/DXE.lua | 135 -- .../addons/thirdparty/LightHeaded.lua | 104 - .../SVUI_StyleOMatic/addons/thirdparty/Mogit.lua | 89 - .../SVUI_StyleOMatic/addons/thirdparty/Omen.lua | 88 - .../addons/thirdparty/Outfitter.lua | 119 -- .../SVUI_StyleOMatic/addons/thirdparty/Postal.lua | 89 - .../SVUI_StyleOMatic/addons/thirdparty/Quartz.lua | 78 - .../SVUI_StyleOMatic/addons/thirdparty/Recount.lua | 144 -- .../addons/thirdparty/SexyCooldown.lua | 105 - .../SVUI_StyleOMatic/addons/thirdparty/Skada.lua | 151 -- .../SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua | 74 - .../SVUI_StyleOMatic/addons/thirdparty/TomTom.lua | 45 - .../addons/thirdparty/TradeSkillDW.lua | 144 -- .../SVUI_StyleOMatic/addons/thirdparty/VEM.lua | 250 --- .../SVUI_StyleOMatic/addons/thirdparty/_load.xml | 27 - .../addons/thirdparty/alDamageMeter.lua | 65 - .../AddOns/SVUI_StyleOMatic/addons/timemanager.lua | 69 - Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua | 112 -- .../AddOns/SVUI_StyleOMatic/addons/tradeskill.lua | 122 -- .../AddOns/SVUI_StyleOMatic/addons/trainer.lua | 93 - .../AddOns/SVUI_StyleOMatic/addons/transmog.lua | 99 - .../AddOns/SVUI_StyleOMatic/addons/voidstorage.lua | 94 - .../AddOns/SVUI_StyleOMatic/addons/worldmap.lua | 241 --- .../AddOns/SVUI_StyleOMatic/addons/worldstate.lua | 43 - .../AddOns/SVUI_StyleOMatic/common/methods.lua | 687 ------- .../AddOns/SVUI_StyleOMatic/components/_load.xml | 5 + .../SVUI_StyleOMatic/components/addons/ACP.lua | 105 + .../SVUI_StyleOMatic/components/addons/Ace3.lua | 273 +++ .../SVUI_StyleOMatic/components/addons/AdiBags.lua | 74 + .../components/addons/Altoholic.lua | 283 +++ .../components/addons/AtlasLoot.lua | 225 +++ .../components/addons/AuctionLite.lua | 88 + .../SVUI_StyleOMatic/components/addons/BigWigs.lua | 147 ++ .../SVUI_StyleOMatic/components/addons/Bugsack.lua | 58 + .../SVUI_StyleOMatic/components/addons/Clique.lua | 152 ++ .../SVUI_StyleOMatic/components/addons/Cooline.lua | 58 + .../SVUI_StyleOMatic/components/addons/DBM.lua | 212 ++ .../SVUI_StyleOMatic/components/addons/DXE.lua | 135 ++ .../components/addons/LightHeaded.lua | 104 + .../SVUI_StyleOMatic/components/addons/Mogit.lua | 89 + .../SVUI_StyleOMatic/components/addons/Omen.lua | 88 + .../components/addons/Outfitter.lua | 119 ++ .../SVUI_StyleOMatic/components/addons/Postal.lua | 89 + .../SVUI_StyleOMatic/components/addons/Quartz.lua | 78 + .../SVUI_StyleOMatic/components/addons/Recount.lua | 144 ++ .../components/addons/SexyCooldown.lua | 105 + .../SVUI_StyleOMatic/components/addons/Skada.lua | 153 ++ .../SVUI_StyleOMatic/components/addons/TinyDPS.lua | 74 + .../SVUI_StyleOMatic/components/addons/TomTom.lua | 45 + .../components/addons/TradeSkillDW.lua | 144 ++ .../SVUI_StyleOMatic/components/addons/VEM.lua | 250 +++ .../SVUI_StyleOMatic/components/addons/_load.xml | 28 + .../components/addons/alDamageMeter.lua | 65 + .../SVUI_StyleOMatic/components/blizzard/_load.xml | 51 + .../components/blizzard/achievement.lua | 454 +++++ .../SVUI_StyleOMatic/components/blizzard/alert.lua | 343 ++++ .../components/blizzard/archeology.lua | 88 + .../components/blizzard/auctionhouse.lua | 331 ++++ .../components/blizzard/barbershop.lua | 67 + .../components/blizzard/battlefield.lua | 94 + .../components/blizzard/blackmarket.lua | 93 + .../components/blizzard/calendar.lua | 188 ++ .../components/blizzard/challenges.lua | 60 + .../components/blizzard/character.lua | 382 ++++ .../SVUI_StyleOMatic/components/blizzard/chat.lua | 481 +++++ .../components/blizzard/dressup.lua | 51 + .../components/blizzard/encounterjournal.lua | 229 +++ .../components/blizzard/friends.lua | 283 +++ .../components/blizzard/gossip.lua | 67 + .../SVUI_StyleOMatic/components/blizzard/guild.lua | 699 +++++++ .../SVUI_StyleOMatic/components/blizzard/help.lua | 175 ++ .../components/blizzard/inspect.lua | 100 + .../components/blizzard/itemsocketing.lua | 67 + .../components/blizzard/itemupgrade.lua | 55 + .../components/blizzard/keybinding.lua | 66 + .../SVUI_StyleOMatic/components/blizzard/lfd.lua | 412 ++++ .../components/blizzard/loothistory.lua | 132 ++ .../components/blizzard/lossofcontrol.lua | 63 + .../SVUI_StyleOMatic/components/blizzard/macro.lua | 126 ++ .../components/blizzard/mailbox.lua | 144 ++ .../components/blizzard/merchant.lua | 91 + .../components/blizzard/petbattle.lua | 379 ++++ .../components/blizzard/petition.lua | 54 + .../components/blizzard/petjournal.lua | 275 +++ .../components/blizzard/petstable.lua | 51 + .../SVUI_StyleOMatic/components/blizzard/pvp.lua | 164 ++ .../SVUI_StyleOMatic/components/blizzard/quest.lua | 279 +++ .../SVUI_StyleOMatic/components/blizzard/raid.lua | 102 + .../components/blizzard/reforging.lua | 59 + .../components/blizzard/spellbook.lua | 330 ++++ .../SVUI_StyleOMatic/components/blizzard/store.lua | 38 + .../components/blizzard/system.lua | 726 +++++++ .../components/blizzard/tabard.lua | 93 + .../components/blizzard/talents.lua | 386 ++++ .../SVUI_StyleOMatic/components/blizzard/taxi.lua | 42 + .../components/blizzard/timemanager.lua | 69 + .../SVUI_StyleOMatic/components/blizzard/trade.lua | 112 ++ .../components/blizzard/tradeskill.lua | 122 ++ .../components/blizzard/trainer.lua | 93 + .../components/blizzard/transmog.lua | 99 + .../components/blizzard/voidstorage.lua | 94 + .../components/blizzard/worldmap.lua | 241 +++ .../components/blizzard/worldstate.lua | 43 + .../SVUI_StyleOMatic/components/style_methods.lua | 687 +++++++ .../AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.lua | 530 +---- .../AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.xml | 9 +- .../AddOns/SVUI_TrackOMatic/components/_load.xml | 4 + .../SVUI_TrackOMatic/components/triangulate.lua | 448 +++++ .../SVUI_TrackOMatic/components/unitframe_gps.lua | 329 +++ .../SVUI_TrackOMatic/libs/oUF_GPS/oUF_GPS.lua | 211 -- .../SVUI_TrackOMatic/libs/oUF_GPS/oUF_GPS.toc | 9 - 246 files changed, 26626 insertions(+), 26344 deletions(-) create mode 100644 Interface/AddOns/SVUI_ChatOMatic/components/_load.xml create mode 100644 Interface/AddOns/SVUI_ChatOMatic/components/answering_service.lua create mode 100644 Interface/AddOns/SVUI_ChatOMatic/components/chat_history.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/_load.xml create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/aura.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/bag.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/bar.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/chat.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/filter.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/henchmen.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/map.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/plate.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/profiles.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/stat.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/tip.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/units/_load.xml create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/units/core.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/units/focus.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/units/grid.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/units/other.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/units/party.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/units/pet.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/units/player.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/units/raid.lua create mode 100644 Interface/AddOns/SVUI_ConfigOMatic/components/units/target.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/_load.xml delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/aura.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/chat.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/filter.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/henchmen.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/profiles.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/stat.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/units/_load.xml delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/units/grid.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua delete mode 100644 Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua create mode 100644 Interface/AddOns/SVUI_CraftOMatic/components/_load.xml create mode 100644 Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua create mode 100644 Interface/AddOns/SVUI_CraftOMatic/components/cooking.lua create mode 100644 Interface/AddOns/SVUI_CraftOMatic/components/farming.lua create mode 100644 Interface/AddOns/SVUI_CraftOMatic/components/fishing.lua delete mode 100644 Interface/AddOns/SVUI_CraftOMatic/modes/archaeology.lua delete mode 100644 Interface/AddOns/SVUI_CraftOMatic/modes/cooking.lua delete mode 100644 Interface/AddOns/SVUI_CraftOMatic/modes/farming.lua delete mode 100644 Interface/AddOns/SVUI_CraftOMatic/modes/fishing.lua create mode 100644 Interface/AddOns/SVUI_FightOMatic/components/_load.xml delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/_load.xml delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/character.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/help.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/store.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/system.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AuctionLite.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Clique.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Cooline.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Quartz.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/_load.xml delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua delete mode 100644 Interface/AddOns/SVUI_StyleOMatic/common/methods.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/_load.xml create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/ACP.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/Ace3.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/AdiBags.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/Altoholic.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/AtlasLoot.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/AuctionLite.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/BigWigs.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/Bugsack.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/Clique.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/Cooline.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/DBM.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/DXE.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/LightHeaded.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/Mogit.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/Omen.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/Outfitter.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/Postal.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/Quartz.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/Recount.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/SexyCooldown.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/Skada.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/TinyDPS.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/TomTom.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/TradeSkillDW.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/VEM.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/_load.xml create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/addons/alDamageMeter.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/_load.xml create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/achievement.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/archeology.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/auctionhouse.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/barbershop.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/battlefield.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/blackmarket.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/calendar.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/challenges.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/character.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/chat.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/dressup.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/encounterjournal.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/friends.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/gossip.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/guild.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/help.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/inspect.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemsocketing.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemupgrade.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/keybinding.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lfd.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/loothistory.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lossofcontrol.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/macro.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/mailbox.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/merchant.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petbattle.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petition.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petjournal.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petstable.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/pvp.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/quest.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/raid.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/reforging.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/spellbook.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/store.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/system.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tabard.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/talents.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/taxi.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/timemanager.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trade.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tradeskill.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trainer.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/transmog.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/voidstorage.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldmap.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldstate.lua create mode 100644 Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua create mode 100644 Interface/AddOns/SVUI_TrackOMatic/components/_load.xml create mode 100644 Interface/AddOns/SVUI_TrackOMatic/components/triangulate.lua create mode 100644 Interface/AddOns/SVUI_TrackOMatic/components/unitframe_gps.lua delete mode 100644 Interface/AddOns/SVUI_TrackOMatic/libs/oUF_GPS/oUF_GPS.lua delete mode 100644 Interface/AddOns/SVUI_TrackOMatic/libs/oUF_GPS/oUF_GPS.toc diff --git a/Interface/AddOns/SVUI/SVUI.lua b/Interface/AddOns/SVUI/SVUI.lua index e043bf4..1112741 100644 --- a/Interface/AddOns/SVUI/SVUI.lua +++ b/Interface/AddOns/SVUI/SVUI.lua @@ -202,7 +202,7 @@ local Core_ResetUI = function(self, confirmed) return end self.Mentalo:Reset() -end +end local Core_ImportProfile = function(self, key) self.SystemAlert["COPY_PROFILE_PROMPT"].text = "Are you sure you want to copy the profile '" .. key .. "'?" diff --git a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua index 7facab1..3c27e64 100644 --- a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua +++ b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua @@ -276,11 +276,13 @@ It's main purpose is to keep all methods and logic needed to properly maintain valid data outside of the core object. --]] ---DATABASE STORAGE -local IndexExceptions = {}; - --DATABASE LOCAL HELPERS -local function tablecopy(d, s) +local function tablecopy(d, s, debug) + if(debug) then + print(debug) + assert(type(s) == "table", "tablecopy ERROR: source (" .. debug .. ") is not a table") + assert(type(d) == "table", "tablecopy ERROR: destination (" .. debug .. ") is not a table") + end if(type(s) ~= "table") then return end if(type(d) ~= "table") then return end for k, v in pairs(s) do @@ -365,13 +367,27 @@ local meta_database = { end, } +local meta_cache = { + __index = function(t, k) + if(not k or k == "") then return end + local sv = rawget(t, "data") + if(not sv[k]) then sv[k] = {} end + rawset(t, k, sv[k]) + return rawget(t, k) + end, +} + --DATABASE PUBLIC METHODS function lib:Remove(key) if(GLOBAL_SV.profiles[key]) then GLOBAL_SV.profiles[key] = nil end + if(GLOBAL_SV.cache[key]) then GLOBAL_SV.cache[key] = nil end twipe(GLOBAL_SV.profileKeys) for k,v in pairs(GLOBAL_SV.profiles) do GLOBAL_SV.profileKeys[k] = k end + for k,v in pairs(GLOBAL_SV.cache) do + GLOBAL_SV.profileKeys[k] = k + end end function lib:GetProfiles() @@ -390,44 +406,50 @@ end function lib:ImportDatabase(key) if(not GLOBAL_SV.profiles[key]) then GLOBAL_SV.profiles[key] = {} end; - local import = GLOBAL_SV.profiles[key]; - local saved = CoreObject.db; + PROFILE_SV.STORED[SOURCE_KEY] = GLOBAL_SV.profiles[key] - import.importTest = true; --Testing value, will be removed next time the UI is reloaded - tablecopy(saved, import); + if(not GLOBAL_SV.cache[key]) then GLOBAL_SV.cache[key] = {} end; + CACHE_SV.STORED[SOURCE_KEY] = GLOBAL_SV.cache[key] - --Ensure that import was successful - if(not CoreObject.db.importTest) then - --If no test value found, might need reloading - --Not the most clever thing in the world but.... - ReloadUI() - else - print("Profile Successfully Copied") - end + ReloadUI() end function lib:ExportDatabase(key) + local export, saved + if(not GLOBAL_SV.profiles[key]) then GLOBAL_SV.profiles[key] = {} end; - local export = rawget(CoreObject.db, "data"); - local saved = GLOBAL_SV.profiles[key]; + export = rawget(CoreObject.db, "data"); + saved = GLOBAL_SV.profiles[key]; + tablecopy(saved, export); + + if not GLOBAL_SV.cache[key] then GLOBAL_SV.cache[key] = {} end + export = rawget(CoreObject.cache, "data") + saved = GLOBAL_SV.cache[key] tablecopy(saved, export); + twipe(GLOBAL_SV.profileKeys) for k,v in pairs(GLOBAL_SV.profiles) do GLOBAL_SV.profileKeys[k] = k end + for k,v in pairs(GLOBAL_SV.cache) do + GLOBAL_SV.profileKeys[k] = k + end end function lib:WipeDatabase() - local sv = rawget(CoreObject.db, "data") - for k,v in pairs(sv) do - sv[k] = nil + for k,v in pairs(PROFILE_SV.STORED[SOURCE_KEY]) do + PROFILE_SV.STORED[SOURCE_KEY][k] = nil end end -function lib:WipeCache() - for k,v in pairs(CACHE_SV) do - CACHE_SV[k] = nil +function lib:WipeCache(index) + if(index) then + CACHE_SV.STORED[SOURCE_KEY][index] = nil + else + for k,v in pairs(CACHE_SV.STORED[SOURCE_KEY]) do + CACHE_SV.STORED[SOURCE_KEY][k] = nil + end end end @@ -448,18 +470,42 @@ function lib:UpdateDatabase(event) removedefaults(sv[k], src[k]) end end + for k,v in pairs(CACHE_SV) do + if(k ~= "STORED") then + CACHE_SV[k] = nil + end + end elseif(event == "ACTIVE_TALENT_GROUP_CHANGED") then + local LastKey = SOURCE_KEY if(PROFILE_SV.SAFEDATA and PROFILE_SV.SAFEDATA.dualSpecEnabled) then - SOURCE_KEY = GetSpecialization() or 1 + SOURCE_KEY = GetSpecialization() self.EventManager:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") + + if(not SOURCE_KEY) then + SOURCE_KEY = 1 + end + + if(LastKey ~= SOURCE_KEY) then + --construct core dataset + local db = setmetatable({}, meta_database) + db.data = PROFILE_SV.STORED[SOURCE_KEY] + db.defaults = CoreObject.configs + CoreObject.db = db + + local cache = setmetatable({}, meta_cache) + cache.data = CACHE_SV.STORED[SOURCE_KEY] + CoreObject.cache = cache + + if(CoreObject.ReLoad) then + CoreObject:ReLoad() + end + + self:RefreshAll() + end else SOURCE_KEY = 1 self.EventManager:UnregisterEvent("ACTIVE_TALENT_GROUP_CHANGED") end - - local data = CoreObject.db - local source = PROFILE_SV.STORED[SOURCE_KEY] - rawset(data, "data", source) end end @@ -482,14 +528,6 @@ function lib:CheckData(schema, key) print("______SAVED_____") end -function lib:NewCache(index) - index = index or CoreObject.Schema - if(not CACHE_SV[index]) then - CACHE_SV[index] = {} - end - return CACHE_SV[index] -end - function lib:NewGlobal(index) index = index or CoreObject.Schema if(not GLOBAL_SV[index]) then @@ -632,23 +670,28 @@ function lib:RunCallbacks() end end -function lib:Update(schema) +function lib:RefreshModule(schema) local obj = CoreObject[schema] if obj and obj.ReLoad then obj:ReLoad() end end -function lib:UpdateAll() +function lib:RefreshPlugin(schema) + local obj = _G[schema] + if obj and obj.ReLoad then + obj:ReLoad() + end +end + +function lib:RefreshAll() for _,schema in pairs(MODULES) do local obj = CoreObject[schema] if obj and obj.ReLoad then obj:ReLoad() end end -end -function lib:UpdatePlugins() for _,schema in pairs(PLUGINS) do local obj = _G[schema] if obj and obj.ReLoad then @@ -685,7 +728,6 @@ function lib:LoadQueuedModules() local schema = MODULES[i] local obj = CoreObject[schema] if obj and not obj.initialized then - obj.initialized = true; local halt = false local data = CoreObject.db[schema] if(data and data.incompatible) then @@ -693,11 +735,9 @@ function lib:LoadQueuedModules() if IsAddOnLoaded(addon) then halt = true end end end - if(obj.Load) then - if(not halt) then - obj:Load() - obj.Load = nil - end + if(obj.Load and (not halt)) then + obj:Load() + obj.initialized = true end end end @@ -710,7 +750,6 @@ function lib:LoadQueuedPlugins() local schema = PLUGINS[i] local obj = _G[schema] if obj and not obj.initialized then - obj.initialized = true; local halt = false local data = CoreObject.db[schema] if(data and data.incompatible) then @@ -718,11 +757,9 @@ function lib:LoadQueuedPlugins() if IsAddOnLoaded(addon) then halt = true end end end - if(obj.Load) then - if(not halt) then - obj:Load() - obj.Load = nil - end + if(obj.Load and (not halt)) then + obj:Load() + obj.initialized = true end end end @@ -972,14 +1009,32 @@ function lib:Initialize() end GLOBAL_SV.profiles = GLOBAL_SV.profiles or {} - for k,v in pairs(GLOBAL_SV.profiles) do GLOBAL_SV.profileKeys[k] = k end + GLOBAL_SV.cache = GLOBAL_SV.cache or {} + for k,v in pairs(GLOBAL_SV.cache) do + GLOBAL_SV.profileKeys[k] = k + end + --CACHE SAVED VARIABLES if not _G[CACHE_FILENAME] then _G[CACHE_FILENAME] = {} end CACHE_SV = _G[CACHE_FILENAME] + if(not CACHE_SV.STORED) then + CACHE_SV.STORED = {} + CACHE_SV.STORED[1] = {} + CACHE_SV.STORED[2] = {} + CACHE_SV.STORED[3] = {} + if playerClass == "DRUID" then + CACHE_SV.STORED[4] = {} + end + for k,v in pairs(CACHE_SV) do + if(k ~= "STORED") then + CACHE_SV.STORED[1][k] = v + end + end + end --PROFILE SAVED VARIABLES if not _G[PROFILE_FILENAME] then _G[PROFILE_FILENAME] = {} end @@ -1049,10 +1104,14 @@ function lib:Initialize() end --construct core dataset - local db = setmetatable({}, meta_database) - db.data = PROFILE_SV.STORED[SOURCE_KEY] - db.defaults = CoreObject.configs - CoreObject.db = db + local db = setmetatable({}, meta_database) + db.data = PROFILE_SV.STORED[SOURCE_KEY] + db.defaults = CoreObject.configs + CoreObject.db = db + + local cache = setmetatable({}, meta_cache) + cache.data = CACHE_SV.STORED[SOURCE_KEY] + CoreObject.cache = cache --check for LOD plugins local addonCount = GetNumAddOns() diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua index 98d7083..421cc81 100644 --- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua +++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua @@ -363,10 +363,10 @@ function MOD:Layout(isBank, isReagent) if (not isReagent and (not isBank and bagID <= 3) or (isBank and bagID ~= -1 and numContainerSlots >= 1 and not (i - 1 > numContainerSlots))) then if not f.ContainerHolder[i] then if isBank then - globalName = "SuperBankBag" .. (bagID - 4); + globalName = "SVUI_BankBag" .. (bagID - 4); f.ContainerHolder[i] = NewFrame("CheckButton", globalName, f.ContainerHolder, "BankItemButtonBagTemplate") else - globalName = "SuperMainBag" .. bagID .. "Slot"; + globalName = "SVUI_MainBag" .. bagID .. "Slot"; f.ContainerHolder[i] = NewFrame("CheckButton", globalName, f.ContainerHolder, "BagSlotButtonTemplate") end --f.ContainerHolder[i]:SetSlotTemplate(true, 2, 4, 4, true) @@ -375,15 +375,11 @@ function MOD:Layout(isBank, isReagent) f.ContainerHolder[i]:SetPushedTexture("") f.ContainerHolder[i]:SetScript("OnClick", nil) f.ContainerHolder[i].id = isBank and bagID or bagID + 1; - f.ContainerHolder[i]:HookScript("OnEnter", function(self) - MOD.UseSlotFading(self, f) end) - f.ContainerHolder[i]:HookScript("OnLeave", function(self) - MOD.FlushSlotFading(self, f) end) - if isBank then - f.ContainerHolder[i]:SetID(bagID) - if not f.ContainerHolder[i].tooltipText then - f.ContainerHolder[i].tooltipText = "" - end + f.ContainerHolder[i]:SetID(isBank and bagID or (bagID + 1)) + f.ContainerHolder[i]:HookScript("OnEnter", function(self) MOD.UseSlotFading(self, f) end) + f.ContainerHolder[i]:HookScript("OnLeave", function(self) MOD.FlushSlotFading(self, f) end) + if(isBank and (not f.ContainerHolder[i].tooltipText)) then + f.ContainerHolder[i].tooltipText = "" end f.ContainerHolder[i].iconTexture = _G[f.ContainerHolder[i]:GetName().."IconTexture"]; f.ContainerHolder[i].iconTexture:FillInner() diff --git a/Interface/AddOns/SVUI/packages/dock/SVDock.lua b/Interface/AddOns/SVUI/packages/dock/SVDock.lua index ac1f6e7..080b9eb 100644 --- a/Interface/AddOns/SVUI/packages/dock/SVDock.lua +++ b/Interface/AddOns/SVUI/packages/dock/SVDock.lua @@ -114,12 +114,12 @@ end local ToggleDocks = function(self) GameTooltip:Hide() - if MOD.Cache.SuperDockFaded then - MOD.Cache.SuperDockFaded = nil; + if SV.cache.Docks.SuperDockFaded then + SV.cache.Docks.SuperDockFaded = nil; SV:SecureFadeIn(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 1) SV:SecureFadeIn(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 1) else - MOD.Cache.SuperDockFaded = true; + SV.cache.Docks.SuperDockFaded = true; SV:SecureFadeOut(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 0, true) SV:SecureFadeOut(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 0, true) end @@ -156,7 +156,7 @@ local DockButtonDeactivate = function(self) end local DockletButton_OnEnter = function(self, ...) - if MOD.Cache.SuperDockFaded then + if SV.cache.Docks.SuperDockFaded then LeftSuperDock:Show() SV:SecureFadeIn(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 1) RightSuperDock:Show() @@ -177,7 +177,7 @@ local DockletButton_OnEnter = function(self, ...) end local DockletButton_OnLeave = function(self, ...) - if MOD.Cache.SuperDockFaded then + if SV.cache.Docks.SuperDockFaded then SV:SecureFadeOut(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 0, true) SV:SecureFadeOut(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 0, true) end @@ -529,7 +529,7 @@ function MOD:CreateDockPanels() rightwindow:Size(rightWidth, rightHeight) rightdock.backdrop = SetSuperDockStyle(rightwindow) - if self.Cache.SuperDockFaded then LeftSuperDock:Hide() RightSuperDock:Hide() end + if SV.cache.Docks.SuperDockFaded then LeftSuperDock:Hide() RightSuperDock:Hide() end local toolbarTop = CreateFrame("Frame", "SuperDockToolBarTop", SV.UIParent) toolbarTop:Point("TOPLEFT", SV.UIParent, "TOPLEFT", 2, -4) @@ -958,10 +958,12 @@ function MOD:ReLoad() end function MOD:Load() - self.Cache = LibSuperVillain:NewCache("Docks") - if(not self.Cache.SuperDockFaded) then - self.Cache.SuperDockFaded = false + SV.cache.Docks = SV.cache.Docks or {} + + if(not SV.cache.Docks.SuperDockFaded) then + SV.cache.Docks.SuperDockFaded = false end + self:CreateSuperBorders() self:CreateDockPanels() local width = RightSuperDock:GetWidth(); diff --git a/Interface/AddOns/SVUI/scripts/mounts.lua b/Interface/AddOns/SVUI/scripts/mounts.lua index 423d4b6..6a98ada 100644 --- a/Interface/AddOns/SVUI/scripts/mounts.lua +++ b/Interface/AddOns/SVUI/scripts/mounts.lua @@ -63,36 +63,36 @@ local function UpdateMountCheckboxes(button, index) bar["SPECIAL"].index = index bar["SPECIAL"].name = creatureName - if(MountCache.names["GROUND"] == creatureName) then - if(MountCache.types["GROUND"] ~= index) then - MountCache.types["GROUND"] = index + if(SV.cache.Mounts.names["GROUND"] == creatureName) then + if(SV.cache.Mounts.types["GROUND"] ~= index) then + SV.cache.Mounts.types["GROUND"] = index end bar["GROUND"]:SetChecked(1) else bar["GROUND"]:SetChecked(0) end - if(MountCache.names["FLYING"] == creatureName) then - if(MountCache.types["FLYING"] ~= index) then - MountCache.types["FLYING"] = index + if(SV.cache.Mounts.names["FLYING"] == creatureName) then + if(SV.cache.Mounts.types["FLYING"] ~= index) then + SV.cache.Mounts.types["FLYING"] = index end bar["FLYING"]:SetChecked(1) else bar["FLYING"]:SetChecked(0) end - if(MountCache.names["SWIMMING"] == creatureName) then - if(MountCache.types["SWIMMING"] ~= index) then - MountCache.types["SWIMMING"] = index + if(SV.cache.Mounts.names["SWIMMING"] == creatureName) then + if(SV.cache.Mounts.types["SWIMMING"] ~= index) then + SV.cache.Mounts.types["SWIMMING"] = index end bar["SWIMMING"]:SetChecked(1) else bar["SWIMMING"]:SetChecked(0) end - if(MountCache.names["SPECIAL"] == creatureName) then - if(MountCache.types["SPECIAL"] ~= index) then - MountCache.types["SPECIAL"] = index + if(SV.cache.Mounts.names["SPECIAL"] == creatureName) then + if(SV.cache.Mounts.types["SPECIAL"] ~= index) then + SV.cache.Mounts.types["SPECIAL"] = index end bar["SPECIAL"]:SetChecked(1) else @@ -101,29 +101,29 @@ local function UpdateMountCheckboxes(button, index) end end -local function UpdateMountCache() +local function UpdateMountsCache() if(not MountJournal or not MountJournal.cachedMounts) then return end local num = GetNumCompanions("MOUNT") for index = 1, num, 1 do local _, info, id = GetCompanionInfo("MOUNT", index) - if(MountCache.names["GROUND"] == info) then - if(MountCache.types["GROUND"] ~= index) then - MountCache.types["GROUND"] = index + if(SV.cache.Mounts.names["GROUND"] == info) then + if(SV.cache.Mounts.types["GROUND"] ~= index) then + SV.cache.Mounts.types["GROUND"] = index end end - if(MountCache.names["FLYING"] == info) then - if(MountCache.types["FLYING"] ~= index) then - MountCache.types["FLYING"] = index + if(SV.cache.Mounts.names["FLYING"] == info) then + if(SV.cache.Mounts.types["FLYING"] ~= index) then + SV.cache.Mounts.types["FLYING"] = index end end - if(MountCache.names["SWIMMING"] == info) then - if(MountCache.types["SWIMMING"] ~= index) then - MountCache.types["SWIMMING"] = index + if(SV.cache.Mounts.names["SWIMMING"] == info) then + if(SV.cache.Mounts.types["SWIMMING"] ~= index) then + SV.cache.Mounts.types["SWIMMING"] = index end end - if(MountCache.names["SPECIAL"] == info) then - if(MountCache.types["SPECIAL"] ~= index) then - MountCache.types["SPECIAL"] = index + if(SV.cache.Mounts.names["SPECIAL"] == info) then + if(SV.cache.Mounts.types["SPECIAL"] ~= index) then + SV.cache.Mounts.types["SPECIAL"] = index end end end @@ -148,7 +148,7 @@ end local ProxyUpdate_Mounts = function(self, event, ...) if(event == "COMPANION_LEARNED" or event == "COMPANION_UNLEARNED") then - UpdateMountCache() + UpdateMountsCache() end Update_MountCheckButtons() end @@ -157,29 +157,29 @@ local function UpdateCurrentMountSelection() ttSummary = "" local creatureName - if(MountCache.types["FLYING"]) then - creatureName = MountCache.names["FLYING"] + if(SV.cache.Mounts.types["FLYING"]) then + creatureName = SV.cache.Mounts.names["FLYING"] if(creatureName) then ttSummary = ttSummary .. "\nFlying: " .. creatureName end end - if(MountCache.types["SWIMMING"]) then - creatureName = MountCache.names["SWIMMING"] + if(SV.cache.Mounts.types["SWIMMING"]) then + creatureName = SV.cache.Mounts.names["SWIMMING"] if(creatureName) then ttSummary = ttSummary .. "\nSwimming: " .. creatureName end end - if(MountCache.types["GROUND"]) then - creatureName = MountCache.names["GROUND"] + if(SV.cache.Mounts.types["GROUND"]) then + creatureName = SV.cache.Mounts.names["GROUND"] if(creatureName) then ttSummary = ttSummary .. "\nGround: " .. creatureName end end - if(MountCache.types["SPECIAL"]) then - creatureName = MountCache.names["SPECIAL"] + if(SV.cache.Mounts.types["SPECIAL"]) then + creatureName = SV.cache.Mounts.names["SPECIAL"] if(creatureName) then ttSummary = ttSummary .. "\nSpecial: " .. creatureName end @@ -193,11 +193,11 @@ local CheckButton_OnClick = function(self) if(index) then if(self:GetChecked() == 1) then - MountCache.types[key] = index - MountCache.names[key] = name + SV.cache.Mounts.types[key] = index + SV.cache.Mounts.names[key] = name else - MountCache.types[key] = false - MountCache.names[key] = "" + SV.cache.Mounts.types[key] = false + SV.cache.Mounts.names[key] = "" end Update_MountCheckButtons() UpdateCurrentMountSelection() @@ -232,17 +232,18 @@ ADDING CHECKBOXES TO JOURNAL ########################################################## ]]-- local function SetMountCheckButtons() - MountCache = LibSuperVillain:NewCache("Mounts") - if not MountCache.types then - MountCache.types = { + SV.cache.Mounts = SV.cache.Mounts or {} + + if not SV.cache.Mounts.types then + SV.cache.Mounts.types = { ["GROUND"] = false, ["FLYING"] = false, ["SWIMMING"] = false, ["SPECIAL"] = false } end - if not MountCache.names then - MountCache.names = { + if not SV.cache.Mounts.names then + SV.cache.Mounts.names = { ["GROUND"] = "", ["FLYING"] = "", ["SWIMMING"] = "", @@ -250,7 +251,7 @@ local function SetMountCheckButtons() } end - UpdateMountCache() + UpdateMountsCache() local scrollFrame = MountJournal.ListScrollFrame; local scrollBar = _G["MountJournalListScrollFrameScrollBar"] @@ -361,7 +362,7 @@ SLASH FUNCTION ########################################################## ]]-- function SVUILetsRide() - local checkList = MountCache.types + local checkList = SV.cache.Mounts.types local letsFly, letsSwim, letsSeahorse, vjZone, IbelieveIcantFly local maxMounts = GetNumCompanions("MOUNT") if(not maxMounts or IsMounted()) then diff --git a/Interface/AddOns/SVUI/scripts/spellbind.lua b/Interface/AddOns/SVUI/scripts/spellbind.lua index 122d625..006f15c 100644 --- a/Interface/AddOns/SVUI/scripts/spellbind.lua +++ b/Interface/AddOns/SVUI/scripts/spellbind.lua @@ -81,8 +81,6 @@ SpellBinder.list.child = CreateFrame("Frame", nil, SpellBinder.list) SpellBinder.list:SetPoint("TOPLEFT", _G["SVUI_SpellBinderInset"], "TOPLEFT", 0, -5) SpellBinder.list:SetPoint("BOTTOMRIGHT", _G["SVUI_SpellBinderInset"], "BOTTOMRIGHT", -30, 5) SpellBinder.list:SetScrollChild(SpellBinder.list.child) - -local SpellBinderCache; --[[ ########################################################## SCRIPT HANDLERS @@ -168,9 +166,9 @@ local SpellBindMask_OnClick = function(self, button) button = SecureButton_GetButtonSuffix(button) end - for i, v in pairs(SpellBinderCache.spells) do if v.spell == spellname then return end end + for i, v in pairs(SV.cache.SpellBinder.spells) do if v.spell == spellname then return end end - tinsert(SpellBinderCache.spells, {["id"] = slot, ["modifier"] = modifier, ["button"] = button, ["spell"] = spellname, ["rank"] = rank, ["texture"] = texture, ["origbutton"] = originalbutton,}) + tinsert(SV.cache.SpellBinder.spells, {["id"] = slot, ["modifier"] = modifier, ["button"] = button, ["spell"] = spellname, ["rank"] = rank, ["texture"] = texture, ["origbutton"] = originalbutton,}) SpellBinder:BuildSpells(false) end end @@ -178,7 +176,7 @@ end local SpellBindDelete_OnClick = function(self) local spell = self.spell - for j, k in ipairs(SpellBinderCache.spells) do + for j, k in ipairs(SV.cache.SpellBinder.spells) do if k ~= spell.spell then k.checked = false _G[j.."_cbs"]:SetBackdropColor(0, 0, 0, 0) @@ -201,7 +199,14 @@ METHODS ########################################################## ]]-- function SpellBinder:BuildSpells(delete) - if(not SpellBinderCache) then return end + if(not SV.cache.SpellBinder) then return end + + if(not SV.cache.SpellBinder.spells) then + SV.cache.SpellBinder.spells = {} + SV.cache.SpellBinder.frames = {} + SV.cache.SpellBinder.keys = {} + end + local oldb, spellName local scroll = self.list.child scroll:SetPoint("TOPLEFT") @@ -219,7 +224,7 @@ function SpellBinder:BuildSpells(delete) end end - for i, spell in ipairs(SpellBinderCache.spells) do + for i, spell in ipairs(SV.cache.SpellBinder.spells) do spellName = spell.spell if spellName then local bf = _G[i.."_cbs"] or CreateFrame("Button", i.."_cbs", scroll) @@ -259,7 +264,7 @@ function SpellBinder:BuildSpells(delete) bf.fs:SetPoint("RIGHT", bf.delete, "LEFT", -4, 0) for frame,_ in pairs(ClickCastFrames) do - if frame and SpellBinderCache.frames[frame] then + if frame and SV.cache.SpellBinder.frames[frame] then if frame:CanChangeAttribute() or frame:CanChangeProtectedState() then if frame:GetAttribute(spell.modifier.."type"..spell.button) ~= "menu" then --frame:RegisterForClicks("AnyDown") @@ -268,15 +273,15 @@ function SpellBinder:BuildSpells(delete) frame:SetAttribute(spell.modifier.."type-"..spell.spell, "spell") frame:SetAttribute(spell.modifier.."spell-"..spell.spell, spell.spell) - SpellBinderCache.keys[spell.modifier..spell.button] = spell.spell - SpellBinderCache.keys[spell.modifier.."type-"..spell.spell] = "spell" - SpellBinderCache.keys[spell.modifier.."spell-"..spell.spell] = spell.spell + SV.cache.SpellBinder.keys[spell.modifier..spell.button] = spell.spell + SV.cache.SpellBinder.keys[spell.modifier.."type-"..spell.spell] = "spell" + SV.cache.SpellBinder.keys[spell.modifier.."spell-"..spell.spell] = spell.spell else frame:SetAttribute(spell.modifier.."type"..spell.button, "spell") frame:SetAttribute(spell.modifier.."spell"..spell.button, spell.spell) - SpellBinderCache.keys[spell.modifier.."type"..spell.button] = "spell" - SpellBinderCache.keys[spell.modifier.."spell"..spell.button] = spell.spell + SV.cache.SpellBinder.keys[spell.modifier.."type"..spell.button] = "spell" + SV.cache.SpellBinder.keys[spell.modifier.."spell"..spell.button] = spell.spell end end end @@ -290,9 +295,9 @@ function SpellBinder:BuildSpells(delete) end function SpellBinder:BuildList() - if(SpellBinderCache and SpellBinderCache.frames) then + if(SV.cache.SpellBinder and SV.cache.SpellBinder.frames) then for frame,_ in pairs(ClickCastFrames) do - SpellBinderCache.frames[frame] = SpellBinderCache.frames[frame] or true + SV.cache.SpellBinder.frames[frame] = SV.cache.SpellBinder.frames[frame] or true end end end @@ -318,8 +323,8 @@ function SpellBinder:ToggleButtons() end function SpellBinder:DeleteSpell() - local count = table.getn(SpellBinderCache.spells) - for i, spell in ipairs(SpellBinderCache.spells) do + local count = table.getn(SV.cache.SpellBinder.spells) + for i, spell in ipairs(SV.cache.SpellBinder.spells) do if spell.checked then for frame,_ in pairs(ClickCastFrames) do local f @@ -339,7 +344,7 @@ function SpellBinder:DeleteSpell() end end end - tremove(SpellBinderCache.spells, i) + tremove(SV.cache.SpellBinder.spells, i) end end self:BuildSpells(true) @@ -427,11 +432,11 @@ SpellBinder:RegisterEvent("ZONE_CHANGED_NEW_AREA") SpellBinder:RegisterEvent("ZONE_CHANGED") local function LoadSpellBinder() - SpellBinderCache = SVLib:NewCache("SpellBinder") - SpellBinderCache.spells = SpellBinderCache.spells or {} - SpellBinderCache.frames = SpellBinderCache.frames or {} - SpellBinderCache.keys = SpellBinderCache.keys or {} - + SV.cache.SpellBinder = SV.cache.SpellBinder or {} + SV.cache.SpellBinder.spells = SV.cache.SpellBinder.spells or {} + SV.cache.SpellBinder.frames = SV.cache.SpellBinder.frames or {} + SV.cache.SpellBinder.keys = SV.cache.SpellBinder.keys or {} + SpellBinder:BuildList() SpellBinder:BuildSpells(true) diff --git a/Interface/AddOns/SVUI/setup/installer.lua b/Interface/AddOns/SVUI/setup/installer.lua index 267adcc..3ab0d4e 100644 --- a/Interface/AddOns/SVUI/setup/installer.lua +++ b/Interface/AddOns/SVUI/setup/installer.lua @@ -117,7 +117,7 @@ local function BarShuffle() local tH = SV.db.SVBar.Bar1.buttonsize + (base - bS); local b2h = bar2 and tH or base; local sph = (400 - b2h); - local anchors = SV.Mentalo.Anchors + local anchors = SV.cache.Anchors if not anchors then anchors = {} end anchors.SVUI_SpecialAbility_MOVE = "BOTTOMSVUIParentBOTTOM0"..sph; anchors.SVUI_ActionBar2_MOVE = "BOTTOMSVUI_ActionBar1TOP0"..(-bS); @@ -133,7 +133,7 @@ local function BarShuffle() end local function UFMoveBottomQuadrant(toggle) - local anchors = SV.Mentalo.Anchors + local anchors = SV.cache.Anchors if not toggle then anchors.SVUI_Player_MOVE = "BOTTOMSVUIParentBOTTOM-278182" anchors.SVUI_PlayerCastbar_MOVE = "BOTTOMSVUIParentBOTTOM-278122" @@ -168,7 +168,7 @@ local function UFMoveBottomQuadrant(toggle) end local function UFMoveLeftQuadrant(toggle) - local anchors = SV.Mentalo.Anchors + local anchors = SV.cache.Anchors if not toggle then anchors.SVUI_Assist_MOVE = "TOPLEFTSVUIParentTOPLEFT"..XOFF.."-250" anchors.SVUI_Tank_MOVE = "TOPLEFTSVUIParentTOPLEFT"..XOFF.."-175" @@ -189,7 +189,7 @@ local function UFMoveLeftQuadrant(toggle) end local function UFMoveTopQuadrant(toggle) - local anchors = SV.Mentalo.Anchors + local anchors = SV.cache.Anchors if not toggle then anchors.GM_MOVE = "TOPLEFTSVUIParentTOPLEFT250-25" anchors.SVUI_LootFrame_MOVE = "BOTTOMSVUIParentBOTTOM0350" @@ -206,7 +206,7 @@ local function UFMoveTopQuadrant(toggle) end local function UFMoveRightQuadrant(toggle) - local anchors = SV.Mentalo.Anchors + local anchors = SV.cache.Anchors local dH = SV.db.SVDock.dockRightHeight + 60 if not toggle or toggle == "high" then anchors.SVUI_BossHolder_MOVE = "RIGHTSVUIParentRIGHT-1050" @@ -281,10 +281,10 @@ function SV.Setup:UserScreen(rez, preserve) if(not preserve and not mungs) then BarShuffle() SV.Mentalo:SetPositions() - SVLib:Update('SVDock') - SVLib:Update('SVAura') - SVLib:Update('SVBar') - SVLib:Update('SVUnit') + SVLib:RefreshModule('SVDock') + SVLib:RefreshModule('SVAura') + SVLib:RefreshModule('SVBar') + SVLib:RefreshModule('SVUnit') SV:SavedPopup() end end @@ -431,8 +431,8 @@ function SV.Setup:ColorTheme(style, preserve) if(not mungs) then SV:MediaUpdate() - SVLib:Update('SVStats') - SVLib:Update('SVUnit') + SVLib:RefreshModule('SVStats') + SVLib:RefreshModule('SVUnit') if(not preserve) then SV:SavedPopup() end @@ -467,8 +467,8 @@ function SV.Setup:UnitframeLayout(style, preserve) end SV.Mentalo:SetPositions() end - SVLib:Update('SVStats') - SVLib:Update('SVUnit') + SVLib:RefreshModule('SVStats') + SVLib:RefreshModule('SVUnit') if(not preserve) then SV:SavedPopup() end @@ -482,7 +482,7 @@ function SV.Setup:GroupframeLayout(style, preserve) SV.db.LAYOUT.groupstyle = style if(not mungs) then - SVLib:Update('SVUnit') + SVLib:RefreshModule('SVUnit') if(not preserve) then SV:SavedPopup() end @@ -515,8 +515,8 @@ function SV.Setup:BarLayout(style, preserve) BarShuffle() SV.Mentalo:SetPositions() end - SVLib:Update('SVStats') - SVLib:Update('SVBar') + SVLib:RefreshModule('SVStats') + SVLib:RefreshModule('SVBar') if(not preserve) then SV:SavedPopup() end @@ -530,9 +530,9 @@ function SV.Setup:Auralayout(style, preserve) SV.db.LAYOUT.aurastyle = style; if(not mungs) then - SVLib:Update('SVStats') - SVLib:Update('SVAura') - SVLib:Update('SVUnit') + SVLib:RefreshModule('SVStats') + SVLib:RefreshModule('SVAura') + SVLib:RefreshModule('SVUnit') if(not preserve) then SV:SavedPopup() end diff --git a/Interface/AddOns/SVUI/system/alerts.lua b/Interface/AddOns/SVUI/system/alerts.lua index 35131c5..f8197a2 100644 --- a/Interface/AddOns/SVUI/system/alerts.lua +++ b/Interface/AddOns/SVUI/system/alerts.lua @@ -193,6 +193,8 @@ SV.SystemAlert["RESET_PROFILE_PROMPT"] = { hideOnEscape = 1, OnAccept = function() SVLib:WipeDatabase() + SVLib:WipeCache("Anchors") + ReloadUI() end }; SV.SystemAlert["COPY_PROFILE_PROMPT"] = { diff --git a/Interface/AddOns/SVUI/system/common.lua b/Interface/AddOns/SVUI/system/common.lua index cc63c59..8dca0d5 100644 --- a/Interface/AddOns/SVUI/system/common.lua +++ b/Interface/AddOns/SVUI/system/common.lua @@ -1322,10 +1322,7 @@ local function SetButtonTemplate(self, invisible, overridePadding, xOffset, yOff FillInner(hover, self.Panel) self.hover = hover; end - - local color = SV.Media.color.highlight - self.hover:SetTexture(color[1], color[2], color[3], 0.5) - + self.hover:SetTexture(0.1, 0.8, 0.8, 0.5) self:SetHighlightTexture(self.hover) end @@ -1390,7 +1387,7 @@ local function SetCheckboxTemplate(self, underlay, x, y) self.__hooked = true end -local function SetEditboxTemplate(self, x, y) +local function SetEditboxTemplate(self, x, y, fixed) if(not self or (self and self.Panel)) then return end if self.TopLeftTex then Die(self.TopLeftTex) end @@ -1402,8 +1399,9 @@ local function SetEditboxTemplate(self, x, y) if self.LeftTex then Die(self.LeftTex) end if self.RightTex then Die(self.RightTex) end if self.MiddleTex then Die(self.MiddleTex) end - - CreatePanelTemplate(self, "Inset", true, true, 1, x, y) + local underlay = true + if(fixed ~= nil) then underlay = fixed end + CreatePanelTemplate(self, "Inset", underlay, true, 1, x, y) local globalName = self:GetName(); if globalName then diff --git a/Interface/AddOns/SVUI/system/load.lua b/Interface/AddOns/SVUI/system/load.lua index eea477c..c9c5db0 100644 --- a/Interface/AddOns/SVUI/system/load.lua +++ b/Interface/AddOns/SVUI/system/load.lua @@ -77,7 +77,7 @@ function SV:RefreshEverything(bypass) self:RefreshAllSystemMedia(); self.UIParent:Hide(); self.Mentalo:SetPositions(); - SVLib:UpdateAll(); + SVLib:RefreshAll(); self.UIParent:Show(); if not bypass then self:VersionCheck() @@ -88,6 +88,13 @@ end SVUI LOAD PROCESS ########################################################## ]]-- +function SV:ReLoad() + self.Timers:ClearAllTimers(); + self:RefreshAllSystemMedia(); + self.Mentalo:SetPositions(); + self:AddonMessage("All user settings reloaded"); +end + function SV:Load() self.Timers:ClearAllTimers() @@ -139,7 +146,7 @@ function SV:Launch() self.UIParent:RegisterEvent("UNIT_INVENTORY_CHANGED"); self.UIParent:RegisterEvent("UPDATE_BONUS_ACTIONBAR"); - SVLib:Update("SVMap"); + SVLib:RefreshModule("SVMap"); collectgarbage("collect") diff --git a/Interface/AddOns/SVUI/system/mentalo.lua b/Interface/AddOns/SVUI/system/mentalo.lua index 2c26bed..ca44714 100644 --- a/Interface/AddOns/SVUI/system/mentalo.lua +++ b/Interface/AddOns/SVUI/system/mentalo.lua @@ -545,13 +545,13 @@ function Mentalo:New(frame, moveName, title, raised, snap, dragStopFunc) end local anchor1, anchorParent, anchor2, xPos, yPos = split("\031", CurrentPosition(frame)) - if(self.Anchors and self.Anchors[moveName]) then - if(type(self.Anchors[moveName]) == "table") then - movable:SetPoint(self.Anchors[moveName]["p"], SV.UIParent, self.Anchors[moveName]["p2"], self.Anchors[moveName]["p3"], self.Anchors[moveName]["p4"]) - self.Anchors[moveName] = CurrentPosition(movable) + if(SV.cache.Anchors and SV.cache.Anchors[moveName]) then + if(type(SV.cache.Anchors[moveName]) == "table") then + movable:SetPoint(SV.cache.Anchors[moveName]["p"], SV.UIParent, SV.cache.Anchors[moveName]["p2"], SV.cache.Anchors[moveName]["p3"], SV.cache.Anchors[moveName]["p4"]) + SV.cache.Anchors[moveName] = CurrentPosition(movable) movable:ClearAllPoints() end - anchor1, anchorParent, anchor2, xPos, yPos = split("\031", self.Anchors[moveName]) + anchor1, anchorParent, anchor2, xPos, yPos = split("\031", SV.cache.Anchors[moveName]) movable:SetPoint(anchor1, anchorParent, anchor2, xPos, yPos) else movable:SetPoint(anchor1, anchorParent, anchor2, xPos, yPos) @@ -603,7 +603,7 @@ function Mentalo:New(frame, moveName, title, raised, snap, dragStopFunc) end function Mentalo:HasMoved(frame) - if self.Anchors and self.Anchors[frame] then + if SV.cache.Anchors and SV.cache.Anchors[frame] then return true else return false @@ -611,8 +611,8 @@ function Mentalo:HasMoved(frame) end function Mentalo:SaveMovable(frame) - if(not _G[frame] or not self.Anchors) then return end - self.Anchors[frame] = CurrentPosition(_G[frame]) + if(not _G[frame] or not SV.cache.Anchors) then return end + SV.cache.Anchors[frame] = CurrentPosition(_G[frame]) end function Mentalo:ChangeSnapOffset(frame, snapOffset) @@ -668,8 +668,8 @@ function Mentalo:Reset(request) end end end - if(self.Anchors) then - self.Anchors = {} + if(SV.cache.Anchors) then + SV.cache.Anchors = {} end else for name, _ in pairs(self.Frames)do @@ -682,8 +682,8 @@ function Mentalo:Reset(request) local u, v, w, x, y = split("\031", self.Frames[name]["point"]) frame:ClearAllPoints() frame:SetPoint(u, v, w, x, y) - if(self.Anchors and self.Anchors[name]) then - self.Anchors[name] = nil + if(SV.cache.Anchors and SV.cache.Anchors[name]) then + SV.cache.Anchors[name] = nil end if (self.Frames[name]["postdrag"] ~= nil and type(self.Frames[name]["postdrag"]) == "function")then self.Frames[name]["postdrag"](frame, Pinpoint(frame)) @@ -701,8 +701,8 @@ function Mentalo:SetPositions() local frame = _G[name]; local anchor1, parent, anchor2, x, y; if frame then - if (self.Anchors and self.Anchors[name] and type(self.Anchors[name]) == "string") then - anchor1, parent, anchor2, x, y = split("\031", self.Anchors[name]) + if (SV.cache.Anchors and SV.cache.Anchors[name] and type(SV.cache.Anchors[name]) == "string") then + anchor1, parent, anchor2, x, y = split("\031", SV.cache.Anchors[name]) frame:ClearAllPoints() frame:SetPoint(anchor1, parent, anchor2, x, y) elseif self.Frames[name]["point"] then @@ -845,7 +845,7 @@ function Mentalo:Initialize() SVUI_MentaloPrecisionLeftButton:SetButtonTemplate() SVUI_MentaloPrecisionRightButton:SetButtonTemplate() - self.Anchors = LibSuperVillain:NewCache("Anchors") + SV.cache.Anchors = SV.cache.Anchors or {} for name, _ in pairs(self.Frames)do local parent, text, overlay, snapoffset, postdrag; diff --git a/Interface/AddOns/SVUI_ChatOMatic/Loader.lua b/Interface/AddOns/SVUI_ChatOMatic/Loader.lua index a303795..fe4dfea 100644 --- a/Interface/AddOns/SVUI_ChatOMatic/Loader.lua +++ b/Interface/AddOns/SVUI_ChatOMatic/Loader.lua @@ -32,6 +32,8 @@ CONFIG DATA ]]-- SV.configs[Schema] = { ["enable"] = true, + ["saveChats"] = true, + ["service"] = true, ["autoAnswer"] = false, ["prefix"] = true } @@ -40,8 +42,24 @@ SV.configs[Schema] = { CONFIG OPTIONS ########################################################## ]]-- -SV.Options.args.plugins.args.pluginOptions.args[Schema].args["autoAnswer"] = { +SV.Options.args.plugins.args.pluginOptions.args[Schema].args["saveChats"] = { order = 2, + name = "Save Chat History", + type = "toggle", + get = function(key) return SV.db[Schema][key[#key]] end, + set = function(key,value) SV.db[Schema][key[#key]] = value end +} + +SV.Options.args.plugins.args.pluginOptions.args[Schema].args["service"] = { + order = 3, + name = "Answering Service", + type = "toggle", + get = function(key) return SV.db[Schema][key[#key]] end, + set = function(key,value) SV.db[Schema][key[#key]] = value end +} + +SV.Options.args.plugins.args.pluginOptions.args[Schema].args["autoAnswer"] = { + order = 4, name = "Auto Answer", type = "toggle", get = function(key) return SV.db[Schema][key[#key]] end, @@ -49,7 +67,7 @@ SV.Options.args.plugins.args.pluginOptions.args[Schema].args["autoAnswer"] = { } SV.Options.args.plugins.args.pluginOptions.args[Schema].args["prefix"] = { - order = 3, + order = 5, name = "Prefix Messages", type = "toggle", get = function(key) return SV.db[Schema][key[#key]] end, diff --git a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.lua b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.lua index 5b1397b..78a9038 100644 --- a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.lua +++ b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.lua @@ -20,864 +20,36 @@ LOCALIZED LUA FUNCTIONS local _G = _G; local unpack = _G.unpack; local select = _G.select; -local pairs = _G.pairs; -local ipairs = _G.ipairs; -local type = _G.type; -local error = _G.error; -local pcall = _G.pcall; -local assert = _G.assert; -local tostring = _G.tostring; -local tonumber = _G.tonumber; -local tinsert = _G.tinsert; -local string = _G.string; -local math = _G.math; -local table = _G.table; ---[[ STRING METHODS ]]-- -local lower, upper = string.lower, string.upper; -local find, format, len, split = string.find, string.format, string.len, string.split; -local match, sub, join = string.match, string.sub, string.join; -local gmatch, gsub = string.gmatch, string.gsub; ---[[ MATH METHODS ]]-- -local abs, ceil, floor, round = math.abs, math.ceil, math.floor, math.round; -- Basic -local random = math.random; -- Uncommon ---[[ TABLE METHODS ]]-- -local tremove, tcopy, twipe = table.remove, table.copy, table.wipe; --[[ ########################################################## GET ADDON DATA ########################################################## ]]-- local PLUGIN = select(2, ...) - local Schema = PLUGIN.Schema; -local PlayersName = UnitName("player") - local SV = _G["SVUI"] local L = SV.L --[[ ########################################################## -LOCAL VARS -########################################################## -]]-- -local playerName = UnitName("player"); -local playerRealm = GetRealmName(); - -local ConjugationKeys = {[1]={[1]="are",[2]="am",[3]="were",[4]="was",[5]="I",[6]="me",[7]="you",[8]="my",[9]="your",[10]="mine",[11]="your's",[12]="I'm",[13]="you're",[14]="I've",[15]="you've",[16]="I'll",[17]="you'll",[18]="myself",[19]="yourself"},[2]={[1]="am",[2]="are",[3]="was",[4]="were",[5]="you",[6]="you",[7]="me",[8]="your",[9]="my",[10]="your's",[11]="mine",[12]="you're",[13]="I'm",[14]="you've",[15]="I've",[16]="you'll",[17]="I'll",[18]="yourself",[19]="myself"},[3]={[1]="me am",[2]="am me",[3]="mecan",[4]="can me",[5]="me have",[6]="me will",[7]="will me"},[4]={[1]="I am",[2]="am I",[3]="I can",[4]="can I",[5]="I have",[6]="I will",[7]="will I"}}; -local punctuations = {[1]={pattern="%.",value="."},[2]={pattern=",",value=","},[3]={pattern="!",value="!"},[4]={pattern="%?",value="?"},[5]={pattern=":",value=":"},[6]={pattern=";",value=";"},[7]={pattern="&",value="&"},[8]={pattern="\"",value="\""},[9]={pattern="@",value="@"},[10]={pattern="#",value="#"},[11]={pattern="%(",value="("},[12]={pattern="%)",value=")"}}; - -local PhoneLines = {}; -local ResponseQueue = {}; - -local ICON_FILE = [[Interface\AddOns\SVUI_ChatOMatic\artwork\DOCK-CALL]] -local DEFAULT_GRADIENT = {"VERTICAL", 0.08, 0.08, 0.08, 0.22, 0.22, 0.22} -local GREEN_GRADIENT = {"VERTICAL", 0.08, 0.5, 0, 0.25, 0.9, 0.08} -local YELLOW_GRADIENT = {"VERTICAL", 1, 0.3, 0, 1, 1, 0} ---[[ -########################################################## -DIALOG TABLES -########################################################## -]]-- -local OneLiners = { - [1] = "I've got to sit down and work out where I stand.", - [2] = "If I save time, when do I get it back?", - [3] = "I am not prejudice. I hate everyone equally.", - [4] = "Take my advice, I don't use it anyway.", - [5] = "The statement below is true. The statement above is false.", - [6] = "As I said before, I never repeat myself.", - [7] = "If at first you don't succeed, avoid skydiving.", - [8] = "War doesn't determine who's right. War determines who's left.", - [9] = "Best way to prevent a hangover is to stay drunk.", - [10] = "Doesn't expecting the unexpected make the unexpected become the expected?", - [11] = "I was born intelligent... education ruined me.", - [12] = "A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station... What more can I say?", - [13] = "If it's true that we are here to help others, then, what exactly are the others here for?", - [14] = "Since light travels faster than sound, people appear bright Until you hear them speak.", - [15] = "How come \"abbreviated\" is such a long word?", - [16] = "Living on Earth may be expensive... but it includes an annual free trip around the Sun.", - [17] = "Your future depends on your dreams So go to sleep!", - [18] = "A good discussion is like a miniskirt, short enough to hold interest and long enough to cover the subject.", - [19] = "A good time to keep your mouth shut is when you are in deep water.", - [20] = "How come we choose from just two people for President and 50 for Miss America?", - [21] = "No one ever says \"it's just a game\" when they are winning.", - [22] = "Suicidal twin kills sister by mistake!", - [23] = "He who laughs last thinks slowest!", - [24] = "Always remember you're unique, just like everyone else.", - [25] = "Hard work has a future payoff. Laziness pays off now.", - [26] = "Don't take life too seriously, you won't get out alive.", - [27] = "I don't suffer from insanity. I enjoy every minute of it.", - [28] = "I'm as confused as a baby in a topless bar.", - [29] = "90% of all statistics are made up.", - [30] = "If you can't convince them, confuse them.", - [31] = "If at first you don't succeed, destroy all evidence that you tried" -} - -local Excuse = { - -- OPENERS - [1] = "I'd love to, but ", - [2] = "I'm being told that ", - [3] = "The voices say that ", - [4] = "Hang on a sec ", - [5] = "You should know that ", - [6] = "I just found out that ", - [7] = "I would but ", - [8] = "Umm... ", - [9] = "I don't know about you but ", - [10] = "Can't talk right now, ", - -- PUNCHLINES - [11] = "I have to floss my cat", - [12] = "I've dedicated my life to linguini", - [13] = "I want to spend more time with my blender", - [14] = "the President said he might drop in", - [15] = "the man on television told me to say tuned", - [16] = "I've been scheduled for a karma transplant", - [17] = "I'm staying home to work on my cottage cheese sculpture", - [18] = "it's my parakeet's bowling night", - [19] = "it wouldn't be fair to the other Beautiful People", - [20] = "I'm building a pig from a kit", - [21] = "I did my own thing and now I've got to undo it", - [22] = "I'm enrolled in aerobic scream therapy", - [23] = "there's a disturbance in the Force", - [24] = "I'm doing door-to-door collecting for static cling", - [25] = "I have to go to the post office to see if I'm still wanted", - [26] = "I'm teaching my ferret to yodel", - [27] = "I have to check the freshness dates on my dairy products", - [28] = "I'm going through cherry cheesecake withdrawl", - [29] = "I'm planning to go downtown to try on gloves", - [30] = "my crayons all melted together", - [31] = "I'm trying to see how long I can go without saying yes", - [32] = "I'm in training to be a household pest", - [33] = "I'm getting my overalls overhauled", - [34] = "my patent is pending", - [35] = "I'm attending the opening of my garage door", - [36] = "I'm sandblasting my oven", - [37] = "I'm worried about my vertical hold", - [38] = "I'm going down to the bakery to watch the buns rise", - [39] = "I'm being deported", - [40] = "the grunion are running", - [41] = "I'll be looking for a parking space", - [42] = "my Millard Filmore Fan Club meets then", - [43] = "the monsters haven't turned blue yet, and I have to eat more dots", - [44] = "I'm taking punk totem pole carving", - [45] = "I have to fluff my shower cap", - [46] = "I'm converting my calendar watch from Julian to Gregorian", - [47] = "I've come down with a really horrible case of something or other", - [48] = "I made an appointment with a cuticle specialist", - [49] = "my plot to take over the world is thickening", - [50] = "I have to fulfill my potential", - [51] = "I don't want to leave my comfort zone", - [52] = "it's too close to the turn of the century", - [53] = "I have some real hard words to look up in the dictionary", - [54] = "my subconscious says no", - [55] = "I'm giving nuisance lessons at a convenience store", - [56] = "I left my body in my other clothes", - [57] = "the last time I went, I never came back", - [58] = "I've got a Friends of Rutabaga meeting", - [59] = "I have to answer all of my 'occupant' letters", - [60] = "none of my socks match", - [61] = "I have to be on the next train to Bermuda", - [62] = "I'm having all my plants neutered", - [63] = "people are blaming me for the Spanish-American War", - [64] = "I changed the lock on my door and now I can't get out", - [65] = "I'm making a home movie called 'The Thing That Grew in My Refrigerator'", - [66] = "I'm attending a perfume convention as guest sniffer", - [67] = "my yucca plant is feeling yucky", - [68] = "I'm touring China with a wok band", - [69] = "my chocolate-appreciation class meets that night", - [70] = "I never go out on days that end in 'Y'", - [71] = "my mother would never let me hear the end of it", - [72] = "I'm running off to Yugoslavia with a foreign-exchange student named Basil Metabolism", - [73] = "I just picked up a book called 'Glue in Many Lands' and I can't put it down", - [74] = "I'm too evil for that stuff", - [75] = "I have to torment my hair", - [76] = "I have too much guilt", - [77] = "there are important world issues that need worrying about", - [78] = "I have to draw 'Cubby' for an art scholarship", - [79] = "I'm uncomfortable when I'm alone or with others", - [80] = "I promised to help a friend fold road maps", - [81] = "I feel a song coming on", - [82] = "I'm trying to be less popular", - [83] = "my bathroom tiles need grouting", - [84] = "I have to bleach my hare", - [85] = "I'm waiting to see if I'm already a winner", - [86] = "I'm writing a love letter to Richard Simmons", - [87] = "you know how we psychos are", - [88] = "my favorite commercial is on TV", - [89] = "I have to study for a blood test", - [90] = "I'm going to be old someday", - [91] = "I've been traded to Cincinnati", - [92] = "I'm observing National Apathy Week", - [93] = "I have to rotate my crops", - [94] = "my uncle escaped again", - [95] = "I'm up to my elbows in waxy buildup", - [96] = "I have to knit some dust bunnies for a charity bazaar", - [97] = "I'm having my baby shoes bronzed", - [98] = "I have to go to court for kitty littering", - [99] = "I'm going to count the bristles in my toothbrush", - [100] = "I have to thaw some karate chops for dinner", - [101] = "having fun gives me prickly heat", - [102] = "I'm going to the Missing Persons Bureau to see if anyone is looking for me", - [103] = "I have to jog my memory", - [104] = "my palm reader advised against it", - [105] = "my Dress For Obscurity class meets then", - [106] = "I have to stay home and see if I snore", - [107] = "I prefer to remain an enigma", - [108] = "I think you want the OTHER " .. playerName, - [109] = "I have to sit up with a sick ant", - [110] = "I'm trying to cut down", - [111] = ".. well, maybe", -}; - -local Phrases = { - [1] = "I don't really want to<*", - [2] = "Are you going to<*", - [3] = "I don't know, should I<*", - [4] = "So you are not going to<*", - [5] = "Why don't you<*", - [6] = "So you think I'm<*", - [7] = "What's it to you if I'm<*", - [8] = "Did you wanna<*", - [9] = "Do you wanna<*", - [10] = "Don't you really<*", - [11] = "Why don't you<*", - [12] = "I bet you can't<*", - [13] = "UMADBRO?", - [14] = "I'm marginally listening.", - [15] = "Let me get this straight, you feel<*", - [16] = "Stop feeling<*", - [17] = "Why would I<*", - [18] = "If your lucky I just might<@", - [19] = "So, your really asking me to<*", - [20] = "Is there a reason why YOU don't<*", - [21] = "Why can't you<*", - [22] = "Why are you interested in whether or not I am<*", - [23] = "Would you prefer if I were not<*", - [24] = "Perhaps in your fantasies I am<*", - [25] = "How do you know you can't<*", - [26] = "Have you tried?", - [27] = "Perhaps you can now<*", - [28] = "Did you come to me because you are<*", - [29] = "How long have you been<*", - [30] = "Do you believe it is normal to be<*", - [31] = "Do you enjoy being<*", - [32] = "We were discussing you, not me.", - [33] = "Oh... <*", - [34] = "Doesn't sound like me though, does it?", - [35] = "How awesome would it be if you got<*", - [36] = "Why do you want<*", - [37] = "Suppose you got<*", - [38] = "What if you never got<*", - [39] = "I sometimes also want<@", - [40] = "Whay are you asking me?", - [41] = "Does it really matter?", - [42] = "Is there a right answer?", - [43] = "What do you think?", - [44] = "You are asking the wrong questions, wanna try again?", - [45] = "What is it that you really want to know?", - [46] = "Who else have you asked?", - [47] = "Am I the first person you have asked this?", - [48] = "Don't you already know the aswer to that?", - [49] = "The names aren't important.", - [50] = "I won't remember any names, do continue.", - [51] = "Is that the real reason?", - [52] = "Don't any other reasons come to mind?", - [53] = "Does that reason explain anything else?", - [54] = "What other reasons might there be?", - [55] = "Please don't apologise!", - [56] = "Apologies are not necessary.", - [57] = "What feelings do you have when you apologise?", - [58] = "Don't be so defensive!", - [59] = "What does that dream suggest to you?", - [60] = "Do you dream often?", - [61] = "What persons appear in your dreams?", - [62] = "Are you disturbed by your dreams?", - [63] = "What?", - [64] = "You don't seem quite certain.", - [65] = "Why the uncertain tone?", - [66] = "Can't you be more positive?", - [67] = "You aren't sure?", - [68] = "Don't you know?", - [69] = "Are you saying no just to be negative?", - [70] = "You are being a bit negative.", - [71] = "Why not?", - [72] = "Are you sure?", - [73] = "Why no?", - [74] = "Why are you concerned about my<*", - [75] = "What about your own<*", - [76] = "Can you think of a specific example?", - [77] = "When?", - [78] = "What are you thinking of?", - [79] = "Really, always?", - [80] = "Think so?", - [81] = "You thought<*", - [82] = "You really think<*", - [83] = "In what way?", - [84] = "What resemblence do you see?", - [85] = "What does the similarity suggest to you?", - [86] = "What other connections do you see?", - [87] = "Could there really be some connection?", - [88] = "How?", - [89] = "You seem quite positive.", - [90] = "ORLY?", - [91] = "OIC.", - [92] = "Word.", - [93] = "You dont have any friends.", - [94] = "Why would I care about your friends?", - [95] = "Are you sure you know what 'friend' means?", - [96] = "Are you sure you have any friends?", - [97] = "Do your friends usually get really quiet when you are around?", - [98] = "I'm willing to bet your friends hate you.", - [99] = "Who still uses the word noob?", - [100] = "Are you talking about me specifically?", - [101] = "I dunno. What are YOU doing?", - [102] = "Would't you like to know?", - [103] = "What do you think?", - [104] = "I'm guessing you want something from me?", - [105] = "I'm playing World of Warcraft... you seriously didn't know that?", - [106] = "No kidding? Fo' realz? That's dope fresh son!", - [107] = "And what did you learn?", - [108] = "Gotcha.", - [109] = "MmmmHmmm", - [110] = "I don't follow...", - [111] = "I'm gonna need a bit more context. Do you know what context means?", - [112] = "Wow... just ...wow.", - [113] = "Same question huh?", - [114] = "Deja Vu!", - [115] = "Yeah, lets try this again shall we?", - [116] = "Have you recently suffered a head injury?", - [117] = "Im hearing an echo I think....", - [118] = "Cant all classes heal themselves now?", - [119] = "Bandages FTW!", - [120] = "Why are you asking me?", - [121] = "Thats adorable how excited you are about it!", - [122] = "What do you think?", - [123] = "What is it that you really want to know?", - [124] = "What is your level?", - [125] = "Is this your first character?", - [126] = "Most guilds are just full of high school kids with nothing better to do.", - [127] = "What is a guild?", - [128] = "What is the name?", - [129] = "Oh really?", - [130] = "Great story.", - [131] = "Meh.", - [132] = "No clue." -}; - -local Responses = { - [1] = {Key = "**NO KEY**", Question = false, Dialog = {106,107,108,109,110,111,112,129,130,131,132}}, - [2] = {Key = "**REPEAT**", Question = false, Dialog = {113,114,115,116,117}}, - [3] = {Key = "YOU'RE", Question = false, Dialog = {6,7,8,9}}, - [4] = {Key = "I DON'T", Question = false, Dialog = {10,11,12,13}}, - [5] = {Key = "I FEEL", Question = false, Dialog = {14,15,16 }}, - [6] = {Key = "WHY DON'T YOU", Question = false, Dialog = {17,18,19}}, - [7] = {Key = "WHY CAN'T I", Question = false, Dialog = {20,21 }}, - [8] = {Key = "ARE YOU", Question = false, Dialog = {22,23,24}}, - [9] = {Key = "I CAN'T", Question = false, Dialog = {25,26,27}}, - [10] = {Key = "I AM", Question = false, Dialog = {28,29,30,31}}, - [11] = {Key = "I'M", Question = false, Dialog = {28,29,30,31}}, - [12] = {Key = "YOU", Question = false, Dialog = {32,33,34}}, - [13] = {Key = "I WANT", Question = false, Dialog = {35,36,37,38,39 }}, - [14] = {Key = "WHAT", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, - [15] = {Key = "HOW", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, - [16] = {Key = "WHO", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, - [17] = {Key = "WHERE", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, - [18] = {Key = "WHEN", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, - [19] = {Key = "WHY", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, - [20] = {Key = "NAME", Question = false, Dialog = {49,50}}, - [21] = {Key = "CAUSE", Question = false, Dialog = {51,52,53,54}}, - [22] = {Key = "SORRY", Question = false, Dialog = {55,56,57,58}}, - [23] = {Key = "DREAM", Question = false, Dialog = {59,60,61,62}}, - [24] = {Key = "HELLO", Question = false, Dialog = {63}}, - [25] = {Key = "HI", Question = false, Dialog = {63}}, - [26] = {Key = "MAYBE", Question = false, Dialog = {64,65,66,67,68}}, - [27] = {Key = "NO", Question = false, Dialog = {69,70,71,72,73}}, - [28] = {Key = "YOUR", Question = false, Dialog = {74,75}}, - [29] = {Key = "ALWAYS", Question = false, Dialog = {76,77,78,79}}, - [30] = {Key = "THINK", Question = false, Dialog = {80,81,82}}, - [31] = {Key = "ALIKE", Question = false, Dialog = {83,84,85,86,87,88,89}}, - [32] = {Key = "YES", Question = false, Dialog = {90,91,92}}, - [33] = {Key = "FRIEND", Question = false, Dialog = {93,94,95,96,97,98}}, - [34] = {Key = "NOOB", Question = false, Dialog = {99}}, - [35] = {Key = "CAN I", Question = false, Dialog = {4,5}}, - [36] = {Key = "CAN YOU", Question = false, Dialog = {1,2,3}}, - [37] = {Key = "WILL YOU", Question = false, Dialog = {1,2,3}}, - [38] = {Key = "WOULD YOU", Question = false, Dialog = {1,2,3}}, - [39] = {Key = "COULD YOU", Question = false, Dialog = {1,2,3}}, - [40] = {Key = "YOU ARE", Question = false, Dialog = {6,7,8,9 }}, - [41] = {Key = "HEALER", Question = false, Dialog = {118,119}}, - [42] = {Key = "HOLY", Question = false, Dialog = {118,119}}, - [43] = {Key = "RESTORATION", Question = false, Dialog = {118,119}}, - [44] = {Key = "HEAL", Question = false, Dialog = {118,119}}, - [45] = {Key = "PORT", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, - [46] = {Key = "PORTAL", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, - [47] = {Key = "WATER", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, - [48] = {Key = "FOOD", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, - [49] = {Key = "MONEY", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, - [50] = {Key = "GOLD", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, - [51] = {Key = "PVP", Question = false, Dialog = {120,121,122,123,124,125}}, - [52] = {Key = "RAID", Question = false, Dialog = {120,121,122,123,124,125}}, - [53] = {Key = "KNOW", Question = false, Dialog = {64,65,66,67,68}}, - [54] = {Key = "POSSIBLE", Question = false, Dialog = {64,65,66,67,68}}, - [55] = {Key = "WTF", Question = false, Dialog = {64,65,66,67,68}}, - [56] = {Key = "LOL", Question = false, Dialog = {64,65,66,67,68}}, - [57] = {Key = "GUILD", Question = false, Dialog = {126,127,128}}, - [58] = {Key = "TOON", Question = false, Dialog = {49,50}}, - [59] = {Key = "CHARACTER", Question = false, Dialog = {49,50}}, - [60] = {Key = "PLAYER", Question = false, Dialog = {49,50}}, - [61] = {Key = "DOING", Question = false, Dialog = {100,101,102,103,104,105}}, - [62] = {Key = "UP TO", Question = false, Dialog = {100,101,102,103,104,105}}, -}; ---[[ -########################################################## -LOCAL FUNCTIONS -########################################################## -]]-- -local function ServiceMessage(msg) - local msgFrom = SV.db[Schema].prefix == true and "Minion Answering Service" or ""; - print("|cffffcc1a" .. msgFrom .. ":|r", msg) -end - -local function ClearResponses(caller) - for x = 1, #ResponseQueue, 1 do - if ResponseQueue[x] then - if ResponseQueue[x].CID == caller then - tremove(ResponseQueue, x) - end - end - end -end - -local function RemoveCaller(caller) - ClearResponses(caller) - - if PhoneLines[caller] then - local data = PhoneLines[caller] - local btn = _G["HenchmenPhoneLine"..data.Line]; - btn.Text:SetText("Empty Phone Line"); - btn:SetPanelColor("default"); - PhoneLines[caller] = nil - ServiceMessage("Caller ("..caller..") was disconnected."); - end -end ---[[ -########################################################## -MESSAGE PROCESSING -########################################################## -]]-- -do - local function Conjugate(parse) - for i,cj in pairs(ConjugationKeys[1]) do - parse = gsub(parse, cj, "#@&"..i) - end - for i,cj in pairs(ConjugationKeys[2]) do - parse = gsub(parse, "#@&"..i, cj) - end - for i,cj in pairs(ConjugationKeys[3]) do - parse = gsub(parse, cj, "#@&"..i) - end - for i,cj in pairs(ConjugationKeys[4]) do - parse = gsub(parse, "#@&"..i, cj) - end - return parse - end - - local function PadString(strng) - aString = " "..strng.." " - for i = 1, 12, 1 do - aString = gsub(aString, punctuations[i].pattern, " "..punctuations[i].value.." ") - end - return " "..aString.." " - end - - local function UnPadString(strng) - aString = strng - aString = gsub(aString, " ", " ") - if sub(aString, 1, 1) == " " then - aString = sub(aString, 2) - end - if sub(aString, -1, -1) == " " then - aString = sub(aString, 1, len(aString)-1) - end - for i = 1, 12, 1 do - aString = gsub(aString, " "..punctuations[i].pattern, punctuations[i].value) - end - return aString - end - - local function TrimString(orgString, unpad) - local tmpChars = ".,!?:;&\"@#()^$+-%= " - local x = 1 - local found = true - - if(unpad) then - orgString = UnPadString(orgString) - end - - while found == true do - local tchar = sub(orgString, -(x), -(x)) - if tchar == "(" or tchar == ")" or tchar == "." or tchar == "%" or tchar == "+" or tchar == "-" or tchar == "*" or tchar == "?" or tchar == "[" or tchar == "]" or tchar == "^" or tchar == "$" then - tchar = "%"..tchar - end - found = find(tchar,tmpChars) and (len(orgString) - x) > 0 - x = x + 1 - end - x = x - 1 - if (len(orgString) - x) > 0 then - orgString = sub(orgString, 1, len(orgString) - x + 1) - end - x = 1 - while find(sub(orgString, x, x),tmpChars) and (len(orgString) - x) > 0 do - x = x + 1 - end - if (len(orgString) - x) > 0 then - orgString = sub(orgString, x) - end - return orgString - end - - local function PhraseSearch(sString, keyid, data) - local thisstr = ""; - local phrase; - local wordkey = Responses[keyid].Key; - local links = Responses[keyid].Dialog; - idrange = #links - if idrange > 1 then - while(not phrase) do - local mod = floor(random(1, idrange)) - if links[mod] ~= data.LastKey then - phrase = Phrases[links[mod]] - data.LastKey = links[mod] - end - end - else - data.LastKey = 1 - end - local tempt = sub(phrase, -1, -1) - local sTemp = "" - if tempt == "*" or tempt == "@" then - sTemp = PadString(sString) - local wTemp = upper(sTemp) - local strpstr = find(wTemp, " "..wordkey.." ") - if not strpstr then - strpstr = find(wTemp, " "..wordkey) - end - if not strpstr then - strpstr = find(wTemp, wordkey.." ") - end - strpstr = strpstr + len(wordkey) + 1 - thisstr = Conjugate(sub(sTemp, strpstr)) - thisstr = TrimString(thisstr, true) - if tempt == "*" then - sTemp = gsub(phrase, "<%*", " "..thisstr.."?") - else - sTemp = gsub(phrase, "<@", " "..thisstr..".") - end - else - sTemp = phrase - end - return sTemp - end - - local function KeywordSearch(wString) - for k, v in gmatch(wString, "([%w']+ [%w']+ [%w']+ [%w']+ [%w']+)") do - for x = 1, 62, 1 do - if Responses[x].Key == k then - return x - end - end - end - for k, v in gmatch(wString, "([%w']+ [%w']+ [%w']+ [%w']+)") do - for x = 1, 62, 1 do - if Responses[x].Key == k then - return x - end - end - end - for k, v in gmatch(wString, "([%w']+ [%w']+ [%w']+)") do - for x = 1, 62, 1 do - if Responses[x].Key == k then - return x - end - end - end - for k, v in gmatch(wString, "([%w']+ [%w']+)") do - for x = 1, 62, 1 do - if Responses[x].Key == k then - return x - end - end - end - for k, v in gmatch(wString, "([%w]-) ") do - for x = 1, 62, 1 do - if Responses[x].Key == k then - return x - end - end - end - return 1 - end - - local function MakeExcuse(sInput) - local joke = random(100) - if(joke <= 31) then - return OneLiners[joke]; - end - local word_list = {} - for k, v in gmatch(sInput, "([%w']+)") do - tinsert(word_list, k) - end - local tBestQuotes = {} - local mxWords = 0 - for x = 11, 101, 1 do - local count = 0 - for y = 1, #word_list, 1 do - if find(Excuse[x], word_list[y]) then - count = count + 1 - end - end - if count > mxWords then - tBestQuotes = {} - mxWords = count - tinsert(tBestQuotes, x) - elseif count == mxWords then - tinsert(tBestQuotes, x) - end - end - - local response = Excuse[random(1,10)] - local mod = random(11,101) - if #tBestQuotes > 0 then - mod = tBestQuotes[random(#tBestQuotes)] - end - response = response .. Excuse[mod] - return response; - end - - local function MessageBuilder(data, inbound) - local sInput = TrimString(inbound); - local outbound; - local mapkey = 1; - if sInput ~= "" and sInput ~= " " and sInput ~= " " and sInput ~= "." and sInput ~= "," then - local wInput = PadString(upper(sInput)); - mapkey = KeywordSearch(wInput); - if Responses[mapkey].Question == true then - if sub(inbound, -1, -1) ~= "?" then - mapkey = 1 - end - end - if(inbound == data.InBound or inbound == data.OutBound) then - mapkey = 2 - elseif mapkey == 1 then - if data.FirstResponse == true then - outbound = ":)"; - else - if(20 >= random(100)) then - outbound = MakeExcuse(sInput) - end - end - end - data.FirstResponse = false - end - if(not outbound) then - outbound = PhraseSearch(sInput, mapkey, data) - end - if(SV.db[Schema].prefix == true) then - return ("%s's Answering Service: %s"):format(PlayersName, outbound) - else - return outbound - end - end - - function PLUGIN:TakeAMessage(caller, inbound) - ClearResponses(caller) - local data = PhoneLines[caller]; - if(data) then - if(data.InUse) then - local data = PhoneLines[caller]; - local outbound = MessageBuilder(data, inbound) - data.OutBound = outbound - local tm = (floor(GetTime()) + ((len(outbound)/400) * 60)); - tinsert(ResponseQueue, {["ETA"] = tm, ["MSG"] = outbound, ["CID"] = caller}) - end - data.InBound = inbound - data.TimeStamp = GetTime() - end - end -end - -function PLUGIN:AddCaller(caller) - local state_text = "now on hold."; - local call_answered = false - PhoneLines[caller] = { - Line = 1, - InUse = false, - FirstResponse = true, - Caller = caller, - InBound = "", - OutBound = "", - LastKey = 1, - TimeStamp = 0 - }; - for x = 1, 5, 1 do - local btn = _G["HenchmenPhoneLine"..x]; - if(btn.Text:GetText() ~= caller) then - btn.Text:SetText(caller); - PhoneLines[caller].Line = x - call_answered = true - if SV.db[Schema].autoAnswer == true then - PhoneLines[caller].InUse = true; - btn:SetPanelColor("green"); - self.Docklet:SetPanelColor("green"); - self.Docklet.stateColor = GREEN_GRADIENT - state_text = "on the line."; - PlaySoundFile("Sound\\interface\\iQuestUpdate.wav") - end - break; - end - end - if(not call_answered) then - ServiceMessage("All lines are busy. New caller ("..caller..") was disconnected.") - else - ServiceMessage("New caller ("..caller..") is "..state_text) - end -end - -function PLUGIN:GetServiceState() - local inUse = false - local onHold = false - for x = 1, 5, 1 do - local btn = _G["HenchmenPhoneLine"..x]; - local caller = btn.Text:GetText() - if(PhoneLines[caller]) then - inUse = true - if(not PhoneLines[caller].InUse) then - onHold = true - end - end - end - - if inUse then - if onHold then - self.Docklet:SetPanelColor("yellow") - self.Docklet.icon:SetGradient(unpack(YELLOW_GRADIENT)) - self.Docklet.stateColor = YELLOW_GRADIENT - else - self.Docklet:SetPanelColor("green") - self.Docklet.icon:SetGradient(unpack(GREEN_GRADIENT)) - self.Docklet.stateColor = GREEN_GRADIENT - end - else - self.Docklet:SetPanelColor("default") - self.Docklet.stateColor = DEFAULT_GRADIENT - end - return inUse,onHold -end - -function PLUGIN:HangUp(caller,ignored) - RemoveCaller(caller) - local inUse,onHold = self:GetServiceState() - - if inUse == false then - self.Window:Hide() - elseif onHold == true then - self.Window:Show() - else - self.Window:Show() - end - - if(ignored) then - ServiceMessage(caller.." is now ignoring you! MwaaHaHa!") - PlaySoundFile("Sound\\interface\\RaidWarning.wav") - end -end ---[[ -########################################################## EVENTS ########################################################## ]]-- -function PLUGIN:PhoneTimeUpdate() - local timer = 300; - local ttime = GetTime() - if #ResponseQueue > 0 then - for x = 1, #ResponseQueue, 1 do - if ResponseQueue[x] then - if ResponseQueue[x].ETA < ttime then - SendChatMessage(ResponseQueue[x].MSG, "WHISPER", nil, ResponseQueue[x].CID) - tremove(ResponseQueue, x) - end - end - end - end - if ttime > timer then - for x = 1, 5, 1 do - local btn = _G["HenchmenPhoneLine"..x]; - local caller = btn.Text:GetText() - if(PhoneLines[caller]) then - if PhoneLines[caller].TimeStamp < (ttime - timer) then - self:HangUp(caller) - end - end - end - end -end - -function PLUGIN:CHAT_MSG_IGNORED(event, inbound_message, caller, ...) - if(PhoneLines[caller] and PhoneLines[caller].InUse) then - self:HangUp(caller,true) +function PLUGIN:CHAT_MSG_WHISPER(event, ...) + if(SV.db.SVChat.enable and SV.db[Schema].saveChats) then + self:SAVE_CHAT_HISTORY(event, ...) end -end - -function PLUGIN:CHAT_MSG_WHISPER(event, inbound_message, caller) - if not UnitIsAFK("player") and not UnitIsDND("player") then - if (not PhoneLines[caller]) then - self:AddCaller(caller) - end - self:TakeAMessage(caller, inbound_message) + if(SV.db[Schema].service) then + self:AUTO_MSG_WHISPER(event, ...) end end -function PLUGIN:CHAT_MSG_BN_WHISPER(event, inbound_message, sender, _, _, _, _, _, _, _, _, _, _, presenceID) - if(not presenceID) then return end - if not UnitIsAFK("player") and not UnitIsDND("player") then - local _, bnToon = BNGetToonInfo(presenceID); - local caller = bnToon or sender; - if (not PhoneLines[caller]) then - self:AddCaller(caller) - end - self:TakeAMessage(caller, inbound_message) - end -end ---[[ -########################################################## -OTHER HANDLERS -########################################################## -]]-- -local AnsweringOnClick = function() - if(not PLUGIN.Window) then return end - if(PLUGIN.Window:IsShown()) then - PLUGIN.Window:Hide() - else - PLUGIN.Window:Show() +function PLUGIN:CHAT_MSG_BN_WHISPER(event, ...) + if(SV.db.SVChat.enable and SV.db[Schema].saveChats) then + self:SAVE_CHAT_HISTORY(event, ...) end -end - -local PhoneLineClick = function(self, button) - local caller = self.Text:GetText() - if((caller == "Empty Phone Line") or not PhoneLines[caller]) then return; end - if button == "LeftButton" then - if(not PhoneLines[caller].InUse) then - self:SetPanelColor("green"); - PhoneLines[caller].InUse = true - ServiceMessage("Let the torment of "..caller.." begin!") - PLUGIN:TakeAMessage(caller, PhoneLines[caller].InBound) - else - self:SetPanelColor("yellow"); - PhoneLines[caller].InUse = false - ServiceMessage(caller.." is now on hold") - end - elseif button == "RightButton" then - PLUGIN:HangUp(caller) + if(SV.db[Schema].service) then + self:AUTO_MSG_BN_WHISPER(event, ...) end - PLUGIN:GetServiceState() end --[[ ########################################################## @@ -885,85 +57,17 @@ LOAD AND CONSTRUCT ########################################################## ]]-- function PLUGIN:Load() + if not ChatOMatic_Cache then ChatOMatic_Cache = {} end if(not SV.db[Schema].enable) then return end - - SV.db[Schema] = SV.db[Schema] - - self:RegisterEvent("CHAT_MSG_WHISPER") - self:RegisterEvent("CHAT_MSG_BN_WHISPER") - self:RegisterEvent("CHAT_MSG_IGNORED") - self:RegisterUpdate("PhoneTimeUpdate", 4) - - local buttonsize = SuperDockToolBarLeft.currentSize - - local docklet = CreateFrame("Button", nil, UIParent) - docklet:SetParent(SuperDockToolBarLeft) - docklet:Point("LEFT", SuperDockToolBarLeft, "LEFT", 3, 0) - docklet:Size(buttonsize, buttonsize) - docklet:SetFramedButtonTemplate() - docklet.icon = docklet:CreateTexture(nil, "OVERLAY") - docklet.icon:FillInner(docklet,2,2) - docklet.icon:SetTexture(ICON_FILE) - docklet.stateColor = {"VERTICAL", 0.33, 0.25, 0.13, 0.47, 0.39, 0.27} - docklet.TText = L["Show / Hide Phone Lines"] - docklet:RegisterForClicks("AnyUp") - - SV.SVDock:ActivateDockletButton(docklet, AnsweringOnClick) - - SuperDockToolBarLeft:SetWidth(buttonsize + 4) - - self.Docklet = docklet - local window = CreateFrame("Frame", nil, UIParent) - window:SetFrameStrata("MEDIUM") - window:SetWidth(128) - window:SetHeight(145) - window:SetScript("OnDragStart", function(this) this:StartMoving() end) - window:SetScript("OnDragStop", function(this) this:StopMovingOrSizing() end) - window:SetPoint("BOTTOMRIGHT", LeftSuperDock, "TOPRIGHT", 0, 6) - window:SetFixedPanelTemplate("Transparent") - window:SetMovable(true) - window:EnableMouse(true) - window:SetClampedToScreen(true) - window:RegisterForDrag("LeftButton") - - local title = window:CreateFontString("HenchmenOperatorText") - title:SetWidth(128) - title:SetHeight(50) - title:SetFontObject(GameFontNormal) - title:SetTextColor(0.5, 0.5, 1, 1) - title:SetJustifyH("CENTER") - title:SetJustifyV("TOP") - title:SetPoint("TOP", window, "TOP", 0, -2) - title:SetText("Henchman Answering Service") - - for x = 1, 5, 1 do - local phLn = CreateFrame("Button", "HenchmenPhoneLine"..x, window) - phLn:SetWidth(124) - phLn:SetHeight(20) - phLn:SetPoint("TOPLEFT", window, "TOPLEFT", 2, ((-16) - (x * 21))) - phLn:RegisterForClicks("AnyUp") - phLn:SetScript("OnClick", PhoneLineClick) - phLn:SetFixedPanelTemplate("Button") - phLn.Text = phLn:CreateFontString() - phLn.Text:SetWidth(124) - phLn.Text:SetHeight(20) - phLn.Text:SetFontObject(GameFontNormalSmall) - phLn.Text:SetTextColor(1, 1, 1, 1) - phLn.Text:SetJustifyH("CENTER") - phLn.Text:SetJustifyV("MIDDLE") - phLn.Text:SetPoint("TOP", "HenchmenPhoneLine"..x, "TOP") - phLn.Text:SetText("Empty Phone Line") + if(SV.db.SVChat.enable and SV.db[Schema].saveChats) then + self:EnableChatHistory() end - - self.Window = window - self.Window:Hide() - local strMsg - if SV.db[Schema].autoAnswer == true then - strMsg = "The Henchmen Operators Are Screening Your Calls.." - else - strMsg = "The Henchmen Operators Are Standing By.." + if(SV.db[Schema].service) then + self:EnableAnsweringService() end - SV:AddonMessage(strMsg) + + self:RegisterEvent("CHAT_MSG_WHISPER") + self:RegisterEvent("CHAT_MSG_BN_WHISPER") end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc index b0f87ae..b061970 100644 --- a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc +++ b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc @@ -2,7 +2,9 @@ ## Author: Munglunch ## Version: 4.8 ## Title: |cffFF9900SVUI |r|cffFFEF00Chat-O-Matic|r -## Notes: Supervillain UI [|cff9911FFAuto-Chat Gadgets|r] +## Notes: Supervillain UI [|cff9911FFVarious Chat Gadgets|r] +## SavedVariables: ChatOMatic_Data +## SavedVariablesPerCharacter: ChatOMatic_Cache ## RequiredDeps: SVUI ## LoadOnDemand: 1 ## X-Email: munglunch@gmail.com diff --git a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.xml b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.xml index 24ce5a6..18a0238 100644 --- a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.xml +++ b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.xml @@ -1,4 +1,5 @@