Work on Ascension Backport

This commit is contained in:
andrew6180
2024-05-17 15:08:08 -07:00
parent 5de2a04b8c
commit bb7e0d2c27
325 changed files with 26995 additions and 41741 deletions
-43
View File
@@ -1,43 +0,0 @@
---
name: Bug report
about: Create a bug report
title: ''
labels: ''
assignees: ''
---
### **Before Start!**
**Make sure the bug also happen when Details! is the only addon enabled.**
**Game and Details! version**
Use /details to grab these two.
**Describe the bug**
- Steps to Reproduce (what did you do to make the bug happen):
- Result (what happens when you follow the steps above):
- Expected (what you think the expected behavior would be when following the steps):
- When the bug started (a date, wow path release, details update, etc)?
- Additional information:
**Lua Error**
Post here lua errors, if you aren't getting any, use */console scriptErrors 1*
**Screenshots**
Post images of the bug if necessary.
**Combat Log**
Include a link to a combatlog file if the error is about not detecting a skill, usable item or item proc.
The log can be as simple as hitting a mob with white damage and using the item/skill.
**Other Information**
If necessary, add more info here.
+77
View File
@@ -0,0 +1,77 @@
name: "Bug Report"
description: Create a report to help us improve this addon
labels: '🐛 Bug'
body:
- type: markdown
attributes:
value: |
Please search for existing issues before creating a new one.
- type: textarea
attributes:
label: Description
description: What did you expect to happen and what happened instead?
validations:
required: true
- type: dropdown
id: flavor
attributes:
label: Realm
description: What realm did this occur on?
options:
- Area 52 (Default)
- Seasonal
- Grizzly Hills
- Rexxar
- Other
validations:
required: true
- type: checkboxes
id: testing
attributes:
label: Tested with only this addon
description: Did you try having just this addon as the only enabled addon and everything else disabled?
options:
- label: "Yes"
- label: "No"
validations:
required: true
- type: textarea
attributes:
label: Lua Error
description: |
Do you have an error log of what happened? If you don't see any errors, make sure that error reporting is enabled (`/console scriptErrors 1`)
validations:
required: false
- type: textarea
attributes:
label: Reproduction Steps
description: Please list out the steps to reproduce your bug.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: input
attributes:
label: Last Good Version
description: |
Was it working in a previous version? If yes, which update did it stop working? If you don't know, when was the last date you were aware it was working
placeholder: "MM/DD/YYYY"
validations:
required: false
- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
placeholder: Click here to attach your screenshots via the editor button in the top right.
validations:
required: false
+1
View File
@@ -0,0 +1 @@
blank_issues_enabled: false
+20
View File
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
+28
View File
@@ -0,0 +1,28 @@
# Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
<!-- A #issueNumber will be sufficient. -->
Fixes #(issue)
## Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
## How Has This Been Tested
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [ ] Test A
- [ ] Test B
## Checklist
<!-- These can be checked off after the pull request is submitted, in case you want discussion before they are completely ready -->
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
<!-- Is there any additional work that needs to be done? If so, add it to the above list -->
-35
View File
@@ -1,35 +0,0 @@
name: Release AddOn
#on: [push]
on:
push:
branches:
- master
tags:
- '**'
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }}
jobs:
# full_package_release:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - uses: BigWigsMods/packager@v2
standalone_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: BigWigsMods/packager@v2
with:
pkgmeta: package_sa.pkgmeta
args: -a qv63A7Gb
-67
View File
@@ -1,67 +0,0 @@
images/NoDetails/
otherplugins/
Blizzard_APIDocumentationGenerated/
.tmp.driveupload/
core/parser - FF.lua
core/parser_original.lua
core/windows - Copy.lua
functions/savedata - Copy.lua
*.psd
Libs/DF/all_addons.blp
Libs/DF/all_addons.tga
Libs/DF/background.blp
Libs/DF/border_1.blp
Libs/DF/border_2.blp
Libs/DF/border_3.blp
Libs/DF/cooltip_background.blp
Libs/DF/feedback_sites.blp
Libs/DF/icons.blp
Libs/DF/mail.blp
plugins/Details_EncounterDetails/images/boss_icons.png
locales/Details-zhTW.lua
locales/Details-zhCN.lua
locales/Details-ruRU.lua
locales/Details-ptBR.lua
locales/Details-koKR.lua
locales/Details-itIT.lua
locales/Details-frFR.lua
locales/Details-esMX.lua
locales/Details-esES.lua
locales/Details-enUS.lua
locales/Details-deDE.lua
Libs/LibTranslit/.pkgmeta
a.lua
functions/pack2.lua
*.json
*.afphoto
wowapi.lua
plugins/Details_TinyThreat/Details_TinyThreat_original.lua
Descriptions.lua
plugins/Details_EncounterDetails/.github/workflows/release.yml
plugins/Details_RaidCheck/.github/workflows/release.yml
plugins/Details_Streamer/.github/workflows/release.yml
plugins/Details_TinyThreat/.github/workflows/release.yml
plugins/Details_Vanguard/.github/workflows/release.yml
photoshop/ten_years_skin.tga
*.yml
plugins/Details_EncounterDetails/Libs/LibLuaServer/LuaServerDefinitions.lua
plugins/Details_EncounterDetails/Definitions.lua
*.afphoto~lock~
annotations.txt
plugins/Details_Compare2/Definitions.lua
plugins/Details_Compare2/DF/
plugins/Details_Compare2/LibLuaServer/
images/castlog_image.png
images/castlog_image2.png
images/castlog_image3.png
images/castlog_raidcooldowns.png
images/chartviewer.png
images/getalpha_version.png
images/icons2.png
images/myself.png
images/package_addons.png
images/patreon_stuff.png
images/plater_darktheme_skin.png
images/Tutorial/DetailsMainWindow.png
Details.cpp
images/DETAILS_NEWS.png
-10
View File
@@ -1,10 +0,0 @@
package-as: Details
move-folders:
Details/plugins/Details_EncounterDetails: Details_EncounterDetails
Details/plugins/Details_TinyThreat: Details_TinyThreat
Details/plugins/Details_Vanguard: Details_Vanguard
Details/plugins/Details_DataStorage: Details_DataStorage
Details/plugins/Details_RaidCheck: Details_RaidCheck
Details/plugins/Details_Streamer: Details_Streamer
Details/plugins/Details_Compare2: Details_Compare2
+8
View File
@@ -0,0 +1,8 @@
# Details! Damage Meter
## [Details.20240508.12717.156](https://github.com/Tercioo/Details-Damage-Meter/tree/Details.20240508.12717.156) (2024-05-08)
[Full Changelog](https://github.com/Tercioo/Details-Damage-Meter/compare/Details.20240407.12708.156...Details.20240508.12717.156)
- Version Bump
- Fixed an error when manually selection the tooltip anchor position
- Plugins toc Update
-1
View File
@@ -437,7 +437,6 @@
---@field damage_taken number amount of damage the actor took during the segment
---@field damage_from table<actorname, boolean> store the name of the actors which damaged the actor, format: [actorName] = true
---@field totalabsorbed number amount of damage dealt by the actor by got absorbed by the target, this is a "ABSORB" type of miss but still counts as damage done
---@field augmentedSpellsContainer spellcontainer
---@class actorheal : actor
---@field healing_taken number amount of healing the actor took during the segment
+1 -4
View File
@@ -1,12 +1,11 @@
## Interface: 100207
## Interface-Cata: 40400
## Title: Details! Damage Meter
## Notes: Essential tool to impress that chick in your raid.
## Notes-ruRU: Незаменимый инструмент, чтобы произвести впечатление на цыпочку в вашем рейде.
## SavedVariables: _detalhes_global, __details_backup, __details_debug
## SavedVariablesPerCharacter: _detalhes_database
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibWindow-1.1, LibDBIcon-1.0, NickTag-1.0, LibDataBroker-1.1, LibGraph-2.0
## Version: #@project-version@
## Version: #Details.20240508.12717.156
## IconTexture: Interface\AddOns\Details\images\minimap
## X-Curse-Project-ID: 61284
@@ -66,7 +65,6 @@ functions\pack.lua
functions\immersion.lua
functions\schedules.lua
functions\autorun.lua
functions\deathrecap.lua
functions\plater.lua
functions\deathmenu.lua
functions\macros.lua
@@ -165,7 +163,6 @@ core\network.lua
core\parser.lua
functions\spec_augmentation.lua
functions\loaddata.lua
startup.lua
-172
View File
@@ -1,172 +0,0 @@
## Interface: 40400
## Title: Details! Damage Meter
## Notes: Essential tool to impress that chick in your raid.
## Notes-ruRU: Незаменимый инструмент, чтобы произвести впечатление на цыпочку в вашем рейде.
## SavedVariables: _detalhes_global, __details_backup, __details_debug
## SavedVariablesPerCharacter: _detalhes_database
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibWindow-1.1, LibDBIcon-1.0, NickTag-1.0, LibDataBroker-1.1, LibGraph-2.0
## Version: #@project-version@
## IconTexture: Interface\AddOns\Details\images\minimap
## X-Curse-Project-ID: 61284
## X-Wago-ID: 25NRDlK3
#@no-lib-strip@
Libs\libs.xml
#@end-no-lib-strip@
locales\Details-enUS.lua
locales\Details-deDE.lua
locales\Details-esES.lua
locales\Details-esMX.lua
locales\Details-frFR.lua
locales\Details-itIT.lua
locales\Details-koKR.lua
locales\Details-ptBR.lua
locales\Details-ruRU.lua
locales\Details-zhCN.lua
locales\Details-zhTW.lua
Definitions.lua
boot.lua
indent.lua
core\util.lua
functions\mixin.lua
API.lua
textures.lua
functions\ej_cache.lua
functions\events.lua
functions\private.lua
functions\profiles.lua
functions\hooks.lua
functions\bossmods.lua
functions\coach.lua
functions\skins.lua
functions\boss.lua
functions\spells.lua
functions\classes.lua
functions\buff.lua
functions\spellcache.lua
functions\attributes.lua
functions\savedata.lua
functions\slash.lua
functions\playerclass.lua
functions\timedata.lua
functions\currentdps.lua
functions\report.lua
functions\rowanimation.lua
functions\raidinfo.lua
functions\mythicdungeon\mythicdungeon.lua
functions\mythicdungeon\data_capture.lua
functions\mythicdungeon\segments.lua
functions\pack.lua
functions\immersion.lua
functions\schedules.lua
functions\autorun.lua
functions\deathrecap.lua
functions\plater.lua
functions\deathmenu.lua
functions\macros.lua
functions\testbars.lua
functions\editmode.lua
functions\warcraftlogs.lua
functions\textures.lua
functions\journal.lua
core\aura_scan.lua
core\timemachine.lua
frames\anime.lua
frames\anime.xml
frames\fw_mods.lua
frames\toolbar_button.xml
frames\window_copy.lua
frames\window_options2.lua
frames\window_options2_sections.lua
frames\window_api.lua
frames\window_cdtracker.lua
frames\window_breakdown\window_playerbreakdown.lua
frames\window_breakdown\window_playerbreakdown_list.lua
frames\window_breakdown\window_playerbreakdown_compare.lua
frames\window_breakdown\window_playerbreakdown_avoidance.lua
frames\window_breakdown\window_playerbreakdown_auras.lua
frames\window_breakdown\window_playerbreakdown_spells.lua
frames\window_breakdown\window_playerbreakdown_spells_options.lua
frames\window_breakdown\breakdown_spells_genericframes.lua
frames\window_breakdown\breakdown_spells_spellframes.lua
frames\window_breakdown\breakdown_spells_targetframes.lua
frames\window_breakdown\breakdown_spells_phaseframes.lua
frames\window_mythicplus\window_mythic_breakdown.lua
frames\window_mythicplus\window_end_of_run.lua
frames\window_mythicplus\window_chart.lua
frames\window_report.lua
frames\window_main.lua
frames\window_custom.lua
frames\window_welcome.lua
frames\window_news.lua
frames\window_wa.lua
frames\window_forge.lua
frames\window_spellcategory.lua
frames\window_switch.lua
frames\window_scrolldamage.lua
frames\window_dump.lua
frames\window_eventtracker.lua
frames\window_currentdps.lua
frames\window_benchmark.lua
frames\window_runcode.lua
frames\window_plater.lua
frames\window_macros.lua
frames\window_profiler.lua
frames\window_rowtexteditor.lua
frames\window_brokertexteditor.lua
frames\window_bookmark.lua
frames\window_classcolor.lua
frames\window_statistics.lua
frames\window_aura_tracker.lua
classes\class_error.lua
classes\class_spelltable.lua
classes\class_combat.lua
classes\class_damage.lua
classes\class_spelldamage.lua
classes\class_heal.lua
classes\class_spellhealing.lua
classes\class_resources.lua
classes\class_spellresources.lua
classes\class_utility.lua
classes\class_spellutility.lua
classes\include_instance.lua
classes\class_instance.lua
classes\class_custom.lua
classes\custom_damagedone.lua
classes\custom_healingdone.lua
core\control.lua
classes\container_actors.lua
classes\container_spells.lua
classes\container_segments.lua
classes\container_pets.lua
core\plugins.lua
core\plugins_toolbar.lua
core\plugins_statusbar.lua
core\plugins_raid.lua
core\plugins_solo.lua
core\gears.lua
core\windows.lua
core\meta.lua
core\network.lua
core\parser.lua
functions\spec_augmentation.lua
functions\loaddata.lua
startup.lua
functions\api2.lua
-167
View File
@@ -1,167 +0,0 @@
## Interface: 11502
## Title: Details! Damage Meter
## Notes: Essential tool to impress that chick in your raid.
## Notes-ruRU: Незаменимый инструмент, чтобы произвести впечатление на цыпочку в вашем рейде.
## SavedVariables: _detalhes_global, __details_backup
## SavedVariablesPerCharacter: _detalhes_database
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibWindow-1.1, LibDBIcon-1.0, NickTag-1.0, LibDataBroker-1.1, LibItemUpgradeInfo-1.0, LibGroupInSpecT-1.1, LibGraph-2.0
## Version: #@project-version@
## IconTexture: Interface\AddOns\Details\images\minimap
#@no-lib-strip@
Libs\libs.xml
#@end-no-lib-strip@
locales\Details-enUS.lua
locales\Details-deDE.lua
locales\Details-esES.lua
locales\Details-esMX.lua
locales\Details-frFR.lua
locales\Details-itIT.lua
locales\Details-koKR.lua
locales\Details-ptBR.lua
locales\Details-ruRU.lua
locales\Details-zhCN.lua
locales\Details-zhTW.lua
Definitions.lua
boot.lua
indent.lua
core\util.lua
functions\mixin.lua
API.lua
textures.lua
functions\ej_cache.lua
functions\private.lua
functions\profiles.lua
functions\hooks.lua
functions\bossmods.lua
functions\coach.lua
functions\skins.lua
functions\boss.lua
functions\spells.lua
functions\events.lua
functions\classes.lua
functions\buff.lua
functions\spellcache.lua
functions\attributes.lua
functions\savedata.lua
functions\slash.lua
functions\playerclass.lua
functions\timedata.lua
functions\currentdps.lua
functions\report.lua
functions\rowanimation.lua
functions\raidinfo.lua
functions\mythicdungeon\mythicdungeon.lua
functions\mythicdungeon\data_capture.lua
functions\mythicdungeon\segments.lua
functions\pack.lua
functions\immersion.lua
functions\schedules.lua
functions\autorun.lua
functions\deathrecap.lua
functions\plater.lua
functions\deathmenu.lua
functions\macros.lua
functions\testbars.lua
functions\warcraftlogs.lua
functions\textures.lua
core\aura_scan.lua
core\timemachine.lua
frames\anime.lua
frames\anime.xml
frames\fw_mods.lua
frames\toolbar_button.xml
frames\window_copy.lua
frames\window_options2.lua
frames\window_options2_sections.lua
frames\window_api.lua
frames\window_cdtracker.lua
frames\window_breakdown\window_playerbreakdown.lua
frames\window_breakdown\window_playerbreakdown_list.lua
frames\window_breakdown\window_playerbreakdown_compare.lua
frames\window_breakdown\window_playerbreakdown_avoidance.lua
frames\window_breakdown\window_playerbreakdown_auras.lua
frames\window_breakdown\window_playerbreakdown_spells.lua
frames\window_breakdown\window_playerbreakdown_spells_options.lua
frames\window_breakdown\breakdown_spells_genericframes.lua
frames\window_breakdown\breakdown_spells_spellframes.lua
frames\window_breakdown\breakdown_spells_targetframes.lua
frames\window_breakdown\breakdown_spells_phaseframes.lua
frames\window_mythicplus\window_mythic_breakdown.lua
frames\window_mythicplus\window_end_of_run.lua
frames\window_mythicplus\window_chart.lua
frames\window_report.lua
frames\window_main.lua
frames\window_custom.lua
frames\window_welcome.lua
frames\window_news.lua
frames\window_wa.lua
frames\window_spellcategory.lua
frames\window_forge.lua
frames\window_switch.lua
frames\window_scrolldamage.lua
frames\window_dump.lua
frames\window_eventtracker.lua
frames\window_currentdps.lua
frames\window_benchmark.lua
frames\window_runcode.lua
frames\window_plater.lua
frames\window_macros.lua
frames\window_profiler.lua
frames\window_rowtexteditor.lua
frames\window_brokertexteditor.lua
frames\window_bookmark.lua
frames\window_classcolor.lua
frames\window_statistics.lua
classes\class_error.lua
classes\class_spelltable.lua
classes\class_combat.lua
classes\class_damage.lua
classes\class_spelldamage.lua
classes\class_heal.lua
classes\class_spellhealing.lua
classes\class_resources.lua
classes\class_spellresources.lua
classes\class_utility.lua
classes\class_spellutility.lua
classes\include_instance.lua
classes\class_instance.lua
classes\class_custom.lua
classes\custom_damagedone.lua
classes\custom_healingdone.lua
core\control.lua
classes\container_actors.lua
classes\container_spells.lua
classes\container_segments.lua
classes\container_pets.lua
core\plugins.lua
core\plugins_toolbar.lua
core\plugins_statusbar.lua
core\plugins_raid.lua
core\plugins_solo.lua
core\gears.lua
core\windows.lua
core\meta.lua
core\network.lua
core\parser.lua
#core\parser_timewalk.lua
functions\spec_augmentation.lua
functions\loaddata.lua
startup.lua
functions\api2.lua
-167
View File
@@ -1,167 +0,0 @@
## Interface: 30403
## Title: Details! Damage Meter
## Notes: Essential tool to impress that chick in your raid.
## Notes-ruRU: Незаменимый инструмент, чтобы произвести впечатление на цыпочку в вашем рейде.
## SavedVariables: _detalhes_global, __details_backup
## SavedVariablesPerCharacter: _detalhes_database
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibWindow-1.1, LibDBIcon-1.0, NickTag-1.0, LibDataBroker-1.1, LibItemUpgradeInfo-1.0, LibGroupInSpecT-1.1, LibGraph-2.0
## Version: #@project-version@
## IconTexture: Interface\AddOns\Details\images\minimap
#@no-lib-strip@
Libs\libs.xml
#@end-no-lib-strip@
locales\Details-enUS.lua
locales\Details-deDE.lua
locales\Details-esES.lua
locales\Details-esMX.lua
locales\Details-frFR.lua
locales\Details-itIT.lua
locales\Details-koKR.lua
locales\Details-ptBR.lua
locales\Details-ruRU.lua
locales\Details-zhCN.lua
locales\Details-zhTW.lua
Definitions.lua
boot.lua
indent.lua
core\util.lua
functions\mixin.lua
API.lua
textures.lua
functions\ej_cache.lua
functions\private.lua
functions\profiles.lua
functions\hooks.lua
functions\bossmods.lua
functions\coach.lua
functions\skins.lua
functions\boss.lua
functions\spells.lua
functions\events.lua
functions\classes.lua
functions\buff.lua
functions\spellcache.lua
functions\attributes.lua
functions\savedata.lua
functions\slash.lua
functions\playerclass.lua
functions\timedata.lua
functions\currentdps.lua
functions\report.lua
functions\rowanimation.lua
functions\raidinfo.lua
functions\mythicdungeon\mythicdungeon.lua
functions\mythicdungeon\data_capture.lua
functions\mythicdungeon\segments.lua
functions\pack.lua
functions\immersion.lua
functions\schedules.lua
functions\autorun.lua
functions\deathrecap.lua
functions\plater.lua
functions\deathmenu.lua
functions\macros.lua
functions\testbars.lua
functions\warcraftlogs.lua
functions\textures.lua
core\aura_scan.lua
core\timemachine.lua
frames\anime.lua
frames\anime.xml
frames\fw_mods.lua
frames\toolbar_button.xml
frames\window_copy.lua
frames\window_options2.lua
frames\window_options2_sections.lua
frames\window_api.lua
frames\window_cdtracker.lua
frames\window_breakdown\window_playerbreakdown.lua
frames\window_breakdown\window_playerbreakdown_list.lua
frames\window_breakdown\window_playerbreakdown_compare.lua
frames\window_breakdown\window_playerbreakdown_avoidance.lua
frames\window_breakdown\window_playerbreakdown_auras.lua
frames\window_breakdown\window_playerbreakdown_spells.lua
frames\window_breakdown\window_playerbreakdown_spells_options.lua
frames\window_breakdown\breakdown_spells_genericframes.lua
frames\window_breakdown\breakdown_spells_spellframes.lua
frames\window_breakdown\breakdown_spells_targetframes.lua
frames\window_breakdown\breakdown_spells_phaseframes.lua
frames\window_mythicplus\window_mythic_breakdown.lua
frames\window_mythicplus\window_end_of_run.lua
frames\window_mythicplus\window_chart.lua
frames\window_report.lua
frames\window_main.lua
frames\window_custom.lua
frames\window_welcome.lua
frames\window_news.lua
frames\window_wa.lua
frames\window_spellcategory.lua
frames\window_forge.lua
frames\window_switch.lua
frames\window_scrolldamage.lua
frames\window_dump.lua
frames\window_eventtracker.lua
frames\window_currentdps.lua
frames\window_benchmark.lua
frames\window_runcode.lua
frames\window_plater.lua
frames\window_macros.lua
frames\window_profiler.lua
frames\window_rowtexteditor.lua
frames\window_brokertexteditor.lua
frames\window_bookmark.lua
frames\window_classcolor.lua
frames\window_statistics.lua
classes\class_error.lua
classes\class_spelltable.lua
classes\class_combat.lua
classes\class_damage.lua
classes\class_spelldamage.lua
classes\class_heal.lua
classes\class_spellhealing.lua
classes\class_resources.lua
classes\class_spellresources.lua
classes\class_utility.lua
classes\class_spellutility.lua
classes\include_instance.lua
classes\class_instance.lua
classes\class_custom.lua
classes\custom_damagedone.lua
classes\custom_healingdone.lua
core\control.lua
classes\container_actors.lua
classes\container_spells.lua
classes\container_segments.lua
classes\container_pets.lua
core\plugins.lua
core\plugins_toolbar.lua
core\plugins_statusbar.lua
core\plugins_raid.lua
core\plugins_solo.lua
core\gears.lua
core\windows.lua
core\meta.lua
core\network.lua
core\parser.lua
#core\parser_timewalk.lua
functions\spec_augmentation.lua
functions\loaddata.lua
startup.lua
functions\api2.lua
-649
View File
@@ -1,649 +0,0 @@
--- **AceAddon-3.0** provides a template for creating addon objects.
-- It'll provide you with a set of callback functions that allow you to simplify the loading
-- process of your addon.\\
-- Callbacks provided are:\\
-- * **OnInitialize**, which is called directly after the addon is fully loaded.
-- * **OnEnable** which gets called during the PLAYER_LOGIN event, when most of the data provided by the game is already present.
-- * **OnDisable**, which is only called when your addon is manually being disabled.
-- @usage
-- -- A small (but complete) addon, that doesn't do anything,
-- -- but shows usage of the callbacks.
-- local MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
--
-- function MyAddon:OnInitialize()
-- -- do init tasks here, like loading the Saved Variables,
-- -- or setting up slash commands.
-- end
--
-- function MyAddon:OnEnable()
-- -- Do more initialization here, that really enables the use of your addon.
-- -- Register Events, Hook functions, Create Frames, Get information from
-- -- the game that wasn't available in OnInitialize
-- end
--
-- function MyAddon:OnDisable()
-- -- Unhook, Unregister Events, Hide frames that you created.
-- -- You would probably only use an OnDisable if you want to
-- -- build a "standby" mode, or be able to toggle modules on/off.
-- end
-- @class file
-- @name AceAddon-3.0.lua
-- @release $Id: AceAddon-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
local MAJOR, MINOR = "AceAddon-3.0", 13
local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not AceAddon then return end -- No Upgrade needed.
AceAddon.frame = AceAddon.frame or CreateFrame("Frame", "AceAddon30Frame") -- Our very own frame
AceAddon.addons = AceAddon.addons or {} -- addons in general
AceAddon.statuses = AceAddon.statuses or {} -- statuses of addon.
AceAddon.initializequeue = AceAddon.initializequeue or {} -- addons that are new and not initialized
AceAddon.enablequeue = AceAddon.enablequeue or {} -- addons that are initialized and waiting to be enabled
AceAddon.embeds = AceAddon.embeds or setmetatable({}, {__index = function(tbl, key) tbl[key] = {} return tbl[key] end }) -- contains a list of libraries embedded in an addon
-- Lua APIs
local tinsert, tconcat, tremove = table.insert, table.concat, table.remove
local fmt, tostring = string.format, tostring
local select, pairs, next, type, unpack = select, pairs, next, type, unpack
local loadstring, assert, error = loadstring, assert, error
local setmetatable, getmetatable, rawset, rawget = setmetatable, getmetatable, rawset, rawget
--[[
xpcall safecall implementation
]]
local xpcall = xpcall
local function errorhandler(err)
return geterrorhandler()(err)
end
local function safecall(func, ...)
-- we check to see if the func is passed is actually a function here and don't error when it isn't
-- this safecall is used for optional functions like OnInitialize OnEnable etc. When they are not
-- present execution should continue without hinderance
if type(func) == "function" then
return xpcall(func, errorhandler, ...)
end
end
-- local functions that will be implemented further down
local Enable, Disable, EnableModule, DisableModule, Embed, NewModule, GetModule, GetName, SetDefaultModuleState, SetDefaultModuleLibraries, SetEnabledState, SetDefaultModulePrototype
-- used in the addon metatable
local function addontostring( self ) return self.name end
-- Check if the addon is queued for initialization
local function queuedForInitialization(addon)
for i = 1, #AceAddon.initializequeue do
if AceAddon.initializequeue[i] == addon then
return true
end
end
return false
end
--- Create a new AceAddon-3.0 addon.
-- Any libraries you specified will be embeded, and the addon will be scheduled for
-- its OnInitialize and OnEnable callbacks.
-- The final addon object, with all libraries embeded, will be returned.
-- @paramsig [object ,]name[, lib, ...]
-- @param object Table to use as a base for the addon (optional)
-- @param name Name of the addon object to create
-- @param lib List of libraries to embed into the addon
-- @usage
-- -- Create a simple addon object
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceEvent-3.0")
--
-- -- Create a Addon object based on the table of a frame
-- local MyFrame = CreateFrame("Frame")
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon(MyFrame, "MyAddon", "AceEvent-3.0")
function AceAddon:NewAddon(objectorname, ...)
local object,name
local i=1
if type(objectorname)=="table" then
object=objectorname
name=...
i=2
else
name=objectorname
end
if type(name)~="string" then
error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2)
end
if self.addons[name] then
error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - Addon '%s' already exists."):format(name), 2)
end
object = object or {}
object.name = name
local addonmeta = {}
local oldmeta = getmetatable(object)
if oldmeta then
for k, v in pairs(oldmeta) do addonmeta[k] = v end
end
addonmeta.__tostring = addontostring
setmetatable( object, addonmeta )
self.addons[name] = object
object.modules = {}
object.orderedModules = {}
object.defaultModuleLibraries = {}
Embed( object ) -- embed NewModule, GetModule methods
self:EmbedLibraries(object, select(i,...))
-- add to queue of addons to be initialized upon ADDON_LOADED
tinsert(self.initializequeue, object)
return object
end
--- Get the addon object by its name from the internal AceAddon registry.
-- Throws an error if the addon object cannot be found (except if silent is set).
-- @param name unique name of the addon object
-- @param silent if true, the addon is optional, silently return nil if its not found
-- @usage
-- -- Get the Addon
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
function AceAddon:GetAddon(name, silent)
if not silent and not self.addons[name] then
error(("Usage: GetAddon(name): 'name' - Cannot find an AceAddon '%s'."):format(tostring(name)), 2)
end
return self.addons[name]
end
-- - Embed a list of libraries into the specified addon.
-- This function will try to embed all of the listed libraries into the addon
-- and error if a single one fails.
--
-- **Note:** This function is for internal use by :NewAddon/:NewModule
-- @paramsig addon, [lib, ...]
-- @param addon addon object to embed the libs in
-- @param lib List of libraries to embed into the addon
function AceAddon:EmbedLibraries(addon, ...)
for i=1,select("#", ... ) do
local libname = select(i, ...)
self:EmbedLibrary(addon, libname, false, 4)
end
end
-- - Embed a library into the addon object.
-- This function will check if the specified library is registered with LibStub
-- and if it has a :Embed function to call. It'll error if any of those conditions
-- fails.
--
-- **Note:** This function is for internal use by :EmbedLibraries
-- @paramsig addon, libname[, silent[, offset]]
-- @param addon addon object to embed the library in
-- @param libname name of the library to embed
-- @param silent marks an embed to fail silently if the library doesn't exist (optional)
-- @param offset will push the error messages back to said offset, defaults to 2 (optional)
function AceAddon:EmbedLibrary(addon, libname, silent, offset)
local lib = LibStub:GetLibrary(libname, true)
if not lib and not silent then
error(("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Cannot find a library instance of %q."):format(tostring(libname)), offset or 2)
elseif lib and type(lib.Embed) == "function" then
lib:Embed(addon)
tinsert(self.embeds[addon], libname)
return true
elseif lib then
error(("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Library '%s' is not Embed capable"):format(libname), offset or 2)
end
end
--- Return the specified module from an addon object.
-- Throws an error if the addon object cannot be found (except if silent is set)
-- @name //addon//:GetModule
-- @paramsig name[, silent]
-- @param name unique name of the module
-- @param silent if true, the module is optional, silently return nil if its not found (optional)
-- @usage
-- -- Get the Addon
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
-- -- Get the Module
-- MyModule = MyAddon:GetModule("MyModule")
function GetModule(self, name, silent)
if not self.modules[name] and not silent then
error(("Usage: GetModule(name, silent): 'name' - Cannot find module '%s'."):format(tostring(name)), 2)
end
return self.modules[name]
end
local function IsModuleTrue(self) return true end
--- Create a new module for the addon.
-- The new module can have its own embeded libraries and/or use a module prototype to be mixed into the module.\\
-- A module has the same functionality as a real addon, it can have modules of its own, and has the same API as
-- an addon object.
-- @name //addon//:NewModule
-- @paramsig name[, prototype|lib[, lib, ...]]
-- @param name unique name of the module
-- @param prototype object to derive this module from, methods and values from this table will be mixed into the module (optional)
-- @param lib List of libraries to embed into the addon
-- @usage
-- -- Create a module with some embeded libraries
-- MyModule = MyAddon:NewModule("MyModule", "AceEvent-3.0", "AceHook-3.0")
--
-- -- Create a module with a prototype
-- local prototype = { OnEnable = function(self) print("OnEnable called!") end }
-- MyModule = MyAddon:NewModule("MyModule", prototype, "AceEvent-3.0", "AceHook-3.0")
function NewModule(self, name, prototype, ...)
if type(name) ~= "string" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2) end
if type(prototype) ~= "string" and type(prototype) ~= "table" and type(prototype) ~= "nil" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'prototype' - table (prototype), string (lib) or nil expected got '%s'."):format(type(prototype)), 2) end
if self.modules[name] then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - Module '%s' already exists."):format(name), 2) end
-- modules are basically addons. We treat them as such. They will be added to the initializequeue properly as well.
-- NewModule can only be called after the parent addon is present thus the modules will be initialized after their parent is.
local module = AceAddon:NewAddon(fmt("%s_%s", self.name or tostring(self), name))
module.IsModule = IsModuleTrue
module:SetEnabledState(self.defaultModuleState)
module.moduleName = name
if type(prototype) == "string" then
AceAddon:EmbedLibraries(module, prototype, ...)
else
AceAddon:EmbedLibraries(module, ...)
end
AceAddon:EmbedLibraries(module, unpack(self.defaultModuleLibraries))
if not prototype or type(prototype) == "string" then
prototype = self.defaultModulePrototype or nil
end
if type(prototype) == "table" then
local mt = getmetatable(module)
mt.__index = prototype
setmetatable(module, mt) -- More of a Base class type feel.
end
safecall(self.OnModuleCreated, self, module) -- Was in Ace2 and I think it could be a cool thing to have handy.
self.modules[name] = module
tinsert(self.orderedModules, module)
return module
end
--- Returns the real name of the addon or module, without any prefix.
-- @name //addon//:GetName
-- @paramsig
-- @usage
-- print(MyAddon:GetName())
-- -- prints "MyAddon"
function GetName(self)
return self.moduleName or self.name
end
--- Enables the Addon, if possible, return true or false depending on success.
-- This internally calls AceAddon:EnableAddon(), thus dispatching a OnEnable callback
-- and enabling all modules of the addon (unless explicitly disabled).\\
-- :Enable() also sets the internal `enableState` variable to true
-- @name //addon//:Enable
-- @paramsig
-- @usage
-- -- Enable MyModule
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
-- MyModule = MyAddon:GetModule("MyModule")
-- MyModule:Enable()
function Enable(self)
self:SetEnabledState(true)
-- nevcairiel 2013-04-27: don't enable an addon/module if its queued for init still
-- it'll be enabled after the init process
if not queuedForInitialization(self) then
return AceAddon:EnableAddon(self)
end
end
--- Disables the Addon, if possible, return true or false depending on success.
-- This internally calls AceAddon:DisableAddon(), thus dispatching a OnDisable callback
-- and disabling all modules of the addon.\\
-- :Disable() also sets the internal `enableState` variable to false
-- @name //addon//:Disable
-- @paramsig
-- @usage
-- -- Disable MyAddon
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
-- MyAddon:Disable()
function Disable(self)
self:SetEnabledState(false)
return AceAddon:DisableAddon(self)
end
--- Enables the Module, if possible, return true or false depending on success.
-- Short-hand function that retrieves the module via `:GetModule` and calls `:Enable` on the module object.
-- @name //addon//:EnableModule
-- @paramsig name
-- @usage
-- -- Enable MyModule using :GetModule
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
-- MyModule = MyAddon:GetModule("MyModule")
-- MyModule:Enable()
--
-- -- Enable MyModule using the short-hand
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
-- MyAddon:EnableModule("MyModule")
function EnableModule(self, name)
local module = self:GetModule( name )
return module:Enable()
end
--- Disables the Module, if possible, return true or false depending on success.
-- Short-hand function that retrieves the module via `:GetModule` and calls `:Disable` on the module object.
-- @name //addon//:DisableModule
-- @paramsig name
-- @usage
-- -- Disable MyModule using :GetModule
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
-- MyModule = MyAddon:GetModule("MyModule")
-- MyModule:Disable()
--
-- -- Disable MyModule using the short-hand
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
-- MyAddon:DisableModule("MyModule")
function DisableModule(self, name)
local module = self:GetModule( name )
return module:Disable()
end
--- Set the default libraries to be mixed into all modules created by this object.
-- Note that you can only change the default module libraries before any module is created.
-- @name //addon//:SetDefaultModuleLibraries
-- @paramsig lib[, lib, ...]
-- @param lib List of libraries to embed into the addon
-- @usage
-- -- Create the addon object
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
-- -- Configure default libraries for modules (all modules need AceEvent-3.0)
-- MyAddon:SetDefaultModuleLibraries("AceEvent-3.0")
-- -- Create a module
-- MyModule = MyAddon:NewModule("MyModule")
function SetDefaultModuleLibraries(self, ...)
if next(self.modules) then
error("Usage: SetDefaultModuleLibraries(...): cannot change the module defaults after a module has been registered.", 2)
end
self.defaultModuleLibraries = {...}
end
--- Set the default state in which new modules are being created.
-- Note that you can only change the default state before any module is created.
-- @name //addon//:SetDefaultModuleState
-- @paramsig state
-- @param state Default state for new modules, true for enabled, false for disabled
-- @usage
-- -- Create the addon object
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
-- -- Set the default state to "disabled"
-- MyAddon:SetDefaultModuleState(false)
-- -- Create a module and explicilty enable it
-- MyModule = MyAddon:NewModule("MyModule")
-- MyModule:Enable()
function SetDefaultModuleState(self, state)
if next(self.modules) then
error("Usage: SetDefaultModuleState(state): cannot change the module defaults after a module has been registered.", 2)
end
self.defaultModuleState = state
end
--- Set the default prototype to use for new modules on creation.
-- Note that you can only change the default prototype before any module is created.
-- @name //addon//:SetDefaultModulePrototype
-- @paramsig prototype
-- @param prototype Default prototype for the new modules (table)
-- @usage
-- -- Define a prototype
-- local prototype = { OnEnable = function(self) print("OnEnable called!") end }
-- -- Set the default prototype
-- MyAddon:SetDefaultModulePrototype(prototype)
-- -- Create a module and explicitly Enable it
-- MyModule = MyAddon:NewModule("MyModule")
-- MyModule:Enable()
-- -- should print "OnEnable called!" now
-- @see NewModule
function SetDefaultModulePrototype(self, prototype)
if next(self.modules) then
error("Usage: SetDefaultModulePrototype(prototype): cannot change the module defaults after a module has been registered.", 2)
end
if type(prototype) ~= "table" then
error(("Usage: SetDefaultModulePrototype(prototype): 'prototype' - table expected got '%s'."):format(type(prototype)), 2)
end
self.defaultModulePrototype = prototype
end
--- Set the state of an addon or module
-- This should only be called before any enabling actually happend, e.g. in/before OnInitialize.
-- @name //addon//:SetEnabledState
-- @paramsig state
-- @param state the state of an addon or module (enabled=true, disabled=false)
function SetEnabledState(self, state)
self.enabledState = state
end
--- Return an iterator of all modules associated to the addon.
-- @name //addon//:IterateModules
-- @paramsig
-- @usage
-- -- Enable all modules
-- for name, module in MyAddon:IterateModules() do
-- module:Enable()
-- end
local function IterateModules(self) return pairs(self.modules) end
-- Returns an iterator of all embeds in the addon
-- @name //addon//:IterateEmbeds
-- @paramsig
local function IterateEmbeds(self) return pairs(AceAddon.embeds[self]) end
--- Query the enabledState of an addon.
-- @name //addon//:IsEnabled
-- @paramsig
-- @usage
-- if MyAddon:IsEnabled() then
-- MyAddon:Disable()
-- end
local function IsEnabled(self) return self.enabledState end
local mixins = {
NewModule = NewModule,
GetModule = GetModule,
Enable = Enable,
Disable = Disable,
EnableModule = EnableModule,
DisableModule = DisableModule,
IsEnabled = IsEnabled,
SetDefaultModuleLibraries = SetDefaultModuleLibraries,
SetDefaultModuleState = SetDefaultModuleState,
SetDefaultModulePrototype = SetDefaultModulePrototype,
SetEnabledState = SetEnabledState,
IterateModules = IterateModules,
IterateEmbeds = IterateEmbeds,
GetName = GetName,
}
local function IsModule(self) return false end
local pmixins = {
defaultModuleState = true,
enabledState = true,
IsModule = IsModule,
}
-- Embed( target )
-- target (object) - target object to embed aceaddon in
--
-- this is a local function specifically since it's meant to be only called internally
function Embed(target, skipPMixins)
for k, v in pairs(mixins) do
target[k] = v
end
if not skipPMixins then
for k, v in pairs(pmixins) do
target[k] = target[k] or v
end
end
end
-- - Initialize the addon after creation.
-- This function is only used internally during the ADDON_LOADED event
-- It will call the **OnInitialize** function on the addon object (if present),
-- and the **OnEmbedInitialize** function on all embeded libraries.
--
-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
-- @param addon addon object to intialize
function AceAddon:InitializeAddon(addon)
safecall(addon.OnInitialize, addon)
local embeds = self.embeds[addon]
for i = 1, #embeds do
local lib = LibStub:GetLibrary(embeds[i], true)
if lib then safecall(lib.OnEmbedInitialize, lib, addon) end
end
-- we don't call InitializeAddon on modules specifically, this is handled
-- from the event handler and only done _once_
end
-- - Enable the addon after creation.
-- Note: This function is only used internally during the PLAYER_LOGIN event, or during ADDON_LOADED,
-- if IsLoggedIn() already returns true at that point, e.g. for LoD Addons.
-- It will call the **OnEnable** function on the addon object (if present),
-- and the **OnEmbedEnable** function on all embeded libraries.\\
-- This function does not toggle the enable state of the addon itself, and will return early if the addon is disabled.
--
-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
-- Use :Enable on the addon itself instead.
-- @param addon addon object to enable
function AceAddon:EnableAddon(addon)
if type(addon) == "string" then addon = AceAddon:GetAddon(addon) end
if self.statuses[addon.name] or not addon.enabledState then return false end
-- set the statuses first, before calling the OnEnable. this allows for Disabling of the addon in OnEnable.
self.statuses[addon.name] = true
safecall(addon.OnEnable, addon)
-- make sure we're still enabled before continueing
if self.statuses[addon.name] then
local embeds = self.embeds[addon]
for i = 1, #embeds do
local lib = LibStub:GetLibrary(embeds[i], true)
if lib then safecall(lib.OnEmbedEnable, lib, addon) end
end
-- enable possible modules.
local modules = addon.orderedModules
for i = 1, #modules do
self:EnableAddon(modules[i])
end
end
return self.statuses[addon.name] -- return true if we're disabled
end
-- - Disable the addon
-- Note: This function is only used internally.
-- It will call the **OnDisable** function on the addon object (if present),
-- and the **OnEmbedDisable** function on all embeded libraries.\\
-- This function does not toggle the enable state of the addon itself, and will return early if the addon is still enabled.
--
-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
-- Use :Disable on the addon itself instead.
-- @param addon addon object to enable
function AceAddon:DisableAddon(addon)
if type(addon) == "string" then addon = AceAddon:GetAddon(addon) end
if not self.statuses[addon.name] then return false end
-- set statuses first before calling OnDisable, this allows for aborting the disable in OnDisable.
self.statuses[addon.name] = false
safecall( addon.OnDisable, addon )
-- make sure we're still disabling...
if not self.statuses[addon.name] then
local embeds = self.embeds[addon]
for i = 1, #embeds do
local lib = LibStub:GetLibrary(embeds[i], true)
if lib then safecall(lib.OnEmbedDisable, lib, addon) end
end
-- disable possible modules.
local modules = addon.orderedModules
for i = 1, #modules do
self:DisableAddon(modules[i])
end
end
return not self.statuses[addon.name] -- return true if we're disabled
end
--- Get an iterator over all registered addons.
-- @usage
-- -- Print a list of all installed AceAddon's
-- for name, addon in AceAddon:IterateAddons() do
-- print("Addon: " .. name)
-- end
function AceAddon:IterateAddons() return pairs(self.addons) end
--- Get an iterator over the internal status registry.
-- @usage
-- -- Print a list of all enabled addons
-- for name, status in AceAddon:IterateAddonStatus() do
-- if status then
-- print("EnabledAddon: " .. name)
-- end
-- end
function AceAddon:IterateAddonStatus() return pairs(self.statuses) end
-- Following Iterators are deprecated, and their addon specific versions should be used
-- e.g. addon:IterateEmbeds() instead of :IterateEmbedsOnAddon(addon)
function AceAddon:IterateEmbedsOnAddon(addon) return pairs(self.embeds[addon]) end
function AceAddon:IterateModulesOfAddon(addon) return pairs(addon.modules) end
-- Blizzard AddOns which can load very early in the loading process and mess with Ace3 addon loading
local BlizzardEarlyLoadAddons = {
Blizzard_DebugTools = true,
Blizzard_TimeManager = true,
Blizzard_BattlefieldMap = true,
Blizzard_MapCanvas = true,
Blizzard_SharedMapDataProviders = true,
Blizzard_CombatLog = true,
}
-- Event Handling
local function onEvent(this, event, arg1)
-- 2020-08-28 nevcairiel - ignore the load event of Blizzard addons which occur early in the loading process
if (event == "ADDON_LOADED" and (arg1 == nil or not BlizzardEarlyLoadAddons[arg1])) or event == "PLAYER_LOGIN" then
-- if a addon loads another addon, recursion could happen here, so we need to validate the table on every iteration
while(#AceAddon.initializequeue > 0) do
local addon = tremove(AceAddon.initializequeue, 1)
-- this might be an issue with recursion - TODO: validate
if event == "ADDON_LOADED" then addon.baseName = arg1 end
AceAddon:InitializeAddon(addon)
tinsert(AceAddon.enablequeue, addon)
end
if IsLoggedIn() then
while(#AceAddon.enablequeue > 0) do
local addon = tremove(AceAddon.enablequeue, 1)
AceAddon:EnableAddon(addon)
end
end
end
end
AceAddon.frame:RegisterEvent("ADDON_LOADED")
AceAddon.frame:RegisterEvent("PLAYER_LOGIN")
AceAddon.frame:SetScript("OnEvent", onEvent)
-- upgrade embeded
for name, addon in pairs(AceAddon.addons) do
Embed(addon, true)
end
-- 2010-10-27 nevcairiel - add new "orderedModules" table
if oldminor and oldminor < 10 then
for name, addon in pairs(AceAddon.addons) do
addon.orderedModules = {}
for module_name, module in pairs(addon.modules) do
tinsert(addon.orderedModules, module)
end
end
end
-4
View File
@@ -1,4 +0,0 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="AceAddon-3.0.lua"/>
</Ui>
-301
View File
@@ -1,301 +0,0 @@
--- **AceComm-3.0** allows you to send messages of unlimited length over the addon comm channels.
-- It'll automatically split the messages into multiple parts and rebuild them on the receiving end.\\
-- **ChatThrottleLib** is of course being used to avoid being disconnected by the server.
--
-- **AceComm-3.0** can be embeded into your addon, either explicitly by calling AceComm:Embed(MyAddon) or by
-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
-- and can be accessed directly, without having to explicitly call AceComm itself.\\
-- It is recommended to embed AceComm, otherwise you'll have to specify a custom `self` on all calls you
-- make into AceComm.
-- @class file
-- @name AceComm-3.0
-- @release $Id: AceComm-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
--[[ AceComm-3.0
TODO: Time out old data rotting around from dead senders? Not a HUGE deal since the number of possible sender names is somewhat limited.
]]
local CallbackHandler = LibStub("CallbackHandler-1.0")
local CTL = assert(ChatThrottleLib, "AceComm-3.0 requires ChatThrottleLib")
local MAJOR, MINOR = "AceComm-3.0", 12
local AceComm,oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not AceComm then return end
-- Lua APIs
local type, next, pairs, tostring = type, next, pairs, tostring
local strsub, strfind = string.sub, string.find
local match = string.match
local tinsert, tconcat = table.insert, table.concat
local error, assert = error, assert
-- WoW APIs
local Ambiguate = Ambiguate
AceComm.embeds = AceComm.embeds or {}
-- for my sanity and yours, let's give the message type bytes some names
local MSG_MULTI_FIRST = "\001"
local MSG_MULTI_NEXT = "\002"
local MSG_MULTI_LAST = "\003"
local MSG_ESCAPE = "\004"
-- remove old structures (pre WoW 4.0)
AceComm.multipart_origprefixes = nil
AceComm.multipart_reassemblers = nil
-- the multipart message spool: indexed by a combination of sender+distribution+
AceComm.multipart_spool = AceComm.multipart_spool or {}
--- Register for Addon Traffic on a specified prefix
-- @param prefix A printable character (\032-\255) classification of the message (typically AddonName or AddonNameEvent), max 16 characters
-- @param method Callback to call on message reception: Function reference, or method name (string) to call on self. Defaults to "OnCommReceived"
function AceComm:RegisterComm(prefix, method)
if method == nil then
method = "OnCommReceived"
end
if #prefix > 16 then -- TODO: 15?
error("AceComm:RegisterComm(prefix,method): prefix length is limited to 16 characters")
end
if C_ChatInfo then
C_ChatInfo.RegisterAddonMessagePrefix(prefix)
else
RegisterAddonMessagePrefix(prefix)
end
return AceComm._RegisterComm(self, prefix, method) -- created by CallbackHandler
end
local warnedPrefix=false
--- Send a message over the Addon Channel
-- @param prefix A printable character (\032-\255) classification of the message (typically AddonName or AddonNameEvent)
-- @param text Data to send, nils (\000) not allowed. Any length.
-- @param distribution Addon channel, e.g. "RAID", "GUILD", etc; see SendAddonMessage API
-- @param target Destination for some distributions; see SendAddonMessage API
-- @param prio OPTIONAL: ChatThrottleLib priority, "BULK", "NORMAL" or "ALERT". Defaults to "NORMAL".
-- @param callbackFn OPTIONAL: callback function to be called as each chunk is sent. receives 3 args: the user supplied arg (see next), the number of bytes sent so far, and the number of bytes total to send.
-- @param callbackArg: OPTIONAL: first arg to the callback function. nil will be passed if not specified.
function AceComm:SendCommMessage(prefix, text, distribution, target, prio, callbackFn, callbackArg)
prio = prio or "NORMAL" -- pasta's reference implementation had different prio for singlepart and multipart, but that's a very bad idea since that can easily lead to out-of-sequence delivery!
if not( type(prefix)=="string" and
type(text)=="string" and
type(distribution)=="string" and
(target==nil or type(target)=="string" or type(target)=="number") and
(prio=="BULK" or prio=="NORMAL" or prio=="ALERT")
) then
error('Usage: SendCommMessage(addon, "prefix", "text", "distribution"[, "target"[, "prio"[, callbackFn, callbackarg]]])', 2)
end
local textlen = #text
local maxtextlen = 255 -- Yes, the max is 255 even if the dev post said 256. I tested. Char 256+ get silently truncated. /Mikk, 20110327
local queueName = prefix..distribution..(target or "")
local ctlCallback = nil
if callbackFn then
ctlCallback = function(sent)
return callbackFn(callbackArg, sent, textlen)
end
end
local forceMultipart
if match(text, "^[\001-\009]") then -- 4.1+: see if the first character is a control character
-- we need to escape the first character with a \004
if textlen+1 > maxtextlen then -- would we go over the size limit?
forceMultipart = true -- just make it multipart, no escape problems then
else
text = "\004" .. text
end
end
if not forceMultipart and textlen <= maxtextlen then
-- fits all in one message
CTL:SendAddonMessage(prio, prefix, text, distribution, target, queueName, ctlCallback, textlen)
else
maxtextlen = maxtextlen - 1 -- 1 extra byte for part indicator in prefix(4.0)/start of message(4.1)
-- first part
local chunk = strsub(text, 1, maxtextlen)
CTL:SendAddonMessage(prio, prefix, MSG_MULTI_FIRST..chunk, distribution, target, queueName, ctlCallback, maxtextlen)
-- continuation
local pos = 1+maxtextlen
while pos+maxtextlen <= textlen do
chunk = strsub(text, pos, pos+maxtextlen-1)
CTL:SendAddonMessage(prio, prefix, MSG_MULTI_NEXT..chunk, distribution, target, queueName, ctlCallback, pos+maxtextlen-1)
pos = pos + maxtextlen
end
-- final part
chunk = strsub(text, pos)
CTL:SendAddonMessage(prio, prefix, MSG_MULTI_LAST..chunk, distribution, target, queueName, ctlCallback, textlen)
end
end
----------------------------------------
-- Message receiving
----------------------------------------
do
local compost = setmetatable({}, {__mode = "k"})
local function new()
local t = next(compost)
if t then
compost[t]=nil
for i=#t,3,-1 do -- faster than pairs loop. don't even nil out 1/2 since they'll be overwritten
t[i]=nil
end
return t
end
return {}
end
local function lostdatawarning(prefix,sender,where)
DEFAULT_CHAT_FRAME:AddMessage(MAJOR..": Warning: lost network data regarding '"..tostring(prefix).."' from '"..tostring(sender).."' (in "..where..")")
end
function AceComm:OnReceiveMultipartFirst(prefix, message, distribution, sender)
local key = prefix.."\t"..distribution.."\t"..sender -- a unique stream is defined by the prefix + distribution + sender
local spool = AceComm.multipart_spool
--[[
if spool[key] then
lostdatawarning(prefix,sender,"First")
-- continue and overwrite
end
--]]
spool[key] = message -- plain string for now
end
function AceComm:OnReceiveMultipartNext(prefix, message, distribution, sender)
local key = prefix.."\t"..distribution.."\t"..sender -- a unique stream is defined by the prefix + distribution + sender
local spool = AceComm.multipart_spool
local olddata = spool[key]
if not olddata then
--lostdatawarning(prefix,sender,"Next")
return
end
if type(olddata)~="table" then
-- ... but what we have is not a table. So make it one. (Pull a composted one if available)
local t = new()
t[1] = olddata -- add old data as first string
t[2] = message -- and new message as second string
spool[key] = t -- and put the table in the spool instead of the old string
else
tinsert(olddata, message)
end
end
function AceComm:OnReceiveMultipartLast(prefix, message, distribution, sender)
local key = prefix.."\t"..distribution.."\t"..sender -- a unique stream is defined by the prefix + distribution + sender
local spool = AceComm.multipart_spool
local olddata = spool[key]
if not olddata then
--lostdatawarning(prefix,sender,"End")
return
end
spool[key] = nil
if type(olddata) == "table" then
-- if we've received a "next", the spooled data will be a table for rapid & garbage-free tconcat
tinsert(olddata, message)
AceComm.callbacks:Fire(prefix, tconcat(olddata, ""), distribution, sender)
compost[olddata] = true
else
-- if we've only received a "first", the spooled data will still only be a string
AceComm.callbacks:Fire(prefix, olddata..message, distribution, sender)
end
end
end
----------------------------------------
-- Embed CallbackHandler
----------------------------------------
if not AceComm.callbacks then
AceComm.callbacks = CallbackHandler:New(AceComm,
"_RegisterComm",
"UnregisterComm",
"UnregisterAllComm")
end
AceComm.callbacks.OnUsed = nil
AceComm.callbacks.OnUnused = nil
local function OnEvent(self, event, prefix, message, distribution, sender)
if event == "CHAT_MSG_ADDON" then
sender = Ambiguate(sender, "none")
local control, rest = match(message, "^([\001-\009])(.*)")
if control then
if control==MSG_MULTI_FIRST then
AceComm:OnReceiveMultipartFirst(prefix, rest, distribution, sender)
elseif control==MSG_MULTI_NEXT then
AceComm:OnReceiveMultipartNext(prefix, rest, distribution, sender)
elseif control==MSG_MULTI_LAST then
AceComm:OnReceiveMultipartLast(prefix, rest, distribution, sender)
elseif control==MSG_ESCAPE then
AceComm.callbacks:Fire(prefix, rest, distribution, sender)
else
-- unknown control character, ignore SILENTLY (dont warn unnecessarily about future extensions!)
end
else
-- single part: fire it off immediately and let CallbackHandler decide if it's registered or not
AceComm.callbacks:Fire(prefix, message, distribution, sender)
end
else
assert(false, "Received "..tostring(event).." event?!")
end
end
AceComm.frame = AceComm.frame or CreateFrame("Frame", "AceComm30Frame")
AceComm.frame:SetScript("OnEvent", OnEvent)
AceComm.frame:UnregisterAllEvents()
AceComm.frame:RegisterEvent("CHAT_MSG_ADDON")
----------------------------------------
-- Base library stuff
----------------------------------------
local mixins = {
"RegisterComm",
"UnregisterComm",
"UnregisterAllComm",
"SendCommMessage",
}
-- Embeds AceComm-3.0 into the target object making the functions from the mixins list available on target:..
-- @param target target object to embed AceComm-3.0 in
function AceComm:Embed(target)
for k, v in pairs(mixins) do
target[v] = self[v]
end
self.embeds[target] = true
return target
end
function AceComm:OnEmbedDisable(target)
target:UnregisterAllComm()
end
-- Update embeds
for target, v in pairs(AceComm.embeds) do
AceComm:Embed(target)
end
-5
View File
@@ -1,5 +0,0 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="ChatThrottleLib.lua"/>
<Script file="AceComm-3.0.lua"/>
</Ui>
-534
View File
@@ -1,534 +0,0 @@
--
-- ChatThrottleLib by Mikk
--
-- Manages AddOn chat output to keep player from getting kicked off.
--
-- ChatThrottleLib:SendChatMessage/:SendAddonMessage functions that accept
-- a Priority ("BULK", "NORMAL", "ALERT") as well as prefix for SendChatMessage.
--
-- Priorities get an equal share of available bandwidth when fully loaded.
-- Communication channels are separated on extension+chattype+destination and
-- get round-robinned. (Destination only matters for whispers and channels,
-- obviously)
--
-- Will install hooks for SendChatMessage and SendAddonMessage to measure
-- bandwidth bypassing the library and use less bandwidth itself.
--
--
-- Fully embeddable library. Just copy this file into your addon directory,
-- add it to the .toc, and it's done.
--
-- Can run as a standalone addon also, but, really, just embed it! :-)
--
-- LICENSE: ChatThrottleLib is released into the Public Domain
--
local CTL_VERSION = 24
local _G = _G
if _G.ChatThrottleLib then
if _G.ChatThrottleLib.version >= CTL_VERSION then
-- There's already a newer (or same) version loaded. Buh-bye.
return
elseif not _G.ChatThrottleLib.securelyHooked then
print("ChatThrottleLib: Warning: There's an ANCIENT ChatThrottleLib.lua (pre-wow 2.0, <v16) in an addon somewhere. Get the addon updated or copy in a newer ChatThrottleLib.lua (>=v16) in it!")
-- ATTEMPT to unhook; this'll behave badly if someone else has hooked...
-- ... and if someone has securehooked, they can kiss that goodbye too... >.<
_G.SendChatMessage = _G.ChatThrottleLib.ORIG_SendChatMessage
if _G.ChatThrottleLib.ORIG_SendAddonMessage then
_G.SendAddonMessage = _G.ChatThrottleLib.ORIG_SendAddonMessage
end
end
_G.ChatThrottleLib.ORIG_SendChatMessage = nil
_G.ChatThrottleLib.ORIG_SendAddonMessage = nil
end
if not _G.ChatThrottleLib then
_G.ChatThrottleLib = {}
end
ChatThrottleLib = _G.ChatThrottleLib -- in case some addon does "local ChatThrottleLib" above us and we're copypasted (AceComm-2, sigh)
local ChatThrottleLib = _G.ChatThrottleLib
ChatThrottleLib.version = CTL_VERSION
------------------ TWEAKABLES -----------------
ChatThrottleLib.MAX_CPS = 800 -- 2000 seems to be safe if NOTHING ELSE is happening. let's call it 800.
ChatThrottleLib.MSG_OVERHEAD = 40 -- Guesstimate overhead for sending a message; source+dest+chattype+protocolstuff
ChatThrottleLib.BURST = 4000 -- WoW's server buffer seems to be about 32KB. 8KB should be safe, but seen disconnects on _some_ servers. Using 4KB now.
ChatThrottleLib.MIN_FPS = 20 -- Reduce output CPS to half (and don't burst) if FPS drops below this value
local setmetatable = setmetatable
local table_remove = table.remove
local tostring = tostring
local GetTime = GetTime
local math_min = math.min
local math_max = math.max
local next = next
local strlen = string.len
local GetFramerate = GetFramerate
local strlower = string.lower
local unpack,type,pairs,wipe = unpack,type,pairs,table.wipe
local UnitInRaid,UnitInParty = UnitInRaid,UnitInParty
-----------------------------------------------------------------------
-- Double-linked ring implementation
local Ring = {}
local RingMeta = { __index = Ring }
function Ring:New()
local ret = {}
setmetatable(ret, RingMeta)
return ret
end
function Ring:Add(obj) -- Append at the "far end" of the ring (aka just before the current position)
if self.pos then
obj.prev = self.pos.prev
obj.prev.next = obj
obj.next = self.pos
obj.next.prev = obj
else
obj.next = obj
obj.prev = obj
self.pos = obj
end
end
function Ring:Remove(obj)
obj.next.prev = obj.prev
obj.prev.next = obj.next
if self.pos == obj then
self.pos = obj.next
if self.pos == obj then
self.pos = nil
end
end
end
-----------------------------------------------------------------------
-- Recycling bin for pipes
-- A pipe is a plain integer-indexed queue of messages
-- Pipes normally live in Rings of pipes (3 rings total, one per priority)
ChatThrottleLib.PipeBin = nil -- pre-v19, drastically different
local PipeBin = setmetatable({}, {__mode="k"})
local function DelPipe(pipe)
PipeBin[pipe] = true
end
local function NewPipe()
local pipe = next(PipeBin)
if pipe then
wipe(pipe)
PipeBin[pipe] = nil
return pipe
end
return {}
end
-----------------------------------------------------------------------
-- Recycling bin for messages
ChatThrottleLib.MsgBin = nil -- pre-v19, drastically different
local MsgBin = setmetatable({}, {__mode="k"})
local function DelMsg(msg)
msg[1] = nil
-- there's more parameters, but they're very repetetive so the string pool doesn't suffer really, and it's faster to just not delete them.
MsgBin[msg] = true
end
local function NewMsg()
local msg = next(MsgBin)
if msg then
MsgBin[msg] = nil
return msg
end
return {}
end
-----------------------------------------------------------------------
-- ChatThrottleLib:Init
-- Initialize queues, set up frame for OnUpdate, etc
function ChatThrottleLib:Init()
-- Set up queues
if not self.Prio then
self.Prio = {}
self.Prio["ALERT"] = { ByName = {}, Ring = Ring:New(), avail = 0 }
self.Prio["NORMAL"] = { ByName = {}, Ring = Ring:New(), avail = 0 }
self.Prio["BULK"] = { ByName = {}, Ring = Ring:New(), avail = 0 }
end
-- v4: total send counters per priority
for _, Prio in pairs(self.Prio) do
Prio.nTotalSent = Prio.nTotalSent or 0
end
if not self.avail then
self.avail = 0 -- v5
end
if not self.nTotalSent then
self.nTotalSent = 0 -- v5
end
-- Set up a frame to get OnUpdate events
if not self.Frame then
self.Frame = CreateFrame("Frame")
self.Frame:Hide()
end
self.Frame:SetScript("OnUpdate", self.OnUpdate)
self.Frame:SetScript("OnEvent", self.OnEvent) -- v11: Monitor P_E_W so we can throttle hard for a few seconds
self.Frame:RegisterEvent("PLAYER_ENTERING_WORLD")
self.OnUpdateDelay = 0
self.LastAvailUpdate = GetTime()
self.HardThrottlingBeginTime = GetTime() -- v11: Throttle hard for a few seconds after startup
-- Hook SendChatMessage and SendAddonMessage so we can measure unpiped traffic and avoid overloads (v7)
if not self.securelyHooked then
-- Use secure hooks as of v16. Old regular hook support yanked out in v21.
self.securelyHooked = true
--SendChatMessage
hooksecurefunc("SendChatMessage", function(...)
return ChatThrottleLib.Hook_SendChatMessage(...)
end)
--SendAddonMessage
if _G.C_ChatInfo then
hooksecurefunc(_G.C_ChatInfo, "SendAddonMessage", function(...)
return ChatThrottleLib.Hook_SendAddonMessage(...)
end)
else
hooksecurefunc("SendAddonMessage", function(...)
return ChatThrottleLib.Hook_SendAddonMessage(...)
end)
end
end
self.nBypass = 0
end
-----------------------------------------------------------------------
-- ChatThrottleLib.Hook_SendChatMessage / .Hook_SendAddonMessage
local bMyTraffic = false
function ChatThrottleLib.Hook_SendChatMessage(text, chattype, language, destination, ...)
if bMyTraffic then
return
end
local self = ChatThrottleLib
local size = strlen(tostring(text or "")) + strlen(tostring(destination or "")) + self.MSG_OVERHEAD
self.avail = self.avail - size
self.nBypass = self.nBypass + size -- just a statistic
end
function ChatThrottleLib.Hook_SendAddonMessage(prefix, text, chattype, destination, ...)
if bMyTraffic then
return
end
local self = ChatThrottleLib
local size = tostring(text or ""):len() + tostring(prefix or ""):len();
size = size + tostring(destination or ""):len() + self.MSG_OVERHEAD
self.avail = self.avail - size
self.nBypass = self.nBypass + size -- just a statistic
end
-----------------------------------------------------------------------
-- ChatThrottleLib:UpdateAvail
-- Update self.avail with how much bandwidth is currently available
function ChatThrottleLib:UpdateAvail()
local now = GetTime()
local MAX_CPS = self.MAX_CPS;
local newavail = MAX_CPS * (now - self.LastAvailUpdate)
local avail = self.avail
if now - self.HardThrottlingBeginTime < 5 then
-- First 5 seconds after startup/zoning: VERY hard clamping to avoid irritating the server rate limiter, it seems very cranky then
avail = math_min(avail + (newavail*0.1), MAX_CPS*0.5)
self.bChoking = true
elseif GetFramerate() < self.MIN_FPS then -- GetFrameRate call takes ~0.002 secs
avail = math_min(MAX_CPS, avail + newavail*0.5)
self.bChoking = true -- just a statistic
else
avail = math_min(self.BURST, avail + newavail)
self.bChoking = false
end
avail = math_max(avail, 0-(MAX_CPS*2)) -- Can go negative when someone is eating bandwidth past the lib. but we refuse to stay silent for more than 2 seconds; if they can do it, we can.
self.avail = avail
self.LastAvailUpdate = now
return avail
end
-----------------------------------------------------------------------
-- Despooling logic
-- Reminder:
-- - We have 3 Priorities, each containing a "Ring" construct ...
-- - ... made up of N "Pipe"s (1 for each destination/pipename)
-- - and each pipe contains messages
function ChatThrottleLib:Despool(Prio)
local ring = Prio.Ring
while ring.pos and Prio.avail > ring.pos[1].nSize do
local msg = table_remove(ring.pos, 1)
if not ring.pos[1] then -- did we remove last msg in this pipe?
local pipe = Prio.Ring.pos
Prio.Ring:Remove(pipe)
Prio.ByName[pipe.name] = nil
DelPipe(pipe)
else
Prio.Ring.pos = Prio.Ring.pos.next
end
local didSend=false
local lowerDest = strlower(msg[3] or "")
if lowerDest == "raid" and not UnitInRaid("player") then
-- do nothing
elseif lowerDest == "party" and not UnitInParty("player") then
-- do nothing
else
Prio.avail = Prio.avail - msg.nSize
bMyTraffic = true
msg.f(unpack(msg, 1, msg.n))
bMyTraffic = false
Prio.nTotalSent = Prio.nTotalSent + msg.nSize
DelMsg(msg)
didSend = true
end
-- notify caller of delivery (even if we didn't send it)
if msg.callbackFn then
msg.callbackFn (msg.callbackArg, didSend)
end
-- USER CALLBACK MAY ERROR
end
end
function ChatThrottleLib.OnEvent(this,event)
-- v11: We know that the rate limiter is touchy after login. Assume that it's touchy after zoning, too.
local self = ChatThrottleLib
if event == "PLAYER_ENTERING_WORLD" then
self.HardThrottlingBeginTime = GetTime() -- Throttle hard for a few seconds after zoning
self.avail = 0
end
end
function ChatThrottleLib.OnUpdate(this,delay)
local self = ChatThrottleLib
self.OnUpdateDelay = self.OnUpdateDelay + delay
if self.OnUpdateDelay < 0.08 then
return
end
self.OnUpdateDelay = 0
self:UpdateAvail()
if self.avail < 0 then
return -- argh. some bastard is spewing stuff past the lib. just bail early to save cpu.
end
-- See how many of our priorities have queued messages (we only have 3, don't worry about the loop)
local n = 0
for prioname,Prio in pairs(self.Prio) do
if Prio.Ring.pos or Prio.avail < 0 then
n = n + 1
end
end
-- Anything queued still?
if n<1 then
-- Nope. Move spillover bandwidth to global availability gauge and clear self.bQueueing
for prioname, Prio in pairs(self.Prio) do
self.avail = self.avail + Prio.avail
Prio.avail = 0
end
self.bQueueing = false
self.Frame:Hide()
return
end
-- There's stuff queued. Hand out available bandwidth to priorities as needed and despool their queues
local avail = self.avail/n
self.avail = 0
for prioname, Prio in pairs(self.Prio) do
if Prio.Ring.pos or Prio.avail < 0 then
Prio.avail = Prio.avail + avail
if Prio.Ring.pos and Prio.avail > Prio.Ring.pos[1].nSize then
self:Despool(Prio)
-- Note: We might not get here if the user-supplied callback function errors out! Take care!
end
end
end
end
-----------------------------------------------------------------------
-- Spooling logic
function ChatThrottleLib:Enqueue(prioname, pipename, msg)
local Prio = self.Prio[prioname]
local pipe = Prio.ByName[pipename]
if not pipe then
self.Frame:Show()
pipe = NewPipe()
pipe.name = pipename
Prio.ByName[pipename] = pipe
Prio.Ring:Add(pipe)
end
pipe[#pipe + 1] = msg
self.bQueueing = true
end
function ChatThrottleLib:SendChatMessage(prio, prefix, text, chattype, language, destination, queueName, callbackFn, callbackArg)
if not self or not prio or not prefix or not text or not self.Prio[prio] then
error('Usage: ChatThrottleLib:SendChatMessage("{BULK||NORMAL||ALERT}", "prefix", "text"[, "chattype"[, "language"[, "destination"]]]', 2)
end
if callbackFn and type(callbackFn)~="function" then
error('ChatThrottleLib:ChatMessage(): callbackFn: expected function, got '..type(callbackFn), 2)
end
local nSize = text:len()
if nSize>255 then
error("ChatThrottleLib:SendChatMessage(): message length cannot exceed 255 bytes", 2)
end
nSize = nSize + self.MSG_OVERHEAD
-- Check if there's room in the global available bandwidth gauge to send directly
if not self.bQueueing and nSize < self:UpdateAvail() then
self.avail = self.avail - nSize
bMyTraffic = true
_G.SendChatMessage(text, chattype, language, destination)
bMyTraffic = false
self.Prio[prio].nTotalSent = self.Prio[prio].nTotalSent + nSize
if callbackFn then
callbackFn (callbackArg, true)
end
-- USER CALLBACK MAY ERROR
return
end
-- Message needs to be queued
local msg = NewMsg()
msg.f = _G.SendChatMessage
msg[1] = text
msg[2] = chattype or "SAY"
msg[3] = language
msg[4] = destination
msg.n = 4
msg.nSize = nSize
msg.callbackFn = callbackFn
msg.callbackArg = callbackArg
self:Enqueue(prio, queueName or (prefix..(chattype or "SAY")..(destination or "")), msg)
end
function ChatThrottleLib:SendAddonMessage(prio, prefix, text, chattype, target, queueName, callbackFn, callbackArg)
if not self or not prio or not prefix or not text or not chattype or not self.Prio[prio] then
error('Usage: ChatThrottleLib:SendAddonMessage("{BULK||NORMAL||ALERT}", "prefix", "text", "chattype"[, "target"])', 2)
end
if callbackFn and type(callbackFn)~="function" then
error('ChatThrottleLib:SendAddonMessage(): callbackFn: expected function, got '..type(callbackFn), 2)
end
local nSize = text:len();
if C_ChatInfo or RegisterAddonMessagePrefix then
if nSize>255 then
error("ChatThrottleLib:SendAddonMessage(): message length cannot exceed 255 bytes", 2)
end
else
nSize = nSize + prefix:len() + 1
if nSize>255 then
error("ChatThrottleLib:SendAddonMessage(): prefix + message length cannot exceed 254 bytes", 2)
end
end
nSize = nSize + self.MSG_OVERHEAD;
-- Check if there's room in the global available bandwidth gauge to send directly
if not self.bQueueing and nSize < self:UpdateAvail() then
self.avail = self.avail - nSize
bMyTraffic = true
if _G.C_ChatInfo then
_G.C_ChatInfo.SendAddonMessage(prefix, text, chattype, target)
else
_G.SendAddonMessage(prefix, text, chattype, target)
end
bMyTraffic = false
self.Prio[prio].nTotalSent = self.Prio[prio].nTotalSent + nSize
if callbackFn then
callbackFn (callbackArg, true)
end
-- USER CALLBACK MAY ERROR
return
end
-- Message needs to be queued
local msg = NewMsg()
msg.f = _G.C_ChatInfo and _G.C_ChatInfo.SendAddonMessage or _G.SendAddonMessage
msg[1] = prefix
msg[2] = text
msg[3] = chattype
msg[4] = target
msg.n = (target~=nil) and 4 or 3;
msg.nSize = nSize
msg.callbackFn = callbackFn
msg.callbackArg = callbackArg
self:Enqueue(prio, queueName or (prefix..chattype..(target or "")), msg)
end
-----------------------------------------------------------------------
-- Get the ball rolling!
ChatThrottleLib:Init()
--[[ WoWBench debugging snippet
if(WOWB_VER) then
local function SayTimer()
print("SAY: "..GetTime().." "..arg1)
end
ChatThrottleLib.Frame:SetScript("OnEvent", SayTimer)
ChatThrottleLib.Frame:RegisterEvent("CHAT_MSG_SAY")
end
]]
-133
View File
@@ -1,133 +0,0 @@
--- **AceLocale-3.0** manages localization in addons, allowing for multiple locale to be registered with fallback to the base locale for untranslated strings.
-- @class file
-- @name AceLocale-3.0
-- @release $Id: AceLocale-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
local MAJOR,MINOR = "AceLocale-3.0", 6
local AceLocale, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not AceLocale then return end -- no upgrade needed
-- Lua APIs
local assert, tostring, error = assert, tostring, error
local getmetatable, setmetatable, rawset, rawget = getmetatable, setmetatable, rawset, rawget
local gameLocale = GetLocale()
if gameLocale == "enGB" then
gameLocale = "enUS"
end
AceLocale.apps = AceLocale.apps or {} -- array of ["AppName"]=localetableref
AceLocale.appnames = AceLocale.appnames or {} -- array of [localetableref]="AppName"
-- This metatable is used on all tables returned from GetLocale
local readmeta = {
__index = function(self, key) -- requesting totally unknown entries: fire off a nonbreaking error and return key
rawset(self, key, key) -- only need to see the warning once, really
geterrorhandler()(MAJOR..": "..tostring(AceLocale.appnames[self])..": Missing entry for '"..tostring(key).."'")
return key
end
}
-- This metatable is used on all tables returned from GetLocale if the silent flag is true, it does not issue a warning on unknown keys
local readmetasilent = {
__index = function(self, key) -- requesting totally unknown entries: return key
rawset(self, key, key) -- only need to invoke this function once
return key
end
}
-- Remember the locale table being registered right now (it gets set by :NewLocale())
-- NOTE: Do never try to register 2 locale tables at once and mix their definition.
local registering
-- local assert false function
local assertfalse = function() assert(false) end
-- This metatable proxy is used when registering nondefault locales
local writeproxy = setmetatable({}, {
__newindex = function(self, key, value)
rawset(registering, key, value == true and key or value) -- assigning values: replace 'true' with key string
end,
__index = assertfalse
})
-- This metatable proxy is used when registering the default locale.
-- It refuses to overwrite existing values
-- Reason 1: Allows loading locales in any order
-- Reason 2: If 2 modules have the same string, but only the first one to be
-- loaded has a translation for the current locale, the translation
-- doesn't get overwritten.
--
local writedefaultproxy = setmetatable({}, {
__newindex = function(self, key, value)
if not rawget(registering, key) then
rawset(registering, key, value == true and key or value)
end
end,
__index = assertfalse
})
--- Register a new locale (or extend an existing one) for the specified application.
-- :NewLocale will return a table you can fill your locale into, or nil if the locale isn't needed for the players
-- game locale.
-- @paramsig application, locale[, isDefault[, silent]]
-- @param application Unique name of addon / module
-- @param locale Name of the locale to register, e.g. "enUS", "deDE", etc.
-- @param isDefault If this is the default locale being registered (your addon is written in this language, generally enUS)
-- @param silent If true, the locale will not issue warnings for missing keys. Must be set on the first locale registered. If set to "raw", nils will be returned for unknown keys (no metatable used).
-- @usage
-- -- enUS.lua
-- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "enUS", true)
-- L["string1"] = true
--
-- -- deDE.lua
-- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "deDE")
-- if not L then return end
-- L["string1"] = "Zeichenkette1"
-- @return Locale Table to add localizations to, or nil if the current locale is not required.
function AceLocale:NewLocale(application, locale, isDefault, silent)
-- GAME_LOCALE allows translators to test translations of addons without having that wow client installed
local activeGameLocale = GAME_LOCALE or gameLocale
local app = AceLocale.apps[application]
if silent and app and getmetatable(app) ~= readmetasilent then
geterrorhandler()("Usage: NewLocale(application, locale[, isDefault[, silent]]): 'silent' must be specified for the first locale registered")
end
if not app then
if silent=="raw" then
app = {}
else
app = setmetatable({}, silent and readmetasilent or readmeta)
end
AceLocale.apps[application] = app
AceLocale.appnames[app] = application
end
if locale ~= activeGameLocale and not isDefault then
return -- nop, we don't need these translations
end
registering = app -- remember globally for writeproxy and writedefaultproxy
if isDefault then
return writedefaultproxy
end
return writeproxy
end
--- Returns localizations for the current locale (or default locale if translations are missing).
-- Errors if nothing is registered (spank developer, not just a missing translation)
-- @param application Unique name of addon / module
-- @param silent If true, the locale is optional, silently return nil if it's not found (defaults to false, optional)
-- @return The locale table for the current language.
function AceLocale:GetLocale(application, silent)
if not silent and not AceLocale.apps[application] then
error("Usage: GetLocale(application[, silent]): 'application' - No locales registered for '"..tostring(application).."'", 2)
end
return AceLocale.apps[application]
end
-4
View File
@@ -1,4 +0,0 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="AceLocale-3.0.lua"/>
</Ui>
@@ -1,287 +0,0 @@
--- **AceSerializer-3.0** can serialize any variable (except functions or userdata) into a string format,
-- that can be send over the addon comm channel. AceSerializer was designed to keep all data intact, especially
-- very large numbers or floating point numbers, and table structures. The only caveat currently is, that multiple
-- references to the same table will be send individually.
--
-- **AceSerializer-3.0** can be embeded into your addon, either explicitly by calling AceSerializer:Embed(MyAddon) or by
-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
-- and can be accessed directly, without having to explicitly call AceSerializer itself.\\
-- It is recommended to embed AceSerializer, otherwise you'll have to specify a custom `self` on all calls you
-- make into AceSerializer.
-- @class file
-- @name AceSerializer-3.0
-- @release $Id: AceSerializer-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
local MAJOR,MINOR = "AceSerializer-3.0", 5
local AceSerializer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not AceSerializer then return end
-- Lua APIs
local strbyte, strchar, gsub, gmatch, format = string.byte, string.char, string.gsub, string.gmatch, string.format
local assert, error, pcall = assert, error, pcall
local type, tostring, tonumber = type, tostring, tonumber
local pairs, select, frexp = pairs, select, math.frexp
local tconcat = table.concat
-- quick copies of string representations of wonky numbers
local inf = math.huge
local serNaN -- can't do this in 4.3, see ace3 ticket 268
local serInf, serInfMac = "1.#INF", "inf"
local serNegInf, serNegInfMac = "-1.#INF", "-inf"
-- Serialization functions
local function SerializeStringHelper(ch) -- Used by SerializeValue for strings
-- We use \126 ("~") as an escape character for all nonprints plus a few more
local n = strbyte(ch)
if n==30 then -- v3 / ticket 115: catch a nonprint that ends up being "~^" when encoded... DOH
return "\126\122"
elseif n<=32 then -- nonprint + space
return "\126"..strchar(n+64)
elseif n==94 then -- value separator
return "\126\125"
elseif n==126 then -- our own escape character
return "\126\124"
elseif n==127 then -- nonprint (DEL)
return "\126\123"
else
assert(false) -- can't be reached if caller uses a sane regex
end
end
local function SerializeValue(v, res, nres)
-- We use "^" as a value separator, followed by one byte for type indicator
local t=type(v)
if t=="string" then -- ^S = string (escaped to remove nonprints, "^"s, etc)
res[nres+1] = "^S"
res[nres+2] = gsub(v,"[%c \94\126\127]", SerializeStringHelper)
nres=nres+2
elseif t=="number" then -- ^N = number (just tostring()ed) or ^F (float components)
local str = tostring(v)
if tonumber(str)==v --[[not in 4.3 or str==serNaN]] then
-- translates just fine, transmit as-is
res[nres+1] = "^N"
res[nres+2] = str
nres=nres+2
elseif v == inf or v == -inf then
res[nres+1] = "^N"
res[nres+2] = v == inf and serInf or serNegInf
nres=nres+2
else
local m,e = frexp(v)
res[nres+1] = "^F"
res[nres+2] = format("%.0f",m*2^53) -- force mantissa to become integer (it's originally 0.5--0.9999)
res[nres+3] = "^f"
res[nres+4] = tostring(e-53) -- adjust exponent to counteract mantissa manipulation
nres=nres+4
end
elseif t=="table" then -- ^T...^t = table (list of key,value pairs)
nres=nres+1
res[nres] = "^T"
for key,value in pairs(v) do
nres = SerializeValue(key, res, nres)
nres = SerializeValue(value, res, nres)
end
nres=nres+1
res[nres] = "^t"
elseif t=="boolean" then -- ^B = true, ^b = false
nres=nres+1
if v then
res[nres] = "^B" -- true
else
res[nres] = "^b" -- false
end
elseif t=="nil" then -- ^Z = nil (zero, "N" was taken :P)
nres=nres+1
res[nres] = "^Z"
else
error(MAJOR..": Cannot serialize a value of type '"..t.."'") -- can't produce error on right level, this is wildly recursive
end
return nres
end
local serializeTbl = { "^1" } -- "^1" = Hi, I'm data serialized by AceSerializer protocol rev 1
--- Serialize the data passed into the function.
-- Takes a list of values (strings, numbers, booleans, nils, tables)
-- and returns it in serialized form (a string).\\
-- May throw errors on invalid data types.
-- @param ... List of values to serialize
-- @return The data in its serialized form (string)
function AceSerializer:Serialize(...)
local nres = 1
for i=1,select("#", ...) do
local v = select(i, ...)
nres = SerializeValue(v, serializeTbl, nres)
end
serializeTbl[nres+1] = "^^" -- "^^" = End of serialized data
return tconcat(serializeTbl, "", 1, nres+1)
end
-- Deserialization functions
local function DeserializeStringHelper(escape)
if escape<"~\122" then
return strchar(strbyte(escape,2,2)-64)
elseif escape=="~\122" then -- v3 / ticket 115: special case encode since 30+64=94 ("^") - OOPS.
return "\030"
elseif escape=="~\123" then
return "\127"
elseif escape=="~\124" then
return "\126"
elseif escape=="~\125" then
return "\94"
end
error("DeserializeStringHelper got called for '"..escape.."'?!?") -- can't be reached unless regex is screwed up
end
local function DeserializeNumberHelper(number)
--[[ not in 4.3 if number == serNaN then
return 0/0
else]]if number == serNegInf or number == serNegInfMac then
return -inf
elseif number == serInf or number == serInfMac then
return inf
else
return tonumber(number)
end
end
-- DeserializeValue: worker function for :Deserialize()
-- It works in two modes:
-- Main (top-level) mode: Deserialize a list of values and return them all
-- Recursive (table) mode: Deserialize only a single value (_may_ of course be another table with lots of subvalues in it)
--
-- The function _always_ works recursively due to having to build a list of values to return
--
-- Callers are expected to pcall(DeserializeValue) to trap errors
local function DeserializeValue(iter,single,ctl,data)
if not single then
ctl,data = iter()
end
if not ctl then
error("Supplied data misses AceSerializer terminator ('^^')")
end
if ctl=="^^" then
-- ignore extraneous data
return
end
local res
if ctl=="^S" then
res = gsub(data, "~.", DeserializeStringHelper)
elseif ctl=="^N" then
res = DeserializeNumberHelper(data)
if not res then
error("Invalid serialized number: '"..tostring(data).."'")
end
elseif ctl=="^F" then -- ^F<mantissa>^f<exponent>
local ctl2,e = iter()
if ctl2~="^f" then
error("Invalid serialized floating-point number, expected '^f', not '"..tostring(ctl2).."'")
end
local m=tonumber(data)
e=tonumber(e)
if not (m and e) then
error("Invalid serialized floating-point number, expected mantissa and exponent, got '"..tostring(m).."' and '"..tostring(e).."'")
end
res = m*(2^e)
elseif ctl=="^B" then -- yeah yeah ignore data portion
res = true
elseif ctl=="^b" then -- yeah yeah ignore data portion
res = false
elseif ctl=="^Z" then -- yeah yeah ignore data portion
res = nil
elseif ctl=="^T" then
-- ignore ^T's data, future extensibility?
res = {}
local k,v
while true do
ctl,data = iter()
if ctl=="^t" then break end -- ignore ^t's data
k = DeserializeValue(iter,true,ctl,data)
if k==nil then
error("Invalid AceSerializer table format (no table end marker)")
end
ctl,data = iter()
v = DeserializeValue(iter,true,ctl,data)
if v==nil then
error("Invalid AceSerializer table format (no table end marker)")
end
res[k]=v
end
else
error("Invalid AceSerializer control code '"..ctl.."'")
end
if not single then
return res,DeserializeValue(iter)
else
return res
end
end
--- Deserializes the data into its original values.
-- Accepts serialized data, ignoring all control characters and whitespace.
-- @param str The serialized data (from :Serialize)
-- @return true followed by a list of values, OR false followed by an error message
function AceSerializer:Deserialize(str)
str = gsub(str, "[%c ]", "") -- ignore all control characters; nice for embedding in email and stuff
local iter = gmatch(str, "(^.)([^^]*)") -- Any ^x followed by string of non-^
local ctl,data = iter()
if not ctl or ctl~="^1" then
-- we purposefully ignore the data portion of the start code, it can be used as an extension mechanism
return false, "Supplied data is not AceSerializer data (rev 1)"
end
return pcall(DeserializeValue, iter)
end
----------------------------------------
-- Base library stuff
----------------------------------------
AceSerializer.internals = { -- for test scripts
SerializeValue = SerializeValue,
SerializeStringHelper = SerializeStringHelper,
}
local mixins = {
"Serialize",
"Deserialize",
}
AceSerializer.embeds = AceSerializer.embeds or {}
function AceSerializer:Embed(target)
for k, v in pairs(mixins) do
target[v] = self[v]
end
self.embeds[target] = true
return target
end
-- Update embeds
for target, v in pairs(AceSerializer.embeds) do
AceSerializer:Embed(target)
end
@@ -1,4 +0,0 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="AceSerializer-3.0.lua"/>
</Ui>
-278
View File
@@ -1,278 +0,0 @@
--- **AceTimer-3.0** provides a central facility for registering timers.
-- AceTimer supports one-shot timers and repeating timers. All timers are stored in an efficient
-- data structure that allows easy dispatching and fast rescheduling. Timers can be registered
-- or canceled at any time, even from within a running timer, without conflict or large overhead.\\
-- AceTimer is currently limited to firing timers at a frequency of 0.01s as this is what the WoW timer API
-- restricts us to.
--
-- All `:Schedule` functions will return a handle to the current timer, which you will need to store if you
-- need to cancel the timer you just registered.
--
-- **AceTimer-3.0** can be embeded into your addon, either explicitly by calling AceTimer:Embed(MyAddon) or by
-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
-- and can be accessed directly, without having to explicitly call AceTimer itself.\\
-- It is recommended to embed AceTimer, otherwise you'll have to specify a custom `self` on all calls you
-- make into AceTimer.
-- @class file
-- @name AceTimer-3.0
-- @release $Id: AceTimer-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
local MAJOR, MINOR = "AceTimer-3.0", 17 -- Bump minor on changes
local AceTimer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not AceTimer then return end -- No upgrade needed
AceTimer.activeTimers = AceTimer.activeTimers or {} -- Active timer list
local activeTimers = AceTimer.activeTimers -- Upvalue our private data
-- Lua APIs
local type, unpack, next, error, select = type, unpack, next, error, select
-- WoW APIs
local GetTime, C_TimerAfter = GetTime, C_Timer.After
local function new(self, loop, func, delay, ...)
if delay < 0.01 then
delay = 0.01 -- Restrict to the lowest time that the C_Timer API allows us
end
local timer = {
object = self,
func = func,
looping = loop,
argsCount = select("#", ...),
delay = delay,
ends = GetTime() + delay,
...
}
activeTimers[timer] = timer
-- Create new timer closure to wrap the "timer" object
timer.callback = function()
if not timer.cancelled then
if type(timer.func) == "string" then
-- We manually set the unpack count to prevent issues with an arg set that contains nil and ends with nil
-- e.g. local t = {1, 2, nil, 3, nil} print(#t) will result in 2, instead of 5. This fixes said issue.
timer.object[timer.func](timer.object, unpack(timer, 1, timer.argsCount))
else
timer.func(unpack(timer, 1, timer.argsCount))
end
if timer.looping and not timer.cancelled then
-- Compensate delay to get a perfect average delay, even if individual times don't match up perfectly
-- due to fps differences
local time = GetTime()
local ndelay = timer.delay - (time - timer.ends)
-- Ensure the delay doesn't go below the threshold
if ndelay < 0.01 then ndelay = 0.01 end
C_TimerAfter(ndelay, timer.callback)
timer.ends = time + ndelay
else
activeTimers[timer.handle or timer] = nil
end
end
end
C_TimerAfter(delay, timer.callback)
return timer
end
--- Schedule a new one-shot timer.
-- The timer will fire once in `delay` seconds, unless canceled before.
-- @param callback Callback function for the timer pulse (funcref or method name).
-- @param delay Delay for the timer, in seconds.
-- @param ... An optional, unlimited amount of arguments to pass to the callback function.
-- @usage
-- MyAddOn = LibStub("AceAddon-3.0"):NewAddon("MyAddOn", "AceTimer-3.0")
--
-- function MyAddOn:OnEnable()
-- self:ScheduleTimer("TimerFeedback", 5)
-- end
--
-- function MyAddOn:TimerFeedback()
-- print("5 seconds passed")
-- end
function AceTimer:ScheduleTimer(func, delay, ...)
if not func or not delay then
error(MAJOR..": ScheduleTimer(callback, delay, args...): 'callback' and 'delay' must have set values.", 2)
end
if type(func) == "string" then
if type(self) ~= "table" then
error(MAJOR..": ScheduleTimer(callback, delay, args...): 'self' - must be a table.", 2)
elseif not self[func] then
error(MAJOR..": ScheduleTimer(callback, delay, args...): Tried to register '"..func.."' as the callback, but it doesn't exist in the module.", 2)
end
end
return new(self, nil, func, delay, ...)
end
--- Schedule a repeating timer.
-- The timer will fire every `delay` seconds, until canceled.
-- @param callback Callback function for the timer pulse (funcref or method name).
-- @param delay Delay for the timer, in seconds.
-- @param ... An optional, unlimited amount of arguments to pass to the callback function.
-- @usage
-- MyAddOn = LibStub("AceAddon-3.0"):NewAddon("MyAddOn", "AceTimer-3.0")
--
-- function MyAddOn:OnEnable()
-- self.timerCount = 0
-- self.testTimer = self:ScheduleRepeatingTimer("TimerFeedback", 5)
-- end
--
-- function MyAddOn:TimerFeedback()
-- self.timerCount = self.timerCount + 1
-- print(("%d seconds passed"):format(5 * self.timerCount))
-- -- run 30 seconds in total
-- if self.timerCount == 6 then
-- self:CancelTimer(self.testTimer)
-- end
-- end
function AceTimer:ScheduleRepeatingTimer(func, delay, ...)
if not func or not delay then
error(MAJOR..": ScheduleRepeatingTimer(callback, delay, args...): 'callback' and 'delay' must have set values.", 2)
end
if type(func) == "string" then
if type(self) ~= "table" then
error(MAJOR..": ScheduleRepeatingTimer(callback, delay, args...): 'self' - must be a table.", 2)
elseif not self[func] then
error(MAJOR..": ScheduleRepeatingTimer(callback, delay, args...): Tried to register '"..func.."' as the callback, but it doesn't exist in the module.", 2)
end
end
return new(self, true, func, delay, ...)
end
--- Cancels a timer with the given id, registered by the same addon object as used for `:ScheduleTimer`
-- Both one-shot and repeating timers can be canceled with this function, as long as the `id` is valid
-- and the timer has not fired yet or was canceled before.
-- @param id The id of the timer, as returned by `:ScheduleTimer` or `:ScheduleRepeatingTimer`
function AceTimer:CancelTimer(id)
local timer = activeTimers[id]
if not timer then
return false
else
timer.cancelled = true
activeTimers[id] = nil
return true
end
end
--- Cancels all timers registered to the current addon object ('self')
function AceTimer:CancelAllTimers()
for k,v in next, activeTimers do
if v.object == self then
AceTimer.CancelTimer(self, k)
end
end
end
--- Returns the time left for a timer with the given id, registered by the current addon object ('self').
-- This function will return 0 when the id is invalid.
-- @param id The id of the timer, as returned by `:ScheduleTimer` or `:ScheduleRepeatingTimer`
-- @return The time left on the timer.
function AceTimer:TimeLeft(id)
local timer = activeTimers[id]
if not timer then
return 0
else
return timer.ends - GetTime()
end
end
-- ---------------------------------------------------------------------
-- Upgrading
-- Upgrade from old hash-bucket based timers to C_Timer.After timers.
if oldminor and oldminor < 10 then
-- disable old timer logic
AceTimer.frame:SetScript("OnUpdate", nil)
AceTimer.frame:SetScript("OnEvent", nil)
AceTimer.frame:UnregisterAllEvents()
-- convert timers
for object,timers in next, AceTimer.selfs do
for handle,timer in next, timers do
if type(timer) == "table" and timer.callback then
local newTimer
if timer.delay then
newTimer = AceTimer.ScheduleRepeatingTimer(timer.object, timer.callback, timer.delay, timer.arg)
else
newTimer = AceTimer.ScheduleTimer(timer.object, timer.callback, timer.when - GetTime(), timer.arg)
end
-- Use the old handle for old timers
activeTimers[newTimer] = nil
activeTimers[handle] = newTimer
newTimer.handle = handle
end
end
end
AceTimer.selfs = nil
AceTimer.hash = nil
AceTimer.debug = nil
elseif oldminor and oldminor < 17 then
-- Upgrade from old animation based timers to C_Timer.After timers.
AceTimer.inactiveTimers = nil
AceTimer.frame = nil
local oldTimers = AceTimer.activeTimers
-- Clear old timer table and update upvalue
AceTimer.activeTimers = {}
activeTimers = AceTimer.activeTimers
for handle, timer in next, oldTimers do
local newTimer
-- Stop the old timer animation
local duration, elapsed = timer:GetDuration(), timer:GetElapsed()
timer:GetParent():Stop()
if timer.looping then
newTimer = AceTimer.ScheduleRepeatingTimer(timer.object, timer.func, duration, unpack(timer.args, 1, timer.argsCount))
else
newTimer = AceTimer.ScheduleTimer(timer.object, timer.func, duration - elapsed, unpack(timer.args, 1, timer.argsCount))
end
-- Use the old handle for old timers
activeTimers[newTimer] = nil
activeTimers[handle] = newTimer
newTimer.handle = handle
end
-- Migrate transitional handles
if oldminor < 13 and AceTimer.hashCompatTable then
for handle, id in next, AceTimer.hashCompatTable do
local t = activeTimers[id]
if t then
activeTimers[id] = nil
activeTimers[handle] = t
t.handle = handle
end
end
AceTimer.hashCompatTable = nil
end
end
-- ---------------------------------------------------------------------
-- Embed handling
AceTimer.embeds = AceTimer.embeds or {}
local mixins = {
"ScheduleTimer", "ScheduleRepeatingTimer",
"CancelTimer", "CancelAllTimers",
"TimeLeft"
}
function AceTimer:Embed(target)
AceTimer.embeds[target] = true
for _,v in next, mixins do
target[v] = AceTimer[v]
end
return target
end
-- AceTimer:OnEmbedDisable(target)
-- target (object) - target object that AceTimer is embedded in.
--
-- cancel all timers registered for the object
function AceTimer:OnEmbedDisable(target)
target:CancelAllTimers()
end
for addon in next, AceTimer.embeds do
AceTimer:Embed(addon)
end
-4
View File
@@ -1,4 +0,0 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="AceTimer-3.0.lua"/>
</Ui>
@@ -1,202 +0,0 @@
--[[ $Id: CallbackHandler-1.0.lua 1298 2022-12-12 15:10:10Z nevcairiel $ ]]
local MAJOR, MINOR = "CallbackHandler-1.0", 8
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
if not CallbackHandler then return end -- No upgrade needed
local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}
-- Lua APIs
local securecallfunction, error = securecallfunction, error
local setmetatable, rawget = setmetatable, rawget
local next, select, pairs, type, tostring = next, select, pairs, type, tostring
local function Dispatch(handlers, ...)
local index, method = next(handlers)
if not method then return end
repeat
securecallfunction(method, ...)
index, method = next(handlers, index)
until not method
end
--------------------------------------------------------------------------
-- CallbackHandler:New
--
-- target - target object to embed public APIs in
-- RegisterName - name of the callback registration API, default "RegisterCallback"
-- UnregisterName - name of the callback unregistration API, default "UnregisterCallback"
-- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
function CallbackHandler.New(_self, target, RegisterName, UnregisterName, UnregisterAllName)
RegisterName = RegisterName or "RegisterCallback"
UnregisterName = UnregisterName or "UnregisterCallback"
if UnregisterAllName==nil then -- false is used to indicate "don't want this method"
UnregisterAllName = "UnregisterAllCallbacks"
end
-- we declare all objects and exported APIs inside this closure to quickly gain access
-- to e.g. function names, the "target" parameter, etc
-- Create the registry object
local events = setmetatable({}, meta)
local registry = { recurse=0, events=events }
-- registry:Fire() - fires the given event/message into the registry
function registry:Fire(eventname, ...)
if not rawget(events, eventname) or not next(events[eventname]) then return end
local oldrecurse = registry.recurse
registry.recurse = oldrecurse + 1
Dispatch(events[eventname], eventname, ...)
registry.recurse = oldrecurse
if registry.insertQueue and oldrecurse==0 then
-- Something in one of our callbacks wanted to register more callbacks; they got queued
for event,callbacks in pairs(registry.insertQueue) do
local first = not rawget(events, event) or not next(events[event]) -- test for empty before. not test for one member after. that one member may have been overwritten.
for object,func in pairs(callbacks) do
events[event][object] = func
-- fire OnUsed callback?
if first and registry.OnUsed then
registry.OnUsed(registry, target, event)
first = nil
end
end
end
registry.insertQueue = nil
end
end
-- Registration of a callback, handles:
-- self["method"], leads to self["method"](self, ...)
-- self with function ref, leads to functionref(...)
-- "addonId" (instead of self) with function ref, leads to functionref(...)
-- all with an optional arg, which, if present, gets passed as first argument (after self if present)
target[RegisterName] = function(self, eventname, method, ... --[[actually just a single arg]])
if type(eventname) ~= "string" then
error("Usage: "..RegisterName.."(eventname, method[, arg]): 'eventname' - string expected.", 2)
end
method = method or eventname
local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten.
if type(method) ~= "string" and type(method) ~= "function" then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - string or function expected.", 2)
end
local regfunc
if type(method) == "string" then
-- self["method"] calling style
if type(self) ~= "table" then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): self was not a table?", 2)
elseif self==target then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): do not use Library:"..RegisterName.."(), use your own 'self'", 2)
elseif type(self[method]) ~= "function" then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - method '"..tostring(method).."' not found on self.", 2)
end
if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
local arg=select(1,...)
regfunc = function(...) self[method](self,arg,...) end
else
regfunc = function(...) self[method](self,...) end
end
else
-- function ref with self=object or self="addonId" or self=thread
if type(self)~="table" and type(self)~="string" and type(self)~="thread" then
error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string or thread expected.", 2)
end
if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
local arg=select(1,...)
regfunc = function(...) method(arg,...) end
else
regfunc = method
end
end
if events[eventname][self] or registry.recurse<1 then
-- if registry.recurse<1 then
-- we're overwriting an existing entry, or not currently recursing. just set it.
events[eventname][self] = regfunc
-- fire OnUsed callback?
if registry.OnUsed and first then
registry.OnUsed(registry, target, eventname)
end
else
-- we're currently processing a callback in this registry, so delay the registration of this new entry!
-- yes, we're a bit wasteful on garbage, but this is a fringe case, so we're picking low implementation overhead over garbage efficiency
registry.insertQueue = registry.insertQueue or setmetatable({},meta)
registry.insertQueue[eventname][self] = regfunc
end
end
-- Unregister a callback
target[UnregisterName] = function(self, eventname)
if not self or self==target then
error("Usage: "..UnregisterName.."(eventname): bad 'self'", 2)
end
if type(eventname) ~= "string" then
error("Usage: "..UnregisterName.."(eventname): 'eventname' - string expected.", 2)
end
if rawget(events, eventname) and events[eventname][self] then
events[eventname][self] = nil
-- Fire OnUnused callback?
if registry.OnUnused and not next(events[eventname]) then
registry.OnUnused(registry, target, eventname)
end
end
if registry.insertQueue and rawget(registry.insertQueue, eventname) and registry.insertQueue[eventname][self] then
registry.insertQueue[eventname][self] = nil
end
end
-- OPTIONAL: Unregister all callbacks for given selfs/addonIds
if UnregisterAllName then
target[UnregisterAllName] = function(...)
if select("#",...)<1 then
error("Usage: "..UnregisterAllName.."([whatFor]): missing 'self' or \"addonId\" to unregister events for.", 2)
end
if select("#",...)==1 and ...==target then
error("Usage: "..UnregisterAllName.."([whatFor]): supply a meaningful 'self' or \"addonId\"", 2)
end
for i=1,select("#",...) do
local self = select(i,...)
if registry.insertQueue then
for eventname, callbacks in pairs(registry.insertQueue) do
if callbacks[self] then
callbacks[self] = nil
end
end
end
for eventname, callbacks in pairs(events) do
if callbacks[self] then
callbacks[self] = nil
-- Fire OnUnused callback?
if registry.OnUnused and not next(callbacks) then
registry.OnUnused(registry, target, eventname)
end
end
end
end
end
end
return registry
end
-- CallbackHandler purposefully does NOT do explicit embedding. Nor does it
-- try to upgrade old implicit embeds since the system is selfcontained and
-- relies on closures to work.
@@ -1,4 +0,0 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="CallbackHandler-1.0.lua"/>
</Ui>
-11
View File
@@ -1,11 +0,0 @@
background.blp
border_1.blp
border_2.blp
border_3.blp
cooltip_background.blp
feedback_sites.blp
icons.blp
mail.blp
*.json
CHANGES.txt
+14 -13
View File
@@ -12,10 +12,10 @@ local tinsert = table.insert
local GetSpellInfo = GetSpellInfo or function(spellID) if not spellID then return nil end local si = C_Spell.GetSpellInfo(spellID) if si then return si.name, nil, si.iconID, si.castTime, si.minRange, si.maxRange, si.spellID, si.originalIconID end end
local lower = string.lower
local SpellBookItemTypeMap = Enum.SpellBookItemType and {[Enum.SpellBookItemType.Spell] = "SPELL", [Enum.SpellBookItemType.None] = "NONE", [Enum.SpellBookItemType.Flyout] = "FLYOUT", [Enum.SpellBookItemType.FutureSpell] = "FUTURESPELL", [Enum.SpellBookItemType.PetAction] = "PETACTION" } or {}
local GetSpellBookItemInfo = GetSpellBookItemInfo or function(...) local si = C_SpellBook.GetSpellBookItemInfo(...) if si then return SpellBookItemTypeMap[si.itemType] or "NONE", si.spellID end end
local GetSpellBookItemInfo = GetSpellBookItemInfo
local SPELLBOOK_BANK_PLAYER = Enum.SpellBookSpellBank and Enum.SpellBookSpellBank.Player or "player"
local GetNumSpellTabs = GetNumSpellTabs or C_SpellBook.GetNumSpellBookSkillLines
local GetSpellTabInfo = GetSpellTabInfo or function(tabLine) local skillLine = C_SpellBook.GetSpellBookSkillLineInfo(tabLine) if skillLine then return skillLine.name, skillLine.iconID, skillLine.itemIndexOffset, skillLine.numSpellBookItems, skillLine.isGuild, skillLine.offSpecID end end
local GetNumSpellTabs = GetNumSpellTabs
local GetSpellTabInfo = GetSpellTabInfo
local unpack = unpack
local CreateFrame = CreateFrame
local GameTooltip = GameTooltip
@@ -1046,16 +1046,17 @@ end
function DF:GetAllPlayerSpells(include_lower_case)
local playerSpells = {}
for i = 1, GetNumSpellTabs() do
local _, _, offset, numSpells = GetSpellTabInfo(i)
for i = 1, numSpells do
local index = offset + i
local spellType, spellId = GetSpellBookItemInfo(index, SPELLBOOK_BANK_PLAYER)
if (spellType == "SPELL") then
local spellName = GetSpellInfo(spellId)
tinsert(playerSpells, spellName)
if (include_lower_case) then
tinsert(playerSpells, lower(spellName))
for i = 2, GetNumSpellTabs() do
local name, _, offset, numSpells = GetSpellTabInfo(i)
if name and name ~= "Internal" and name ~= "Ascension Vanity Items" then
for i = 1, numSpells do
local index = offset + i
local spellName = GetSpellInfo(index, BOOKTYPE_SPELL)
if spellName then
tinsert(playerSpells, spellName)
if (include_lower_case) then
tinsert(playerSpells, lower(spellName))
end
end
end
end
+3 -3
View File
@@ -156,13 +156,13 @@ local createOptionHighlightTexture = function(frame, label, widgetWidth)
highlightFrame:SetScript("OnLeave", onLeaveHighlight)
local highlightTexture = highlightFrame:CreateTexture(nil, "overlay")
highlightTexture:SetColorTexture(1, 1, 1, 0.1)
highlightTexture:SetTexture(1, 1, 1, 0.1)
PixelUtil.SetPoint(highlightTexture, "topleft", highlightFrame, "topleft", 0, 0)
PixelUtil.SetPoint(highlightTexture, "bottomright", highlightFrame, "bottomright", 0, 0)
highlightTexture:Hide()
local backgroundTexture = highlightFrame:CreateTexture(nil, "artwork")
backgroundTexture:SetColorTexture(1, 1, 1)
backgroundTexture:SetTexture(1, 1, 1)
backgroundTexture:SetVertexColor(.25, .25, .25, 0.5)
PixelUtil.SetPoint(backgroundTexture, "topleft", highlightFrame, "topleft", 0, 0)
PixelUtil.SetPoint(backgroundTexture, "bottomright", highlightFrame, "bottomright", 0, 0)
@@ -1587,7 +1587,7 @@ function detailsFramework:CreateInCombatTexture(frame)
end
local inCombatBackgroundTexture = detailsFramework:CreateImage(frame)
inCombatBackgroundTexture:SetColorTexture(.6, 0, 0, .1)
inCombatBackgroundTexture:SetTexture(.6, 0, 0, .1)
inCombatBackgroundTexture:Hide()
local inCombatLabel = detailsFramework:CreateLabel(frame, "you are in combat", 24, "silver")
+10 -10
View File
@@ -418,13 +418,13 @@ detailsFramework:Mixin(ButtonMetaFunctions, detailsFramework.ScriptHookMixin)
end
if (type(texture) == "string") then
local isAtlas = C_Texture.GetAtlasInfo(texture)
local isAtlas = AtlasUtil:AtlasExists(texture)
if (isAtlas) then
self.icon:SetAtlas(texture)
elseif (detailsFramework:IsHtmlColor(texture)) then
local r, g, b, a = detailsFramework:ParseColors(texture)
self.icon:SetColorTexture(r, g, b, a)
self.icon:SetTexture(r, g, b, a)
else
self.icon:SetTexture(texture, nil, nil, filterMode)
end
@@ -1134,7 +1134,7 @@ end
--texture which shows the texture color
local colorTexture = colorPickButton:CreateTexture("$parentTex", "overlay")
colorTexture:SetColorTexture(1, 1, 1)
colorTexture:SetTexture(1, 1, 1)
colorTexture:SetPoint("topleft", colorPickButton.widget, "topleft", 0, 0)
colorTexture:SetPoint("bottomright", colorPickButton.widget, "bottomright", 0, 0)
colorTexture:SetDrawLayer("background", 3)
@@ -1167,7 +1167,7 @@ end
local atlas
if (type(texture) == "string") then
atlas = C_Texture.GetAtlasInfo(texture)
atlas = AtlasUtil:AtlasExists(texture)
if (atlas) then
atlas = texture
end
@@ -1453,16 +1453,16 @@ function detailsFramework:CreateCloseButton(parent, frameName)
closeButton:SetSize(16, 16)
detailsFramework:Mixin(closeButton, detailsFramework.CloseButtonMixin)
closeButton:SetNormalAtlas("RedButton-Exit")
closeButton:SetHighlightAtlas("RedButton-Highlight")
closeButton:SetPushedAtlas("RedButton-exit-pressed")
closeButton:SetDisabledAtlas("RedButton-Exit-Disabled")
local normalTexture = closeButton:GetNormalTexture()
local pushedTexture = closeButton:GetPushedTexture()
local highlightTexture = closeButton:GetHighlightTexture()
local disabledTexture = closeButton:GetDisabledTexture()
normalTexture:SetAtlas("RedButton-Exit")
highlightTexture:SetAtlas("RedButton-Highlight")
pushedTexture:SetAtlas("RedButton-exit-pressed")
disabledTexture:SetAtlas("RedButton-Exit-Disabled")
normalTexture:SetDesaturated(true)
highlightTexture:SetDesaturated(true)
+7 -7
View File
@@ -160,7 +160,7 @@ local createVerticalAxisLabels = function(parent, amountLabels, labelsTable, red
local guideLine = parent:CreateLine("$parentYAxisLabel" .. i .. "GuideLine", "border")
guideLine:SetThickness(1)
guideLine:SetColorTexture(red, green, blue, 0.05)
guideLine:SetTexture(red, green, blue, 0.05)
label.circleTexture = circleTexture
label.guideLine = guideLine
@@ -351,8 +351,8 @@ detailsFramework.ChartFrameSharedMixin = {
--set the color of both axis lines
red, green, blue, alpha = detailsFramework:ParseColors(red, green, blue, alpha)
self.yAxisLine:SetColorTexture(red, green, blue, alpha)
self.xAxisLine:SetColorTexture(red, green, blue, alpha)
self.yAxisLine:SetTexture(red, green, blue, alpha)
self.xAxisLine:SetTexture(red, green, blue, alpha)
--iterage over all labels and set their color
for i = 1, #self.yAxisLabels do
@@ -520,10 +520,10 @@ detailsFramework.ChartFrameSharedMixin = {
thisIndicator:SetPoint("bottomright", self.plotFrame, "bottomleft", endX, 0)
thisIndicator.fieldLabel:SetText(labelText)
thisIndicator.fieldTexture:SetColorTexture(unpack(color))
thisIndicator.fieldTexture:SetTexture(unpack(color))
thisIndicator.indicatorLabel:SetText(labelText)
thisIndicator.indicatorTexture:SetColorTexture(unpack(color))
thisIndicator.indicatorTexture:SetTexture(unpack(color))
local stringWidth = thisIndicator.indicatorLabel:GetStringWidth()
local squareWidth = thisIndicator.indicatorTexture:GetWidth()
@@ -712,7 +712,7 @@ detailsFramework.ChartFrameMixin = {
for i = 1, maxLines do
local line = self:GetLine()
line:SetColorTexture(unpack(self.color))
line:SetTexture(unpack(self.color))
if (line.thickness ~= self.lineThickness) then
line:SetThickness(self.lineThickness)
@@ -971,7 +971,7 @@ detailsFramework.MultiChartFrameMixin = {
self.lineNameIndicators[nameIndicatorIndex] = thisIndicator
end
thisIndicator.Texture:SetColorTexture(red, green, blue, alpha)
thisIndicator.Texture:SetTexture(red, green, blue, alpha)
thisIndicator.Label:SetText(chartName)
local textWidth = thisIndicator.Label:GetStringWidth()
thisIndicator:SetWidth(math.max(textWidth + thisIndicator.Texture:GetWidth() + 4, 85))
+4 -13
View File
@@ -8,19 +8,6 @@ do
DF.alias_text_colors = DF.alias_text_colors or {}
local defaultColors = {
["HUNTER"] = {0.67, 0.83, 0.45},
["WARLOCK"] = {0.58, 0.51, 0.79},
["PRIEST"] = {1.0, 1.0, 1.0},
["PALADIN"] = {0.96, 0.55, 0.73},
["MAGE"] = {0.41, 0.8, 0.94},
["ROGUE"] = {1.0, 0.96, 0.41},
["DRUID"] = {1.0, 0.49, 0.04},
["SHAMAN"] = {0.0, 0.44, 0.87},
["WARRIOR"] = {0.78, 0.61, 0.43},
["DEATHKNIGHT"] = {0.77, 0.12, 0.23},
["MONK"] = {0.0, 1.00, 0.59},
["DEMONHUNTER"] = {0.64, 0.19, 0.79},
["EVOKER"] = {0.20, 0.58, 0.50},
["dark1"] = {0.1215, 0.1176, 0.1294},
["dark2"] = {0.2215, 0.2176, 0.2294},
@@ -172,6 +159,10 @@ do
["yellowgreen"] = {0.603922, 0.803922, 0.196078, 1}
}
for class, color in pairs(RAID_CLASS_COLORS) do
defaultColors[class] = { color.r, color.g, color.b }
end
function DF:GetDefaultColorList()
return defaultColors
end
+3 -3
View File
@@ -270,9 +270,9 @@ detailsFramework.FrameContainerMixin = {
frameContainer.sideResizers[i]:SetScript("OnMouseDown", frameContainer.OnResizerMouseDown)
frameContainer.sideResizers[i]:SetScript("OnMouseUp", frameContainer.OnResizerMouseUp)
frameContainer.sideResizers[i]:GetNormalTexture():SetColorTexture(1, 1, 1, 0.6)
frameContainer.sideResizers[i]:GetHighlightTexture():SetColorTexture(detailsFramework:ParseColors("aqua"))
frameContainer.sideResizers[i]:GetPushedTexture():SetColorTexture(1, 1, 1, 1)
frameContainer.sideResizers[i]:GetNormalTexture():SetTexture(1, 1, 1, 0.6)
frameContainer.sideResizers[i]:GetHighlightTexture():SetTexture(detailsFramework:ParseColors("aqua"))
frameContainer.sideResizers[i]:GetPushedTexture():SetTexture(1, 1, 1, 1)
frameContainer.sideResizers[i]:ClearAllPoints()
+11 -41
View File
@@ -259,7 +259,7 @@ function DF:CreateCoolTip()
--this texture get the color from gameCooltip:SetColor()
if (not self.frameBackgroundTexture) then
self.frameBackgroundTexture = self:CreateTexture("$parent_FrameBackgroundTexture", "BACKGROUND", nil, 2)
self.frameBackgroundTexture:SetColorTexture(0, 0, 0, 0)
self.frameBackgroundTexture:SetTexture(0, 0, 0, 0)
self.frameBackgroundTexture:SetAllPoints()
end
@@ -272,7 +272,7 @@ function DF:CreateCoolTip()
if (not self.selectedTop) then
self.selectedTop = self:CreateTexture("$parent_SelectedTop", "ARTWORK")
self.selectedTop:SetColorTexture(.5, .5, .5, .75)
self.selectedTop:SetTexture(.5, .5, .5, .75)
self.selectedTop:SetHeight(3)
end
@@ -284,13 +284,13 @@ function DF:CreateCoolTip()
if (not self.selectedBottom) then
self.selectedBottom = self:CreateTexture("$parent_SelectedBottom", "ARTWORK")
self.selectedBottom:SetColorTexture(.5, .5, .5, .75)
self.selectedBottom:SetTexture(.5, .5, .5, .75)
self.selectedBottom:SetHeight(3)
end
if (not self.selectedMiddle) then
self.selectedMiddle = self:CreateTexture("$parent_Selected", "ARTWORK")
self.selectedMiddle:SetColorTexture(.5, .5, .5, .75)
self.selectedMiddle:SetTexture(.5, .5, .5, .75)
self.selectedMiddle:SetPoint("TOPLEFT", self.selectedTop, "BOTTOMLEFT")
self.selectedMiddle:SetPoint("BOTTOMRIGHT", self.selectedBottom, "TOPRIGHT")
end
@@ -623,18 +623,10 @@ function DF:CreateCoolTip()
statusbar.leftIcon:SetSize(16, 16)
statusbar.leftIcon:SetPoint("LEFT", statusbar, "LEFT", 0, 0)
statusbar.leftIconMask = statusbar:CreateMaskTexture("$parent_LeftIconMask", "artwork")
statusbar.leftIconMask:SetAllPoints(statusbar.leftIcon)
statusbar.leftIcon:AddMaskTexture(statusbar.leftIconMask)
statusbar.rightIcon = statusbar:CreateTexture("$parent_RightIcon", "OVERLAY")
statusbar.rightIcon:SetSize(16, 16)
statusbar.rightIcon:SetPoint("RIGHT", statusbar, "RIGHT", 0, 0)
statusbar.rightIconMask = statusbar:CreateMaskTexture("$parent_RightIconMask", "artwork")
statusbar.rightIconMask:SetAllPoints(statusbar.rightIcon)
statusbar.rightIcon:AddMaskTexture(statusbar.rightIconMask)
statusbar.spark2 = statusbar:CreateTexture("$parent_Spark2", "OVERLAY")
statusbar.spark2:SetSize(32, 32)
statusbar.spark2:SetPoint("LEFT", statusbar, "RIGHT", -17, -1)
@@ -677,8 +669,6 @@ function DF:CreateCoolTip()
self:RegisterForClicks("LeftButtonDown")
self.leftIcon = self.statusbar.leftIcon
self.rightIcon = self.statusbar.rightIcon
self.leftIconMask = self.statusbar.leftIconMask
self.rightIconMask = self.statusbar.rightIconMask
self.texture = self.statusbar.texture
self.spark = self.statusbar.spark
self.spark2 = self.statusbar.spark2
@@ -1176,7 +1166,7 @@ function DF:CreateCoolTip()
--check if the texture passed is a texture object
if (type(leftIconSettings[1]) == "table" and leftIconSettings[1].GetObjectType and leftIconSettings[1]:GetObjectType() == "Texture") then
menuButton.leftIcon:SetSize(leftIconSettings[2], leftIconSettings[3])
menuButton.leftIcon:SetColorTexture(0.0156, 0.047, 0.1215, 1)
menuButton.leftIcon:SetTexture(0.0156, 0.047, 0.1215, 1)
textureObject = leftIconSettings[1]
textureObject:SetParent(menuButton.leftIcon:GetParent())
textureObject:ClearAllPoints()
@@ -1203,16 +1193,6 @@ function DF:CreateCoolTip()
textureObject:SetHeight(leftIconSettings[3])
textureObject:SetTexCoord(leftIconSettings[4], leftIconSettings[5], leftIconSettings[6], leftIconSettings[7])
if (leftIconSettings[10]) then
menuButton.leftIconMask:SetTexture(leftIconSettings[10])
else
if (DF.IsDragonflightAndBeyond()) then
menuButton.leftIconMask:SetTexture([[Interface\COMMON\common-iconmask]])
else
menuButton.leftIconMask:SetTexture([[Interface\CHATFRAME\chatframebackground]])
end
end
local colorRed, colorGreen, colorBlue, colorAlpha = DF:ParseColors(leftIconSettings[8])
textureObject:SetVertexColor(colorRed, colorGreen, colorBlue, colorAlpha)
@@ -1242,7 +1222,7 @@ function DF:CreateCoolTip()
--check if the texture passed is a texture object
if (type(rightIconSettings[1]) == "table" and rightIconSettings[1].GetObjectType and rightIconSettings[1]:GetObjectType() == "Texture") then
menuButton.rightIcon:SetSize(leftIconSettings[2], leftIconSettings[3])
menuButton.rightIcon:SetColorTexture(0.0156, 0.047, 0.1215, 1)
menuButton.rightIcon:SetTexture(0.0156, 0.047, 0.1215, 1)
textureObject = rightIconSettings[1]
textureObject:SetParent(menuButton)
@@ -1270,12 +1250,6 @@ function DF:CreateCoolTip()
menuButton.rightIcon:SetHeight(rightIconSettings[3])
menuButton.rightIcon:SetTexCoord(rightIconSettings[4], rightIconSettings[5], rightIconSettings[6], rightIconSettings[7])
if (rightIconSettings[10]) then
menuButton.rightIconMask:SetTexture(rightIconSettings[10])
else
menuButton.rightIconMask:SetTexture([[Interface\COMMON\common-iconmask]])
end
local colorRed, colorGreen, colorBlue, colorAlpha = DF:ParseColors(rightIconSettings[8])
menuButton.rightIcon:SetVertexColor(colorRed, colorGreen, colorBlue, colorAlpha)
@@ -1516,7 +1490,7 @@ function DF:CreateCoolTip()
if (DF:IsHtmlColor(texture) or type(texture) == "table") then
local color = texture
local r, g, b, a = DF:ParseColors(color)
wallpaper:SetColorTexture(r, g, b, a)
wallpaper:SetTexture(r, g, b, a)
else
wallpaper:SetTexture(texture)
end
@@ -1535,9 +1509,6 @@ function DF:CreateCoolTip()
wallpaper:SetDesaturated(true)
else
wallpaper:SetDesaturated(false)
if (wallpaperTable[8]) then
wallpaper:SetDesaturation(wallpaperTable[8])
end
end
wallpaper:Show()
@@ -1942,7 +1913,6 @@ function DF:CreateCoolTip()
function gameCooltip:SetSpellByID(spellId, bShowDescriptionOnly) --~spell
if (type(spellId) == "number") then
spellId = C_SpellBook.GetOverrideSpell(spellId)
local spellName, spellRank, spellIcon, castTime, minRange, maxRange = GetSpellInfo(spellId)
--castTime zero represents an instant cast or a channeled cast
if (spellName) then
@@ -2640,7 +2610,7 @@ function DF:CreateCoolTip()
menuType = gameCooltip:ParseMenuType(menuType)
if (menuType == CONST_MENU_TYPE_MAINMENU) then
frame1.frameBackgroundTexture:SetColorTexture(colorRed, colorGreen, colorBlue, colorAlpha)
frame1.frameBackgroundTexture:SetTexture(colorRed, colorGreen, colorBlue, colorAlpha)
--hide textures from older versions if exists
if (frame1.frameBackgroundLeft) then
@@ -2650,7 +2620,7 @@ function DF:CreateCoolTip()
end
elseif (menuType == CONST_MENU_TYPE_SUBMENU) then
frame2.frameBackgroundTexture:SetColorTexture(colorRed, colorGreen, colorBlue, colorAlpha)
frame2.frameBackgroundTexture:SetTexture(colorRed, colorGreen, colorBlue, colorAlpha)
--hide textures from older versions if exists
if (frame2.frameBackgroundLeft) then
@@ -2787,8 +2757,8 @@ function DF:CreateCoolTip()
frame1.frameBackgroundCenter:Hide()
end
frame1.frameBackgroundTexture:SetColorTexture(0, 0, 0, 0)
frame2.frameBackgroundTexture:SetColorTexture(0, 0, 0, 0)
frame1.frameBackgroundTexture:SetTexture(0, 0, 0, 0)
frame2.frameBackgroundTexture:SetTexture(0, 0, 0, 0)
if (not fromPreset) then
gameCooltip:Preset(3, true)
-15
View File
@@ -163,20 +163,6 @@
---@field TalentExporter table
---@field FormatNumber fun(number:number) : string abbreviate a number, e.g. 1000 -> 1k 1000 -> 1천, depending on the client language
---@field UnitGroupRolesAssigned fun(unitId: unit, bUseSupport:boolean?, specId: specializationid?) : string there's no self here
---@field IsDragonflight fun():boolean
---@field IsDragonflightAndBeyond fun():boolean
---@field IsTimewalkWoW fun():boolean
---@field IsClassicWow fun():boolean
---@field IsTBCWow fun():boolean
---@field IsWotLKWow fun():boolean
---@field IsCataWow fun():boolean
---@field IsPandaWow fun():boolean
---@field IsWarlordsWow fun():boolean
---@field IsLegionWow fun():boolean
---@field IsBFAWow fun():boolean
---@field IsShadowlandsWow fun():boolean
---@field IsDragonflightWow fun():boolean
---@field IsWarWow fun():boolean
---@field LoadSpellCache fun(self:table, hashMap:table, indexTable:table, allSpellsSameName:table) : hashMap:table, indexTable:table, allSpellsSameName:table load all spells in the game and add them into the passed tables
---@field UnloadSpellCache fun(self:table) wipe the table contents filled with LoadSpellCache()
---@field GetCurrentClassName fun(self:table) : string return the name of the class the player is playing
@@ -299,7 +285,6 @@
---@field ParseTexture fun(self:table, texture:texturepath|textureid|atlasname|atlasinfo, width: number?, height: number?, leftTexCoord: number?, rightTexCoord: number?, topTexCoord: number?, bottomTexCoord: number?, vertexRed:number|string?, vertexGreenvertexRed:number?, vertexBluevertexRed:number?, vertexAlphavertexRed:number?) : any, number?, number?, number?, number?, number?, number?, number?, number?, number?, number?, number?, number?
---@field IsTexture fun(self:table, texture:any, bCheckTextureObject: boolean?) : boolean
---@field CreateAtlasString fun(self:table, atlas:atlasinfo|atlasname, textureHeight:number?, textureWidth:number?) : string
---@field SetMask fun(self:table, texture:texture, maskTexture:atlasname|texturepath|textureid|table) : nil
---@field GetClientRegion fun(self:table) : string
---@field GetBestFontPathForLanguage fun(self:table, languageId:string) : string
---@field SetTemplate fun(self:table, frame:uiobject, template:string)
+1 -1
View File
@@ -1455,7 +1455,7 @@ function DF:CreateNewDropdownFrame(parent, name)
local backgroundTexture = child:CreateTexture(nil, "background")
backgroundTexture:SetAllPoints()
backgroundTexture:SetColorTexture(0, 0, 0, 1)
backgroundTexture:SetTexture(0, 0, 0, 1)
local selected = child:CreateTexture("$parent_SelectedTexture", "BACKGROUND")
selected:SetSize(150, 16)
+7 -7
View File
@@ -379,7 +379,7 @@ detailsFramework.EditorMixin = {
}
for side, texture in pairs(self.moverGuideLines) do
texture:SetColorTexture(.8, .8, .8, 0.1)
texture:SetTexture(.8, .8, .8, 0.1)
texture:SetSize(1, 1)
texture:SetDrawLayer("overlay", 7)
texture:Hide()
@@ -456,7 +456,7 @@ detailsFramework.EditorMixin = {
editorFrame.AnchorFrames:SetNotInUseForAllAnchors()
--change the color of the anchor point to show it's selected
anchorFrame.Texture:SetColorTexture(1, 0, 0, 0.5)
anchorFrame.Texture:SetTexture(1, 0, 0, 0.5)
--get the object being edited in the editor
local object = editorFrame:GetEditingObject()
@@ -502,11 +502,11 @@ detailsFramework.EditorMixin = {
end,
SetNotInUse = function(self, anchorFrame)
anchorFrame.Texture:SetColorTexture(1, 1, 1, 0.5)
anchorFrame.Texture:SetTexture(1, 1, 1, 0.5)
end,
SetInUse = function(self, anchorFrame)
anchorFrame.Texture:SetColorTexture(1, 0, 0, 0.5)
anchorFrame.Texture:SetTexture(1, 0, 0, 0.5)
end,
CreateNineAnchors = function(self)
@@ -527,7 +527,7 @@ detailsFramework.EditorMixin = {
self.anchorFrames[i] = anchorFrame
anchorFrame.Texture = anchorFrame:CreateTexture("$parentTexture", "border")
anchorFrame.Texture:SetColorTexture(1, 1, 1, 0.5)
anchorFrame.Texture:SetTexture(1, 1, 1, 0.5)
anchorFrame.Texture:SetAllPoints(anchorFrame)
end
end,
@@ -671,7 +671,7 @@ detailsFramework.EditorMixin = {
end
movers.ObjectBackgroundTexture = movers[1]:CreateTexture("$parentMoverObjectBackground", "artwork")
movers.ObjectBackgroundTexture:SetColorTexture(1, 1, 1, 0.25)
movers.ObjectBackgroundTexture:SetTexture(1, 1, 1, 0.25)
return movers
end,
@@ -1226,7 +1226,7 @@ detailsFramework.EditorMixin = {
detailsFramework:ReskinSlider(selectObjectScrollBox)
local selectionTexture = selectObjectScrollBox:CreateTexture(nil, "overlay")
selectionTexture:SetColorTexture(1, 1, 0, 0.2)
selectionTexture:SetTexture(1, 1, 0, 0.2)
selectObjectScrollBox.SelectionTexture = selectionTexture
function selectObjectScrollBox:RefreshMe()
+2 -19
View File
@@ -3,10 +3,6 @@ if (not detailsFramework) then
return
end
local IS_WOW_PROJECT_MAINLINE = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
local IS_WOW_PROJECT_NOT_MAINLINE = WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE
local IS_WOW_PROJECT_CLASSIC_ERA = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
detailsFramework.CastInfo = detailsFramework.CastInfo or {}
--NOTE: This NEEDs a chance to run, as Plater is depending on this working and LibCC is not bundled neccessarily in other addons.
@@ -94,21 +90,8 @@ function detailsFramework:LoadLCC(LibCC)
end
end
if IS_WOW_PROJECT_CLASSIC_ERA and false then --disable this for now, as it appears to be working now through API changes...
local LibCC = LibStub("LibClassicCasterino", true)
if (LibCC and not _G.DetailsFrameworkLCCLoaded) then
detailsFramework:LoadLCC(LibCC)
_G.DetailsFrameworkLCCLoaded = true
elseif not LibCC then
detailsFramework.CastInfo.UnitCastingInfo = CastingInfo
detailsFramework.CastInfo.UnitChannelInfo = ChannelInfo
end
else -- end classic era
detailsFramework.CastInfo.UnitCastingInfo = UnitCastingInfo
detailsFramework.CastInfo.UnitChannelInfo = UnitChannelInfo
end
detailsFramework.CastInfo.UnitCastingInfo = UnitCastingInfo
detailsFramework.CastInfo.UnitChannelInfo = UnitChannelInfo
if (not DetailsFrameworkCanLoad) then
+5 -40
View File
@@ -26,15 +26,6 @@ local setCornerPoints = function(self, textures, width, height, xOffset, yOffset
thisTexture:SetSize(width or 16, height or 16)
thisTexture:SetTexture(self.options.corner_texture)
--set the mask
if (not thisTexture.MaskTexture and bIsBorder) then
thisTexture.MaskTexture = self:CreateMaskTexture(nil, "background")
thisTexture.MaskTexture:SetSize(74, 64)
thisTexture:AddMaskTexture(thisTexture.MaskTexture)
thisTexture.MaskTexture:SetTexture([[Interface\Azerite\AzeriteGoldRingRank2]]) --1940690
--thisTexture.MaskTexture:Hide()
end
xOffset = xOffset or 0
yOffset = yOffset or 0
@@ -44,30 +35,18 @@ local setCornerPoints = function(self, textures, width, height, xOffset, yOffset
if (cornerName == "TopLeft") then
thisTexture:SetTexCoord(0, 0.5, 0, 0.5)
thisTexture:SetPoint(cornerName, self, cornerName, -xOffset, yOffset)
if (thisTexture.MaskTexture) then
thisTexture.MaskTexture:SetPoint(cornerName, self, cornerName, -18-xOffset, 16+yOffset)
end
elseif (cornerName == "TopRight") then
thisTexture:SetTexCoord(0.5, 1, 0, 0.5)
thisTexture:SetPoint(cornerName, self, cornerName, xOffset, yOffset)
if (thisTexture.MaskTexture) then
thisTexture.MaskTexture:SetPoint(cornerName, self, cornerName, -18+xOffset, 16+yOffset)
end
elseif (cornerName == "BottomLeft") then
thisTexture:SetTexCoord(0, 0.5, 0.5, 1)
thisTexture:SetPoint(cornerName, self, cornerName, -xOffset, -yOffset)
if (thisTexture.MaskTexture) then
thisTexture.MaskTexture:SetPoint(cornerName, self, cornerName, -18-xOffset, 16-yOffset)
end
elseif (cornerName == "BottomRight") then
thisTexture:SetTexCoord(0.5, 1, 0.5, 1)
thisTexture:SetPoint(cornerName, self, cornerName, xOffset, -yOffset)
if (thisTexture.MaskTexture) then
thisTexture.MaskTexture:SetPoint(cornerName, self, cornerName, -18+xOffset, 16-yOffset)
end
end
end
end
@@ -95,7 +74,7 @@ detailsFramework.RoundedCornerPanelMixin = {
topHorizontalEdge:SetPoint("bottomleft", self.CornerTextures["TopLeft"], "bottomright", 0, 0)
topHorizontalEdge:SetPoint("topright", self.CornerTextures["TopRight"], "topleft", 0, 0)
topHorizontalEdge:SetPoint("bottomright", self.CornerTextures["TopRight"], "bottomleft", 0, 0)
topHorizontalEdge:SetColorTexture(unpack(defaultColorTable))
topHorizontalEdge:SetTexture(unpack(defaultColorTable))
--create the bottom texture which connects the bottom corners with a horizontal line
---@type texture
@@ -104,7 +83,7 @@ detailsFramework.RoundedCornerPanelMixin = {
bottomHorizontalEdge:SetPoint("bottomleft", self.CornerTextures["BottomLeft"], "bottomright", 0, 0)
bottomHorizontalEdge:SetPoint("topright", self.CornerTextures["BottomRight"], "topleft", 0, 0)
bottomHorizontalEdge:SetPoint("bottomright", self.CornerTextures["BottomRight"], "bottomleft", 0, 0)
bottomHorizontalEdge:SetColorTexture(unpack(defaultColorTable))
bottomHorizontalEdge:SetTexture(unpack(defaultColorTable))
--create the center block which connects the bottom left of the topleft corner with the top right of the bottom right corner
---@type texture
@@ -113,7 +92,7 @@ detailsFramework.RoundedCornerPanelMixin = {
centerBlock:SetPoint("bottomleft", self.CornerTextures["BottomLeft"], "topleft", 0, 0)
centerBlock:SetPoint("topright", self.CornerTextures["BottomRight"], "topright", 0, 0)
centerBlock:SetPoint("bottomright", self.CornerTextures["BottomRight"], "topright", 0, 0)
centerBlock:SetColorTexture(unpack(defaultColorTable))
centerBlock:SetTexture(unpack(defaultColorTable))
self.CenterTextures[#self.CenterTextures+1] = topHorizontalEdge
self.CenterTextures[#self.CenterTextures+1] = bottomHorizontalEdge
@@ -251,7 +230,6 @@ detailsFramework.RoundedCornerPanelMixin = {
if (self.bHasBorder) then
for _, thisTexture in pairs(self.BorderCornerTextures) do
thisTexture:SetSize(cornerWidth-self.cornerRoundness, cornerHeight-self.cornerRoundness)
thisTexture.MaskTexture:SetSize(74-(self.cornerRoundness*0.75), 64-self.cornerRoundness)
end
local horizontalEdgesNewSize = self:CalculateBorderEdgeSize("horizontal")
@@ -300,7 +278,7 @@ detailsFramework.RoundedCornerPanelMixin = {
---@type texture
local newBorderTexture = self:CreateTexture(nil, "background", nil, 0)
self.BorderCornerTextures[cornerNames[i]] = newBorderTexture
newBorderTexture:SetColorTexture(unpack(defaultColorTable))
newBorderTexture:SetTexture(unpack(defaultColorTable))
newBorderTexture:SetVertexColor(r, g, b, a)
self[cornerNames[i] .. "Border"] = newBorderTexture
end
@@ -341,7 +319,7 @@ detailsFramework.RoundedCornerPanelMixin = {
for edgeName, thisTexture in pairs(self.BorderEdgeTextures) do
---@cast thisTexture texture
thisTexture:SetColorTexture(unpack(defaultColorTable))
thisTexture:SetTexture(unpack(defaultColorTable))
thisTexture:SetVertexColor(r, g, b, a)
end
@@ -401,19 +379,6 @@ detailsFramework.RoundedCornerPanelMixin = {
for _, thisTexture in pairs(self.CenterTextures) do
thisTexture:SetVertexColor(red, green, blue, alpha)
end
if (self.bHasBorder) then
if (alpha < 0.98) then
--if using borders, the two border textures overlaps making the alpha be darker than it should
for _, thisTexture in pairs(self.BorderCornerTextures) do
thisTexture.MaskTexture:Show()
end
else
for _, thisTexture in pairs(self.BorderCornerTextures) do
thisTexture.MaskTexture:Hide()
end
end
end
end,
}
+144 -559
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -267,7 +267,7 @@ detailsFramework.HeaderMixin = {
if (self.options.use_line_separators) then
columnHeader.Separator:Show()
columnHeader.Separator:SetWidth(self.options.line_separator_width)
columnHeader.Separator:SetColorTexture(unpack(self.options.line_separator_color))
columnHeader.Separator:SetTexture(unpack(self.options.line_separator_color))
columnHeader.Separator:ClearAllPoints()
if (self.options.line_separator_gap_align) then
@@ -285,7 +285,7 @@ detailsFramework.HeaderMixin = {
if (self.options.use_line_separators) then
columnHeader.Separator:Show()
columnHeader.Separator:SetWidth(self.options.line_separator_width)
columnHeader.Separator:SetColorTexture(unpack(self.options.line_separator_color))
columnHeader.Separator:SetTexture(unpack(self.options.line_separator_color))
columnHeader.Separator:ClearAllPoints()
if (self.options.line_separator_gap_align) then
@@ -555,7 +555,7 @@ detailsFramework.HeaderMixin = {
resizerButton.texture = resizerButton:CreateTexture(nil, "overlay")
resizerButton.texture:SetAllPoints()
resizerButton.texture:SetColorTexture(1, 1, 1, 1)
resizerButton.texture:SetTexture(1, 1, 1, 1)
local xOffset = self.options.reziser_shown and -5 or -1
columnHeader.Arrow:SetPoint("right", columnHeader, "right", xOffset, 0)
+2 -2
View File
@@ -142,7 +142,7 @@ detailsFramework.IconMixin = {
---@type texture
iconFrame.Border = iconFrame:CreateTexture(nil, "background")
iconFrame.Border:SetAllPoints()
iconFrame.Border:SetColorTexture(0, 0, 0)
iconFrame.Border:SetTexture(0, 0, 0)
---@type fontstring
iconFrame.StackText = iconFrame:CreateFontString(nil, "overlay", "GameFontNormal")
@@ -274,7 +274,7 @@ detailsFramework.IconMixin = {
iconFrame:SetBackdropBorderColor(0, 0, 0 ,0)
end
--iconFrame.Border:SetColorTexture(0, 0, 0, 1)
--iconFrame.Border:SetTexture(0, 0, 0, 1)
if (startTime) then
CooldownFrame_Set(iconFrame.Cooldown, startTime, duration, true, true, modRate)
+1 -5
View File
@@ -149,7 +149,7 @@ detailsFramework.IconGenericMixin = {
---@type texture
newIcon.Border = newIcon:CreateTexture(nil, "background")
newIcon.Border:SetAllPoints()
newIcon.Border:SetColorTexture(0, 0, 0)
newIcon.Border:SetTexture(0, 0, 0)
---@type fontstring
newIcon.StackText = newIcon:CreateFontString(nil, "overlay", "GameFontNormal")
@@ -393,13 +393,9 @@ detailsFramework.IconGenericMixin = {
end
end
iconFrame:SetIgnoreParentAlpha(false)
if (iconSettings.color) then
local r, g, b, a = detailsFramework:ParseColors(iconSettings.color)
iconFrame.Texture:SetVertexColor(r, g, b, a)
--ignore the param alpha has the settings might have an alpha for it
iconFrame:SetIgnoreParentAlpha(true)
else
iconFrame.Texture:SetVertexColor(1, 1, 1, 1)
end
+1 -11
View File
@@ -7,18 +7,8 @@ end
--namespace
detailsFramework.Items = {}
local containerAPIVersion = 1
if (detailsFramework.IsDragonflightAndBeyond()) then
containerAPIVersion = 2
end
function detailsFramework.Items.GetContainerItemInfo(containerIndex, slotIndex)
if (containerAPIVersion == 2 and C_Container and C_Container.GetContainerItemInfo) then
local itemInfo = C_Container.GetContainerItemInfo(containerIndex, slotIndex)
return itemInfo.iconFileID, itemInfo.stackCount, itemInfo.isLocked, itemInfo.quality, itemInfo.isReadable, itemInfo.hasLoot, itemInfo.hyperlink, itemInfo.isFiltered, itemInfo.hasNoValue, itemInfo.itemID, itemInfo.isBound
else
return GetContainerItemInfo(containerIndex, slotIndex)
end
return GetContainerItemInfo(containerIndex, slotIndex)
end
function detailsFramework.Items.IsItemSoulbound(containerIndex, slotIndex)
+4 -4
View File
@@ -864,14 +864,14 @@ detailsFramework.KeybindMixin = {
line.backgroundTexture:SetAllPoints()
if (index % 2 == 0) then
line.backgroundTexture:SetColorTexture(0, 0, 0, 0.1)
line.backgroundTexture:SetTexture(0, 0, 0, 0.1)
else
line.backgroundTexture:SetColorTexture(0, 0, 0, 0)
line.backgroundTexture:SetTexture(0, 0, 0, 0)
end
line.highlightTexture = line:CreateTexture(nil, "border")
line.highlightTexture:SetAllPoints()
line.highlightTexture:SetColorTexture(1, 1, 1, .1)
line.highlightTexture:SetTexture(1, 1, 1, .1)
line.highlightTexture:Hide()
line:SetScript("OnEnter", keyBindFrame.OnEnterScrollLine)
@@ -1372,7 +1372,7 @@ detailsFramework.KeybindMixin = {
detailsFramework:ReskinSlider(editMacroEditBox.scroll)
editMacroEditBox:SetPoint("topleft", editMacroText, "bottomleft", 0, -5)
editMacroEditBox["Center"]:SetColorTexture(.1, .1, .1, .834)
editMacroEditBox["Center"]:SetTexture(.1, .1, .1, .834)
local saveButtonCallback = function()
local bIsEditing, actionIdentifier, keybindTable = self:IsEditingKeybindSettings()
+25 -431
View File
@@ -17,15 +17,10 @@ local CreateFrame = CreateFrame ---@diagnostic disable-line
local UnitIsUnit = UnitIsUnit ---@diagnostic disable-line
local UnitClass = UnitClass ---@diagnostic disable-line
local GetInstanceInfo = GetInstanceInfo ---@diagnostic disable-line
local C_ChallengeMode = C_ChallengeMode ---@diagnostic disable-line
local C_Map = C_Map ---@diagnostic disable-line
local GetTalentInfoByID = GetTalentInfoByID ---@diagnostic disable-line
local IS_WOW_PROJECT_MAINLINE = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE ---@diagnostic disable-line
local IS_WOW_PROJECT_NOT_MAINLINE = WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE ---@diagnostic disable-line
local IS_WOW_PROJECT_CLASSIC_ERA = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC ---@diagnostic disable-line
local PixelUtil = PixelUtil or DFPixelUtil ---@diagnostic disable-line
local PixelUtil = PixelUtil
local UnitGroupRolesAssigned = detailsFramework.UnitGroupRolesAssigned
local loadConditionsFrame
@@ -100,15 +95,9 @@ local default_load_conditions_frame_options = {
function detailsFramework:CreateLoadFilterParser(callback)
local filterFrame = CreateFrame("frame")
if IS_WOW_PROJECT_MAINLINE then
filterFrame:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
filterFrame:RegisterEvent("TRAIT_CONFIG_LIST_UPDATED")
filterFrame:RegisterEvent("CHALLENGE_MODE_START")
else
filterFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
filterFrame:RegisterEvent("PLAYER_TALENT_UPDATE")
end
filterFrame:RegisterEvent("MYTHIC_PLUS_STARTED")
filterFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
filterFrame:RegisterEvent("ASCENSION_KNOWN_ENTRIES_CHANGED")
filterFrame:RegisterEvent("PLAYER_ROLES_ASSIGNED")
filterFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA")
@@ -117,47 +106,11 @@ function detailsFramework:CreateLoadFilterParser(callback)
filterFrame:RegisterEvent("PLAYER_REGEN_ENABLED")
filterFrame:RegisterEvent("PLAYER_REGEN_DISABLED")
filterFrame:RegisterEvent("CHAT_MSG_LOOT")
filterFrame:SetScript("OnEvent", function(self, event, ...)
if (event == "ENCOUNTER_START") then --triggers before regen_disabled
local encounterID = ...
filterFrame.EncounterIDCached = encounterID
elseif (event == "CHAT_MSG_LOOT") then
local message = ...
local itemId = message:match("|Hitem:(%d+):")
itemId = tonumber(itemId)
if (itemId == 191140) then
xpcall(callback, geterrorhandler(), "RACE_START")
--monitor the player backpack each second to know when the item is removed from the bag
C_Timer.After(5, function()
filterFrame.FindBackpackItem = C_Timer.NewTicker(1, function()
local bFoundItem = false
for bagId = 0, 4 do
for slotId = 1, 32 do
local bagItemID = C_Container.GetContainerItemID(bagId, slotId)
if (bagItemID) then
if (bagItemID == itemId) then
--bronze timepiece is on the player backpack
return
end
end
end
end
if (not bFoundItem) then
filterFrame.FindBackpackItem:Cancel()
xpcall(callback, geterrorhandler(), "RACE_STOP")
return
end
end)
end)
end
return
elseif (event == "PLAYER_REGEN_DISABLED") then
elseif (event == "ENCOUNTER_END") then
@@ -167,7 +120,7 @@ function detailsFramework:CreateLoadFilterParser(callback)
--f.EncounterIDCached = nil
--when the player dies during an encounter, the game is triggering regen enabled
elseif (event == "PLAYER_SPECIALIZATION_CHANGED") then
elseif (event == "ASCENSION_KNOWN_ENTRIES_CHANGED") then
if (loadConditionsFrame and loadConditionsFrame:IsShown()) then
loadConditionsFrame:Refresh()
end
@@ -210,39 +163,6 @@ function detailsFramework:PassLoadFilters(loadTable, encounterID)
end
end
--spec
if (IS_WOW_PROJECT_MAINLINE and loadTable.spec.Enabled) then
local canCheckTalents = true
if (passLoadClass) then
--if is allowed to load on this class, check if the talents isn't from another class
local _, classFileName = UnitClass("player")
local specsForThisClass = detailsFramework:GetClassSpecIDs(classFileName)
canCheckTalents = false
for _, specID in ipairs(specsForThisClass) do
if (loadTable.spec[specID] or loadTable.spec[specID..""]) then
--theres a talent for this class
canCheckTalents = true
break
end
end
end
if (canCheckTalents) then
local specIndex = DetailsFramework.GetSpecialization()
if (specIndex) then
local specID = DetailsFramework.GetSpecializationInfo(specIndex)
if not specID or(not loadTable.spec[specID] and not loadTable.spec[specID .. ""]) then
return false, _G["SPECIALIZATION"]
end
else
return false, _G["SPECIALIZATION"]
end
end
end
--race
if (loadTable.race.Enabled) then
local raceName, raceFileName, raceID = UnitRace("player")
@@ -251,40 +171,6 @@ function detailsFramework:PassLoadFilters(loadTable, encounterID)
end
end
--talents
if (IS_WOW_PROJECT_MAINLINE and loadTable.talent.Enabled) then
local bOnlySelected, bUseHashTable = true, true
local talentsInUse = detailsFramework:GetCharacterTalents(bOnlySelected, bUseHashTable)
local hasTalent
for talentId in pairs(talentsInUse) do
if talentId and(loadTable.talent[talentId] or loadTable.talent[talentId .. ""]) then
hasTalent = true
break
end
end
if (not hasTalent) then
return false, _G["TALENTS"]
end
end
--pvptalent
if (IS_WOW_PROJECT_MAINLINE and loadTable.pvptalent.Enabled) then
local talentsInUse = detailsFramework:GetCharacterPvPTalents(false, true)
local hasTalent
for talentID, _ in pairs(talentsInUse) do
if talentID and(loadTable.pvptalent [talentID] or loadTable.pvptalent [talentID .. ""]) then
hasTalent = true
break
end
end
if (not hasTalent) then
return false, (_G["PVP"] or "") .. " " .. (_G["TALENTS"] or "")
end
end
--group
if (loadTable.group.Enabled) then
local _, zoneType = GetInstanceInfo()
@@ -308,15 +194,15 @@ function detailsFramework:PassLoadFilters(loadTable, encounterID)
end
--affix
if (IS_WOW_PROJECT_MAINLINE and loadTable.affix.Enabled) then
local isInMythicDungeon = C_ChallengeMode.IsChallengeModeActive()
if (loadTable.affix.Enabled) then
local isInMythicDungeon = C_MythicPlus.IsKeystoneActive()
if (not isInMythicDungeon) then
return false, "M+ Affix"
end
local level, affixes, wasEnergized = C_ChallengeMode.GetActiveKeystoneInfo()
local activeKeystone = C_MythicPlus.GetActiveKeystoneInfo()
local hasAffix = false
for _, affixID in ipairs(affixes) do
for _, affixID in ipairs(activeKeystone.activeAffixes) do
if affixID and(loadTable.affix[affixID] or loadTable.affix[affixID .. ""]) then
hasAffix = true
break
@@ -460,26 +346,6 @@ function detailsFramework:OpenLoadConditionsPanel(optionsTable, callback, frameO
classGroup.DBKey = "class"
table.insert(loadConditionsFrame.AllRadioGroups, classGroup)
--create the radio group for character spec
if IS_WOW_PROJECT_MAINLINE then
local specs = {}
for _, specID in ipairs(detailsFramework:GetClassSpecIDs(select(2, UnitClass("player")))) do
local specID, specName, specDescription, specIcon, specBackground, specRole, specClass = DetailsFramework.GetSpecializationInfoByID(specID)
table.insert(specs, {
name = specName,
set = loadConditionsFrame.OnRadioCheckboxClick,
param = specID,
get = function() return loadConditionsFrame.OptionsTable.spec[specID] or loadConditionsFrame.OptionsTable.spec[specID..""] end,
texture = specIcon,
})
end
local specGroup = detailsFramework:CreateCheckboxGroup(loadConditionsFrame, specs, nil, {width = 200, height = 200, title = "Character Spec", backdrop_color = {0, 0, 0, 0}}, {offset_x = 120, amount_per_line = 4})
specGroup:SetPoint("topleft", loadConditionsFrame, "topleft", anchorPositions.spec[1], anchorPositions.spec[2])
specGroup.DBKey = "spec"
table.insert(loadConditionsFrame.AllRadioGroups, specGroup)
end
--create radio group for character races
local raceList = {}
for _, raceTable in ipairs(detailsFramework:GetCharacterRaceList()) do
@@ -496,221 +362,6 @@ function detailsFramework:OpenLoadConditionsPanel(optionsTable, callback, frameO
raceGroup.DBKey = "race"
table.insert(loadConditionsFrame.AllRadioGroups, raceGroup)
--create radio group for talents
if IS_WOW_PROJECT_MAINLINE then
--[=[ 7.0 to 9.0 talents schema
local talentList = {}
for _, talentTable in ipairs(detailsFramework:GetCharacterTalents()) do
if talentTable.ID then
table.insert(talentList, {
name = talentTable.Name:sub(1, 15),
set = loadConditionsFrame.OnRadioCheckboxClick,
param = talentTable.ID,
get = function() return loadConditionsFrame.OptionsTable.talent[talentTable.ID] or loadConditionsFrame.OptionsTable.talent[talentTable.ID .. ""] end,
texture = talentTable.Texture,
})
end
end
--]=]
--10.0 talents schema
local talentList = {}
local talentGroup = detailsFramework:CreateCheckboxGroup(loadConditionsFrame, talentList, nil, {width = 200, height = 200, title = "Character Talents", backdrop_color = {0, 0, 0, 0}}, {offset_x = 64, amount_per_line = 16})
talentGroup:SetPoint("topleft", loadConditionsFrame, "topleft", anchorPositions.talent[1], anchorPositions.talent[2])
talentGroup.DBKey = "talent"
table.insert(loadConditionsFrame.AllRadioGroups, talentGroup)
loadConditionsFrame.TalentGroup = talentGroup
do
if (false) then --disabled, isn't in use
--create a frame to show talents selected in other specs or characters
local otherTalents = CreateFrame("frame", nil, loadConditionsFrame, "BackdropTemplate")
otherTalents:SetSize(26, 26)
otherTalents:SetPoint("left", talentGroup.Title.widget, "right", 10, -2)
otherTalents.Texture = detailsFramework:CreateImage(otherTalents, [[Interface\BUTTONS\AdventureGuideMicrobuttonAlert]], 24, 24)
otherTalents.Texture:SetAllPoints()
local removeTalent = function(_, _, talentID)
loadConditionsFrame.OptionsTable.talent[talentID] = nil
GameCooltip2:Hide()
loadConditionsFrame.OnRadioStateChanged(talentGroup, loadConditionsFrame.OptionsTable[talentGroup.DBKey])
--loadConditionsFrame.CanShowTalentWarning()
end
local buildTalentMenu = function()
local playerTalents = detailsFramework:GetCharacterTalents()
local indexedTalents = {}
for _, talentTable in ipairs(playerTalents) do
table.insert(indexedTalents, talentTable.ID)
end
--talents selected to load
GameCooltip2:AddLine("select a talent to remove it (added from a different spec or character)", "", 1, "orange", "orange", 9)
GameCooltip2:AddLine("$div", nil, nil, -1, -1)
for talentID, _ in pairs(loadConditionsFrame.OptionsTable.talent) do
if (type(talentID) == "number" and not detailsFramework.table.find(indexedTalents, talentID)) then
local talentID, name, texture, selected, available = GetTalentInfoByID(talentID)
if (name) then
GameCooltip2:AddLine(name)
GameCooltip2:AddIcon(texture, 1, 1, 16, 16, .1, .9, .1, .9)
GameCooltip2:AddMenu(1, removeTalent, talentID)
end
end
end
end
otherTalents.CoolTip = {
Type = "menu",
BuildFunc = buildTalentMenu,
OnEnterFunc = function(self) end,
OnLeaveFunc = function(self) end,
FixedValue = "none",
ShowSpeed = 0.05,
Options = function()
GameCooltip2:SetOption("TextFont", "Friz Quadrata TT")
GameCooltip2:SetOption("TextColor", "orange")
GameCooltip2:SetOption("TextSize", 12)
GameCooltip2:SetOption("FixedWidth", 220)
GameCooltip2:SetOption("ButtonsYMod", -4)
GameCooltip2:SetOption("YSpacingMod", -4)
GameCooltip2:SetOption("IgnoreButtonAutoHeight", true)
GameCooltip2:SetColor(1, 0.5, 0.5, 0.5, 0)
local preset2_backdrop = {bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Buttons\WHITE8X8]], tile = true, edgeSize = 1, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}
local gray_table = {0.37, 0.37, 0.37, 0.95}
local black_table = {0.2, 0.2, 0.2, 1}
GameCooltip2:SetBackdrop(1, preset2_backdrop, gray_table, black_table)
GameCooltip2:SetBackdrop(2, preset2_backdrop, gray_table, black_table)
end,
}
GameCooltip2:CoolTipInject(otherTalents)
--[=[
function loadConditionsFrame.CanShowTalentWarning() --not in use
local playerTalents = detailsFramework:GetCharacterTalents()
local indexedTalents = {}
for _, talentTable in ipairs(playerTalents) do
table.insert(indexedTalents, talentTable.ID)
end
for talentID, _ in pairs(loadConditionsFrame.OptionsTable.talent) do
if (type(talentID) == "number" and not detailsFramework.table.find(indexedTalents, talentID)) then
otherTalents:Show()
return
end
end
otherTalents:Hide()
end
--]=]
end
end
end
--create radio group for pvp talents
if IS_WOW_PROJECT_MAINLINE then
local pvpTalentList = {}
for _, talentTable in ipairs(detailsFramework:GetCharacterPvPTalents()) do
table.insert(pvpTalentList, {
name = talentTable.Name:sub(1, 15),
set = loadConditionsFrame.OnRadioCheckboxClick,
param = talentTable.ID,
get = function() return loadConditionsFrame.OptionsTable.pvptalent [talentTable.ID] or loadConditionsFrame.OptionsTable.pvptalent [talentTable.ID .. ""] end,
texture = talentTable.Texture,
})
end
local pvpTalentGroup = detailsFramework:CreateCheckboxGroup(loadConditionsFrame, pvpTalentList, nil, {width = 200, height = 200, title = "Characer PvP Talents", backdrop_color = {0, 0, 0, 0}}, {offset_x = 160, amount_per_line = 3})
pvpTalentGroup:SetPoint("topleft", loadConditionsFrame, "topleft", anchorPositions.pvptalent [1], anchorPositions.pvptalent [2])
pvpTalentGroup.DBKey = "pvptalent"
table.insert(loadConditionsFrame.AllRadioGroups, pvpTalentGroup)
loadConditionsFrame.PvPTalentGroup = pvpTalentGroup
do
if (false) then
--create a frame to show talents selected in other specs or characters
local otherTalents = CreateFrame("frame", nil, loadConditionsFrame, "BackdropTemplate")
otherTalents:SetSize(26, 26)
otherTalents:SetPoint("left", pvpTalentGroup.Title.widget, "right", 10, -2)
otherTalents.Texture = detailsFramework:CreateImage(otherTalents, [[Interface\BUTTONS\AdventureGuideMicrobuttonAlert]], 24, 24)
otherTalents.Texture:SetAllPoints()
local removeTalent = function(_, _, talentID)
loadConditionsFrame.OptionsTable.pvptalent [talentID] = nil
GameCooltip2:Hide()
loadConditionsFrame.OnRadioStateChanged(pvpTalentGroup, loadConditionsFrame.OptionsTable [pvpTalentGroup.DBKey])
--loadConditionsFrame.CanShowPvPTalentWarning()
end
local buildTalentMenu = function()
local playerTalents = detailsFramework:GetCharacterPvPTalents()
local indexedTalents = {}
for _, talentTable in ipairs(playerTalents) do
table.insert(indexedTalents, talentTable.ID)
end
--talents selected to load
GameCooltip2:AddLine("select a talent to remove it(added from a different spec or character)", "", 1, "orange", "orange", 9)
GameCooltip2:AddLine("$div", nil, nil, -1, -1)
for talentID, _ in pairs(loadConditionsFrame.OptionsTable.pvptalent) do
if (type(talentID) == "number" and not detailsFramework.table.find(indexedTalents, talentID)) then
local _, name, texture = GetPvpTalentInfoByID(talentID)
if (name) then
GameCooltip2:AddLine(name)
GameCooltip2:AddIcon(texture, 1, 1, 16, 16, .1, .9, .1, .9)
GameCooltip2:AddMenu(1, removeTalent, talentID)
end
end
end
end
otherTalents.CoolTip = {
Type = "menu",
BuildFunc = buildTalentMenu,
OnEnterFunc = function(self) end,
OnLeaveFunc = function(self) end,
FixedValue = "none",
ShowSpeed = 0.05,
Options = function()
GameCooltip2:SetOption("TextFont", "Friz Quadrata TT")
GameCooltip2:SetOption("TextColor", "orange")
GameCooltip2:SetOption("TextSize", 12)
GameCooltip2:SetOption("FixedWidth", 220)
GameCooltip2:SetOption("ButtonsYMod", -4)
GameCooltip2:SetOption("YSpacingMod", -4)
GameCooltip2:SetOption("IgnoreButtonAutoHeight", true)
GameCooltip2:SetColor(1, 0.5, 0.5, 0.5, 0)
local preset2_backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], tile = true, edgeSize = 1, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}
local gray_table = {0.37, 0.37, 0.37, 0.95}
local black_table = {0.2, 0.2, 0.2, 1}
GameCooltip2:SetBackdrop(1, preset2_backdrop, gray_table, black_table)
GameCooltip2:SetBackdrop(2, preset2_backdrop, gray_table, black_table)
end,
}
GameCooltip2:CoolTipInject(otherTalents)
function loadConditionsFrame.CanShowPvPTalentWarning()
local playerTalents = detailsFramework:GetCharacterPvPTalents()
local indexedTalents = {}
for _, talentTable in ipairs(playerTalents) do
table.insert(indexedTalents, talentTable.ID)
end
for talentID, _ in pairs(loadConditionsFrame.OptionsTable.pvptalent) do
if (type(talentID) == "number" and not detailsFramework.table.find(indexedTalents, talentID)) then
otherTalents:Show()
return
end
end
otherTalents:Hide()
end
--]=]
end
end
end
--create radio for group types
local groupTypes = {}
for _, groupTable in ipairs(detailsFramework:GetGroupTypes()) do
@@ -743,26 +394,24 @@ function detailsFramework:OpenLoadConditionsPanel(optionsTable, callback, frameO
table.insert(loadConditionsFrame.AllRadioGroups, roleTypesGroup)
--create radio group for mythic+ affixes
if IS_WOW_PROJECT_MAINLINE then
local affixes = {}
for i = 2, 1000 do
local affixName, desc, texture = C_ChallengeMode.GetAffixInfo(i)
if (affixName and not deprecatedAffixes[i]) then
table.insert(affixes, {
name = affixName,
set = loadConditionsFrame.OnRadioCheckboxClick,
param = i,
get = function() return loadConditionsFrame.OptionsTable.affix[i] or loadConditionsFrame.OptionsTable.affix[i .. ""] end,
texture = texture,
})
end
local affixes = {}
for _, affixID in ipairs(C_MythicPlus.GetCurrentAffixes()) do
local affixName, desc, texture = GetSpellInfo(affixID)
if (affixName and not deprecatedAffixes[affixID]) then
table.insert(affixes, {
name = affixName,
set = loadConditionsFrame.OnRadioCheckboxClick,
param = affixID,
get = function() return loadConditionsFrame.OptionsTable.affix[affixID] or loadConditionsFrame.OptionsTable.affix[affixID .. ""] end,
texture = texture,
})
end
local affixTypesGroup = detailsFramework:CreateCheckboxGroup(loadConditionsFrame, affixes, nil, {width = 200, height = 200, title = "M+ Affixes", backdrop_color = {0, 0, 0, 0}}, {offset_x = 125})
affixTypesGroup:SetPoint("topleft", loadConditionsFrame, "topleft", anchorPositions.affix [1], anchorPositions.affix [2])
affixTypesGroup.DBKey = "affix"
table.insert(loadConditionsFrame.AllRadioGroups, affixTypesGroup)
end
local affixTypesGroup = detailsFramework:CreateCheckboxGroup(loadConditionsFrame, affixes, nil, {width = 200, height = 200, title = "M+ Affixes", backdrop_color = {0, 0, 0, 0}}, {offset_x = 125})
affixTypesGroup:SetPoint("topleft", loadConditionsFrame, "topleft", anchorPositions.affix [1], anchorPositions.affix [2])
affixTypesGroup.DBKey = "affix"
table.insert(loadConditionsFrame.AllRadioGroups, affixTypesGroup)
--text entries functions
local textEntryRefresh = function(self)
@@ -818,56 +467,6 @@ function detailsFramework:OpenLoadConditionsPanel(optionsTable, callback, frameO
table.insert(loadConditionsFrame.AllTextEntries, mapIDEditbox)
function loadConditionsFrame.Refresh(self)
if IS_WOW_PROJECT_MAINLINE then
---@type {Name: string, ID: number, Texture: any, IsSelected: boolean}[]
local allTalents = detailsFramework:GetAllTalents()
local talentList = {}
for _, talentTable in ipairs(allTalents) do
if (talentTable.ID) then
table.insert(talentList, {
name = "", --talentTable.Name:sub(1, 15),
set = loadConditionsFrame.OnRadioCheckboxClick,
param = talentTable.ID,
get = function() return loadConditionsFrame.OptionsTable.talent[talentTable.ID] or loadConditionsFrame.OptionsTable.talent[talentTable.ID .. ""] end,
texture = talentTable.Texture,
tooltip = talentTable.Name,
})
end
end
--[=[]]
--update the talents(might have changed if the player changed its specializationid)
local talentList = {}
for _, talentTable in ipairs(detailsFramework:GetCharacterTalents()) do
if talentTable.ID then
table.insert(talentList, {
name = talentTable.Name,
set = loadConditionsFrame.OnRadioCheckboxClick,
param = talentTable.ID,
get = function() return loadConditionsFrame.OptionsTable.talent [talentTable.ID] or loadConditionsFrame.OptionsTable.talent [talentTable.ID .. ""] end,
texture = talentTable.Texture,
})
end
end
--]=]
loadConditionsFrame.TalentGroup:SetOptions(talentList)
end
if IS_WOW_PROJECT_MAINLINE then
local pvpTalentList = {}
for _, talentTable in ipairs(detailsFramework:GetCharacterPvPTalents()) do
table.insert(pvpTalentList, {
name = talentTable.Name:sub(1, 15),
set = loadConditionsFrame.OnRadioCheckboxClick,
param = talentTable.ID,
get = function() return loadConditionsFrame.OptionsTable.pvptalent [talentTable.ID] or loadConditionsFrame.OptionsTable.pvptalent [talentTable.ID .. ""] end,
texture = talentTable.Texture,
})
end
loadConditionsFrame.PvPTalentGroup:SetOptions(pvpTalentList)
end
--refresh the radio group
for _, radioGroup in ipairs(loadConditionsFrame.AllRadioGroups) do
radioGroup:Refresh()
@@ -878,11 +477,6 @@ function detailsFramework:OpenLoadConditionsPanel(optionsTable, callback, frameO
for _, textEntry in ipairs(loadConditionsFrame.AllTextEntries) do
textEntry:Refresh()
end
if IS_WOW_PROJECT_MAINLINE then
--loadConditionsFrame.CanShowTalentWarning()
--loadConditionsFrame.CanShowPvPTalentWarning()
end
end
end
+1 -1
View File
@@ -113,7 +113,7 @@ function DF.Math.GetNinePoints(object)
local point = ninePoints[i]
local t = f:CreateTexture(nil, "overlay")
t:SetColorTexture(1, 0, 0, 1)
t:SetTexture(1, 0, 0, 1)
t:SetSize(2, 2)
t:SetPoint("bottomleft", UIParent, "bottomleft", point.x, point.y)
end
+5 -129
View File
@@ -738,13 +738,6 @@ detailsFramework.ValueMixin = {
---@field GetTexCoord fun(self: table) : number, number, number, number
---@field SetColor fun(self: table, ...)
---@field GetColor fun(self: table) : number, number, number, number
---@field SetMaskTexture fun(self: table, texture: string)
---@field GetMaskTexture fun(self: table) : string
---@field SetMaskTexCoord fun(self: table, ...)
---@field GetMaskTexCoord fun(self: table) : number, number, number, number
---@field SetMaskAtlas fun(self: table, atlasName: string)
---@field GetMaskAtlas fun(self: table) : string
---@field AddMaskTexture fun(self: table, texture: string)
---@field SetBorderTexture fun(self: table, texture: string)
---@field GetBorderTexture fun(self: table) : string
---@field SetBorderColor fun(self: table, ...)
@@ -775,7 +768,7 @@ detailsFramework.StatusBarFunctions = {
end,
SetDesaturation = function(self, desaturationAmount)
self.barTexture:SetDesaturation(desaturationAmount)
self.barTexture:SetDesaturated(desaturationAmount > 0.5 and true or false)
end,
IsDesaturated = function(self)
@@ -817,136 +810,19 @@ detailsFramework.StatusBarFunctions = {
return self:GetStatusBarColor()
end,
SetMaskTexture = function(self, ...)
if (not self:HasTextureMask()) then
return
end
self.barTextureMask:SetTexture(...)
end,
GetMaskTexture = function(self)
if (not self:HasTextureMask()) then
return
end
self.barTextureMask:GetTexture()
end,
SetMaskAtlas = function(self, atlasName)
if (not self:HasTextureMask()) then
return
end
self.barTextureMask:SetAtlas(atlasName)
end,
GetMaskAtlas = function(self)
if (not self:HasTextureMask()) then
return
end
self.barTextureMask:GetAtlas()
end,
AddMaskTexture = function(self, object)
if (not self:HasTextureMask()) then
return
end
if (object.GetObjectType and object:GetObjectType() == "Texture") then
object:AddMaskTexture(self.barTextureMask)
else
detailsFramework:Msg("Invalid 'Texture' to object:AddMaskTexture(Texture)", debugstack())
end
end,
CreateTextureMask = function(self)
local barTexture = self:GetStatusBarTexture() or self.barTexture
if (not barTexture) then
detailsFramework:Msg("Object doesn't not have a statubar texture, create one and object:SetStatusBarTexture(textureObject)", debugstack())
return
end
if (self.barTextureMask) then
return self.barTextureMask
end
--statusbar texture mask
self.barTextureMask = self:CreateMaskTexture(nil, "artwork")
self.barTextureMask:SetAllPoints()
self.barTextureMask:SetTexture([[Interface\CHATFRAME\CHATFRAMEBACKGROUND]])
--border texture
self.barBorderTextureForMask = self:CreateTexture(nil, "overlay", nil, 7)
self.barBorderTextureForMask:SetAllPoints()
--self.barBorderTextureForMask:SetPoint("topleft", self, "topleft", -1, 1)
--self.barBorderTextureForMask:SetPoint("bottomright", self, "bottomright", 1, -1)
self.barBorderTextureForMask:Hide()
barTexture:AddMaskTexture(self.barTextureMask)
return self.barTextureMask
end,
HasTextureMask = function(self)
if (not self.barTextureMask) then
detailsFramework:Msg("Object doesn't not have a texture mask, create one using object:CreateTextureMask()", debugstack())
return false
end
return true
end,
SetBorderTexture = function(self, texture)
if (not self:HasTextureMask()) then
return
end
texture = texture or ""
self.barBorderTextureForMask:SetTexture(texture)
if (texture == "") then
self.barBorderTextureForMask:Hide()
else
self.barBorderTextureForMask:Show()
end
return
end,
GetBorderTexture = function(self)
if (not self:HasTextureMask()) then
return
end
return self.barBorderTextureForMask:GetTexture()
return
end,
SetBorderColor = function(self, r, g, b, a)
r, g, b, a = detailsFramework:ParseColors(r, g, b, a)
if (self.barBorderTextureForMask and self.barBorderTextureForMask:IsShown()) then
self.barBorderTextureForMask:SetVertexColor(r, g, b, a)
--if there's a square border on the widget, remove its color
if (self.border and self.border.UpdateSizes and self.border.SetVertexColor) then
self.border:SetVertexColor(0, 0, 0, 0)
end
return
end
if (self.border and self.border.UpdateSizes and self.border.SetVertexColor) then
self.border:SetVertexColor(r, g, b, a)
--adjust the mask border texture ask well in case the user set the mask color texture before setting a texture on it
if (self.barBorderTextureForMask) then
self.barBorderTextureForMask:SetVertexColor(r, g, b, a)
end
return
end
return
end,
GetBorderColor = function(self)
if (self.barBorderTextureForMask and self.barBorderTextureForMask:IsShown()) then
return self.barBorderTextureForMask:GetVertexColor()
end
if (self.border and self.border.UpdateSizes and self.border.GetVertexColor) then
return self.border:GetVertexColor()
end
return
end,
}
+22 -49
View File
@@ -17,22 +17,11 @@ local CreateFrame = CreateFrame
-- TWW compatibility:
local GetSpellInfo = GetSpellInfo or function(spellID) if not spellID then return nil end local si = C_Spell.GetSpellInfo(spellID) if si then return si.name, nil, si.iconID, si.castTime, si.minRange, si.maxRange, si.spellID, si.originalIconID end end
local GetNumSpellTabs = GetNumSpellTabs or C_SpellBook.GetNumSpellBookSkillLines
local GetSpellTabInfo = GetSpellTabInfo or function(tabLine) local skillLine = C_SpellBook.GetSpellBookSkillLineInfo(tabLine) if skillLine then return skillLine.name, skillLine.iconID, skillLine.itemIndexOffset, skillLine.numSpellBookItems, skillLine.isGuild, skillLine.offSpecID end end
local SpellBookItemTypeMap = Enum.SpellBookItemType and {[Enum.SpellBookItemType.Spell] = "SPELL", [Enum.SpellBookItemType.None] = "NONE", [Enum.SpellBookItemType.Flyout] = "FLYOUT", [Enum.SpellBookItemType.FutureSpell] = "FUTURESPELL", [Enum.SpellBookItemType.PetAction] = "PETACTION" } or {}
local GetSpellBookItemInfo = GetSpellBookItemInfo or function(...) local si = C_SpellBook.GetSpellBookItemInfo(...) if si then return SpellBookItemTypeMap[si.itemType] or "NONE", si.spellID end end
local GetNumSpellTabs = GetNumSpellTabs
local GetSpellTabInfo = GetSpellTabInfo
local GetSpellBookItemInfo = GetSpellBookItemInfo
local IS_WOW_PROJECT_MAINLINE = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
local IS_WOW_PROJECT_NOT_MAINLINE = WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE
local IS_WOW_PROJECT_CLASSIC_ERA = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
local CastInfo = detailsFramework.CastInfo
local PixelUtil = PixelUtil or DFPixelUtil
local UnitGroupRolesAssigned = detailsFramework.UnitGroupRolesAssigned
local cleanfunction = function() end
local PixelUtil = PixelUtil
local APIFrameFunctions
do
@@ -1631,7 +1620,7 @@ function detailsFramework:IconPick (callback, close_when_select, param1, param2)
local preview_image_bg = detailsFramework:NewImage(detailsFramework.IconPickFrame.preview, nil, 76, 76)
preview_image_bg:SetDrawLayer("background", 0)
preview_image_bg:SetAllPoints(detailsFramework.IconPickFrame.preview)
preview_image_bg:SetColorTexture(0, 0, 0)
preview_image_bg:SetTexture(0, 0, 0)
local preview_image = detailsFramework:NewImage(detailsFramework.IconPickFrame.preview, nil, 76, 76)
preview_image:SetAllPoints(detailsFramework.IconPickFrame.preview)
@@ -1998,7 +1987,6 @@ function detailsFramework:CreateScaleBar(frame, config, bNoRightClick) --~scale
local scaleBar, text = detailsFramework:CreateSlider(frame, 120, 14, 0.6, 1.6, 0.1, config.scale, true, "ScaleBar", nil, "Scale:", detailsFramework:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE"), detailsFramework:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
scaleBar.thumb:SetWidth(24)
scaleBar:SetValueStep(0.05)
scaleBar:SetObeyStepOnDrag(true)
scaleBar.mouseDown = false
rawset(scaleBar, "lockdown", true)
@@ -2512,7 +2500,7 @@ function detailsFramework:ShowPromptPanel(message, trueCallback, falseCallback,
detailsFramework:CreateAnimation(promptFrame.ShowAnimation, "scale", 2, .075, 1, 1, .90, .90, "center", 0, 0)
promptFrame.FlashTexture = promptFrame:CreateTexture(nil, "overlay")
promptFrame.FlashTexture:SetColorTexture(1, 1, 1, 1)
promptFrame.FlashTexture:SetTexture(1, 1, 1, 1)
promptFrame.FlashTexture:SetAllPoints()
promptFrame.FlashAnimation = detailsFramework:CreateAnimationHub(promptFrame.FlashTexture, function() promptFrame.FlashTexture:Show() end, function() promptFrame.FlashTexture:Hide() end)
@@ -2878,7 +2866,7 @@ local chart_panel_add_label = function(self, color, name, type, number)
thisbox.type = type
thisbox.index = number
thisbox.box:SetColorTexture(unpack(color))
thisbox.box:SetTexture(unpack(color))
thisbox.text:SetText(name)
thisbox.check:Show()
@@ -2919,7 +2907,7 @@ local draw_overlay = function(self, this_overlay, overlayData, color)
this_block:SetWidth(pixel*5)
end
this_block:SetColorTexture(r, g, b, a or 0.25)
this_block:SetTexture(r, g, b, a or 0.25)
this_block:Show()
index = index + 1
@@ -3321,7 +3309,7 @@ function detailsFramework:CreateChartPanel(parent, width, height, name)
--div lines
for i = 1, 8, 1 do
local line = g:CreateTexture(nil, "overlay")
line:SetColorTexture(1, 1, 1, .05)
line:SetTexture(1, 1, 1, .05)
line:SetWidth(670)
line:SetHeight(1.1)
@@ -3347,14 +3335,14 @@ function detailsFramework:CreateChartPanel(parent, width, height, name)
local line = chartFrame:CreateTexture(nil, "border")
line:SetSize(1, height-45)
line:SetColorTexture(1, 1, 1, .1)
line:SetTexture(1, 1, 1, .1)
line:SetPoint("bottomleft", timeString, "topright", 0, -10)
line:Hide()
timeString.line = line
end
local bottom_texture = detailsFramework:NewImage(chartFrame, nil, 702, 25, "background", nil, nil, "$parentBottomTexture")
bottom_texture:SetColorTexture(.1, .1, .1, .7)
bottom_texture:SetTexture(.1, .1, .1, .7)
bottom_texture:SetPoint("topright", g, "bottomright", 0, 0)
bottom_texture:SetPoint("bottomleft", chartFrame, "bottomleft", 8, 12)
@@ -3433,7 +3421,7 @@ local gframe_create_line = function(self)
t:SetWidth(1)
t:SetPoint("topright", f, "topright")
t:SetPoint("bottomright", f, "bottomright")
t:SetColorTexture(1, 1, 1, .1)
t:SetTexture(1, 1, 1, .1)
f.grid = t
local b = f:CreateTexture(nil, "overlay")
@@ -3452,7 +3440,7 @@ local gframe_create_line = function(self)
local text = f:CreateFontString(nil, "overlay", "GameFontNormal")
local textBackground = f:CreateTexture(nil, "artwork")
textBackground:SetSize(30, 16)
textBackground:SetColorTexture(0, 0, 0, 0.5)
textBackground:SetTexture(0, 0, 0, 0.5)
textBackground:SetPoint("bottom", f.ball, "top", 0, -6)
text:SetPoint("center", textBackground, "center")
detailsFramework:SetFontSize(text, 10)
@@ -3959,7 +3947,7 @@ function detailsFramework:ApplyStandardBackdrop(frame, bUseSolidColor, alphaScal
if (not frame.__background) then
frame.__background = frame:CreateTexture(nil, "border", nil, -6)
frame.__background:SetColorTexture(red, green, blue)
frame.__background:SetTexture(red, green, blue)
frame.__background:SetAllPoints()
end
@@ -4254,21 +4242,6 @@ detailsFramework.RadioGroupCoreFunctions = {
else
checkbox.Icon:SetTexCoord(0, 1, 0, 1)
end
if (optionTable.mask) then
if (not checkbox.Icon.Mask) then
checkbox.Icon.Mask = checkbox:CreateMaskTexture(nil, "overlay")
checkbox.Icon.Mask:SetAllPoints(checkbox.Icon.widget)
checkbox.Icon.Mask:SetTexture(optionTable.mask)
checkbox.Icon:AddMaskTexture(checkbox.Icon.Mask)
end
checkbox.Icon.Mask:SetTexture(optionTable.mask)
else
--checkbox.Icon:SetMask("")
if (checkbox.Icon.Mask) then
checkbox.Icon.Mask:SetTexture("")
end
end
else
checkbox.Icon:SetTexture("")
if (self.options.text_padding) then
@@ -4810,7 +4783,7 @@ function detailsFramework:CreateBorderFrame(parent, name)
--create left border
local leftBorder = f:CreateTexture(nil, "overlay")
leftBorder:SetDrawLayer("overlay", 7)
leftBorder:SetColorTexture(1, 1, 1, 1)
leftBorder:SetTexture(1, 1, 1, 1)
table.insert(f.allTextures, leftBorder)
f.leftBorder = leftBorder
PixelUtil.SetPoint(leftBorder, "topright", f, "topleft", 0, 1, 0, 1)
@@ -4820,7 +4793,7 @@ function detailsFramework:CreateBorderFrame(parent, name)
--create right border
local rightBorder = f:CreateTexture(nil, "overlay")
rightBorder:SetDrawLayer("overlay", 7)
rightBorder:SetColorTexture(1, 1, 1, 1)
rightBorder:SetTexture(1, 1, 1, 1)
table.insert(f.allTextures, rightBorder)
f.rightBorder = rightBorder
PixelUtil.SetPoint(rightBorder, "topleft", f, "topright", 0, 1, 0, 1)
@@ -4830,7 +4803,7 @@ function detailsFramework:CreateBorderFrame(parent, name)
--create top border
local topBorder = f:CreateTexture(nil, "overlay")
topBorder:SetDrawLayer("overlay", 7)
topBorder:SetColorTexture(1, 1, 1, 1)
topBorder:SetTexture(1, 1, 1, 1)
table.insert(f.allTextures, topBorder)
f.topBorder = topBorder
PixelUtil.SetPoint(topBorder, "bottomleft", f, "topleft", 0, 0, 0, 0)
@@ -4840,7 +4813,7 @@ function detailsFramework:CreateBorderFrame(parent, name)
--create border
local bottomBorder = f:CreateTexture(nil, "overlay")
bottomBorder:SetDrawLayer("overlay", 7)
bottomBorder:SetColorTexture(1, 1, 1, 1)
bottomBorder:SetTexture(1, 1, 1, 1)
table.insert(f.allTextures, bottomBorder)
f.bottomBorder = bottomBorder
PixelUtil.SetPoint(bottomBorder, "topleft", f, "bottomleft", 0, 0, 0, 0)
@@ -4924,7 +4897,7 @@ detailsFramework.TimeLineElapsedTimeFunctions = {
if (not label) then
label = self:CreateFontString(nil, "artwork", "GameFontNormal")
label.line = self:CreateTexture(nil, "artwork")
label.line:SetColorTexture(1, 1, 1)
label.line:SetTexture(1, 1, 1)
label.line:SetPoint("topleft", label, "bottomleft", 0, -2)
self.labels [index] = label
end
@@ -5149,7 +5122,7 @@ detailsFramework.TimeLineBlockFunctions = {
self.blocks [index] = block
local background = block:CreateTexture(nil, "background")
background:SetColorTexture(1, 1, 1, 1)
background:SetTexture(1, 1, 1, 1)
local icon = block:CreateTexture(nil, "artwork")
local text = block:CreateFontString(nil, "artwork")
local auraLength = block:CreateTexture(nil, "border")
@@ -5159,7 +5132,7 @@ detailsFramework.TimeLineBlockFunctions = {
text:SetPoint("left", icon, "left", 2, 0)
auraLength:SetPoint("topleft", icon, "topleft", 0, 0)
auraLength:SetPoint("bottomleft", icon, "bottomleft", 0, 0)
auraLength:SetColorTexture(1, 1, 1, 1)
auraLength:SetTexture(1, 1, 1, 1)
auraLength:SetVertexColor(1, 1, 1, 0.1)
block.icon = icon
@@ -5575,7 +5548,7 @@ function detailsFramework:ShowErrorMessage (errorMessage, titleText)
detailsFramework:CreateAnimation(f.ShowAnimation, "scale", 2, .075, 1, 1, .90, .90, "center", 0, 0)
f.FlashTexture = f:CreateTexture(nil, "overlay")
f.FlashTexture:SetColorTexture(1, 1, 1, 1)
f.FlashTexture:SetTexture(1, 1, 1, 1)
f.FlashTexture:SetAllPoints()
f.FlashAnimation = detailsFramework:CreateAnimationHub (f.FlashTexture, function() f.FlashTexture:Show() end, function() f.FlashTexture:Hide() end)
+10 -61
View File
@@ -144,7 +144,7 @@ detailsFramework:Mixin(ImageMetaFunctions, detailsFramework.ScriptHookMixin)
--color
local smember_color = function(object, value)
local red, green, blue, alpha = detailsFramework:ParseColors(value)
object.image:SetColorTexture(red, green, blue, alpha)
object.image:SetTexture(red, green, blue, alpha)
end
--vertex color
@@ -181,7 +181,7 @@ detailsFramework:Mixin(ImageMetaFunctions, detailsFramework.ScriptHookMixin)
--gradient
local smember_gradient = function(object, value)
if (type(value) == "table" and value.gradient and value.fromColor and value.toColor) then
object.image:SetColorTexture(1, 1, 1, 1)
object.image:SetTexture(1, 1, 1, 1)
local fromColor = detailsFramework:FormatColor("tablemembers", value.fromColor)
local toColor = detailsFramework:FormatColor("tablemembers", value.toColor)
object.image:SetGradient(value.gradient, fromColor, toColor)
@@ -346,20 +346,7 @@ detailsFramework:Mixin(ImageMetaFunctions, detailsFramework.ScriptHookMixin)
---@type df_gradienttable
local gradientTable = texture
if (detailsFramework.IsDragonflight() or detailsFramework.IsNonRetailWowWithRetailAPI() or detailsFramework.IsWarWow()) then
ImageObject.image:SetColorTexture(1, 1, 1, 1)
local fromColor = detailsFramework:FormatColor("tablemembers", gradientTable.fromColor)
local toColor = detailsFramework:FormatColor("tablemembers", gradientTable.toColor)
if (gradientTable.invert) then
local temp = fromColor
fromColor = toColor
toColor = temp
end
ImageObject.image:SetGradient(gradientTable.gradient, fromColor, toColor)
else
local fromR, fromG, fromB, fromA = detailsFramework:ParseColors(gradientTable.fromColor)
local fromR, fromG, fromB, fromA = detailsFramework:ParseColors(gradientTable.fromColor)
local toR, toG, toB, toA = detailsFramework:ParseColors(gradientTable.toColor)
if (gradientTable.invert) then
@@ -377,22 +364,21 @@ detailsFramework:Mixin(ImageMetaFunctions, detailsFramework.ScriptHookMixin)
toA = temp
end
ImageObject.image:SetColorTexture(1, 1, 1, 1)
ImageObject.image:SetTexture(1, 1, 1, 1)
ImageObject.image:SetGradientAlpha(gradientTable.gradient, fromR, fromG, fromB, fromA, toR, toG, toB, toA)
end
else
local r, g, b, a = detailsFramework:ParseColors(texture)
ImageObject.image:SetColorTexture(r, g, b, a)
ImageObject.image:SetTexture(r, g, b, a)
end
elseif (type(texture) == "string") then
local isAtlas = C_Texture.GetAtlasInfo(texture)
local isAtlas = AtlasUtil:AtlasExists(texture)
if (isAtlas) then
ImageObject.image:SetAtlas(texture)
else
if (detailsFramework:IsHtmlColor(texture)) then
local r, g, b = detailsFramework:ParseColors(texture)
ImageObject.image:SetColorTexture(r, g, b)
ImageObject.image:SetTexture(r, g, b)
else
ImageObject.image:SetTexture(texture)
end
@@ -452,7 +438,7 @@ end
---@param filterMode texturefilter?
---@param resetTexCoords boolean?
function detailsFramework:SetAtlas(textureObject, atlas, useAtlasSize, filterMode, resetTexCoords)
local isAtlas = C_Texture.GetAtlasInfo(type(atlas) == "string" and atlas or "--")
local isAtlas = AtlasUtil:AtlasExists(type(atlas) == "string" and atlas or "--")
if (isAtlas and type(atlas) == "string") then
textureObject:SetAtlas(atlas, useAtlasSize, filterMode, resetTexCoords)
return
@@ -464,7 +450,7 @@ function detailsFramework:SetAtlas(textureObject, atlas, useAtlasSize, filterMod
local atlasName = atlas.atlas
if (atlasName) then
isAtlas = C_Texture.GetAtlasInfo(atlasName)
isAtlas = AtlasUtil:AtlasExists(atlasName)
if (isAtlas) then
textureObject:SetAtlas(atlasName, useAtlasSize, filterMode, resetTexCoords)
return
@@ -490,9 +476,6 @@ function detailsFramework:SetAtlas(textureObject, atlas, useAtlasSize, filterMod
textureObject:SetDesaturated(true)
else
textureObject:SetDesaturated(false)
if (atlasInfo.desaturation) then
textureObject:SetDesaturation(atlasInfo.desaturation)
end
end
if (atlasInfo.colorName) then
@@ -570,7 +553,7 @@ end
function detailsFramework:ParseTexture(texture, width, height, leftTexCoord, rightTexCoord, topTexCoord, bottomTexCoord, vertexRed, vertexGreen, vertexBlue, vertexAlpha)
local isAtlas
if (type(texture) == "string") then
isAtlas = C_Texture.GetAtlasInfo(texture)
isAtlas = AtlasUtil:AtlasExists(texture)
end
if (isAtlas) then
@@ -706,37 +689,3 @@ function detailsFramework:TableIsAtlas(atlasTale)
end
return false
end
---Receives a texture object and a texture to use as mask
---If the mask texture is not created, it will be created and added to a key named MaskTexture
---@param self table
---@param texture texture
---@param maskTexture string|number|table
function detailsFramework:SetMask(texture, maskTexture)
if (not texture.MaskTexture) then
local parent = texture:GetParent()
local maskTextureObject = parent:CreateMaskTexture(nil, "artwork")
maskTextureObject:SetAllPoints(texture)
texture:AddMaskTexture(maskTextureObject)
texture.MaskTexture = maskTextureObject
end
--is this a game texture atlas?
if (type(maskTexture) == "string") then
local isAtlas = C_Texture.GetAtlasInfo(maskTexture)
if (isAtlas) then
texture.MaskTexture:SetAtlas(maskTexture)
return
end
elseif (type(maskTexture) == "table") then
local bIsAtlas = detailsFramework:TableIsAtlas(maskTexture)
if (bIsAtlas) then
detailsFramework:SetAtlas(texture.MaskTexture, maskTexture)
return
end
end
texture.MaskTexture:SetTexture(maskTexture)
end
+12 -12
View File
@@ -67,7 +67,7 @@ local CreateImageEditorFrame = function()
local topCoordTexture = DF:NewImage(editorWindow, nil, nil, nil, "overlay", nil, nil, "$parentImageTopCoord")
topCoordTexture:SetPoint("topleft", editorWindow, "topleft")
topCoordTexture:SetPoint("topright", editorWindow, "topright")
topCoordTexture:SetColorTexture(1, 0, 0)
topCoordTexture:SetTexture(1, 0, 0)
topCoordTexture.height = 1
topCoordTexture.alpha = .2
@@ -80,7 +80,7 @@ local CreateImageEditorFrame = function()
topSlider:SetHook("OnLeave", function() return true end)
local topSliderThumpTexture = topSlider:CreateTexture(nil, "overlay")
topSliderThumpTexture:SetColorTexture(1, 1, 1)
topSliderThumpTexture:SetTexture(1, 1, 1)
topSliderThumpTexture:SetWidth(512)
topSliderThumpTexture:SetHeight(1)
topSlider:SetThumbTexture (topSliderThumpTexture)
@@ -98,7 +98,7 @@ local CreateImageEditorFrame = function()
local bottomCoordTexture = DF:NewImage(editorWindow, nil, nil, nil, "overlay", nil, nil, "$parentImageBottomCoord")
bottomCoordTexture:SetPoint("bottomleft", editorWindow, "bottomleft", 0, 0)
bottomCoordTexture:SetPoint("bottomright", editorWindow, "bottomright", 0, 0)
bottomCoordTexture:SetColorTexture(1, 0, 0)
bottomCoordTexture:SetTexture(1, 0, 0)
bottomCoordTexture.height = 1
bottomCoordTexture.alpha = .2
@@ -111,7 +111,7 @@ local CreateImageEditorFrame = function()
bottomSlider:SetHook("OnLeave", function() return true end)
local bottomSliderThumpTexture = bottomSlider:CreateTexture(nil, "overlay")
bottomSliderThumpTexture:SetColorTexture(1, 1, 1)
bottomSliderThumpTexture:SetTexture(1, 1, 1)
bottomSliderThumpTexture:SetWidth(512)
bottomSliderThumpTexture:SetHeight(1)
bottomSlider:SetThumbTexture (bottomSliderThumpTexture)
@@ -130,7 +130,7 @@ local CreateImageEditorFrame = function()
local leftCoordTexture = DF:NewImage(editorWindow, nil, nil, nil, "overlay", nil, nil, "$parentImageLeftCoord")
leftCoordTexture:SetPoint("topleft", editorWindow, "topleft", 0, 0)
leftCoordTexture:SetPoint("bottomleft", editorWindow, "bottomleft", 0, 0)
leftCoordTexture:SetColorTexture(1, 0, 0)
leftCoordTexture:SetTexture(1, 0, 0)
leftCoordTexture.width = 1
leftCoordTexture.alpha = .2
@@ -142,7 +142,7 @@ local CreateImageEditorFrame = function()
leftSlider:SetHook("OnLeave", function() return true end)
local leftSliderThumpTexture = leftSlider:CreateTexture(nil, "overlay")
leftSliderThumpTexture:SetColorTexture(1, 1, 1)
leftSliderThumpTexture:SetTexture(1, 1, 1)
leftSliderThumpTexture:SetWidth(1)
leftSliderThumpTexture:SetHeight(512)
leftSlider:SetThumbTexture (leftSliderThumpTexture)
@@ -160,7 +160,7 @@ local CreateImageEditorFrame = function()
local rightCoordTexture = DF:NewImage(editorWindow, nil, nil, nil, "overlay", nil, nil, "$parentImageRightCoord")
rightCoordTexture:SetPoint("topright", editorWindow, "topright", 0, 0)
rightCoordTexture:SetPoint("bottomright", editorWindow, "bottomright", 0, 0)
rightCoordTexture:SetColorTexture(1, 0, 0)
rightCoordTexture:SetTexture(1, 0, 0)
rightCoordTexture.width = 1
rightCoordTexture.alpha = .2
@@ -172,7 +172,7 @@ local CreateImageEditorFrame = function()
rightSlider:SetHook("OnLeave", function() return true end)
--[
local rightSliderThumpTexture = rightSlider:CreateTexture(nil, "overlay")
rightSliderThumpTexture:SetColorTexture(1, 1, 1)
rightSliderThumpTexture:SetTexture(1, 1, 1)
rightSliderThumpTexture:SetWidth(1)
rightSliderThumpTexture:SetHeight(512)
rightSlider:SetThumbTexture (rightSliderThumpTexture)
@@ -431,19 +431,19 @@ local CreateImageEditorFrame = function()
local selectionBoxUp = dragFrame:CreateTexture(nil, "overlay")
selectionBoxUp:SetHeight(1)
selectionBoxUp:SetColorTexture(1, 1, 1)
selectionBoxUp:SetTexture(1, 1, 1)
local selectionBoxDown = dragFrame:CreateTexture(nil, "overlay")
selectionBoxDown:SetHeight(1)
selectionBoxDown:SetColorTexture(1, 1, 1)
selectionBoxDown:SetTexture(1, 1, 1)
local selectionBoxLeft = dragFrame:CreateTexture(nil, "overlay")
selectionBoxLeft:SetWidth(1)
selectionBoxLeft:SetColorTexture(1, 1, 1)
selectionBoxLeft:SetTexture(1, 1, 1)
local selectionBoxRight = dragFrame:CreateTexture(nil, "overlay")
selectionBoxRight:SetWidth(1)
selectionBoxRight:SetColorTexture(1, 1, 1)
selectionBoxRight:SetTexture(1, 1, 1)
function dragFrame.ClearSelectionBoxPoints()
selectionBoxUp:ClearAllPoints()
+5 -40
View File
@@ -113,15 +113,6 @@ local setCornerPoints = function(self, textures, width, height, xOffset, yOffset
PixelUtil.SetSize(thisTexture, width or 16, height or 16)
thisTexture:SetTexture(self.options.corner_texture, "CLAMP", "CLAMP", "TRILINEAR")
--set the mask
if (not thisTexture.MaskTexture and bIsBorder) then
thisTexture.MaskTexture = self:CreateMaskTexture(nil, "background")
thisTexture.MaskTexture:SetSize(74, 64)
thisTexture:AddMaskTexture(thisTexture.MaskTexture)
thisTexture.MaskTexture:SetTexture([[Interface\Azerite\AzeriteGoldRingRank2]], "CLAMP", "CLAMP", "TRILINEAR") --1940690
--thisTexture.MaskTexture:Hide()
end
xOffset = xOffset or 0
yOffset = yOffset or 0
@@ -131,30 +122,18 @@ local setCornerPoints = function(self, textures, width, height, xOffset, yOffset
if (cornerName == "TopLeft") then
thisTexture:SetTexCoord(0, 0.5, 0, 0.5)
PixelUtil.SetPoint(thisTexture, cornerName, self, cornerName, -xOffset, yOffset)
if (thisTexture.MaskTexture) then
PixelUtil.SetPoint(thisTexture.MaskTexture, cornerName, self, cornerName, -18-xOffset, 16+yOffset)
end
elseif (cornerName == "TopRight") then
thisTexture:SetTexCoord(0.5, 1, 0, 0.5)
PixelUtil.SetPoint(thisTexture, cornerName, self, cornerName, xOffset, yOffset)
if (thisTexture.MaskTexture) then
PixelUtil.SetPoint(thisTexture.MaskTexture, cornerName, self, cornerName, -18+xOffset, 16+yOffset)
end
elseif (cornerName == "BottomLeft") then
thisTexture:SetTexCoord(0, 0.5, 0.5, 1)
PixelUtil.SetPoint(thisTexture, cornerName, self, cornerName, -xOffset, -yOffset)
if (thisTexture.MaskTexture) then
PixelUtil.SetPoint(thisTexture.MaskTexture, cornerName, self, cornerName, -18-xOffset, 16-yOffset)
end
elseif (cornerName == "BottomRight") then
thisTexture:SetTexCoord(0.5, 1, 0.5, 1)
PixelUtil.SetPoint(thisTexture, cornerName, self, cornerName, xOffset, -yOffset)
if (thisTexture.MaskTexture) then
PixelUtil.SetPoint(thisTexture.MaskTexture, cornerName, self, cornerName, -18+xOffset, 16-yOffset)
end
end
end
end
@@ -181,7 +160,7 @@ detailsFramework.RoundedCornerPanelMixin = {
PixelUtil.SetPoint(topHorizontalEdge, "bottomleft", self.CornerTextures["TopLeft"], "bottomright", 0, 0)
PixelUtil.SetPoint(topHorizontalEdge, "topright", self.CornerTextures["TopRight"], "topleft", 0, 0)
PixelUtil.SetPoint(topHorizontalEdge, "bottomright", self.CornerTextures["TopRight"], "bottomleft", 0, 0)
topHorizontalEdge:SetColorTexture(unpack(defaultColorTable))
topHorizontalEdge:SetTexture(unpack(defaultColorTable))
--create the bottom texture which connects the bottom corners with a horizontal line
---@type texture
@@ -190,7 +169,7 @@ detailsFramework.RoundedCornerPanelMixin = {
PixelUtil.SetPoint(bottomHorizontalEdge, "bottomleft", self.CornerTextures["BottomLeft"], "bottomright", 0, 0)
PixelUtil.SetPoint(bottomHorizontalEdge, "topright", self.CornerTextures["BottomRight"], "topleft", 0, 0)
PixelUtil.SetPoint(bottomHorizontalEdge, "bottomright", self.CornerTextures["BottomRight"], "bottomleft", 0, 0)
bottomHorizontalEdge:SetColorTexture(unpack(defaultColorTable))
bottomHorizontalEdge:SetTexture(unpack(defaultColorTable))
--create the center block which connects the bottom left of the topleft corner with the top right of the bottom right corner
---@type texture
@@ -199,7 +178,7 @@ detailsFramework.RoundedCornerPanelMixin = {
PixelUtil.SetPoint(centerBlock, "bottomleft", self.CornerTextures["BottomLeft"], "topleft", 0, 0)
PixelUtil.SetPoint(centerBlock, "topright", self.CornerTextures["BottomRight"], "topright", 0, 0)
PixelUtil.SetPoint(centerBlock, "bottomright", self.CornerTextures["BottomRight"], "topright", 0, 0)
centerBlock:SetColorTexture(unpack(defaultColorTable))
centerBlock:SetTexture(unpack(defaultColorTable))
self:CreateBorder()
self:SetBorderCornerColor(0, 0, 0, 0)
@@ -345,7 +324,6 @@ detailsFramework.RoundedCornerPanelMixin = {
if (self.bHasBorder) then
for _, thisTexture in pairs(self.BorderCornerTextures) do
PixelUtil.SetSize(thisTexture, cornerWidth-self.cornerRoundness, cornerHeight-self.cornerRoundness)
thisTexture.MaskTexture:SetSize(74-(self.cornerRoundness*0.75), 64-self.cornerRoundness)
end
local horizontalEdgesNewSize = self:CalculateBorderEdgeSize("horizontal")
@@ -443,7 +421,7 @@ detailsFramework.RoundedCornerPanelMixin = {
---@type texture
local newBorderTexture = self:CreateTexture(nil, "background", nil, 0)
self.BorderCornerTextures[cornerNames[i]] = newBorderTexture
newBorderTexture:SetColorTexture(unpack(defaultColorTable))
newBorderTexture:SetTexture(unpack(defaultColorTable))
newBorderTexture:SetVertexColor(r, g, b, a)
self[cornerNames[i] .. "Border"] = newBorderTexture
end
@@ -484,7 +462,7 @@ detailsFramework.RoundedCornerPanelMixin = {
for edgeName, thisTexture in pairs(self.BorderEdgeTextures) do
---@cast thisTexture texture
thisTexture:SetColorTexture(unpack(defaultColorTable))
thisTexture:SetTexture(unpack(defaultColorTable))
thisTexture:SetVertexColor(r, g, b, a)
end
@@ -547,19 +525,6 @@ detailsFramework.RoundedCornerPanelMixin = {
for _, thisTexture in pairs(self.CenterTextures) do
thisTexture:SetVertexColor(red, green, blue, alpha)
end
if (self.bHasBorder) then
if (alpha < 0.979) then
--if using borders, the two border textures overlaps making the alpha be darker than it should
for _, thisTexture in pairs(self.BorderCornerTextures) do
thisTexture.MaskTexture:Show()
end
else
for _, thisTexture in pairs(self.BorderCornerTextures) do
thisTexture.MaskTexture:Hide()
end
end
end
end,
}
+1 -1
View File
@@ -27,7 +27,7 @@ local createOptionFrameFunc = function(line, lineIndex, columnIndex)
local highlightTexture = optionButton:CreateTexture(nil, "highlight")
highlightTexture:SetAllPoints()
highlightTexture:SetColorTexture(1, 1, 1, 0.2)
highlightTexture:SetTexture(1, 1, 1, 0.2)
DetailsFramework:ApplyStandardBackdrop(optionButton)
-1
View File
@@ -298,7 +298,6 @@ detailsFramework.ScrollBoxFunctions = {
end
scrollBar:SetMinMaxValues(0, maxRange);
scrollBar:SetValueStep(buttonHeight);
scrollBar:SetStepsPerPage(numToDisplay-1);
scrollChildFrame:SetHeight(scrollChildHeight);
-- Arrow button handling
-1
View File
@@ -1255,7 +1255,6 @@ function DF:NewSlider (parent, container, name, member, width, height, minValue,
SliderObject.slider:SetValueStep(0.01)
else
SliderObject.slider:SetValueStep(step)
SliderObject.slider:SetObeyStepOnDrag(true)
end
if (not APISliderFunctions) then
+103 -698
View File
@@ -4,9 +4,6 @@ if (not DF or not DetailsFrameworkCanLoad) then
return
end
local IS_WOW_PROJECT_MAINLINE = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
local IS_WOW_PROJECT_NOT_MAINLINE = WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE
DF_COOLDOWN_RAID = 4
DF_COOLDOWN_EXTERNAL = 3
@@ -489,206 +486,6 @@ DF.CooldownsBySpec = {
},
}
--additional CDs / modifications for classic
if (IS_WOW_PROJECT_NOT_MAINLINE) then
--WARRIOR
--Arms
DF.CooldownsBySpec[71][12292] = 1 --Death Wish (BCC)
--ROGUE
--Outlaw
DF.CooldownsBySpec[260][13877] = 1 --Blade Flurry (talent) (BBC)
--MAGE
--fire
DF.CooldownsBySpec[63][28682] = 1 --Combustion (talent) (BCC)
--HUNTER
--marksmanship
DF.CooldownsBySpec[254][3045] = 1 --Rapid Fire (BCC)
DF.CooldownsBySpec[254][34471] = 1 --The Beast Within (talent) (BCC)
--auto-generated spell-ranks
--SHAMAN - 262
--SHAMAN - 263
--SHAMAN - 264
--WARRIOR - 71
--WARRIOR - 72
--WARRIOR - 73
--HUNTER - 253
--HUNTER - 254
--HUNTER - 255
--MAGE - 62
--MAGE - 63
--MAGE - 64
DF.CooldownsBySpec[64][13031] = 5 --ice barrier Rank 2
DF.CooldownsBySpec[64][13032] = 5 --ice barrier Rank 3
DF.CooldownsBySpec[64][13033] = 5 --ice barrier Rank 4
DF.CooldownsBySpec[64][27134] = 5 --ice barrier Rank 5
DF.CooldownsBySpec[64][33405] = 5 --ice barrier Rank 6
--PALADIN - 65
DF.CooldownsBySpec[65][1020] = 2 --divine shield Rank 2
DF.CooldownsBySpec[65][2800] = 3 --lay on hands Rank 2
DF.CooldownsBySpec[65][9257] = 3 --lay on hands Rank 2
DF.CooldownsBySpec[65][10310] = 3 --lay on hands Rank 3
DF.CooldownsBySpec[65][20236] = 3 --lay on hands Rank 2
DF.CooldownsBySpec[65][27154] = 3 --lay on hands Rank 4
DF.CooldownsBySpec[65][5588] = 5 --hammer of justice Rank 2
DF.CooldownsBySpec[65][5589] = 5 --hammer of justice Rank 3
DF.CooldownsBySpec[65][10308] = 5 --hammer of justice Rank 4
DF.CooldownsBySpec[65][10326] = 5 --Turn Evil
DF.CooldownsBySpec[65][20729] = 3 --blessing of sacrifice Rank 2
DF.CooldownsBySpec[65][27147] = 3 --blessing of sacrifice Rank 3
DF.CooldownsBySpec[65][27148] = 3 --blessing of sacrifice Rank 4
DF.CooldownsBySpec[65][5573] = 2 --divine protection Rank 2
DF.CooldownsBySpec[65][5599] = 3 --blessing of protection Rank 2
DF.CooldownsBySpec[65][10278] = 3 --blessing of protection Rank 3
--PALADIN - 66
DF.CooldownsBySpec[66][31851] = 2 --ardent defender Rank 2
DF.CooldownsBySpec[66][31852] = 2 --ardent defender Rank 3
DF.CooldownsBySpec[66][31853] = 2 --ardent defender Rank 4
DF.CooldownsBySpec[66][31854] = 2 --ardent defender Rank 5
DF.CooldownsBySpec[66][20729] = 3 --blessing of sacrifice Rank 2
DF.CooldownsBySpec[66][27147] = 3 --blessing of sacrifice Rank 3
DF.CooldownsBySpec[66][27148] = 3 --blessing of sacrifice Rank 4
DF.CooldownsBySpec[66][5588] = 5 --hammer of justice Rank 2
DF.CooldownsBySpec[66][5589] = 5 --hammer of justice Rank 3
DF.CooldownsBySpec[66][10308] = 5 --hammer of justice Rank 4
DF.CooldownsBySpec[66][10326] = 5 --Turn Evil
DF.CooldownsBySpec[66][5599] = 3 --blessing of protection Rank 2
DF.CooldownsBySpec[66][10278] = 3 --blessing of protection Rank 3
--PALADIN - 70
DF.CooldownsBySpec[70][1020] = 2 --divine shield Rank 2
DF.CooldownsBySpec[70][2800] = 3 --lay on hands Rank 2
DF.CooldownsBySpec[70][9257] = 3 --lay on hands Rank 2
DF.CooldownsBySpec[70][10310] = 3 --lay on hands Rank 3
DF.CooldownsBySpec[70][20236] = 3 --lay on hands Rank 2
DF.CooldownsBySpec[70][27154] = 3 --lay on hands Rank 4
DF.CooldownsBySpec[70][5588] = 5 --hammer of justice Rank 2
DF.CooldownsBySpec[70][5589] = 5 --hammer of justice Rank 3
DF.CooldownsBySpec[70][10308] = 5 --hammer of justice Rank 4
DF.CooldownsBySpec[70][10326] = 5 --Turn Evil
DF.CooldownsBySpec[70][5599] = 3 --blessing of protection Rank 2
DF.CooldownsBySpec[70][10278] = 3 --blessing of protection Rank 3
DF.CooldownsBySpec[70][20729] = 3 --blessing of sacrifice Rank 2
DF.CooldownsBySpec[70][27147] = 3 --blessing of sacrifice Rank 3
DF.CooldownsBySpec[70][27148] = 3 --blessing of sacrifice Rank 4
--PRIEST - 256
DF.CooldownsBySpec[256][8124] = 5 --psychic scream Rank 2
DF.CooldownsBySpec[256][10888] = 5 --psychic scream Rank 3
DF.CooldownsBySpec[256][10890] = 5 --psychic scream Rank 4
DF.CooldownsBySpec[256][27610] = 5 --psychic scream Rank 4
DF.CooldownsBySpec[256][19236] = 5 --desperate prayer Rank 2
DF.CooldownsBySpec[256][19238] = 5 --desperate prayer Rank 3
DF.CooldownsBySpec[256][19240] = 5 --desperate prayer Rank 4
DF.CooldownsBySpec[256][19241] = 5 --desperate prayer Rank 5
DF.CooldownsBySpec[256][19242] = 5 --desperate prayer Rank 6
DF.CooldownsBySpec[256][19243] = 5 --desperate prayer Rank 7
DF.CooldownsBySpec[256][25437] = 5 --desperate prayer Rank 8
--PRIEST - 257
DF.CooldownsBySpec[257][2052] = 5 --lesser heal Rank 2
DF.CooldownsBySpec[257][2053] = 5 --lesser heal Rank 3
DF.CooldownsBySpec[257][34863] = 5 --circle of healing Rank 2
DF.CooldownsBySpec[257][34864] = 5 --circle of healing Rank 3
DF.CooldownsBySpec[257][34865] = 5 --circle of healing Rank 4
DF.CooldownsBySpec[257][34866] = 5 --circle of healing Rank 5
DF.CooldownsBySpec[257][8124] = 5 --psychic scream Rank 2
DF.CooldownsBySpec[257][10888] = 5 --psychic scream Rank 3
DF.CooldownsBySpec[257][10890] = 5 --psychic scream Rank 4
DF.CooldownsBySpec[257][27610] = 5 --psychic scream Rank 4
DF.CooldownsBySpec[257][19236] = 5 --desperate prayer Rank 2
DF.CooldownsBySpec[257][19238] = 5 --desperate prayer Rank 3
DF.CooldownsBySpec[257][19240] = 5 --desperate prayer Rank 4
DF.CooldownsBySpec[257][19241] = 5 --desperate prayer Rank 5
DF.CooldownsBySpec[257][19242] = 5 --desperate prayer Rank 6
DF.CooldownsBySpec[257][19243] = 5 --desperate prayer Rank 7
DF.CooldownsBySpec[257][25437] = 5 --desperate prayer Rank 8
--PRIEST - 258
DF.CooldownsBySpec[258][8124] = 5 --psychic scream Rank 2
DF.CooldownsBySpec[258][10888] = 5 --psychic scream Rank 3
DF.CooldownsBySpec[258][10890] = 5 --psychic scream Rank 4
DF.CooldownsBySpec[258][27610] = 5 --psychic scream Rank 4
DF.CooldownsBySpec[258][19236] = 5 --desperate prayer Rank 2
DF.CooldownsBySpec[258][19238] = 5 --desperate prayer Rank 3
DF.CooldownsBySpec[258][19240] = 5 --desperate prayer Rank 4
DF.CooldownsBySpec[258][19241] = 5 --desperate prayer Rank 5
DF.CooldownsBySpec[258][19242] = 5 --desperate prayer Rank 6
DF.CooldownsBySpec[258][19243] = 5 --desperate prayer Rank 7
DF.CooldownsBySpec[258][25437] = 5 --desperate prayer Rank 8
DF.CooldownsBySpec[258][15286] = not IS_WOW_PROJECT_CLASSIC_WRATH and 5 or nil --vampiric embrace is a debuff in classic, not a buff; a 30min buff in wotlk (don't track it...)
--ROGUE - 259
DF.CooldownsBySpec[259][1857] = 2 --vanish Rank 2
DF.CooldownsBySpec[259][11329] = 2 --vanish Rank 2
DF.CooldownsBySpec[259][26888] = 2 --vanish Rank 3
DF.CooldownsBySpec[259][26889] = 2 --vanish Rank 3
DF.CooldownsBySpec[259][27617] = 2 --vanish Rank 2
DF.CooldownsBySpec[259][26669] = 2 --evasion Rank 2
--ROGUE - 260
DF.CooldownsBySpec[260][1857] = 2 --vanish Rank 2
DF.CooldownsBySpec[260][11329] = 2 --vanish Rank 2
DF.CooldownsBySpec[260][26888] = 2 --vanish Rank 3
DF.CooldownsBySpec[260][26889] = 2 --vanish Rank 3
DF.CooldownsBySpec[260][27617] = 2 --vanish Rank 2
DF.CooldownsBySpec[260][26669] = 2 --evasion Rank 2
--ROGUE - 261
DF.CooldownsBySpec[261][1857] = 2 --vanish Rank 2
DF.CooldownsBySpec[261][11329] = 2 --vanish Rank 2
DF.CooldownsBySpec[261][26888] = 2 --vanish Rank 3
DF.CooldownsBySpec[261][26889] = 2 --vanish Rank 3
DF.CooldownsBySpec[261][27617] = 2 --vanish Rank 2
DF.CooldownsBySpec[261][26669] = 2 --evasion Rank 2
--WARLOCK - 265
DF.CooldownsBySpec[265][30413] = 5 --shadowfury Rank 2
DF.CooldownsBySpec[265][30414] = 5 --shadowfury Rank 3
DF.CooldownsBySpec[265][17928] = 5 --howl of terror Rank 2
DF.CooldownsBySpec[265][17925] = 5 --death coil Rank 2
DF.CooldownsBySpec[265][17926] = 5 --death coil Rank 3
DF.CooldownsBySpec[265][27223] = 5 --death coil Rank 4
--WARLOCK - 266
DF.CooldownsBySpec[266][30413] = 5 --shadowfury Rank 2
DF.CooldownsBySpec[266][30414] = 5 --shadowfury Rank 3
DF.CooldownsBySpec[266][17928] = 5 --howl of terror Rank 2
DF.CooldownsBySpec[266][17925] = 5 --death coil Rank 2
DF.CooldownsBySpec[266][17926] = 5 --death coil Rank 3
DF.CooldownsBySpec[266][27223] = 5 --death coil Rank 4
--WARLOCK - 267
DF.CooldownsBySpec[267][17925] = 5 --death coil Rank 2
DF.CooldownsBySpec[267][17926] = 5 --death coil Rank 3
DF.CooldownsBySpec[267][27223] = 5 --death coil Rank 4
DF.CooldownsBySpec[267][17928] = 5 --howl of terror Rank 2
DF.CooldownsBySpec[267][30413] = 5 --shadowfury Rank 2
DF.CooldownsBySpec[267][30414] = 5 --shadowfury Rank 3
--DRUID - 102
DF.CooldownsBySpec[102][99] = nil --demoralizing roar disabled, no CC in tbc
--DRUID - 103
--DRUID - 104
DF.CooldownsBySpec[104][99] = nil --demoralizing roar disabled, no CC in tbc
--DRUID - 105
DF.CooldownsBySpec[105][8918] = 4 --tranquility Rank 2
DF.CooldownsBySpec[105][9862] = 4 --tranquility Rank 3
DF.CooldownsBySpec[105][9863] = 4 --tranquility Rank 4
DF.CooldownsBySpec[105][26983] = 4 --tranquility Rank 5
end
-- tells the duration, requirements and cooldown of a cooldown
DF.CooldownsInfo = {
--paladin
@@ -915,322 +712,74 @@ DF.CooldownsInfo = {
-- {cooldown = , duration = , talent = false, charges = 1}
DF.CrowdControlSpells = {
[5246] = "WARRIOR", --Intimidating Shout
[132168] = "WARRIOR", --Shockwave (debuff spellid)
[6552] = "WARRIOR", --Pummel
[132169] = "WARRIOR", --Storm Bolt (talent debuff spellid)
[118699] = "WARLOCK", --Fear (debuff spellid)
[6789] = "WARLOCK", --Mortal Coil
[19647] = "WARLOCK", --Spelllock
[30283] = "WARLOCK", --Shadowfury
[710] = "WARLOCK", --Banish
[212619] = "WARLOCK", --Call Fellhunt
[5484] = "WARLOCK", --Howl of Terror (talent)
[118] = "MAGE", --Polymorph
[61305] = "MAGE", --Polymorph (black cat)
[28271] = "MAGE", --Polymorph Turtle
[161354] = "MAGE", --Polymorph Monkey
[161353] = "MAGE", --Polymorph Polar Bear Cub
[126819] = "MAGE", --Polymorph Porcupine
[277787] = "MAGE", --Polymorph Direhorn
[61721] = "MAGE", --Polymorph Rabbit
[28272] = "MAGE", --Polymorph Pig
[277792] = "MAGE", --Polymorph Bumblebee
[391622] = "MAGE", --Polymorph Duck
[2139] = "MAGE", --Counterspell
[82691] = "MAGE", --Ring of Frost (debuff spellid)
[122] = "MAGE", --Frost Nova
[157997] = "MAGE", --Ice Nova
[31661] = "MAGE", --Dragon's Breath
[157981] = "MAGE", --Blast Wave
[205364] = "PRIEST", --Mind Control (talent)
[605] = "PRIEST", --Mind Control
[8122] = "PRIEST", --Psychic Scream
[9484] = "PRIEST", --Shackle Undead
[200196] = "PRIEST", --Holy Word: Chastise (debuff spellid)
[200200] = "PRIEST", --Holy Word: Chastise (talent debuff spellid)
[226943] = "PRIEST", --Mind Bomb (talent)
[64044] = "PRIEST", --Psychic Horror (talent)
[15487] = "PRIEST", --Silence
[2094] = "ROGUE", --Blind
[427773] = "ROGUE", --Blind (AoE)
[1833] = "ROGUE", --Cheap Shot
[408] = "ROGUE", --Kidney Shot
[1766] = "ROGUE", --Kick
[6770] = "ROGUE", --Sap
[1776] = "ROGUE", --Gouge
[853] = "PALADIN", --Hammer of Justice
[96231] = "PALADIN", --Rebuke (tank)
[20066] = "PALADIN", --Repentance (talent)
[105421] = "PALADIN", --Blinding Light (talent)
[31935] = "PALADIN", --Avengers Shield
[217824] = "PALADIN", --Shield of Virtue
[10326] = "PALADIN", --Turn Evil
[221562] = "DEATHKNIGHT", --Asphyxiate
[108194] = "DEATHKNIGHT", --Asphyxiate (talent)
[47528] = "DEATHKNIGHT", --Mind Frezer
[91807] = "DEATHKNIGHT", --Shab Rush
[207167] = "DEATHKNIGHT", --Blinding Sleet
[334693] = "DEAHTKNIGHT", --Absolute Zero (legendary)
[339] = "DRUID", --Entangling Roots
[2637] = "DRUID", --Hibernate
[61391] = "DRUID", --Typhoon
[102359] = "DRUID", --Mass Entanglement
[99] = "DRUID", --Incapacitating Roar
[236748] = "DRUID", --Intimidating Roar
[5211] = "DRUID", --Mighty Bash
[45334] = "DRUID", --Immobilized
[203123] = "DRUID", --Maim
[50259] = "DRUID", --Dazed (from Wild Charge)
[209753] = "DRUID", --Cyclone (from pvp talent)
[33786] = "DRUID", --Cyclone (from pvp talent - resto druid)
[93985] = "DRUID", --Skullbash
[163505] = "DRUID", --Rake
[127797] = "DRUID", --Ursol's Vortex
[147362] = "HUNTER", --Countershot
[187707] = "HUNTER", --Muzzle
[3355] = "HUNTER", --Freezing Trap / Diamond Ice (from pvp talent)
[19577] = "HUNTER", --Intimidation
[190927] = "HUNTER", --Harpoon
[162480] = "HUNTER", --Steel Trap
[24394] = "HUNTER", --Intimidation
[117405] = "HUNTER", --Binding Shot (trigger)
[117526] = "HUNTER", --Binding Shot (triggered)
[1513] = "HUNTER", --Scare Beast
[119381] = "MONK", --Leg Sweep
[115078] = "MONK", --Paralysis
[198909] = "MONK", --Song of Chi-Ji (talent)
[116706] = "MONK", --Disable
[107079] = "MONK", --Quaking Palm (racial)
[116705] = "MONK", --Spear kick
[118905] = "SHAMAN", --Static Charge (Capacitor Totem)
[51514] = "SHAMAN", --Hex
[210873] = "SHAMAN", --Hex (Compy)
[211004] = "SHAMAN", --Hex (Spider)
[211010] = "SHAMAN", --Hex (Snake)
[211015] = "SHAMAN", --Hex (Cockroach)
[269352] = "SHAMAN", --Hex (Skeletal Hatchling)
[277778] = "SHAMAN", --Hex (Zandalari Tendonripper)
[277784] = "SHAMAN", --Hex (Wicker Mongrel)
[309328] = "SHAMAN", --Hex (Living Honey)
[57994] = "SHAMAN", --Wind Shear
[64695] = "SHAMAN", --Earthgrab (talent)
[197214] = "SHAMAN", --Sundering (talent)
[179057] = "DEMONHUNTER", --Chaos Nova
[217832] = "DEMONHUNTER", --Imprison
[200166] = "DEMONHUNTER", --Metamorphosis
[207685] = "DEMONHUNTER", --Sigil of Misery
[211881] = "DEMONHUNTER", -- Fel Eruption
[183752] = "DEMONHUNTER", --Disrupt
[331866] = "COVENANT|VENTHYR", --Agent of Chaos (Nadia soulbind)
[372245] = "EVOKER", --Terror of the Skies
[360806] = "EVOKER", --Sleep Walk
}
-- additionals for classic
if (IS_WOW_PROJECT_NOT_MAINLINE) then
DF.CrowdControlSpells[99] = nil --demoralizing roar disabled, no CC in tbc
--auto-generated
DF.CrowdControlSpells[18657] = "DRUID" --hibernate Rank 2
DF.CrowdControlSpells[18658] = "DRUID" --hibernate Rank 3
DF.CrowdControlSpells[6798] = "DRUID" --bash Rank 2
DF.CrowdControlSpells[8983] = "DRUID" --bash Rank 3
DF.CrowdControlSpells[1062] = "DRUID" --entangling roots Rank 2
DF.CrowdControlSpells[5195] = "DRUID" --entangling roots Rank 3
DF.CrowdControlSpells[5196] = "DRUID" --entangling roots Rank 4
DF.CrowdControlSpells[9852] = "DRUID" --entangling roots Rank 5
DF.CrowdControlSpells[9853] = "DRUID" --entangling roots Rank 6
DF.CrowdControlSpells[19970] = "DRUID" --entangling roots Rank 6
DF.CrowdControlSpells[19971] = "DRUID" --entangling roots Rank 5
DF.CrowdControlSpells[19972] = "DRUID" --entangling roots Rank 4
DF.CrowdControlSpells[19973] = "DRUID" --entangling roots Rank 3
DF.CrowdControlSpells[19974] = "DRUID" --entangling roots Rank 2
DF.CrowdControlSpells[26989] = "DRUID" --entangling roots Rank 7
DF.CrowdControlSpells[27010] = "DRUID" --entangling roots Rank 7
DF.CrowdControlSpells[14310] = "HUNTER" --freezing trap Rank 2
DF.CrowdControlSpells[14311] = "HUNTER" --freezing trap Rank 3
DF.CrowdControlSpells[27753] = "HUNTER" --freezing trap Rank 3
DF.CrowdControlSpells[14308] = "HUNTER" --freezing trap effect Rank 2
DF.CrowdControlSpells[14309] = "HUNTER" --freezing trap effect Rank 3
DF.MageFireWardSpells = {
[543] = 30 , -- Fire Ward (Mage) Rank 1
[8457] = 30,
[8458] = 30,
[10223] = 30,
[10225] = 30,
[27128] = 30,
[43010] = 30, -- Rank 7
}
DF.CrowdControlSpells[865] = "MAGE" --frost nova Rank 2
DF.CrowdControlSpells[6131] = "MAGE" --frost nova Rank 3
DF.CrowdControlSpells[9915] = "MAGE" --frost nova Rank 3
DF.CrowdControlSpells[10230] = "MAGE" --frost nova Rank 4
DF.CrowdControlSpells[27088] = "MAGE" --frost nova Rank 5
DF.CrowdControlSpells[33041] = "MAGE" --dragon's breath Rank 2
DF.CrowdControlSpells[33042] = "MAGE" --dragon's breath Rank 3
DF.CrowdControlSpells[33043] = "MAGE" --dragon's breath Rank 4
DF.CrowdControlSpells[12824] = "MAGE" --polymorph Rank 2
DF.CrowdControlSpells[12825] = "MAGE" --polymorph Rank 3
DF.CrowdControlSpells[12826] = "MAGE" --polymorph Rank 4
DF.CrowdControlSpells[1090] = "MAGE" --sleep Rank 2
DF.MageFrostWardSpells = {
[6143] = 30, -- Frost Ward (Mage) Rank 1
[8461] = 30,
[8462] = 30,
[10177] = 30,
[28609] = 30,
[32796] = 30,
[43012] = 30, -- Rank 7
}
DF.CrowdControlSpells[5588] = "PALADIN" --hammer of justice Rank 2
DF.CrowdControlSpells[5589] = "PALADIN" --hammer of justice Rank 3
DF.CrowdControlSpells[10308] = "PALADIN" --hammer of justice Rank 4
DF.CrowdControlSpells[10326] = "PALADIN" --Turn Evil
DF.WarlockShadowWardSpells = {
[6229] = 30, -- Shadow Ward (warlock) Rank 1
[11739] = 30,
[11740] = 30,
[28610] = 30,
[47890] = 30,
[47891] = 30, -- Rank 6
}
DF.CrowdControlSpells[8124] = "PRIEST" --psychic scream Rank 2
DF.CrowdControlSpells[10888] = "PRIEST" --psychic scream Rank 3
DF.CrowdControlSpells[10890] = "PRIEST" --psychic scream Rank 4
DF.CrowdControlSpells[27610] = "PRIEST" --psychic scream Rank 4
DF.CrowdControlSpells[9485] = "PRIEST" --shackle undead Rank 2
DF.CrowdControlSpells[10955] = "PRIEST" --shackle undead Rank 3
DF.CrowdControlSpells[10911] = "PRIEST" --mind control Rank 2
DF.CrowdControlSpells[10912] = "PRIEST" --mind control Rank 3
DF.MageIceBarrierSpells = {
[11426] = 60, -- Ice Barrier (Mage) Rank 1
[13031] = 60,
[13032] = 60,
[13033] = 60,
[27134] = 60,
[33405] = 60,
[43038] = 60,
[43039] = 60, -- Rank 8
}
DF.CrowdControlSpells[1777] = "ROGUE" --gouge Rank 2
DF.CrowdControlSpells[8629] = "ROGUE" --gouge Rank 3
DF.CrowdControlSpells[11285] = "ROGUE" --gouge Rank 4
DF.CrowdControlSpells[11286] = "ROGUE" --gouge Rank 5
DF.CrowdControlSpells[38764] = "ROGUE" --gouge Rank 6
DF.CrowdControlSpells[2070] = "ROGUE" --sap Rank 2
DF.CrowdControlSpells[11297] = "ROGUE" --sap Rank 3
DF.CrowdControlSpells[8643] = "ROGUE" --kidney shot Rank 2
DF.CrowdControlSpells[27615] = "ROGUE" --kidney shot Rank 2
DF.CrowdControlSpells[30621] = "ROGUE" --kidney shot Rank 2
DF.WarlockSacrificeSpells = {
[7812] = 30, -- Sacrifice (warlock) Rank 1
[19438] = 30,
[19440] = 30,
[19441] = 30,
[19442] = 30,
[19443] = 30,
[27273] = 30,
[47985] = 30,
[47986] = 30, -- rank 9
}
DF.CrowdControlSpells[17925] = "WARLOCK" --death coil Rank 2
DF.CrowdControlSpells[17926] = "WARLOCK" --death coil Rank 3
DF.CrowdControlSpells[27223] = "WARLOCK" --death coil Rank 4
DF.CrowdControlSpells[18647] = "WARLOCK" --banish Rank 2
DF.CrowdControlSpells[30413] = "WARLOCK" --shadowfury Rank 2
DF.CrowdControlSpells[30414] = "WARLOCK" --shadowfury Rank 3
DF.CrowdControlSpells[6213] = "WARLOCK" --fear Rank 2
DF.CrowdControlSpells[6215] = "WARLOCK" --fear Rank 3
DF.CrowdControlSpells[17928] = "WARLOCK" --howl of terror Rank 2
DF.SpecIds = {}
DF.ClassSpecIds = {}
for _, class in ipairs(CLASS_SORT_ORDER) do
local specs = C_ClassInfo.GetAllSpecs(class)
DF.ClassSpecIds[class] = {}
for _, spec in ipairs(specs) do
local specInfo = C_ClassInfo.GetSpecInfo(class, spec)
DF.SpecIds[specInfo.ID] = class
DF.ClassSpecIds[specInfo.ID] = true
end
end
DF.SpecIds = {
[577] = "DEMONHUNTER",
[581] = "DEMONHUNTER",
[250] = "DEATHKNIGHT",
[251] = "DEATHKNIGHT",
[252] = "DEATHKNIGHT",
[71] = "WARRIOR",
[72] = "WARRIOR",
[73] = "WARRIOR",
[62] = "MAGE",
[63] = "MAGE",
[64] = "MAGE",
[259] = "ROGUE",
[260] = "ROGUE",
[261] = "ROGUE",
[102] = "DRUID",
[103] = "DRUID",
[104] = "DRUID",
[105] = "DRUID",
[253] = "HUNTER",
[254] = "HUNTER",
[255] = "HUNTER",
[262] = "SHAMAN",
[263] = "SHAMAN",
[264] = "SHAMAN",
[256] = "PRIEST",
[257] = "PRIEST",
[258] = "PRIEST",
[265] = "WARLOCK",
[266] = "WARLOCK",
[267] = "WARLOCK",
[65] = "PALADIN",
[66] = "PALADIN",
[70] = "PALADIN",
[268] = "MONK",
[269] = "MONK",
[270] = "MONK",
}
DF.ClassSpecIds = { --private
["DEMONHUNTER"] = {
[577] = true,
[581] = true,
},
["DEATHKNIGHT"] = {
[250] = true,
[251] = true,
[252] = true,
},
["WARRIOR"] = {
[71] = true,
[72] = true,
[73] = true,
},
["MAGE"] = {
[62] = true,
[63] = true,
[64] = true,
},
["ROGUE"] = {
[259] = true,
[260] = true,
[261] = true,
},
["DRUID"] = {
[102] = true,
[103] = true,
[104] = true,
[105] = true,
},
["HUNTER"] = {
[253] = true,
[254] = true,
[255] = true,
},
["SHAMAN"] = {
[262] = true,
[263] = true,
[264] = true,
},
["PRIEST"] = {
[256] = true,
[257] = true,
[258] = true,
},
["WARLOCK"] = {
[265] = true,
[266] = true,
[267] = true,
},
["PALADIN"] = {
[65] = true,
[66] = true,
[70] = true,
},
["MONK"] = {
[268] = true,
[269] = true,
[270] = true,
},
}
DF.CooldownToClass = {}
DF.CooldownsAttack = {}
@@ -1283,146 +832,50 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--consumables
if (DF.IsShadowlandsWow() or DF.IsDragonflight()) then --Temporary IsDragonFlight until I get the items together
DF.WeaponEnchantIds = {
[6188] = true, --shadowcore oil
[6190] = true, --embalmer's oil
[6201] = true, --weighted
[6200] = true, --sharpened
[5400] = true, --flametongue
[5401] = true, --windfury
}
DF.WeaponEnchantIds = {
[5400] = true, --flametongue
[5401] = true, --windfury
}
DF.FlaskIDs = {
[46377] = true, -- Flask of Endless Rage
[46376] = true, -- Flask of the Frost Wyrm
[54213] = true, -- Flask of Pure Mojo
[46379] = true, -- Flask of Stoneblood
[53899] = true, -- Lesser Flask of Toughness
}
DF.FoodIDs = {
[57367] = true, --(Agi +40, Stam +40) Blackended Dragonfin
[57294] = true, --(AP +60, SP +35, Stam +30) Dalaran Clam Chowder / Great Feast
[57365] = true, --(Spirit +40, Stam +40) Cuttlesteak
[57360] = true, --(Hit+40, Stam +40) Worg Tartare / Snapper Extreme
[57358] = true, --(ArmorPen +40, Stam +40) Hearty Rhino
[57356] = true, --(Expertise +40, Stam +40) Rhinolicious Wormsteak
[57334] = true, --(Mana per 5s +20, Stam +40) Spicy Fried Herring / Mighty Rhino Dogs
[57332] = true, --(Haste +40, Stam +40) Imperial Manta Steak / Very Burnt Worg
[57329] = true, --(Crit +40, Stam +40) Spicy Blue Nettlefish / Spicy Worm Burger
[57327] = true, --(SP +46, Stam +40) Firecracker Salmon / Tender Shoveltusk Steak
[57325] = true, --(AP +80, Stam +40) Poached Northern Sculpin / Mega Mammoth Head
[57291] = true, --(Mana per 5s +15, Stam +30) Rhino Dogs / Pickled Fangtooth
[57288] = true, --(Haste +30, Stam +30) Baked Manta Ray / Roasted Worg
[57286] = true, --(Crit +30, Stam +30) Poached Nettlefish / Worm Delight
[57139] = true, --(SP +35, Stam +30) Smoked Salmon / Shoveltusk Steak
[57111] = true, --(AP +60, Stam +30) Grilled Sculpin / Mammoth Meal
}
DF.FlaskIDs = {
--Shadowlands
[307185] = true, --Spectral Flask of Power
[307187] = true, --Spectral Stamina Flask
[307166] = true, --Eternal Flask
}
DF.FoodIDs = {
--shadowlands tier 1
[259454] = 1, -- (agility) Feast of Gluttonous Hedonism
[308434] = 1, -- (critical) Phantasmal Souffle and Fries
[308397] = 1, --(critical +18) Butterscotch Marinated Ribs
[308400] = 1, --(critical +30) Spinefin Souffle and Fries
[308488] = 1, -- (haste) Tenebrous Crown Roast Aspic
[308404] = 1, -- (haste +18) Cinnamon Bonefish Stew
[308405] = 1, -- (haste +30) Tenebrous Crown Roast Aspic
[308506] = 1, -- (mastery) Crawler Ravioli with Apple Sauce
[308412] = 1, -- (mastery +18) Meaty Apple Dumplings
[308413] = 1, -- (mastery +30) Iridescent Ravioli with Apple Sauce
[308525] = 1, -- (stamina) Banana Beef Pudding
[308414] = 1, -- (stamina +14) Pickled Meat Smoothie
[308415] = 1, -- (stamina +22) Banana Beef Pudding
[308514] = 1, -- (versatility) Steak a la Mode
[308425] = 1, -- (versatility +18) Sweet Silvergill Sausages
[308426] = 1, -- (versatility +30) Steak a la Mode
[308419] = 1, -- (periodicaly damage) Smothered Shank
[327715] = 1, -- (speed) Fried Bonefish
--feasts
[327706] = 2, --strength +20
[327707] = 2, --stamina +20
[327708] = 2, --intellect +20
[327709] = 2, --agility +20
[327704] = 2, --intellect +18
[327701] = 2, --strength +18
[327705] = 2, --agility +18
}
DF.PotionIDs = {
--Shadowlands
[307159] = true, --Potion of Spectral Agility
[307163] = true, --Potion of Spectral Stamina
[307164] = true, --Potion of Spectral Strength
[307160] = true, --Potion of Hardened Shadows
[307162] = true, --Potion of Spectral Intellect
[307494] = true, --Potion of Empowered Exorcisms
[307495] = true, --Potion of Phantom Fire
[307161] = true, --Potion of Spiritual Clarity
[307496] = true, --Potion of Divine Awakening
[307501] = true, --Potion of Specter Swiftness
[322302] = true, --Potion of Sacrificial Anima
[307497] = true, --Potion of Deathly Fixation
[307195] = true, --Potion of the Hidden Spirit
[307199] = true, --Potion of Soul Purity
[307196] = true, --Potion of Shadow Sight
[307192] = true, --Spiritual Healing Potion
[307194] = true, --Spiritual Rejuvenation Potion
[307193] = true, --Spiritual Mana Potion
[323436] = true, --Purify Soul (greek convent)
-- [] = true, --
[307165] = true, --Spiritual Anti-Venom
}
DF.FeastIDs = {
[308462] = true, --Feast of Gluttonous Hedonism
[307153] = true, --Eternal Cauldron
}
DF.RuneIDs = {
[347901] = true, --Veiled Augmentation
[367405] = true, --Eternal Augmentation
}
elseif (DF.IsWotLKWow()) then
DF.WeaponEnchantIds = {
[5400] = true, --flametongue
[5401] = true, --windfury
}
DF.FlaskIDs = {
[46377] = true, -- Flask of Endless Rage
[46376] = true, -- Flask of the Frost Wyrm
[54213] = true, -- Flask of Pure Mojo
[46379] = true, -- Flask of Stoneblood
[53899] = true, -- Lesser Flask of Toughness
}
DF.FoodIDs = {
[57367] = true, --(Agi +40, Stam +40) Blackended Dragonfin
[57294] = true, --(AP +60, SP +35, Stam +30) Dalaran Clam Chowder / Great Feast
[57365] = true, --(Spirit +40, Stam +40) Cuttlesteak
[57360] = true, --(Hit+40, Stam +40) Worg Tartare / Snapper Extreme
[57358] = true, --(ArmorPen +40, Stam +40) Hearty Rhino
[57356] = true, --(Expertise +40, Stam +40) Rhinolicious Wormsteak
[57334] = true, --(Mana per 5s +20, Stam +40) Spicy Fried Herring / Mighty Rhino Dogs
[57332] = true, --(Haste +40, Stam +40) Imperial Manta Steak / Very Burnt Worg
[57329] = true, --(Crit +40, Stam +40) Spicy Blue Nettlefish / Spicy Worm Burger
[57327] = true, --(SP +46, Stam +40) Firecracker Salmon / Tender Shoveltusk Steak
[57325] = true, --(AP +80, Stam +40) Poached Northern Sculpin / Mega Mammoth Head
[57291] = true, --(Mana per 5s +15, Stam +30) Rhino Dogs / Pickled Fangtooth
[57288] = true, --(Haste +30, Stam +30) Baked Manta Ray / Roasted Worg
[57286] = true, --(Crit +30, Stam +30) Poached Nettlefish / Worm Delight
[57139] = true, --(SP +35, Stam +30) Smoked Salmon / Shoveltusk Steak
[57111] = true, --(AP +60, Stam +30) Grilled Sculpin / Mammoth Meal
}
DF.PotionIDs = {
[53762] = true, --Indestructable Potion
[53908] = true, --Potion of Speed
[53909] = true, --Potion of Wild Magic
[53753] = true, --Potion of Nightmares
[43185] = true, -- Runic Healing Potion
[67489] = true, -- Runic Healing Injector
[53761] = true, -- Powerful Rejuvenation Potion
[53750] = true, -- Crazy Alchemist's Potion
[43186] = true, -- Runic Mana Potion
[67490] = true, -- Runic Mana Injector
}
DF.FeastIDs = {}
DF.RuneIDs = {}
--~Cata temp
elseif (DF.IsClassicWow() or DF.IsCataWow()) then
DF.PotionIDs = {}
DF.FeastIDs = {}
DF.RuneIDs = {}
DF.FoodIDs = {}
DF.FlaskIDs = {}
end
DF.PotionIDs = {
[53762] = true, --Indestructable Potion
[53908] = true, --Potion of Speed
[53909] = true, --Potion of Wild Magic
[53753] = true, --Potion of Nightmares
[43185] = true, -- Runic Healing Potion
[67489] = true, -- Runic Healing Injector
[53761] = true, -- Powerful Rejuvenation Potion
[53750] = true, -- Crazy Alchemist's Potion
[43186] = true, -- Runic Mana Potion
[67490] = true, -- Runic Mana Injector
}
DF.FeastIDs = {}
DF.RuneIDs = {}
-- /dump UnitAura ("player", 1)
-- /dump UnitAura ("player", 2)
@@ -1469,53 +922,5 @@ function DF:GetSpellsForEncounterFromJournal (instanceEJID, encounterEJID)
end
--default spells to use in the range check
DF.SpellRangeCheckListBySpec = {
-- 185245 spellID for Torment, it is always failing to check range with IsSpellInRange()
[577] = 278326, --havoc demon hunter - Consume Magic
[581] = 278326, --vengeance demon hunter - Consume Magic
[250] = 56222, --blood dk - dark command
[251] = 56222, --frost dk - dark command
[252] = 56222, --unholy dk - dark command
[102] = 8921, -- druid balance - Moonfire (45 yards)
[103] = 8921, -- druid feral - Moonfire (40 yards)
[104] = 6795, -- druid guardian - Growl
[105] = 8921, -- druid resto - Moonfire (40 yards)
[253] = 193455, -- hunter bm - Cobra Shot
[254] = 19434, --hunter marks - Aimed Shot
[255] = 271788, --hunter survivor - Serpent Sting
[62] = 227170, --mage arcane - arcane blast
[63] = 133, --mage fire - fireball
[64] = 228597, --mage frost - frostbolt
[268] = 115546 , --monk bm - Provoke
[269] = 117952, --monk ww - Crackling Jade Lightning (40 yards)
[270] = 117952, --monk mw - Crackling Jade Lightning (40 yards)
[65] = 20473, --paladin holy - Holy Shock (40 yards)
[66] = 62124, --paladin protect - Hand of Reckoning
[70] = 62124, --paladin ret - Hand of Reckoning
[256] = 585, --priest disc - Smite
[257] = 585, --priest holy - Smite
[258] = 8092, --priest shadow - Mind Blast
[259] = 185565, --rogue assassination - Poisoned Knife (30 yards)
[260] = 185763, --rogue outlaw - Pistol Shot (20 yards)
[261] = 114014, --rogue sub - Shuriken Toss (30 yards)
[262] = 188196, --shaman elemental - Lightning Bolt
[263] = 187837, --shaman enhancement - Lightning Bolt (instance cast)
[264] = 403, --shaman resto - Lightning Bolt
[265] = 686, --warlock aff - Shadow Bolt
[266] = 686, --warlock demo - Shadow Bolt
[267] = 116858, --warlock destro - Chaos Bolt
[71] = 355, --warrior arms - Taunt
[72] = 355, --warrior fury - Taunt
[73] = 355, --warrior protect - Taunt
}
-- [specID] = spellID
DF.SpellRangeCheckListBySpec = {}
+1 -1
View File
@@ -626,7 +626,7 @@ function detailsFramework:NewTextEntry(parent, container, name, member, width, h
--editbox
newTextEntryObject.editbox = CreateFrame("EditBox", name, parent,"BackdropTemplate")
newTextEntryObject.editbox:SetSize(232, 20)
newTextEntryObject.editbox:SetBackdrop({bgFile = [["Interface\DialogFrame\UI-DialogBox-Background"]], tileSize = 64, tile = true, edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], edgeSize = 10, insets = {left = 1, right = 1, top = 0, bottom = 0}})
newTextEntryObject.editbox:SetBackdrop({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background]], tileSize = 64, tile = true, edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], edgeSize = 10, insets = {left = 1, right = 1, top = 0, bottom = 0}})
newTextEntryObject.editbox:SetTextInsets(3, 0, 0, -3)
newTextEntryObject.editbox:SetWidth(width)
newTextEntryObject.editbox:SetHeight(height)
+1 -7
View File
@@ -321,12 +321,6 @@ function TimeBarMetaFunctions:SetTimer(currentTime, startTime, endTime)
self.statusBar:SetMinMaxValues(self.statusBar.startTime, self.statusBar.endTime)
if (self.direction == "right") then
self.statusBar:SetReverseFill(false)
else
self.statusBar:SetReverseFill(true)
end
if (self.statusBar.dontShowSpark) then
self.statusBar.spark:Hide()
else
@@ -418,7 +412,7 @@ function DF:CreateTimeBar(parent, texture, width, height, value, member, name)
timeBar.statusBar:EnableMouse(false)
timeBar.statusBar.backgroundTexture = timeBar.statusBar:CreateTexture(nil, "border")
timeBar.statusBar.backgroundTexture:SetColorTexture(.1, .1, .1, .6)
timeBar.statusBar.backgroundTexture:SetTexture(.1, .1, .1, .6)
timeBar.statusBar.backgroundTexture:SetAllPoints()
timeBar.statusBar.barTexture = timeBar.statusBar:CreateTexture(nil, "artwork")
+15 -50
View File
@@ -33,18 +33,12 @@ local UnitIsTapDenied = UnitIsTapDenied
local max = math.max
local min = math.min
local abs = math.abs
local GetSpellInfo = GetSpellInfo or function(spellID) if not spellID then return nil end local si = C_Spell.GetSpellInfo(spellID) if si then return si.name, nil, si.iconID, si.castTime, si.minRange, si.maxRange, si.spellID, si.originalIconID end end
local GetSpellInfo = GetSpellInfo
local IS_WOW_PROJECT_MAINLINE = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
local IS_WOW_PROJECT_NOT_MAINLINE = WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE
local IS_WOW_PROJECT_CLASSIC_ERA = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
local CastInfo = detailsFramework.CastInfo
local PixelUtil = PixelUtil or DFPixelUtil
local UnitGroupRolesAssigned = detailsFramework.UnitGroupRolesAssigned
local cleanfunction = function() end
local PixelUtil = PixelUtil
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--health bar frame
@@ -163,10 +157,9 @@ local cleanfunction = function() end
{"PLAYER_ENTERING_WORLD"},
{"UNIT_HEALTH", true},
{"UNIT_MAXHEALTH", true},
{(IS_WOW_PROJECT_NOT_MAINLINE) and "UNIT_HEALTH_FREQUENT", true}, -- this one is classic-only...
{"UNIT_HEAL_PREDICTION", true},
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_ABSORB_AMOUNT_CHANGED", true},
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_HEAL_ABSORB_AMOUNT_CHANGED", true},
{"UNIT_ABSORB_AMOUNT_CHANGED", true},
--{"UNIT_HEAL_ABSORB_AMOUNT_CHANGED", true},
}
--setup the castbar to be used by another unit
@@ -195,16 +188,12 @@ local cleanfunction = function() end
--check for settings and update some events
if (not self.Settings.ShowHealingPrediction) then
self:UnregisterEvent("UNIT_HEAL_PREDICTION")
if IS_WOW_PROJECT_MAINLINE then
self:UnregisterEvent("UNIT_HEAL_ABSORB_AMOUNT_CHANGED")
end
self:UnregisterEvent("UNIT_HEAL_ABSORB_AMOUNT_CHANGED")
self.incomingHealIndicator:Hide()
self.healAbsorbIndicator:Hide()
end
if (not self.Settings.ShowShields) then
if IS_WOW_PROJECT_MAINLINE then
self:UnregisterEvent("UNIT_ABSORB_AMOUNT_CHANGED")
end
self:UnregisterEvent("UNIT_ABSORB_AMOUNT_CHANGED")
self.shieldAbsorbIndicator:Hide()
self.shieldAbsorbGlow:Hide()
end
@@ -241,7 +230,7 @@ local cleanfunction = function() end
self:SetTexture(self.Settings.Texture)
self.background:SetAllPoints()
self.background:SetColorTexture(self.Settings.BackgroundColor:GetColor())
self.background:SetTexture(self.Settings.BackgroundColor:GetColor())
--setpoint of these widgets are set inside the function that updates the incoming heal
self.incomingHealIndicator:SetTexture(self:GetTexture())
@@ -321,9 +310,9 @@ local cleanfunction = function() end
if (self.Settings.ShowHealingPrediction) then
--incoming heal on the unit from all sources
local unitHealIncoming = self.displayedUnit and UnitGetIncomingHeals(self.displayedUnit) or 0
local unitHealIncoming = 0--self.displayedUnit and UnitGetIncomingHeals(self.displayedUnit) or 0
--heal absorbs
local unitHealAbsorb = IS_WOW_PROJECT_MAINLINE and self.displayedUnit and UnitGetTotalHealAbsorbs(self.displayedUnit) or 0
local unitHealAbsorb = 0--self.displayedUnit and UnitGetTotalHealAbsorbs(self.displayedUnit) or 0
if (unitHealIncoming > 0) then
--calculate what is the percent of health incoming based on the max health the player has
@@ -347,7 +336,7 @@ local cleanfunction = function() end
end
end
if (self.Settings.ShowShields and IS_WOW_PROJECT_MAINLINE) then
if (self.Settings.ShowShields) then
--damage absorbs
local unitDamageAbsorb = self.displayedUnit and UnitGetTotalAbsorbs (self.displayedUnit) or 0
@@ -616,7 +605,7 @@ detailsFramework.PowerFrameFunctions = {
self:SetTexture(self.Settings.Texture)
self.background:SetAllPoints()
self.background:SetColorTexture(self.Settings.BackgroundColor:GetColor())
self.background:SetTexture(self.Settings.BackgroundColor:GetColor())
if (self.Settings.ShowPercentText) then
self.percentText:Show()
@@ -672,18 +661,6 @@ detailsFramework.PowerFrameFunctions = {
--when a event different from unit_power_update is triggered, update which type of power the unit should show
UpdatePowerInfo = function(self)
if (IS_WOW_PROJECT_MAINLINE and self.Settings.ShowAlternatePower) then -- not available in classic
local barID = UnitPowerBarID(self.displayedUnit)
local barInfo = GetUnitPowerBarInfoByID(barID)
--local name, tooltip, cost = GetUnitPowerBarStringsByID(barID);
--barInfo.barType,barInfo.minPower, barInfo.startInset, barInfo.endInset, barInfo.smooth, barInfo.hideFromOthers, barInfo.showOnRaid, barInfo.opaqueSpark, barInfo.opaqueFlash, barInfo.anchorTop, name, tooltip, cost, barInfo.ID, barInfo.forcePercentage, barInfo.sparkUnderFrame;
if (barInfo and barInfo.showOnRaid and IsInGroup()) then
self.powerType = ALTERNATE_POWER_INDEX
self.minPower = barInfo.minPower
return
end
end
self.powerType = UnitPowerType (self.displayedUnit)
self.minPower = 0
end,
@@ -695,7 +672,7 @@ detailsFramework.PowerFrameFunctions = {
return
end
if (self.powerType == ALTERNATE_POWER_INDEX) then
if (self.powerType == Enum.PowerType.Focus) then
--don't change this, keep the same color as the game tints on CompactUnitFrame.lua
self:SetStatusBarColor(0.7, 0.7, 0.6)
return
@@ -907,15 +884,9 @@ detailsFramework.CastFrameFunctions = {
CastBarEvents = {
{"UNIT_SPELLCAST_INTERRUPTED"},
{"UNIT_SPELLCAST_DELAYED"},
{"UNIT_SPELLCAST_CHANNEL_START"},
{"UNIT_SPELLCAST_CHANNEL_UPDATE"},
{"UNIT_SPELLCAST_CHANNEL_STOP"},
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_EMPOWER_START"},
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_EMPOWER_UPDATE"},
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_EMPOWER_STOP"},
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_INTERRUPTIBLE"},
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_NOT_INTERRUPTIBLE"},
{"PLAYER_ENTERING_WORLD"},
{"UNIT_SPELLCAST_START", true},
{"UNIT_SPELLCAST_STOP", true},
@@ -978,9 +949,9 @@ detailsFramework.CastFrameFunctions = {
PixelUtil.SetWidth (self, self.Settings.Width)
PixelUtil.SetHeight(self, self.Settings.Height)
self.background:SetColorTexture(self.Settings.BackgroundColor:GetColor())
self.background:SetTexture(self.Settings.BackgroundColor:GetColor())
self.background:SetAllPoints()
self.extraBackground:SetColorTexture(0, 0, 0, 1)
self.extraBackground:SetTexture(0, 0, 0, 1)
self.extraBackground:SetVertexColor(self.Settings.BackgroundColor:GetColor())
self.extraBackground:SetAllPoints()
@@ -1948,7 +1919,7 @@ function detailsFramework:CreateCastBar(parent, name, settingsOverride)
--animatios flash
local flashTexture = castBar:CreateTexture(nil, "overlay", nil, 7)
flashTexture:SetColorTexture(1, 1, 1, 1)
flashTexture:SetTexture(1, 1, 1, 1)
flashTexture:SetAllPoints()
flashTexture:SetAlpha(0)
flashTexture:Hide()
@@ -1965,12 +1936,6 @@ function detailsFramework:CreateCastBar(parent, name, settingsOverride)
detailsFramework:Mixin(castBar, detailsFramework.CastFrameFunctions)
detailsFramework:Mixin(castBar, detailsFramework.StatusBarFunctions)
castBar:CreateTextureMask()
castBar:AddMaskTexture(castBar.flashTexture)
castBar:AddMaskTexture(castBar.background)
castBar:AddMaskTexture(castBar.extraBackground)
castBar:SetTexture([[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]])
--settings and hooks
-470
View File
@@ -1,470 +0,0 @@
-----------------------------------------------------------------------
-- LibDBIcon-1.0
--
-- Allows addons to easily create a lightweight minimap icon as an alternative to heavier LDB displays.
--
local DBICON10 = "LibDBIcon-1.0"
local DBICON10_MINOR = 43 -- Bump on changes
if not LibStub then error(DBICON10 .. " requires LibStub.") end
local ldb = LibStub("LibDataBroker-1.1", true)
if not ldb then error(DBICON10 .. " requires LibDataBroker-1.1.") end
local lib = LibStub:NewLibrary(DBICON10, DBICON10_MINOR)
if not lib then return end
lib.objects = lib.objects or {}
lib.callbackRegistered = lib.callbackRegistered or nil
lib.callbacks = lib.callbacks or LibStub("CallbackHandler-1.0"):New(lib)
lib.notCreated = lib.notCreated or {}
lib.radius = lib.radius or 5
lib.tooltip = lib.tooltip or CreateFrame("GameTooltip", "LibDBIconTooltip", UIParent, "GameTooltipTemplate")
local next, Minimap = next, Minimap
local isDraggingButton = false
function lib:IconCallback(event, name, key, value)
if lib.objects[name] then
if key == "icon" then
lib.objects[name].icon:SetTexture(value)
elseif key == "iconCoords" then
lib.objects[name].icon:UpdateCoord()
elseif key == "iconR" then
local _, g, b = lib.objects[name].icon:GetVertexColor()
lib.objects[name].icon:SetVertexColor(value, g, b)
elseif key == "iconG" then
local r, _, b = lib.objects[name].icon:GetVertexColor()
lib.objects[name].icon:SetVertexColor(r, value, b)
elseif key == "iconB" then
local r, g = lib.objects[name].icon:GetVertexColor()
lib.objects[name].icon:SetVertexColor(r, g, value)
end
end
end
if not lib.callbackRegistered then
ldb.RegisterCallback(lib, "LibDataBroker_AttributeChanged__icon", "IconCallback")
ldb.RegisterCallback(lib, "LibDataBroker_AttributeChanged__iconCoords", "IconCallback")
ldb.RegisterCallback(lib, "LibDataBroker_AttributeChanged__iconR", "IconCallback")
ldb.RegisterCallback(lib, "LibDataBroker_AttributeChanged__iconG", "IconCallback")
ldb.RegisterCallback(lib, "LibDataBroker_AttributeChanged__iconB", "IconCallback")
lib.callbackRegistered = true
end
local function getAnchors(frame)
local x, y = frame:GetCenter()
if not x or not y then return "CENTER" end
local hhalf = (x > UIParent:GetWidth()*2/3) and "RIGHT" or (x < UIParent:GetWidth()/3) and "LEFT" or ""
local vhalf = (y > UIParent:GetHeight()/2) and "TOP" or "BOTTOM"
return vhalf..hhalf, frame, (vhalf == "TOP" and "BOTTOM" or "TOP")..hhalf
end
local function onEnter(self)
if isDraggingButton then return end
for _, button in next, lib.objects do
if button.showOnMouseover then
button.fadeOut:Stop()
button:SetAlpha(1)
end
end
local obj = self.dataObject
if obj.OnTooltipShow then
lib.tooltip:SetOwner(self, "ANCHOR_NONE")
lib.tooltip:SetPoint(getAnchors(self))
obj.OnTooltipShow(lib.tooltip)
lib.tooltip:Show()
elseif obj.OnEnter then
obj.OnEnter(self)
end
end
local function onLeave(self)
lib.tooltip:Hide()
if not isDraggingButton then
for _, button in next, lib.objects do
if button.showOnMouseover then
button.fadeOut:Play()
end
end
end
local obj = self.dataObject
if obj.OnLeave then
obj.OnLeave(self)
end
end
--------------------------------------------------------------------------------
local onDragStart, updatePosition
do
local minimapShapes = {
["ROUND"] = {true, true, true, true},
["SQUARE"] = {false, false, false, false},
["CORNER-TOPLEFT"] = {false, false, false, true},
["CORNER-TOPRIGHT"] = {false, false, true, false},
["CORNER-BOTTOMLEFT"] = {false, true, false, false},
["CORNER-BOTTOMRIGHT"] = {true, false, false, false},
["SIDE-LEFT"] = {false, true, false, true},
["SIDE-RIGHT"] = {true, false, true, false},
["SIDE-TOP"] = {false, false, true, true},
["SIDE-BOTTOM"] = {true, true, false, false},
["TRICORNER-TOPLEFT"] = {false, true, true, true},
["TRICORNER-TOPRIGHT"] = {true, false, true, true},
["TRICORNER-BOTTOMLEFT"] = {true, true, false, true},
["TRICORNER-BOTTOMRIGHT"] = {true, true, true, false},
}
local rad, cos, sin, sqrt, max, min = math.rad, math.cos, math.sin, math.sqrt, math.max, math.min
function updatePosition(button, position)
local angle = rad(position or 225)
local x, y, q = cos(angle), sin(angle), 1
if x < 0 then q = q + 1 end
if y > 0 then q = q + 2 end
local minimapShape = GetMinimapShape and GetMinimapShape() or "ROUND"
local quadTable = minimapShapes[minimapShape]
local w = (Minimap:GetWidth() / 2) + lib.radius
local h = (Minimap:GetHeight() / 2) + lib.radius
if quadTable[q] then
x, y = x*w, y*h
else
local diagRadiusW = sqrt(2*(w)^2)-10
local diagRadiusH = sqrt(2*(h)^2)-10
x = max(-w, min(x*diagRadiusW, w))
y = max(-h, min(y*diagRadiusH, h))
end
button:SetPoint("CENTER", Minimap, "CENTER", x, y)
end
end
local function onClick(self, b)
if self.dataObject.OnClick then
self.dataObject.OnClick(self, b)
end
end
local function onMouseDown(self)
self.isMouseDown = true
self.icon:UpdateCoord()
end
local function onMouseUp(self)
self.isMouseDown = false
self.icon:UpdateCoord()
end
do
local deg, atan2 = math.deg, math.atan2
local function onUpdate(self)
local mx, my = Minimap:GetCenter()
local px, py = GetCursorPosition()
local scale = Minimap:GetEffectiveScale()
px, py = px / scale, py / scale
local pos = 225
if self.db then
pos = deg(atan2(py - my, px - mx)) % 360
self.db.minimapPos = pos
else
pos = deg(atan2(py - my, px - mx)) % 360
self.minimapPos = pos
end
updatePosition(self, pos)
end
function onDragStart(self)
self:LockHighlight()
self.isMouseDown = true
self.icon:UpdateCoord()
self:SetScript("OnUpdate", onUpdate)
isDraggingButton = true
lib.tooltip:Hide()
for _, button in next, lib.objects do
if button.showOnMouseover then
button.fadeOut:Stop()
button:SetAlpha(1)
end
end
end
end
local function onDragStop(self)
self:SetScript("OnUpdate", nil)
self.isMouseDown = false
self.icon:UpdateCoord()
self:UnlockHighlight()
isDraggingButton = false
for _, button in next, lib.objects do
if button.showOnMouseover then
button.fadeOut:Play()
end
end
end
local defaultCoords = {0, 1, 0, 1}
local function updateCoord(self)
local coords = self:GetParent().dataObject.iconCoords or defaultCoords
local deltaX, deltaY = 0, 0
if not self:GetParent().isMouseDown then
deltaX = (coords[2] - coords[1]) * 0.05
deltaY = (coords[4] - coords[3]) * 0.05
end
self:SetTexCoord(coords[1] + deltaX, coords[2] - deltaX, coords[3] + deltaY, coords[4] - deltaY)
end
local function createButton(name, object, db)
local button = CreateFrame("Button", "LibDBIcon10_"..name, Minimap)
button.dataObject = object
button.db = db
button:SetFrameStrata("MEDIUM")
button:SetSize(31, 31)
button:SetFrameLevel(8)
button:RegisterForClicks("anyUp")
button:RegisterForDrag("LeftButton")
button:SetHighlightTexture(136477) --"Interface\\Minimap\\UI-Minimap-ZoomButton-Highlight"
local overlay = button:CreateTexture(nil, "OVERLAY")
overlay:SetSize(53, 53)
overlay:SetTexture(136430) --"Interface\\Minimap\\MiniMap-TrackingBorder"
overlay:SetPoint("TOPLEFT")
local background = button:CreateTexture(nil, "BACKGROUND")
background:SetSize(20, 20)
background:SetTexture(136467) --"Interface\\Minimap\\UI-Minimap-Background"
background:SetPoint("TOPLEFT", 7, -5)
local icon = button:CreateTexture(nil, "ARTWORK")
icon:SetSize(17, 17)
icon:SetTexture(object.icon)
icon:SetPoint("TOPLEFT", 7, -6)
button.icon = icon
button.isMouseDown = false
local r, g, b = icon:GetVertexColor()
icon:SetVertexColor(object.iconR or r, object.iconG or g, object.iconB or b)
icon.UpdateCoord = updateCoord
icon:UpdateCoord()
button:SetScript("OnEnter", onEnter)
button:SetScript("OnLeave", onLeave)
button:SetScript("OnClick", onClick)
if not db or not db.lock then
button:SetScript("OnDragStart", onDragStart)
button:SetScript("OnDragStop", onDragStop)
end
button:SetScript("OnMouseDown", onMouseDown)
button:SetScript("OnMouseUp", onMouseUp)
button.fadeOut = button:CreateAnimationGroup()
local animOut = button.fadeOut:CreateAnimation("Alpha")
animOut:SetOrder(1)
animOut:SetDuration(0.2)
animOut:SetFromAlpha(1)
animOut:SetToAlpha(0)
animOut:SetStartDelay(1)
button.fadeOut:SetToFinalAlpha(true)
lib.objects[name] = button
if lib.loggedIn then
updatePosition(button, db and db.minimapPos)
if not db or not db.hide then
button:Show()
else
button:Hide()
end
end
lib.callbacks:Fire("LibDBIcon_IconCreated", button, name) -- Fire 'Icon Created' callback
end
-- We could use a metatable.__index on lib.objects, but then we'd create
-- the icons when checking things like :IsRegistered, which is not necessary.
local function check(name)
if lib.notCreated[name] then
createButton(name, lib.notCreated[name][1], lib.notCreated[name][2])
lib.notCreated[name] = nil
end
end
-- Wait a bit with the initial positioning to let any GetMinimapShape addons
-- load up.
if not lib.loggedIn then
local f = CreateFrame("Frame")
f:SetScript("OnEvent", function(f)
for _, button in next, lib.objects do
updatePosition(button, button.db and button.db.minimapPos)
if not button.db or not button.db.hide then
button:Show()
else
button:Hide()
end
end
lib.loggedIn = true
f:SetScript("OnEvent", nil)
end)
f:RegisterEvent("PLAYER_LOGIN")
end
local function getDatabase(name)
return lib.notCreated[name] and lib.notCreated[name][2] or lib.objects[name].db
end
function lib:Register(name, object, db)
if not object.icon then error("Can't register LDB objects without icons set!") end
if lib.objects[name] or lib.notCreated[name] then error(DBICON10.. ": Object '".. name .."' is already registered.") end
if not db or not db.hide then
createButton(name, object, db)
else
lib.notCreated[name] = {object, db}
end
end
function lib:Lock(name)
if not lib:IsRegistered(name) then return end
if lib.objects[name] then
lib.objects[name]:SetScript("OnDragStart", nil)
lib.objects[name]:SetScript("OnDragStop", nil)
end
local db = getDatabase(name)
if db then
db.lock = true
end
end
function lib:Unlock(name)
if not lib:IsRegistered(name) then return end
if lib.objects[name] then
lib.objects[name]:SetScript("OnDragStart", onDragStart)
lib.objects[name]:SetScript("OnDragStop", onDragStop)
end
local db = getDatabase(name)
if db then
db.lock = nil
end
end
function lib:Hide(name)
if not lib.objects[name] then return end
lib.objects[name]:Hide()
end
function lib:Show(name)
check(name)
local button = lib.objects[name]
if button then
button:Show()
updatePosition(button, button.db and button.db.minimapPos or button.minimapPos)
end
end
function lib:IsRegistered(name)
return (lib.objects[name] or lib.notCreated[name]) and true or false
end
function lib:Refresh(name, db)
check(name)
local button = lib.objects[name]
if db then
button.db = db
end
updatePosition(button, button.db and button.db.minimapPos or button.minimapPos)
if not button.db or not button.db.hide then
button:Show()
else
button:Hide()
end
if not button.db or not button.db.lock then
button:SetScript("OnDragStart", onDragStart)
button:SetScript("OnDragStop", onDragStop)
else
button:SetScript("OnDragStart", nil)
button:SetScript("OnDragStop", nil)
end
end
function lib:GetMinimapButton(name)
return lib.objects[name]
end
do
local function OnMinimapEnter()
if isDraggingButton then return end
for _, button in next, lib.objects do
if button.showOnMouseover then
button.fadeOut:Stop()
button:SetAlpha(1)
end
end
end
local function OnMinimapLeave()
if isDraggingButton then return end
for _, button in next, lib.objects do
if button.showOnMouseover then
button.fadeOut:Play()
end
end
end
Minimap:HookScript("OnEnter", OnMinimapEnter)
Minimap:HookScript("OnLeave", OnMinimapLeave)
function lib:ShowOnEnter(name, value)
local button = lib.objects[name]
if button then
if value then
button.showOnMouseover = true
button.fadeOut:Stop()
button:SetAlpha(0)
else
button.showOnMouseover = false
button.fadeOut:Stop()
button:SetAlpha(1)
end
end
end
end
function lib:GetButtonList()
local t = {}
for name in next, lib.objects do
t[#t+1] = name
end
return t
end
function lib:SetButtonRadius(radius)
if type(radius) == "number" then
lib.radius = radius
for _, button in next, lib.objects do
updatePosition(button, button.db and button.db.minimapPos or button.minimapPos)
end
end
end
function lib:SetButtonToPosition(button, position)
updatePosition(lib.objects[button] or button, position)
end
-- Upgrade!
for name, button in next, lib.objects do
local db = getDatabase(name)
if not db or not db.lock then
button:SetScript("OnDragStart", onDragStart)
button:SetScript("OnDragStop", onDragStop)
end
button:SetScript("OnEnter", onEnter)
button:SetScript("OnLeave", onLeave)
button:SetScript("OnClick", onClick)
button:SetScript("OnMouseDown", onMouseDown)
button:SetScript("OnMouseUp", onMouseUp)
if not button.fadeOut then -- Upgrade to 39
button.fadeOut = button:CreateAnimationGroup()
local animOut = button.fadeOut:CreateAnimation("Alpha")
animOut:SetOrder(1)
animOut:SetDuration(0.2)
animOut:SetFromAlpha(1)
animOut:SetToAlpha(0)
animOut:SetStartDelay(1)
button.fadeOut:SetToFinalAlpha(true)
end
end
lib:SetButtonRadius(lib.radius) -- Upgrade to 40
-6
View File
@@ -1,6 +0,0 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
<Script file="LibDBIcon-1.0.lua"/>
</Ui>
@@ -1,33 +0,0 @@
tag v1.1.4
ddb0519a000c69ddf3a28c3f9fe2e62bb3fd00c5
Tekkub <tekkub@gmail.com>
2008-11-06 22:03:04 -0700
Build 1.1.4
--------------------
Tekkub:
Add pairs and ipairs iters, since we can't use the normal iters on our dataobjs
Simplify readme, all docs have been moved into GitHub wiki pages
Documentation on how to use LDB data (for display addons)
Add StatBlockCore forum link
Add link to Fortress thread
And rearrange the addon list a bit too
Make field lists into nice pretty tables
Add list of who is using LDB
Always with the typos, I hate my fingers
Add tooltiptext and OnTooltipShow to data addon spec
Readme rejiggering
Add in some documentation on how to push data into LDB
Meh, fuck you textile
Adding readme
Pass current dataobj with attr change callbacks to avoid excessive calls to :GetDataObjectByName
Tekkub Stoutwrithe:
Make passed dataobj actually work
I always forget the 'then'
Minor memory optimization
- Only hold upvalues to locals in the functions called frequently
- Retain the metatable across future lib upgrades (the one in v1 will be lost)
Allow caller to pass a pre-populated table to NewDataObject
@@ -1,90 +0,0 @@
assert(LibStub, "LibDataBroker-1.1 requires LibStub")
assert(LibStub:GetLibrary("CallbackHandler-1.0", true), "LibDataBroker-1.1 requires CallbackHandler-1.0")
local lib, oldminor = LibStub:NewLibrary("LibDataBroker-1.1", 4)
if not lib then return end
oldminor = oldminor or 0
lib.callbacks = lib.callbacks or LibStub:GetLibrary("CallbackHandler-1.0"):New(lib)
lib.attributestorage, lib.namestorage, lib.proxystorage = lib.attributestorage or {}, lib.namestorage or {}, lib.proxystorage or {}
local attributestorage, namestorage, callbacks = lib.attributestorage, lib.namestorage, lib.callbacks
if oldminor < 2 then
lib.domt = {
__metatable = "access denied",
__index = function(self, key) return attributestorage[self] and attributestorage[self][key] end,
}
end
if oldminor < 3 then
lib.domt.__newindex = function(self, key, value)
if not attributestorage[self] then attributestorage[self] = {} end
if attributestorage[self][key] == value then return end
attributestorage[self][key] = value
local name = namestorage[self]
if not name then return end
callbacks:Fire("LibDataBroker_AttributeChanged", name, key, value, self)
callbacks:Fire("LibDataBroker_AttributeChanged_"..name, name, key, value, self)
callbacks:Fire("LibDataBroker_AttributeChanged_"..name.."_"..key, name, key, value, self)
callbacks:Fire("LibDataBroker_AttributeChanged__"..key, name, key, value, self)
end
end
if oldminor < 2 then
function lib:NewDataObject(name, dataobj)
if self.proxystorage[name] then return end
if dataobj then
assert(type(dataobj) == "table", "Invalid dataobj, must be nil or a table")
self.attributestorage[dataobj] = {}
for i,v in pairs(dataobj) do
self.attributestorage[dataobj][i] = v
dataobj[i] = nil
end
end
dataobj = setmetatable(dataobj or {}, self.domt)
self.proxystorage[name], self.namestorage[dataobj] = dataobj, name
self.callbacks:Fire("LibDataBroker_DataObjectCreated", name, dataobj)
return dataobj
end
end
if oldminor < 1 then
function lib:DataObjectIterator()
return pairs(self.proxystorage)
end
function lib:GetDataObjectByName(dataobjectname)
return self.proxystorage[dataobjectname]
end
function lib:GetNameByDataObject(dataobject)
return self.namestorage[dataobject]
end
end
if oldminor < 4 then
local next = pairs(attributestorage)
function lib:pairs(dataobject_or_name)
local t = type(dataobject_or_name)
assert(t == "string" or t == "table", "Usage: ldb:pairs('dataobjectname') or ldb:pairs(dataobject)")
local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name
assert(attributestorage[dataobj], "Data object not found")
return next, attributestorage[dataobj], nil
end
local ipairs_iter = ipairs(attributestorage)
function lib:ipairs(dataobject_or_name)
local t = type(dataobject_or_name)
assert(t == "string" or t == "table", "Usage: ldb:ipairs('dataobjectname') or ldb:ipairs(dataobject)")
local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name
assert(attributestorage[dataobj], "Data object not found")
return ipairs_iter, attributestorage[dataobj], 0
end
end
-13
View File
@@ -1,13 +0,0 @@
LibDataBroker is a small WoW addon library designed to provide a "MVC":http://en.wikipedia.org/wiki/Model-view-controller interface for use in various addons.
LDB's primary goal is to "detach" plugins for TitanPanel and FuBar from the display addon.
Plugins can provide data into a simple table, and display addons can receive callbacks to refresh their display of this data.
LDB also provides a place for addons to register "quicklaunch" functions, removing the need for authors to embed many large libraries to create minimap buttons.
Users who do not wish to be "plagued" by these buttons simply do not install an addon to render them.
Due to it's simple generic design, LDB can be used for any design where you wish to have an addon notified of changes to a table.
h2. Links
* "API documentation":http://github.com/tekkub/libdatabroker-1-1/wikis/api
* "Data specifications":http://github.com/tekkub/libdatabroker-1-1/wikis/data-specifications
* "Addons using LDB":http://github.com/tekkub/libdatabroker-1-1/wikis/addons-using-ldb
File diff suppressed because it is too large Load Diff
-3
View File
@@ -1,3 +0,0 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
<Script file="LibDeflate.lua" />
</Ui>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2023 Terciob19
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
File diff suppressed because it is too large Load Diff
-8
View File
@@ -1,8 +0,0 @@
## Interface: 100105
## Title: LuaServerDefinitions
## Notes: Development Tools
## Version: #@project-version@
## X-Curse-Project-ID: 889573
LuaServerDefinitions.lua
-42
View File
@@ -1,42 +0,0 @@
# Compiled Lua sources
luac.out
# luarocks build files
*.src.rock
*.zip
*.tar.gz
# Object files
*.o
*.os
*.ko
*.obj
*.elf
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
*.def
*.exp
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
.vscode/bookmarks.json
-120
View File
@@ -1,120 +0,0 @@
if (not LIB_OPEN_RAID_CAN_LOAD) then
return
end
local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0")
--comm prefix deprecated
openRaidLib.commPrefixDeprecated = {
}
local spamLimit = {}
local showDeprecatedMessage = function(deprecatedCall, newCall)
local debugTrace = debugstack(3, 1, 1)
if (debugTrace:find("AddOns\\WeakAuras")) then
local auraName = debugTrace:gsub("%[string \"Error in: ", ""):gsub("':'.*", "")
openRaidLib.DeprecatedMessage("|cFFEEEEEE" .. deprecatedCall .. "|r is deprecated|cFFEEEEEE, please use " .. newCall .. "\nFrom a weakaura named: " .. auraName .. "")
else
debugTrace = debugTrace:gsub("%[.-%]", "")
debugTrace = debugTrace:gsub("\n", "")
openRaidLib.DeprecatedMessage("|cFFEEEEEE" .. deprecatedCall .. "|r is deprecated|cFFEEEEEE, please use " .. newCall .. "\nFrom line" .. debugTrace .. "")
end
end
--deprecated: 'RequestAllPlayersInfo' has been replaced by 'RequestAllData'
function openRaidLib.RequestAllPlayersInfo()
if (not spamLimit["openRaidLib.RequestAllData"]) then
spamLimit["openRaidLib.RequestAllData"] = true
showDeprecatedMessage("openRaidLib.RequestAllPlayersInfo()", "openRaidLib.RequestAllData()")
end
end
--deprecated: 'playerInfoManager' has been replaced by 'UnitInfoManager'
openRaidLib.playerInfoManager = {}
local deprecatedMetatable = {
__newindex = function()
if (not spamLimit["openRaidLib.UnitInfoManager"]) then
openRaidLib.DeprecatedMessage("openRaidLib.playerInfoManager table is deprecated, please use openRaidLib.UnitInfoManager.")
showDeprecatedMessage("", "")
spamLimit["openRaidLib.UnitInfoManager"] = true
end
return
end,
__index = function(t, key)
return rawget(t, key) or showDeprecatedMessage("openRaidLib.playerInfoManager", "openRaidLib.UnitInfoManager")
end,
}
function openRaidLib.playerInfoManager.GetPlayerInfo()
if (not spamLimit["openRaidLib.playerInfoManager.GetPlayerInfo"]) then
showDeprecatedMessage("openRaidLib.playerInfoManager.GetPlayerInfo(unitName)", "openRaidLib.GetUnitInfo(unitId)")
spamLimit["openRaidLib.playerInfoManager.GetPlayerInfo"] = true
end
end
function openRaidLib.playerInfoManager.GetAllPlayersInfo()
if (not spamLimit["openRaidLib.playerInfoManager.GetAllPlayersInfo"]) then
showDeprecatedMessage("openRaidLib.playerInfoManager.GetAllPlayersInfo()", "openRaidLib.GetAllUnitsInfo()")
spamLimit["openRaidLib.playerInfoManager.GetAllPlayersInfo"] = true
end
end
setmetatable(openRaidLib.playerInfoManager, deprecatedMetatable)
--deprecated: 'gearManager' has been replaced by 'GearManager'
openRaidLib.gearManager = {}
local deprecatedMetatable = {
__newindex = function()
if (not spamLimit["openRaidLib.gearManager__newindex"]) then
showDeprecatedMessage("openRaidLib.gearManager", "openRaidLib.GearManager")
spamLimit["openRaidLib.gearManager__newindex"] = true
end
return
end,
__index = function(t, key)
return rawget(t, key) or showDeprecatedMessage("openRaidLib.gearManager", "openRaidLib.GearManager")
end,
}
function openRaidLib.gearManager.GetAllPlayersGear()
if (not spamLimit["openRaidLib.gearManager.GetAllPlayersGear"]) then
showDeprecatedMessage("openRaidLib.gearManager.GetAllPlayersGear()", "openRaidLib.GetAllUnitsGear()")
spamLimit["openRaidLib.gearManager.GetAllPlayersGear"] = true
end
end
function openRaidLib.gearManager.GetPlayerGear()
if (not spamLimit["openRaidLib.gearManager.GetPlayerGear"]) then
showDeprecatedMessage("openRaidLib.gearManager.GetPlayerGear()", "openRaidLib.GetUnitGear(unitId)")
spamLimit["openRaidLib.gearManager.GetPlayerGear"] = true
end
end
setmetatable(openRaidLib.gearManager, deprecatedMetatable)
--deprecated: 'cooldownManager' has been replaced by 'CooldownManager'
openRaidLib.cooldownManager = {}
local deprecatedMetatable = {
__newindex = function()
if (not spamLimit["openRaidLib.cooldownManager__newindex"]) then
showDeprecatedMessage("openRaidLib.cooldownManager", "openRaidLib.CooldownManager")
spamLimit["openRaidLib.cooldownManager__newindex"] = true
end
return
end,
__index = function(t, key)
return rawget(t, key) or showDeprecatedMessage("openRaidLib.cooldownManager", "openRaidLib.CooldownManager")
end,
}
function openRaidLib.cooldownManager.GetAllPlayersCooldown()
if (not spamLimit["openRaidLib.cooldownManager.GetAllPlayersCooldown"]) then
showDeprecatedMessage("openRaidLib.cooldownManager.GetAllPlayersCooldown()", "openRaidLib.GetAllUnitsCooldown()")
spamLimit["openRaidLib.cooldownManager.GetAllPlayersCooldown"] = true
end
end
function openRaidLib.cooldownManager.GetPlayerCooldowns()
if (not spamLimit["openRaidLib.cooldownManager.GetPlayerCooldowns"]) then
showDeprecatedMessage("openRaidLib.cooldownManager.GetPlayerCooldowns()", "openRaidLib.GetUnitCooldowns(unitId)")
spamLimit["openRaidLib.cooldownManager.GetPlayerCooldowns"] = true
end
end
setmetatable(openRaidLib.cooldownManager, deprecatedMetatable)
+7 -22
View File
@@ -1,4 +1,4 @@
--[=[
--[=[
Dumping logical functions here, make the code of the main file smaller
--]=]
@@ -444,22 +444,12 @@ function openRaidLib.GetFoodTierFromAura(auraInfo)
end
local isTierPiece = function(itemLink)
local tooltipData = C_TooltipInfo.GetHyperlink(itemLink)
if (tooltipData) then
local lines = tooltipData.lines
if (lines and #lines > 0) then
for i = 1, #lines do
local thisLine = lines[i]
local leftText = thisLine.leftText
if (type(leftText) == "string") then
if (leftText:match( "%s%(%d%/5%)$" )) then
return true
end
end
end
if GetItemSetID then
local itemID = GetItemInfoFromHyperlink(itemLink)
if itemID then
return GetItemSetID(itemID) ~= nil
end
end
return false
end
@@ -507,7 +497,7 @@ function openRaidLib.GearManager.BuildEquipmentItemLinks(equippedGearList)
equipmentTable.itemName = itemName
equipmentTable.isTier = isTierPiece(itemLink)
local _, _, enchantId, gemId1, gemId2, gemId3, gemId4, suffixId, uniqueId, levelOfTheItem, specId, upgradeInfo, instanceDifficultyId, numBonusIds, restLink = strsplit(":", itemLink)
local _, _, enchantId, gemId1, gemId2, gemId3, gemId4 = strsplit(":", itemLink)
local enchantAttribute = LIB_OPEN_RAID_ENCHANT_SLOTS[slotId]
local nEnchantId = 0
@@ -516,11 +506,6 @@ function openRaidLib.GearManager.BuildEquipmentItemLinks(equippedGearList)
enchantId = tonumber(enchantId)
nEnchantId = enchantId
end
--6400 and above is dragonflight enchantId number space
if (nEnchantId < 6300 and not LIB_OPEN_RAID_DEATHKNIGHT_RUNEFORGING_ENCHANT_IDS[nEnchantId]) then
nEnchantId = 0
end
end
equipmentTable.enchantId = nEnchantId
@@ -532,7 +517,7 @@ function openRaidLib.GearManager.BuildEquipmentItemLinks(equippedGearList)
--check if the socket is empty
for gemSlotId = 1, numGemSlots do
local gemId = tonumber(gemsIds[gemSlotId])
if (gemId and gemId >= 180000) then
if (gemId) then
nGemId = gemId
break
end
+141 -625
View File
@@ -1,4 +1,4 @@
--[=[
--[=[
This file has the functions to get player information
Dumping them here, make the code of the main file smaller
--]=]
@@ -11,291 +11,54 @@ end
local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0")
local CONST_TALENT_VERSION_CLASSIC = 1
local CONST_TALENT_VERSION_LEGION = 4
local CONST_TALENT_VERSION_DRAGONFLIGHT = 5
local CONST_BTALENT_VERSION_COVENANTS = 9
local CONST_SPELLBOOK_CLASSSPELLS_TABID = 2
local CONST_SPELLBOOK_GENERAL_TABID = 1
local CONST_ISITEM_BY_TYPEID = {
[10] = true, --healing items
[11] = true, --attack items
[12] = true, --utility items
}
local GetItemInfo = GetItemInfo
local GetItemStats = GetItemStats
local GetInventoryItemLink = GetInventoryItemLink
local isTimewalkWoW = function()
local _, _, _, buildInfo = GetBuildInfo()
if (buildInfo < 40000) then
return true
end
end
local IsDragonflight = function()
return select(4, GetBuildInfo()) >= 100000
end
local IsShadowlands = function()
local versionString, revision, launchDate, gameVersion = GetBuildInfo()
if (gameVersion >= 90000 and gameVersion < 100000) then
return true
end
end
--information about the player character to send, each expansion has its own system and data can be different
--it's always a number
function openRaidLib.UnitInfoManager.GetPlayerInfo1()
if (IsShadowlands()) then
--return the renown level within the player covenant
local renown = C_CovenantSanctumUI.GetRenownLevel() or 1
return renown
end
return 0
end
--information about the player character to send, each expansion has its own system and data can be different
--it's always a number
function openRaidLib.UnitInfoManager.GetPlayerInfo2()
if (IsShadowlands()) then
--return which covenant the player picked
local covenant = C_Covenants.GetActiveCovenantID() or 0
return covenant
end
return 0
end
--default player class-spec talent system
function openRaidLib.GetTalentVersion()
local _, _, _, buildInfo = GetBuildInfo()
if (buildInfo >= 1 and buildInfo <= 40000) then --vanilla tbc wotlk cataclysm
return CONST_TALENT_VERSION_CLASSIC
end
if (buildInfo >= 70000 and buildInfo <= 100000) then --legion bfa shadowlands
return CONST_TALENT_VERSION_LEGION
end
if (buildInfo >= 100000 and buildInfo <= 200000) then --dragonflight
return CONST_TALENT_VERSION_DRAGONFLIGHT
end
end
--secondary talent tree, can be a legendary weapon talent tree, covenant talent tree, etc...
function openRaidLib.GetBorrowedTalentVersion()
if (IsShadowlands()) then
return CONST_BTALENT_VERSION_COVENANTS
end
end
local getDragonflightTalentsExportedString = function()
local exportStream = ExportUtil.MakeExportDataStream()
local configId = C_ClassTalents.GetActiveConfigID()
if (configId) then
local configInfo = C_Traits.GetConfigInfo(configId)
local currentSpecID = PlayerUtil.GetCurrentSpecID()
local treeInfo = C_Traits.GetTreeInfo(configId, configInfo.treeIDs[1])
local treeHash = C_Traits.GetTreeHash(treeInfo.ID)
local serializationVersion = C_Traits.GetLoadoutSerializationVersion()
end
end
local getDragonflightTalentsAsIndexTable = function()
local allTalents = {}
local configId = C_ClassTalents.GetActiveConfigID()
if (not configId) then
return allTalents
end
local configInfo = C_Traits.GetConfigInfo(configId)
for treeIndex, treeId in ipairs(configInfo.treeIDs) do
local treeNodes = C_Traits.GetTreeNodes(treeId)
for nodeIdIndex, treeNodeID in ipairs(treeNodes) do
local traitNodeInfo = C_Traits.GetNodeInfo(configId, treeNodeID)
if (traitNodeInfo) then
local activeEntry = traitNodeInfo.activeEntry
if (activeEntry) then
local entryId = activeEntry.entryID
local rank = activeEntry.rank
if (rank > 0) then
--get the entry info
local traitEntryInfo = C_Traits.GetEntryInfo(configId, entryId)
local definitionId = traitEntryInfo.definitionID
--definition info
local traitDefinitionInfo = C_Traits.GetDefinitionInfo(definitionId)
local spellId = traitDefinitionInfo.overriddenSpellID or traitDefinitionInfo.spellID
local spellName, _, spellTexture = GetSpellInfo(spellId)
if (spellName) then
allTalents[#allTalents+1] = spellId
end
end
end
end
end
end
return allTalents
end
--creates two tables, one with indexed talents and another with pairs values ([talentId] = true)
function openRaidLib.UnitInfoManager.GetPlayerTalentsAsPairsTable()
local talentsPairs = {}
local talentVersion = openRaidLib.GetTalentVersion()
if (talentVersion == CONST_TALENT_VERSION_DRAGONFLIGHT) then
local allTalents = getDragonflightTalentsAsIndexTable()
for i = 1, #allTalents do
local spellId = allTalents[i]
talentsPairs[spellId] = true
end
elseif (talentVersion == CONST_TALENT_VERSION_LEGION) then
for i = 1, 7 do
for o = 1, 3 do
local talentId, _, _, selected = GetTalentInfo(i, o, 1)
if (selected) then
talentsPairs[talentId] = true
break
end
end
end
end
return talentsPairs
end
function openRaidLib.UnitInfoManager.GetPlayerTalents()
local talents = {}
local talentVersion = openRaidLib.GetTalentVersion()
if (talentVersion == CONST_TALENT_VERSION_DRAGONFLIGHT) then
talents = getDragonflightTalentsAsIndexTable()
elseif (talentVersion == CONST_TALENT_VERSION_LEGION) then
talents = {0, 0, 0, 0, 0, 0, 0}
for talentTier = 1, 7 do
for talentColumn = 1, 3 do
local talentId, name, texture, selected, available = GetTalentInfo(talentTier, talentColumn, 1)
if (selected) then
talents[talentTier] = talentId
break
end
end
end
end
return talents
end
function openRaidLib.UnitInfoManager.GetPlayerPvPTalents()
if (IsDragonflight()) then
return {}
end
-- todo: coa will use these eventually
return {}
local talentsPvP = {0, 0, 0}
local talentList = C_SpecializationInfo.GetAllSelectedPvpTalentIDs()
for talentIndex, talentId in ipairs(talentList) do
local doesExists = GetPvpTalentInfoByID(talentId)
if (doesExists) then
talentsPvP[talentIndex] = talentId
end
end
return talentsPvP
-- expected format
-- local talentsPvP = {0, 0, 0}
-- talentsPvP[index] = talentID
end
--return the current specId of the player
function openRaidLib.GetPlayerSpecId()
if (isTimewalkWoW()) then
return 0
end
local spec = GetSpecialization()
if (spec) then
local specId = GetSpecializationInfo(spec)
if (specId and specId > 0) then
return specId
end
end
return GetSpecialization() or 1
end
--borrowed talent tree from shadowlands
function openRaidLib.UnitInfoManager.GetPlayerConduits()
local conduits = {}
local soulbindID = C_Soulbinds.GetActiveSoulbindID()
if (soulbindID ~= 0) then
local soulbindData = C_Soulbinds.GetSoulbindData(soulbindID)
if (soulbindData ~= 0) then
local tree = soulbindData.tree
local nodes = tree.nodes
table.sort(nodes, function(t1, t2) return t1.row < t2.row end)
local C_Soulbinds_GetConduitCollectionData = C_Soulbinds.GetConduitCollectionData
for nodeId, nodeInfo in ipairs(nodes) do
--check if the node is a conduit placed by the player
if (nodeInfo.state == Enum.SoulbindNodeState.Selected) then
local conduitId = nodeInfo.conduitID
local conduitRank = nodeInfo.conduitRank
if (conduitId and conduitRank) then
--have spell id when it's a default conduit from the game
local spellId = nodeInfo.spellID
--have conduit id when is a conduid placed by the player
local conduitId = nodeInfo.conduitID
if (spellId == 0) then
--is player conduit
spellId = C_Soulbinds.GetConduitSpellID(nodeInfo.conduitID, nodeInfo.conduitRank)
conduits[#conduits+1] = spellId
local collectionData = C_Soulbinds_GetConduitCollectionData(conduitId)
conduits[#conduits+1] = collectionData and collectionData.conduitItemLevel or 0
else
--is default conduit
conduits[#conduits+1] = spellId
conduits[#conduits+1] = 0
end
end
end
end
end
end
return conduits
end
function openRaidLib.UnitInfoManager.GetPlayerBorrowedTalents()
local borrowedTalentVersion = openRaidLib.GetBorrowedTalentVersion()
if (borrowedTalentVersion == CONST_BTALENT_VERSION_COVENANTS) then
return openRaidLib.UnitInfoManager.GetPlayerConduits()
end
return {}
end
function openRaidLib.GearManager.GetPlayerItemLevel()
if (_G.GetAverageItemLevel) then
local _, itemLevel = GetAverageItemLevel()
itemLevel = floor(itemLevel)
return itemLevel
else
return 0
end
local itemLevel = UnitAverageItemLevel("player")
return floor(itemLevel)
end
--return an integer between zero and one hundret indicating the player gear durability
@@ -327,17 +90,33 @@ function openRaidLib.GearManager.GetPlayerGearDurability()
end
function openRaidLib.GearManager.GetPlayerWeaponEnchant()
if not GetWeaponTempEnchantInfo then
return 0, 0, 0
end
local weaponEnchant = 0
local _, _, _, mainHandEnchantId, _, _, _, offHandEnchantId = GetWeaponEnchantInfo()
if (LIB_OPEN_RAID_WEAPON_ENCHANT_IDS[mainHandEnchantId]) then
local _, mainHandEnchantId = GetWeaponTempEnchantInfo(INVSLOT_MAINHAND)
local _, offHandEnchantId = GetWeaponTempEnchantInfo(INVSLOT_OFFHAND)
if (mainHandEnchantId and LIB_OPEN_RAID_WEAPON_ENCHANT_IDS[mainHandEnchantId]) then
weaponEnchant = 1
elseif(LIB_OPEN_RAID_WEAPON_ENCHANT_IDS[offHandEnchantId]) then
elseif( offHandEnchantId and LIB_OPEN_RAID_WEAPON_ENCHANT_IDS[offHandEnchantId]) then
weaponEnchant = 1
end
return weaponEnchant, mainHandEnchantId or 0, offHandEnchantId or 0
end
function openRaidLib.GearManager.GetPlayerRangedWeaponEnchant()
if not GetWeaponTempEnchantInfo then
return 0, 0
end
local weaponEnchant = 0
local _, rangedEnchantId = GetWeaponTempEnchantInfo(INVSLOT_RANGED)
if (rangedEnchantId and LIB_OPEN_RAID_WEAPON_ENCHANT_IDS[rangedEnchantId]) then
weaponEnchant = 1
end
return weaponEnchant, rangedEnchantId or 0
end
function openRaidLib.GearManager.GetPlayerGemsAndEnchantInfo()
--hold equipmentSlotId of equipment with a gem socket but it's empty
local slotsWithoutGems = {}
@@ -346,55 +125,48 @@ function openRaidLib.GearManager.GetPlayerGemsAndEnchantInfo()
local gearWithEnchantIds = {}
for equipmentSlotId = 1, 17 do
for equipmentSlotId = INVSLOT_FIRST_EQUIPPED, INVSLOT_LAST_EQUIPPED do
local itemLink = GetInventoryItemLink("player", equipmentSlotId)
if (itemLink) then
--get the information from the item
local _, itemId, enchantId, gemId1, gemId2, gemId3, gemId4, suffixId, uniqueId, levelOfTheItem, specId, upgradeInfo, instanceDifficultyId, numBonusIds, restLink = strsplit(":", itemLink)
local _, itemId, enchantId, gemId1, gemId2, gemId3, gemId4 = strsplit(":", itemLink)
local gemsIds = {gemId1, gemId2, gemId3, gemId4}
--enchant
--check if the slot can receive enchat and if the equipment has an enchant
local enchantAttribute = LIB_OPEN_RAID_ENCHANT_SLOTS[equipmentSlotId]
local nEnchantId = 0
--check if the slot can receive enchat and if the equipment has an enchant
local enchantAttribute = LIB_OPEN_RAID_ENCHANT_SLOTS[equipmentSlotId]
local nEnchantId = 0
if (enchantAttribute) then --this slot can receive an enchant
if (enchantId and enchantId ~= "") then
local number = tonumber(enchantId)
nEnchantId = number
gearWithEnchantIds[#gearWithEnchantIds+1] = nEnchantId
else
gearWithEnchantIds[#gearWithEnchantIds+1] = 0
end
--6400 and above is dragonflight enchantId number space
if (nEnchantId < 6300 and not LIB_OPEN_RAID_DEATHKNIGHT_RUNEFORGING_ENCHANT_IDS[nEnchantId]) then
slotsWithoutEnchant[#slotsWithoutEnchant+1] = equipmentSlotId
end
if (enchantAttribute) then --this slot can receive an enchant
if (enchantId and enchantId ~= "") then
local number = tonumber(enchantId)
nEnchantId = number
gearWithEnchantIds[#gearWithEnchantIds+1] = nEnchantId
else
gearWithEnchantIds[#gearWithEnchantIds+1] = 0
slotsWithoutEnchant[#slotsWithoutEnchant+1] = equipmentSlotId
end
end
--gems
--local itemStatsTable = {}
--fill the table above with information about the item
--GetItemStats(itemLink, itemStatsTable) --deprecated in 10.2.5
local itemStatsTable = C_Item.GetItemStats(itemLink)
--local itemStatsTable = {}
--fill the table above with information about the item
--GetItemStats(itemLink, itemStatsTable)
local itemStatsTable = GetItemStats(itemLink)
--check if the item has a socket
if (itemStatsTable) then
if (itemStatsTable.EMPTY_SOCKET_PRISMATIC) then
--check if the socket is empty
for i = 1, itemStatsTable.EMPTY_SOCKET_PRISMATIC do
local gemId = tonumber(gemsIds[i])
if (not gemId or gemId == 0) then
slotsWithoutGems[#slotsWithoutGems+1] = equipmentSlotId
--check if the gem is not a valid gem (deprecated gem)
elseif (gemId < 180000) then
slotsWithoutGems[#slotsWithoutGems+1] = equipmentSlotId
end
--check if the item has a socket
if (itemStatsTable) then
local numSockets = (itemStatsTable.EMPTY_SOCKET_RED or 0) + (itemStatsTable.EMPTY_SOCKET_YELLOW or 0) + (itemStatsTable.EMPTY_SOCKET_BLUE or 0)
if numSockets > 0 then
--check if the socket is empty
for i = 1, numSockets do
local gemId = tonumber(gemsIds[i])
if (not gemId or gemId == 0) then
slotsWithoutGems[#slotsWithoutGems+1] = equipmentSlotId
end
end
end
end
end
end
@@ -408,19 +180,19 @@ function openRaidLib.GearManager.BuildPlayerEquipmentList()
local itemLink = GetInventoryItemLink("player", equipmentSlotId)
if (itemLink) then
--local itemStatsTable = {}
local itemID, enchantID, gemID1, gemID2, gemID3, gemID4, suffixID, uniqueID, linkLevel, specializationID, modifiersMask, itemContext = select(2, strsplit(":", itemLink))
local itemID = select(2, strsplit(":", itemLink))
itemID = tonumber(itemID)
local effectiveILvl, isPreview, baseILvl = GetDetailedItemLevelInfo(itemLink)
local _, _, _, effectiveILvl = GetItemInfo(itemID)
if (not effectiveILvl) then
openRaidLib.mainControl.scheduleUpdatePlayerData()
effectiveILvl = 0
openRaidLib.__errors[#openRaidLib.__errors+1] = "Fail to get Item Level: " .. (itemID or "invalid itemID") .. " " .. (itemLink and itemLink:gsub("|H", "") or "invalid itemLink")
end
local itemStatsTable = C_Item.GetItemStats(itemLink)
local itemStatsTable = GetItemStats(itemLink)
--GetItemStats(itemLink, itemStatsTable)
local gemSlotsAvailable = itemStatsTable and itemStatsTable.EMPTY_SOCKET_PRISMATIC or 0
local gemSlotsAvailable = itemStatsTable and (itemStatsTable.EMPTY_SOCKET_RED or 0) + (itemStatsTable.EMPTY_SOCKET_YELLOW or 0) + (itemStatsTable.EMPTY_SOCKET_BLUE or 0)
local noPrefixItemLink = itemLink : gsub("^|c%x%x%x%x%x%x%x%x|Hitem", "")
local linkTable = {strsplit(":", noPrefixItemLink)}
@@ -497,118 +269,50 @@ end
local getSpellListAsHashTableFromSpellBook = function()
local completeListOfSpells = {}
--this line might not be compatible with classic
local specId, specName, _, specIconTexture = GetSpecializationInfo(GetSpecialization())
--local classNameLoc, className, classId = UnitClass("player") --not in use
local locPlayerRace, playerRace, playerRaceId = UnitRace("player")
-- find spells in spellbook
for tab = 2, GetNumSpellTabs() do
local name, _, offset, numSpells = GetSpellTabInfo(tab)
--get racials from the general tab
local tabName, tabTexture, offset, numSpells, isGuild, offspecId = GetSpellTabInfo(CONST_SPELLBOOK_GENERAL_TABID)
offset = offset + 1
local tabEnd = offset + numSpells
for entryOffset = offset, tabEnd - 1 do
local spellType, spellId = GetSpellBookItemInfo(entryOffset, "player")
local spellData = LIB_OPEN_RAID_COOLDOWNS_INFO[spellId]
if (spellData) then
local raceId = spellData.raceid
if (raceId) then
if (type(raceId) == "table") then
if (raceId[playerRaceId]) then
spellId = C_SpellBook.GetOverrideSpell(spellId)
local spellName = GetSpellInfo(spellId)
local bIsPassive = IsPassiveSpell(spellId, "player")
if (spellName and not bIsPassive) then
completeListOfSpells[spellId] = true
end
end
if name and name ~= "Internal" and name ~= "Ascension Vanity Items" then
for i = offset + 1, offset + numSpells do
local spellName, rank = GetSpellInfo(i, BOOKTYPE_SPELL)
elseif (type(raceId) == "number") then
if (raceId == playerRaceId) then
spellId = C_SpellBook.GetOverrideSpell(spellId)
local spellName = GetSpellInfo(spellId)
local bIsPassive = IsPassiveSpell(spellId, "player")
if (spellName and not bIsPassive) then
completeListOfSpells[spellId] = true
end
end
end
end
end
end
--get spells from the Spec spellbook
for i = 1, GetNumSpellTabs() do
local tabName, tabTexture, offset, numSpells, isGuild, offspecId = GetSpellTabInfo(i)
if (tabTexture == specIconTexture) then
offset = offset + 1
local tabEnd = offset + numSpells
for entryOffset = offset, tabEnd - 1 do
local spellType, spellId = GetSpellBookItemInfo(entryOffset, "player")
if (spellId) then
if (spellType == "SPELL") then
spellId = C_SpellBook.GetOverrideSpell(spellId)
local spellName = GetSpellInfo(spellId)
local bIsPassive = IsPassiveSpell(spellId, "player")
if LIB_OPEN_RAID_MULTI_OVERRIDE_SPELLS[spellId] then
for _, overrideSpellId in pairs(LIB_OPEN_RAID_MULTI_OVERRIDE_SPELLS[spellId]) do
completeListOfSpells[overrideSpellId] = true
if spellName then
local link = GetSpellLink(spellName, rank)
if link then
local spellID = tonumber(link:match("spell:(%d*)"))
if spellID and not IsPassiveSpellID(spellID) then
if LIB_OPEN_RAID_MULTI_OVERRIDE_SPELLS and LIB_OPEN_RAID_MULTI_OVERRIDE_SPELLS[spellID] then
for _, overrideSpellID in pairs(LIB_OPEN_RAID_MULTI_OVERRIDE_SPELLS[spellID]) do
completeListOfSpells[overrideSpellID] = true
end
else
completeListOfSpells[spellID] = true
end
elseif (spellName and not bIsPassive) then
completeListOfSpells[spellId] = true
end
end
end
end
end
end
--get class shared spells from the spell book
local tabName, tabTexture, offset, numSpells, isGuild, offspecId = GetSpellTabInfo(CONST_SPELLBOOK_CLASSSPELLS_TABID)
offset = offset + 1
local tabEnd = offset + numSpells
for entryOffset = offset, tabEnd - 1 do
local spellType, spellId = GetSpellBookItemInfo(entryOffset, "player")
if (spellId) then
if (spellType == "SPELL") then
spellId = C_SpellBook.GetOverrideSpell(spellId)
local spellName = GetSpellInfo(spellId)
local bIsPassive = IsPassiveSpell(spellId, "player")
if LIB_OPEN_RAID_MULTI_OVERRIDE_SPELLS[spellId] then
for _, overrideSpellId in pairs(LIB_OPEN_RAID_MULTI_OVERRIDE_SPELLS[spellId]) do
completeListOfSpells[overrideSpellId] = true
end
elseif (spellName and not bIsPassive) then
completeListOfSpells[spellId] = true
else
if (not spellName) then
--print("no spellname")
--print(GetSpellInfo(spellId))
elseif (bIsPassive) then
--print("is passive")
--print(GetSpellInfo(spellId))
end
end
end
end
end
local getNumPetSpells = function()
--'HasPetSpells' contradicts the name and return the amount of pet spells available instead of a boolean
return HasPetSpells()
end
--get pet spells from the pet spellbook
local numPetSpells = getNumPetSpells()
local numPetSpells = HasPetSpells()
if (numPetSpells) then
for i = 1, numPetSpells do
local spellName, _, unmaskedSpellId = GetSpellBookItemName(i, "pet")
if (unmaskedSpellId) then
unmaskedSpellId = C_SpellBook.GetOverrideSpell(unmaskedSpellId)
local bIsPassive = IsPassiveSpell(unmaskedSpellId, "pet")
if (spellName and not bIsPassive) then
completeListOfSpells[unmaskedSpellId] = true
local spellName, rank, unmaskedSpellId = GetSpellInfo(i, "pet")
if spellName then
local link = GetSpellLink(spellName, rank)
if link then
local spellID = tonumber(link:match("spell:(%d*)"))
if spellID and not IsPassiveSpellID(spellID) then
if LIB_OPEN_RAID_MULTI_OVERRIDE_SPELLS and LIB_OPEN_RAID_MULTI_OVERRIDE_SPELLS[spellID] then
for _, overrideSpellID in pairs(LIB_OPEN_RAID_MULTI_OVERRIDE_SPELLS[spellID]) do
completeListOfSpells[overrideSpellID] = true
end
else
completeListOfSpells[spellID] = true
end
end
end
end
end
@@ -653,118 +357,53 @@ end
--build a list with the local player cooldowns
--called only from SendAllPlayerCooldowns()
function openRaidLib.CooldownManager.GetPlayerCooldownList()
--update the list of cooldowns the player has available
if (IsDragonflight()) then
--this fill the global LIB_OPEN_RAID_PLAYERCOOLDOWNS
updateCooldownAvailableList()
--get the player specId
local specId = openRaidLib.GetPlayerSpecId()
if (specId) then
--get the cooldowns for the specializationid
local playerCooldowns = LIB_OPEN_RAID_PLAYERCOOLDOWNS
if (not playerCooldowns) then
openRaidLib.DiagnosticError("CooldownManager|GetPlayerCooldownList|LIB_OPEN_RAID_PLAYERCOOLDOWNS is nil")
return {}, {}
end
local cooldowns = {} --table to ship on comm
local cooldownsHash = {} --table with [spellId] = cooldownInfo
local talentsHash = openRaidLib.UnitInfoManager.GetPlayerTalentsAsPairsTable()
local timeNow = GetTime()
for cooldownSpellId, cooldownInfo in pairs(playerCooldowns) do
--does this cooldown is based on a talent?
local talentId = cooldownInfo.talent
--check if the player has a talent which makes this cooldown unavailable
local ignoredByTalentId = cooldownInfo.ignoredIfTalent
local bIsIgnoredByTalentId = false
if (ignoredByTalentId) then
if (talentsHash[ignoredByTalentId]) then
bIsIgnoredByTalentId = true
end
--this fill the global LIB_OPEN_RAID_PLAYERCOOLDOWNS
updateCooldownAvailableList()
--get the player specId
local specId = openRaidLib.GetPlayerSpecId()
if (specId) then
--get the cooldowns for the specializationid
local playerCooldowns = LIB_OPEN_RAID_PLAYERCOOLDOWNS
if (not playerCooldowns) then
openRaidLib.DiagnosticError("CooldownManager|GetPlayerCooldownList|LIB_OPEN_RAID_PLAYERCOOLDOWNS is nil")
return {}, {}
end
local cooldowns = {} --table to ship on comm
local cooldownsHash = {} --table with [spellId] = cooldownInfo
local talentsHash = openRaidLib.UnitInfoManager.GetPlayerTalentsAsPairsTable()
local timeNow = GetTime()
for cooldownSpellId, cooldownInfo in pairs(playerCooldowns) do
--does this cooldown is based on a talent?
local talentId = cooldownInfo.talent
--check if the player has a talent which makes this cooldown unavailable
local ignoredByTalentId = cooldownInfo.ignoredIfTalent
local bIsIgnoredByTalentId = false
if (ignoredByTalentId) then
if (talentsHash[ignoredByTalentId]) then
bIsIgnoredByTalentId = true
end
if (not bIsIgnoredByTalentId) then
if (talentId) then
--check if the player has the talent selected
if (talentsHash[talentId]) then
if (canAddCooldown(cooldownInfo)) then
addCooldownToTable(cooldowns, cooldownsHash, cooldownSpellId, timeNow)
end
end
else
end
if (not bIsIgnoredByTalentId) then
if (talentId) then
--check if the player has the talent selected
if (talentsHash[talentId]) then
if (canAddCooldown(cooldownInfo)) then
addCooldownToTable(cooldowns, cooldownsHash, cooldownSpellId, timeNow)
end
end
else
if (canAddCooldown(cooldownInfo)) then
addCooldownToTable(cooldowns, cooldownsHash, cooldownSpellId, timeNow)
end
end
end
return cooldowns, cooldownsHash
else
return {}, {}
end
end
return {}, {}
end
--aura frame handles only UNIT_AURA events to grab the duration of the buff placed by the aura
local bIsNewUnitAuraAvailable = C_UnitAuras and C_UnitAuras.GetAuraDataBySlot and true
local auraSpellID
local auraDurationTime
local auraUnitId
local handleBuffAura = function(aura)
local auraInfo = C_UnitAuras.GetAuraDataByAuraInstanceID(auraUnitId, aura.auraInstanceID)
if (auraInfo) then
local spellId = auraInfo.spellId
if (auraSpellID == spellId) then
auraSpellID = nil
auraDurationTime = auraInfo.duration
return true
end
end
end
local getAuraDuration = function(spellId, unitId)
--some auras does not have the same spellId of the cast as the spell for its aura duration
--in these cases, it's necessary to declare the buff spellId which tells the duration of the effect by adding 'durationSpellId = spellId' within the cooldown data
if (not LIB_OPEN_RAID_PLAYERCOOLDOWNS[spellId]) then
--local spellname = GetSpellInfo(spellId)
--print("spell not found:", spellname)
return 0
end
local customBuffDuration = LIB_OPEN_RAID_PLAYERCOOLDOWNS[spellId].durationSpellId
--spellId = customBuffDuration or spellId --can't replace the spellId by customBuffDurationSpellId has it wount be found in LIB_OPEN_RAID_PLAYERCOOLDOWNS
if (bIsNewUnitAuraAvailable) then
local bUsePackedAura = true
auraSpellID = customBuffDuration or spellId
auraDurationTime = 0 --reset duration
auraUnitId = unitId or "player"
AuraUtil.ForEachAura(auraUnitId, "HELPFUL", nil, handleBuffAura, bUsePackedAura) --check auras to find a buff for the spellId
if (auraDurationTime == 0) then --if the buff wasn't found, attempt to get the duration from the file
return LIB_OPEN_RAID_PLAYERCOOLDOWNS[spellId].duration or 0
end
return auraDurationTime
return cooldowns, cooldownsHash
else
--this is classic
return {}, {}
end
end
---get the duration of a buff placed by a spell
---@param spellId number
---@param unitId string?
---@return number duration
function openRaidLib.CooldownManager.GetSpellBuffDuration(spellId, unitId)
return getAuraDuration(spellId, unitId)
end
---check if a player cooldown is ready or if is in cooldown
---@spellId: the spellId to check for cooldown
---@return number timeLeft
@@ -776,7 +415,6 @@ function openRaidLib.CooldownManager.GetPlayerCooldownStatus(spellId)
--check if is a charge spell
local spellData = LIB_OPEN_RAID_COOLDOWNS_INFO[spellId]
if (spellData) then
local buffDuration = getAuraDuration(spellId)
local chargesAvailable, chargesTotal, start, duration = GetSpellCharges(spellId)
if chargesAvailable then
if (chargesAvailable == chargesTotal) then
@@ -785,7 +423,7 @@ function openRaidLib.CooldownManager.GetPlayerCooldownStatus(spellId)
--return the time to the next charge
local timeLeft = start + duration - GetTime()
local startTimeOffset = start - GetTime()
return ceil(timeLeft), chargesAvailable, startTimeOffset, duration, buffDuration
return ceil(timeLeft), chargesAvailable, startTimeOffset, duration
end
else
local start, duration = GetSpellCooldown(spellId)
@@ -794,7 +432,7 @@ function openRaidLib.CooldownManager.GetPlayerCooldownStatus(spellId)
else
local timeLeft = start + duration - GetTime()
local startTimeOffset = start - GetTime()
return ceil(timeLeft), 0, ceil(startTimeOffset), duration, buffDuration --time left, charges, startTime, duration, buffDuration
return ceil(timeLeft), 0, ceil(startTimeOffset), duration --time left, charges, startTime, duration
end
end
else
@@ -802,68 +440,10 @@ function openRaidLib.CooldownManager.GetPlayerCooldownStatus(spellId)
end
end
do
--make new namespace
openRaidLib.AuraTracker = {}
do if (false) then --do not load this section as it isn't in use
function openRaidLib.AuraTracker.ScanCallback(auraInfo)
if (auraInfo) then
local spellId = auraInfo.spellId
if (spellId) then
local unitId = openRaidLib.AuraTracker.CurrentUnitId
local thisUnitAuras = openRaidLib.AuraTracker.CurrentAuras[unitId]
thisUnitAuras[spellId] = true
openRaidLib.AuraTracker.AurasFoundOnScan[spellId] = true
end
end
end
function openRaidLib.AuraTracker.ScanUnitAuras(unitId)
local maxCount = nil
local bUsePackedAura = true
openRaidLib.AuraTracker.CurrentUnitId = unitId
openRaidLib.AuraTracker.AurasFoundOnScan = {}
--code of 'ForEachAura' has been updated to use the latest API available
AuraUtil.ForEachAura(unitId, "HELPFUL", maxCount, openRaidLib.AuraTracker.ScanCallback, bUsePackedAura)
local thisUnitAuras = openRaidLib.AuraTracker.CurrentAuras[unitId]
for spellId in pairs(thisUnitAuras) do
if (not openRaidLib.AuraTracker.AurasFoundOnScan[spellId]) then
--aura removed
openRaidLib.internalCallback.TriggerEvent("unitAuraRemoved", unitId, spellId)
end
end
end
--run when the open raid lib loads
function openRaidLib.AuraTracker.StartScanUnitAuras(unitId) --this function isn't getting called (was called from Entering World event)
openRaidLib.AuraTracker.CurrentAuras = {
[unitId] = {} --storing using the unitId as key, won't work for any other unit other than the "player"
}
local auraFrameEvent = CreateFrame("frame")
auraFrameEvent:RegisterUnitEvent("UNIT_AURA", unitId)
auraFrameEvent:SetScript("OnEvent", function()
openRaidLib.AuraTracker.ScanUnitAuras(unitId)
end)
end
end end
--test case:
local debugModule = {}
function debugModule.AuraRemoved(event, unitId, spellId)
local spellName = GetSpellInfo(spellId)
--print("aura removed:", unitId, spellId, spellName)
end
openRaidLib.internalCallback.RegisterCallback("unitAuraRemoved", debugModule.AuraRemoved)
end
do
local getUnitName = function(unitId)
local unitName, realmName = UnitName(unitId)
if (unitName) then
@@ -874,7 +454,7 @@ do
end
end
local predicateFunc = function(spellIdToFind, casterName, _, name, icon, applications, dispelName, duration, expirationTime, sourceUnitId, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, applications)
local predicateFunc = function(spellIdToFind, casterName, _, name, rank, icon, applications, dispelName, duration, expirationTime, sourceUnitId, isStealable, spellId)
if (spellIdToFind == spellId and UnitExists(sourceUnitId)) then
if (casterName == getUnitName(sourceUnitId)) then
return true
@@ -889,7 +469,7 @@ do
---@return auraduration|nil auraDuration
---@return number|nil expirationTime
function openRaidLib.AuraTracker.FindBuffDuration(unitId, casterName, spellId)
local name, texture, count, buffType, duration, expirationTime = AuraUtil.FindAura(predicateFunc, unitId, "HELPFUL", spellId, casterName)
local name, rank, icon, count, buffType, duration, expirationTime = AuraUtil.FindAura(predicateFunc, unitId, "HELPFUL", spellId, casterName)
if (name) then
return duration, expirationTime
end
@@ -906,76 +486,12 @@ do
end
end
--which is the main attribute of each spec
--1 Intellect
--2 Agility
--3 Strenth
openRaidLib.specAttribute = {
["DEMONHUNTER"] = {
[577] = 2,
[581] = 2,
},
["DEATHKNIGHT"] = {
[250] = 3,
[251] = 3,
[252] = 3,
},
["WARRIOR"] = {
[71] = 3,
[72] = 3,
[73] = 3,
},
["MAGE"] = {
[62] = 1,
[63] = 1,
[64] = 1,
},
["ROGUE"] = {
[259] = 2,
[260] = 2,
[261] = 2,
},
["DRUID"] = {
[102] = 1,
[103] = 2,
[104] = 2,
[105] = 1,
},
["HUNTER"] = {
[253] = 2,
[254] = 2,
[255] = 2,
},
["SHAMAN"] = {
[262] = 1,
[263] = 2,
[264] = 1,
},
["PRIEST"] = {
[256] = 1,
[257] = 1,
[258] = 1,
},
["WARLOCK"] = {
[265] = 1,
[266] = 1,
[267] =1 ,
},
["PALADIN"] = {
[65] = 1,
[66] = 3,
[70] = 3,
},
["MONK"] = {
[268] = 2,
[269] = 2,
[270] = 1,
},
["EVOKER"] = {
[1467] = 1, --Devastation
[1468] = 1, --Preservation
[1473] = 1, --Augmentation
},
}
openRaidLib.specAttribute = {}
for _, class in ipairs(CLASS_SORT_ORDER) do
local specs = C_ClassInfo.GetAllSpecs(class)
openRaidLib.specAttribute[class] = {}
for index, spec in ipairs(specs) do
local specInfo = C_ClassInfo.GetSpecInfo(class, spec)
openRaidLib.specAttribute[class][specInfo.ID] = Enum.PrimaryStat[specInfo.PrimaryStats[1] or "Strength"]
end
end
+1 -1
View File
@@ -1,4 +1,4 @@
GNU LESSER GENERAL PUBLIC LICENSE
 GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+82 -206
View File
@@ -1,4 +1,4 @@

--[=[
Please refer to the docs.txt within this file folder for a guide on how to use this library.
@@ -116,9 +116,6 @@ end
local CONST_TWO_SECONDS = 2.0
local CONST_THREE_SECONDS = 3.0
local CONST_SPECIALIZATION_VERSION_CLASSIC = 0
local CONST_SPECIALIZATION_VERSION_MODERN = 1
local CONST_COOLDOWN_CHECK_INTERVAL = CONST_THREE_SECONDS
local CONST_COOLDOWN_TIMELEFT_HAS_CHANGED = CONST_THREE_SECONDS
@@ -136,19 +133,9 @@ end
-- Real throttle is 10 messages per 1 second, but we want to be safe due to fact we dont know when it actually resets
local CONST_COMM_BURST_BUFFER_COUNT = 9
local GetContainerNumSlots = GetContainerNumSlots or C_Container.GetContainerNumSlots
local GetContainerItemID = GetContainerItemID or C_Container.GetContainerItemID
local GetContainerItemLink = GetContainerItemLink or C_Container.GetContainerItemLink
--from vanilla to cataclysm, the specID did not existed, hence its considered version 0
--for mists of pandaria and beyond it's version 1
local getSpecializationVersion = function()
if (gameVersion >= 50000) then
return CONST_SPECIALIZATION_VERSION_MODERN
else
return CONST_SPECIALIZATION_VERSION_CLASSIC
end
end
local GetContainerNumSlots = GetContainerNumSlots
local GetContainerItemID = GetContainerItemID
local GetContainerItemLink = GetContainerItemLink
function openRaidLib.ShowDiagnosticErrors(value)
CONST_DIAGNOSTIC_ERRORS = value
@@ -197,36 +184,13 @@ end
sendChatMessage("|cFFFF9922OpenRaidLib|r:", "|cFFFF5555" .. msg .. "|r")
end
local isTimewalkWoW = function()
local _, _, _, buildInfo = GetBuildInfo()
if (buildInfo < 40000) then
return true
end
end
local checkClientVersion = function(...)
for i = 1, select("#", ...) do
local clientVersion = select(i, ...)
if (clientVersion == "retail" and (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE or isExpansion_Dragonflight())) then --retail
return true
elseif (clientVersion == "classic_era" and WOW_PROJECT_ID == WOW_PROJECT_CLASSIC) then --classic era (vanila)
return true
elseif (clientVersion == "bcc" and WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC) then --the burning crusade classic
return true
end
end
end
--------------------------------------------------------------------------------------------------------------------------------
--~internal cache
--use a console variable to create a flash cache to keep data while the game reload
--this is not a long term database as saved variables are and it get clean up often
C_CVar.RegisterCVar(CONST_CVAR_TEMPCACHE)
C_CVar.RegisterCVar(CONST_CVAR_TEMPCACHE_DEBUG)
RegisterCVar(CONST_CVAR_TEMPCACHE)
RegisterCVar(CONST_CVAR_TEMPCACHE_DEBUG)
--internal namespace
local tempCache = {
@@ -247,13 +211,13 @@ end
--use debug cvar to find issues that occurred during the logoff process
function openRaidLib.PrintTempCacheDebug()
local debugMessage = C_CVar.GetCVar(CONST_CVAR_TEMPCACHE_DEBUG)
local debugMessage = C_CVar.Get(CONST_CVAR_TEMPCACHE_DEBUG)
sendChatMessage("|cFFFF9922OpenRaidLib|r Temp CVar Result:\n", debugMessage)
end
function tempCache.SaveDebugText()
C_CVar.SetCVar(CONST_CVAR_TEMPCACHE_DEBUG, "0")
--C_CVar.SetCVar(CONST_CVAR_TEMPCACHE_DEBUG, tempCache.debugString)
C_CVar.Set(CONST_CVAR_TEMPCACHE_DEBUG, "0")
--C_CVar.Set(CONST_CVAR_TEMPCACHE_DEBUG, tempCache.debugString)
end
function tempCache.AddDebugText(text)
@@ -261,13 +225,13 @@ function tempCache.AddDebugText(text)
end
function tempCache.SaveCacheOnCVar(data)
C_CVar.SetCVar(CONST_CVAR_TEMPCACHE, "0")
--C_CVar.SetCVar(CONST_CVAR_TEMPCACHE, data)
C_CVar.Set(CONST_CVAR_TEMPCACHE, "0")
--C_CVar.Set(CONST_CVAR_TEMPCACHE, data)
tempCache.AddDebugText("CVars Saved on saveCahceOnCVar(), Size: " .. #data)
end
function tempCache.RestoreData()
local data = C_CVar.GetCVar(CONST_CVAR_TEMPCACHE)
local data = C_CVar.Get(CONST_CVAR_TEMPCACHE)
if (data and type(data) == "string" and string.len(data) > 2) then
local LibAceSerializer = LibStub:GetLibrary("AceSerializer-3.0", true)
if (LibAceSerializer) then
@@ -389,7 +353,7 @@ end
local data = text
local LibDeflate = LibStub:GetLibrary("LibDeflate")
local dataCompressed = LibDeflate:DecodeForWoWAddonChannel(data)
local dataCompressed = LibDeflate:DecodeForPrint(data)
data = LibDeflate:DecompressDeflate(dataCompressed)
--some users are reporting errors where 'data is nil'. Making some sanitization
@@ -443,7 +407,6 @@ end
end
end
C_ChatInfo.RegisterAddonMessagePrefix(CONST_COMM_PREFIX)
openRaidLib.commHandler.eventFrame = CreateFrame("frame")
openRaidLib.commHandler.eventFrame:RegisterEvent("CHAT_MSG_ADDON")
openRaidLib.commHandler.eventFrame:SetScript("OnEvent", openRaidLib.commHandler.OnReceiveComm)
@@ -480,7 +443,7 @@ end
if (aceComm) then
aceComm:SendCommMessage(CONST_COMM_PREFIX, dataEncoded, channel, nil, "ALERT")
else
C_ChatInfo.SendAddonMessage(CONST_COMM_PREFIX, dataEncoded, channel)
SendAddonMessage(CONST_COMM_PREFIX, dataEncoded, channel)
end
end
@@ -523,20 +486,20 @@ end
function openRaidLib.commHandler.SendCommData(data, flags, bIgnoreQueue)
local LibDeflate = LibStub:GetLibrary("LibDeflate")
local dataCompressed = LibDeflate:CompressDeflate(data, {level = 9})
local dataEncoded = LibDeflate:EncodeForWoWAddonChannel(dataCompressed)
local dataEncoded = LibDeflate:EncodeForPrint(dataCompressed)
if (flags) then
if (bit.band(flags, CONST_COMM_SENDTO_PARTY)) then --send to party
if (IsInGroup() and not IsInRaid()) then
---@type commdata
local commData = {data = dataEncoded, channel = IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or "PARTY"}
local commData = {data = dataEncoded, channel = "PARTY"}
table.insert(commScheduler, commData)
end
end
if (bit.band(flags, CONST_COMM_SENDTO_RAID)) then --send to raid
if (IsInRaid()) then
local commData = {data = dataEncoded, channel = IsInRaid(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or "RAID"}
local commData = {data = dataEncoded, channel = "RAID"}
table.insert(commScheduler, commData)
end
end
@@ -549,11 +512,11 @@ end
end
else
if (IsInGroup() and not IsInRaid()) then --in party only
local commData = {data = dataEncoded, channel = IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or "PARTY"}
local commData = {data = dataEncoded, channel = "PARTY"}
table.insert(commScheduler, commData)
elseif (IsInRaid()) then
local commData = {data = dataEncoded, channel = IsInRaid(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or "RAID"}
local commData = {data = dataEncoded, channel = "RAID"}
table.insert(commScheduler, commData)
end
end
@@ -883,12 +846,14 @@ end
["UNIT_SPELLCAST_SUCCEEDED"] = function(...)
local unitId, castGUID, spellId = ...
C_Timer.After(0.1, function()
--some spells has many different spellIds, get the default
spellId = LIB_OPEN_RAID_SPELL_DEFAULT_IDS[spellId] or spellId
--trigger internal callbacks
openRaidLib.internalCallback.TriggerEvent("playerCast", spellId, UnitIsUnit(unitId, "pet"))
end)
if unitId == "pet" or unitId == "player" then
C_Timer.After(0.1, function()
--some spells has many different spellIds, get the default
spellId = LIB_OPEN_RAID_SPELL_DEFAULT_IDS[spellId] or spellId
--trigger internal callbacks
openRaidLib.internalCallback.TriggerEvent("playerCast", spellId, UnitIsUnit(unitId, "pet"))
end)
end
end,
["PLAYER_ENTERING_WORLD"] = function(...)
@@ -942,16 +907,7 @@ end
openRaidLib.internalCallback.TriggerEvent("onEnterWorld")
end,
["PLAYER_SPECIALIZATION_CHANGED"] = function(...)
delayedTalentChange()
end,
["PLAYER_TALENT_UPDATE"] = function(...)
delayedTalentChange()
end,
["TRAIT_CONFIG_UPDATED"] = function(...)
delayedTalentChange()
end,
["TRAIT_TREE_CURRENCY_INFO_UPDATED"] = function(...)
["ASCENSION_KNOWN_ENTRIES_UPDATED"] = function(...)
delayedTalentChange()
end,
@@ -998,7 +954,7 @@ end
end
end,
["CHALLENGE_MODE_START"] = function()
["MYTHIC_PLUS_STARTED"] = function()
openRaidLib.internalCallback.TriggerEvent("mythicDungeonStart")
end,
@@ -1020,7 +976,7 @@ end
end
end,
["CHALLENGE_MODE_COMPLETED"] = function()
["MYTHIC_PLUS_COMPLETE"] = function()
openRaidLib.internalCallback.TriggerEvent("mythicDungeonEnd")
end,
@@ -1039,8 +995,9 @@ end
--run when PLAYER_ENTERING_WORLD triggers, this avoid any attempt of getting information without the game has completed the load process
function openRaidLib.OnEnterWorldRegisterEvents()
eventFrame:RegisterEvent("GROUP_ROSTER_UPDATE")
eventFrame:RegisterUnitEvent("UNIT_SPELLCAST_SUCCEEDED", "player", "pet")
eventFrame:RegisterEvent("RAID_ROSTER_UPDATE")
eventFrame:RegisterEvent("PARTY_MEMBERS_CHANGED")
eventFrame:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
eventFrame:RegisterEvent("PLAYER_REGEN_DISABLED")
eventFrame:RegisterEvent("PLAYER_REGEN_ENABLED")
eventFrame:RegisterEvent("UPDATE_INVENTORY_DURABILITY")
@@ -1050,17 +1007,9 @@ end
eventFrame:RegisterEvent("PLAYER_ALIVE")
eventFrame:RegisterEvent("PLAYER_UNGHOST")
eventFrame:RegisterEvent("PLAYER_LOGOUT")
if (checkClientVersion("retail")) then
eventFrame:RegisterEvent("PLAYER_TALENT_UPDATE")
eventFrame:RegisterEvent("PLAYER_PVP_TALENT_UPDATE")
eventFrame:RegisterEvent("ENCOUNTER_END")
eventFrame:RegisterEvent("CHALLENGE_MODE_START")
eventFrame:RegisterEvent("CHALLENGE_MODE_COMPLETED")
eventFrame:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
eventFrame:RegisterEvent("TRAIT_TREE_CURRENCY_INFO_UPDATED")
eventFrame:RegisterEvent("TRAIT_CONFIG_UPDATED")
end
eventFrame:RegisterEvent("MYTHIC_PLUS_STARTED")
eventFrame:RegisterEvent("MYTHIC_PLUS_COMPLETE")
eventFrame:RegisterEvent("ASCENSION_KNOWN_ENTRIES_UPDATED")
end
@@ -1308,11 +1257,6 @@ end
end
function openRaidLib.UnitInfoManager.SetUnitInfo(unitName, unitInfo, specId, renown, covenantId, talentsTableUnpacked, conduitsTableUnpacked, pvpTalentsTableUnpacked)
if (not GetSpecializationInfoByID) then --tbc hot fix
return
end
local specId, specName, specDescription, specIcon, role = GetSpecializationInfoByID(specId or 0)
local className, classString, classId = UnitClass(unitName)
--cold login bug where the player class info cannot be retrived by the player name, after a /reload it's all good
@@ -1323,6 +1267,35 @@ end
end
end
local specId, specName, specDescription, specIcon, role
if classString == "HERO" then
local spellID, _, icon, _, statName = C_PrimaryStat:GetPrimaryStatInfo(specId) or 0
if spellID == 0 then
specName = className
specDescription = ""
specIcon = "Interface\\Icons\\classicon_hero"
else
specName = statName
specDescription = GetSpellDescription(statName)
specIcon = icon
end
role = "DAMAGER"
else
local specInfo = C_ClassInfo.GetSpecInfoByID(specId or 0)
if specInfo then
specName = specInfo.Name
specDescription = specInfo.Description
specIcon = "Interface\\Icons\\"..specInfo.SpecFilename
if specInfo.Healer then
role = "HEALER"
elseif specInfo.Tank then
role = "TANK"
else
role = "DAMAGER"
end
end
end
unitInfo.specId = specId or unitInfo.specId
unitInfo.specName = specName or unitInfo.specName
unitInfo.role = role or "DAMAGER"
@@ -1414,42 +1387,11 @@ end
--index 5: talents 2: borrowed power talents: length vary from expansions
--index 6: talents 3: pvp talents
function openRaidLib.UnitInfoManager.GetPlayerFullInfo()
local playerInfo = {}
local specId = GetSpecialization() or 1
if (isTimewalkWoW()) then
--indexes: specId, renown, covenant, talent, conduits, pvp talents
--return a placeholder table
return {0, 0, 0, {0, 0, 0, 0, 0, 0, 0}, {0, 0}, 0}
end
local specId = 0
if (getSpecializationVersion() == CONST_SPECIALIZATION_VERSION_MODERN) then
local selectedSpecialization = GetSpecialization()
if (selectedSpecialization) then
specId = GetSpecializationInfo(selectedSpecialization) or 0
end
end
playerInfo[1] = specId
--player information 1 (this can be different for each expansion)
playerInfo[2] = openRaidLib.UnitInfoManager.GetPlayerInfo1()
--player information 2 (this can be different for each expansion)
playerInfo[3] = openRaidLib.UnitInfoManager.GetPlayerInfo2()
--player class-spec talents
local talents = openRaidLib.UnitInfoManager.GetPlayerTalents()
playerInfo[4] = talents
--borrowed talents (conduits talents on shadowlands)
local borrowedTalents = openRaidLib.UnitInfoManager.GetPlayerBorrowedTalents()
playerInfo[5] = borrowedTalents
--pvp talents
local pvpTalents = openRaidLib.UnitInfoManager.GetPlayerPvPTalents()
playerInfo[6] = pvpTalents
return playerInfo
--indexes: specId, renown, covenant, talent, conduits, pvp talents
--return a placeholder table
return {specId, 0, 0, {0, 0, 0, 0, 0, 0, 0}, {0, 0}, 0}
end
--talent update (when the player changes a talent and the lib needs to notify other players in the group)
@@ -1471,14 +1413,7 @@ function openRaidLib.UnitInfoManager.OnPlayerTalentChanged()
--this talent update could be a specialization change, so we need to pass the specId as well
local playerName = UnitName("player")
local unitInfo = openRaidLib.UnitInfoManager.GetUnitInfo(playerName, true)
local specId = 0
if (getSpecializationVersion() == CONST_SPECIALIZATION_VERSION_MODERN) then
local selectedSpecialization = GetSpecialization()
if (selectedSpecialization) then
specId = GetSpecializationInfo(selectedSpecialization) or 0
end
end
local specId = GetSpecialization() or 1
openRaidLib.UnitInfoManager.SetUnitInfo(playerName, unitInfo, specId, nil, nil, openRaidLib.UnitInfoManager.GetPlayerTalents())
@@ -1673,13 +1608,9 @@ openRaidLib.internalCallback.RegisterCallback("onLeaveCombat", openRaidLib.UnitI
--get gear information from what the player has equipped at the moment
function openRaidLib.GearManager.GetPlayerFullGearInfo()
--get the player class and specId
local _, playerClass = UnitClass("player")
--get the player specId
local specId = openRaidLib.GetPlayerSpecId()
--get which attribute the spec uses
local specMainAttribute = openRaidLib.specAttribute[playerClass][specId] --1 int, 2 dex, 3 str
if (not specId or not specMainAttribute) then
if (not specId) then
return {0, 0, 0, {}, {}, {}, 0, 0}
end
@@ -2496,14 +2427,6 @@ function openRaidLib.CooldownManager.OnReceiveUnitCooldowns(data, unitName)
--unpack the table as a pairs table
local unpackedTable = openRaidLib.UnpackTable(data, 1, true, true, CONST_COOLDOWN_INFO_SIZE)
--[=[ --debug for data received from Evokers
local _, class = UnitClass(unitName)
if (class == "EVOKER") then
print(unitName)
dumpt(unpackedTable)
end
--]=]
--add the list of cooldowns
openRaidLib.CooldownManager.AddUnitCooldownsList(unitName, unpackedTable)
end
@@ -2615,40 +2538,20 @@ openRaidLib.commHandler.RegisterComm(CONST_COMM_COOLDOWNREQUEST_PREFIX, openRaid
local keystoneTablePrototype = {
level = 0,
mapID = 0,
challengeMapID = 0,
classID = 0,
rating = 0,
mythicPlusMapID = 0,
}
--search the player backpack to find a mythic keystone
--with the keystone object, it'll attempt to get the mythicPlusMapID to be used with C_ChallengeMode.GetMapUIInfo(mythicPlusMapID)
--ATM we are obligated to do this due to C_MythicPlus.GetOwnedKeystoneMapID() return the same mapID for the two Tazavesh dungeons
local getMythicPlusMapID = function()
for backpackId = 0, 4 do
for slotId = 1, GetContainerNumSlots(backpackId) do
local itemId = GetContainerItemID(backpackId, slotId)
if (itemId == LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID) then
local itemLink = GetContainerItemLink(backpackId, slotId)
local destroyedItemLink = itemLink:gsub("|", "")
local color, itemID, mythicPlusMapID = strsplit(":", destroyedItemLink)
return tonumber(mythicPlusMapID)
end
end
end
end
function openRaidLib.KeystoneInfoManager.UpdatePlayerKeystoneInfo(keystoneInfo)
keystoneInfo.level = C_MythicPlus.GetOwnedKeystoneLevel() or 0
keystoneInfo.mapID = C_MythicPlus.GetOwnedKeystoneMapID() or 0
keystoneInfo.mythicPlusMapID = getMythicPlusMapID() or 0
keystoneInfo.challengeMapID = C_MythicPlus.GetOwnedKeystoneChallengeMapID() or 0
local keystoneID = C_Keystones.GetKeystoneInInventoryItemID()
local keyInfo
if keystoneID then
keyInfo = C_MythicPlus.GetKeystoneInfo(keystoneID)
end
keystoneInfo.level = keyInfo and keyInfo.keystoneLevel or 0
keystoneInfo.mapID = keyInfo and keyInfo.dungeonID or 0
local _, _, playerClassID = UnitClass("player")
keystoneInfo.classID = playerClassID
local ratingSummary = C_PlayerInfo.GetPlayerMythicPlusRatingSummary("player")
keystoneInfo.rating = ratingSummary and ratingSummary.currentSeasonScore or 0
end
function openRaidLib.KeystoneInfoManager.GetAllKeystonesInfo()
@@ -2671,7 +2574,7 @@ openRaidLib.commHandler.RegisterComm(CONST_COMM_COOLDOWNREQUEST_PREFIX, openRaid
local keystoneInfo = openRaidLib.KeystoneInfoManager.GetKeystoneInfo(playerName, true)
openRaidLib.KeystoneInfoManager.UpdatePlayerKeystoneInfo(keystoneInfo)
local dataToSend = CONST_COMM_KEYSTONE_DATA_PREFIX .. "," .. keystoneInfo.level .. "," .. keystoneInfo.mapID .. "," .. keystoneInfo.challengeMapID .. "," .. keystoneInfo.classID .. "," .. keystoneInfo.rating .. "," .. keystoneInfo.mythicPlusMapID
local dataToSend = CONST_COMM_KEYSTONE_DATA_PREFIX .. "," .. keystoneInfo.level .. "," .. keystoneInfo.mapID .. "," .. keystoneInfo.classID
return dataToSend
end
@@ -2691,10 +2594,6 @@ openRaidLib.commHandler.RegisterComm(CONST_COMM_COOLDOWNREQUEST_PREFIX, openRaid
--when a request data is received, only send the data to party and guild
--sending stuff to raid need to be called my the application with 'openRaidLib.RequestKeystoneDataFromRaid()'
function openRaidLib.KeystoneInfoManager.OnReceiveRequestData()
if (not checkClientVersion("retail")) then
return
end
--update the information about the key stone the player has
local keystoneInfo = openRaidLib.KeystoneInfoManager.GetKeystoneInfo(UnitName("player"), true)
openRaidLib.KeystoneInfoManager.UpdatePlayerKeystoneInfo(keystoneInfo)
@@ -2717,25 +2616,15 @@ openRaidLib.commHandler.RegisterComm(CONST_COMM_COOLDOWNREQUEST_PREFIX, openRaid
openRaidLib.commHandler.RegisterComm(CONST_COMM_KEYSTONE_DATAREQUEST_PREFIX, openRaidLib.KeystoneInfoManager.OnReceiveRequestData)
function openRaidLib.KeystoneInfoManager.OnReceiveKeystoneData(data, unitName)
if (not checkClientVersion("retail")) then
return
end
local level = tonumber(data[1])
local mapID = tonumber(data[2])
local challengeMapID = tonumber(data[3])
local classID = tonumber(data[4])
local rating = tonumber(data[5])
local mythicPlusMapID = tonumber(data[6])
local classID = tonumber(data[3])
if (level and mapID and challengeMapID and classID and rating and mythicPlusMapID) then
if (level and mapID and classID) then
local keystoneInfo = openRaidLib.KeystoneInfoManager.GetKeystoneInfo(unitName, true)
keystoneInfo.level = level
keystoneInfo.mapID = mapID
keystoneInfo.mythicPlusMapID = mythicPlusMapID
keystoneInfo.challengeMapID = challengeMapID
keystoneInfo.classID = classID
keystoneInfo.rating = rating
--trigger public callback
openRaidLib.publicCallback.TriggerCallback("KeystoneUpdate", unitName, keystoneInfo, openRaidLib.KeystoneInfoManager.KeystoneData)
@@ -2745,11 +2634,6 @@ openRaidLib.commHandler.RegisterComm(CONST_COMM_COOLDOWNREQUEST_PREFIX, openRaid
--on entering a group, send keystone information for the party
function openRaidLib.KeystoneInfoManager.OnPlayerEnterGroup()
--keystones are only available on retail
if (not checkClientVersion("retail")) then
return
end
if (IsInGroup() and not IsInRaid()) then
--update the information about the key stone the player has
local keystoneInfo = openRaidLib.KeystoneInfoManager.GetKeystoneInfo(UnitName("player"), true)
@@ -2761,10 +2645,6 @@ openRaidLib.commHandler.RegisterComm(CONST_COMM_COOLDOWNREQUEST_PREFIX, openRaid
end
function openRaidLib.KeystoneInfoManager.OnPlayerEnterWorld()
--keystones are only available on retail
if (not checkClientVersion("retail")) then
return
end
--hack: on received data send data to party and guild
openRaidLib.KeystoneInfoManager.OnReceiveRequestData()
@@ -2777,10 +2657,6 @@ openRaidLib.commHandler.RegisterComm(CONST_COMM_COOLDOWNREQUEST_PREFIX, openRaid
end
function openRaidLib.KeystoneInfoManager.OnMythicDungeonFinished()
--keystones are only available on retail
if (not checkClientVersion("retail")) then
return
end
--hack: on received data send data to party and guild
openRaidLib.KeystoneInfoManager.OnReceiveRequestData()
-5
View File
@@ -1,5 +0,0 @@
## Interface: 90205
## Title: Library Open Raid
## Notes: This is a library used by addons.
lib.xml
+1 -1
View File
@@ -1,2 +1,2 @@
# Open-Raid-Library
# Open-Raid-Library
Library for World of Warcraft game, help to transmit data among players in a group
@@ -0,0 +1,499 @@

--data for Ascension.gg
--localization
local gameLanguage = GetLocale()
local L = { --default localization
["STRING_EXPLOSION"] = "explosion",
["STRING_MIRROR_IMAGE"] = "Mirror Image",
["STRING_CRITICAL_ONLY"] = "critical",
["STRING_BLOOM"] = "Bloom", --lifebloom 'bloom' healing
["STRING_GLAIVE"] = "Glaive", --DH glaive toss
["STRING_MAINTARGET"] = "Main Target",
["STRING_AOE"] = "AoE", --multi targets
["STRING_SHADOW"] = "Shadow", --the spell school 'shadow'
["STRING_PHYSICAL"] = "Physical", --the spell school 'physical'
["STRING_PASSIVE"] = "Passive", --passive spell
["STRING_TEMPLAR_VINDCATION"] = "Templar's Vindication", --paladin spell
["STRING_PROC"] = "proc", --spell proc
["STRING_TRINKET"] = "Trinket", --trinket
}
if (gameLanguage == "enUS") then
--default language
elseif (gameLanguage == "deDE") then
L["STRING_EXPLOSION"] = "Explosion"
L["STRING_MIRROR_IMAGE"] = "Bilder spiegeln"
L["STRING_CRITICAL_ONLY"] = "kritisch"
elseif (gameLanguage == "esES") then
L["STRING_EXPLOSION"] = "explosión"
L["STRING_MIRROR_IMAGE"] = "Imagen de espejo"
L["STRING_CRITICAL_ONLY"] = "crítico"
elseif (gameLanguage == "esMX") then
L["STRING_EXPLOSION"] = "explosión"
L["STRING_MIRROR_IMAGE"] = "Imagen de espejo"
L["STRING_CRITICAL_ONLY"] = "crítico"
elseif (gameLanguage == "frFR") then
L["STRING_EXPLOSION"] = "explosion"
L["STRING_MIRROR_IMAGE"] = "Effet miroir"
L["STRING_CRITICAL_ONLY"] = "critique"
elseif (gameLanguage == "itIT") then
L["STRING_EXPLOSION"] = "esplosione"
L["STRING_MIRROR_IMAGE"] = "Immagine Speculare"
L["STRING_CRITICAL_ONLY"] = "critico"
elseif (gameLanguage == "koKR") then
L["STRING_EXPLOSION"] = "폭발"
L["STRING_MIRROR_IMAGE"] = "미러 이미지"
L["STRING_CRITICAL_ONLY"] = "치명타"
elseif (gameLanguage == "ptBR") then
L["STRING_EXPLOSION"] = "explosão"
L["STRING_MIRROR_IMAGE"] = "Imagem Espelhada"
L["STRING_CRITICAL_ONLY"] = "critico"
elseif (gameLanguage == "ruRU") then
L["STRING_EXPLOSION"] = "взрыв"
L["STRING_MIRROR_IMAGE"] = "Зеркальное изображение"
L["STRING_CRITICAL_ONLY"] = "критический"
elseif (gameLanguage == "zhCN") then
L["STRING_EXPLOSION"] = "爆炸"
L["STRING_MIRROR_IMAGE"] = "镜像"
L["STRING_CRITICAL_ONLY"] = "爆击"
elseif (gameLanguage == "zhTW") then
L["STRING_EXPLOSION"] = "爆炸"
L["STRING_MIRROR_IMAGE"] = "鏡像"
L["STRING_CRITICAL_ONLY"] = "致命"
end
LIB_OPEN_RAID_MANA_POTIONS = {}
LIB_OPEN_RAID_FOOD_BUFF = {} --default
LIB_OPEN_RAID_FLASK_BUFF = {} --default
LIB_OPEN_RAID_BLOODLUST = {
[2825] = true, --bloodlust
[32182] = true, --heroism
[80353] = true, --timewarp
}
--which gear slots can be enchanted on the latest retail version of the game
--when the value is a number, the slot only receives enchants for a specific attribute (Enum.PrimaryStat)
LIB_OPEN_RAID_ENCHANT_SLOTS = {
--[INVSLOT_NECK] = true,
[INVSLOT_BACK] = true, --for all
[INVSLOT_CHEST] = true, --for all
[INVSLOT_FINGER1] = true, --for all
[INVSLOT_FINGER2] = true, --for all
[INVSLOT_MAINHAND] = true, --for all
[INVSLOT_OFFHAND] = true, --for all
[INVSLOT_RANGED] = true, --for all
[INVSLOT_FEET] = true, --for all
[INVSLOT_WRIST] = true, --for all
[INVSLOT_HAND] = true, --for all
}
LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 180653
LIB_OPEN_RAID_AUGMENTATED_RUNE = 0
LIB_OPEN_RAID_COVENANT_ICONS = {}
LIB_OPEN_RAID_ENCHANT_IDS = {}
LIB_OPEN_RAID_GEM_IDS = {}
LIB_OPEN_RAID_WEAPON_ENCHANT_IDS = {}
LIB_OPEN_RAID_FOOD_BUFF = {}
LIB_OPEN_RAID_FLASK_BUFF = {}
LIB_OPEN_RAID_ALL_POTIONS = {}
LIB_OPEN_RAID_HEALING_POTIONS = {
[33447] = true, --Runic Healing Potion
[41166] = true, --Runic Healing Injector
[47875] = true, --Warlock's Healthstone (0/2 Talent)
[47867] = true, --Warlock's Healthstone (1/2 Talent)
[47877] = true, --Warlock's Healthstone (2/2 Talent)
}
LIB_OPEN_RAID_MELEE_SPECS = {}
for _, class in ipairs(CLASS_SORT_ORDER) do
local specs = C_ClassInfo.GetAllSpecs(class)
for _, spec in ipairs(specs) do
local specInfo = C_ClassInfo.GetSpecInfo(class, spec)
if specInfo.MeleeDPS then
LIB_OPEN_RAID_MELEE_SPECS[specInfo.ID] = class
end
end
end
--tells the duration, requirements and cooldown
--information about a cooldown is mainly get from tooltips
--if talent is required, use the command:
--/dump GetTalentInfo (talentTier, talentColumn, 1)
--example: to get the second talent of the last talent line, use: /dump GetTalentInfo (7, 2, 1)
local ENUM_SPELL_TYPE = {
AttackCooldown = 1,
PersonalDefensive = 2,
ExternalDefensive = 3,
RaidDefensive = 4,
PersonalUtility = 5,
Interrupt = 6,
}
LIB_OPEN_RAID_COOLDOWNS_INFO = {
--interrupts
[6552] = {class = "WARRIOR", specs = {64, 65, 66}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = ENUM_SPELL_TYPE.Interrupt, charges = 1}, --Pummel
[2139] = {class = "MAGE", specs = {85, 86, 87}, cooldown = 24, silence = 6, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = ENUM_SPELL_TYPE.Interrupt, charges = 1}, --Counterspell
[15487] = {class = "PRIEST", specs = {78}, cooldown = 45, silence = 4, talent = false, cooldownWithTalent = 30, cooldownTalentId = 23137, type = ENUM_SPELL_TYPE.Interrupt, charges = 1}, --Silence (shadow) Last Word Talent to reduce cooldown in 15 seconds
[1766] = {class = "ROGUE", specs = {73, 74, 75}, cooldown = 15, silence = 5, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = ENUM_SPELL_TYPE.Interrupt, charges = 1}, --Kick
[96231] = {class = "PALADIN", specs = {67, 68, 69}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = ENUM_SPELL_TYPE.Interrupt, charges = 1}, --Rebuke (protection and retribution)
[57994] = {class = "SHAMAN", specs = {82, 83, 84}, cooldown = 12, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = ENUM_SPELL_TYPE.Interrupt, charges = 1}, --Wind Shear
[47528] = {class = "DEATHKNIGHT", specs = {79, 80, 81}, cooldown = 15, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = ENUM_SPELL_TYPE.Interrupt, charges = 1}, --Mind Freeze
[106839] = {class = "DRUID", specs = {92}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = ENUM_SPELL_TYPE.Interrupt, charges = 1}, --Skull Bash (feral, guardian)
[78675] = {class = "DRUID", specs = {91 ,93}, cooldown = 60, silence = 8, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = ENUM_SPELL_TYPE.Interrupt, charges = 1}, --Solar Beam (balance)
[147362] = {class = "HUNTER", specs = {70, 71, 7}, cooldown = 24, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = ENUM_SPELL_TYPE.Interrupt, charges = 1}, --Counter Shot (beast mastery, marksmanship)
[19647] = {class = "WARLOCK", specs = {88, 89, 90}, cooldown = 24, silence = 6, talent = false, cooldownWithTalent = false, cooldownTalentId = false, pet = 417, type = ENUM_SPELL_TYPE.Interrupt, charges = 1}, --Spell Lock (pet felhunter ability)
[89766] = {class = "WARLOCK", specs = {90}, cooldown = 30, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, pet = 17252, type = ENUM_SPELL_TYPE.Interrupt, charges = 1}, --Axe Toss (pet felguard ability)
--paladin
-- 67 - Holy
-- 68 - Protection
-- 69 - Retribution
[31884] = {cooldown = 120, duration = 20, specs = {68,67,69}, talent =false, charges = 1, class = "PALADIN", type = ENUM_SPELL_TYPE.AttackCooldown}, --Avenging Wrath
[498] = {cooldown = 60, duration = 8, specs = {68,67,69}, talent =false, charges = 1, class = "PALADIN", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Divine Protection
[642] = {cooldown = 300, duration = 8, specs = {68,67,69}, talent =false, charges = 1, class = "PALADIN", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Divine Shield
[633] = {cooldown = 600, duration = false, specs = {68,67,69}, talent =false, charges = 1, class = "PALADIN", type = ENUM_SPELL_TYPE.ExternalDefensive}, --Lay on Hands
[1022] = {cooldown = 300, duration = 10, specs = {68,67,69}, talent =false, charges = 1, class = "PALADIN", type = ENUM_SPELL_TYPE.ExternalDefensive}, --Blessing of Protection
[6940] = {cooldown = 120, duration = 12, specs = {68,67,69}, talent =false, charges = 1, class = "PALADIN", type = ENUM_SPELL_TYPE.ExternalDefensive}, --Blessing of Sacrifice
[31821] = {cooldown = 180, duration = 8, specs = {67}, talent =false, charges = 1, class = "PALADIN", type = ENUM_SPELL_TYPE.RaidDefensive}, --Aura Mastery
[1044] = {cooldown = 25, duration = 8, specs = {68,67,69}, talent =false, charges = 1, class = "PALADIN", type = ENUM_SPELL_TYPE.PersonalUtility}, --Blessing of Freedom
[853] = {cooldown = 60, duration = 6, specs = {68,67,69}, talent =false, charges = 1, class = "PALADIN", type = ENUM_SPELL_TYPE.PersonalUtility}, --Hammer of Justice
[31850] = {cooldown = 120, duration = 8, specs = {68}, talent =false, charges = 1, class = "PALADIN", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Ardent Defender
--warrior
-- 64 - Arms
-- 65 - Fury
-- 66 - Protection
[227847] = {cooldown = 90, duration = 5, specs = {64}, talent =false, charges = 1, class = "WARRIOR", type = ENUM_SPELL_TYPE.AttackCooldown}, --Bladestorm
[46924] = {cooldown = 60, duration = 4, specs = {64}, talent =22400, charges = 1, class = "WARRIOR", type = ENUM_SPELL_TYPE.AttackCooldown}, --Bladestorm (talent)
[1719] = {cooldown = 90, duration = 10, specs = {64,65,66}, talent =false, charges = 1, class = "WARRIOR", type = ENUM_SPELL_TYPE.AttackCooldown}, --Recklessness
[184364] = {cooldown = 120, duration = 8, specs = {64,65,66}, talent =false, charges = 1, class = "WARRIOR", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Enraged Regeneration
[12975] = {cooldown = 180, duration = 15, specs = {66}, talent =false, charges = 1, class = "WARRIOR", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Last Stand
[871] = {cooldown = 8, duration = 240, specs = {64,65,66}, talent =false, charges = 1, class = "WARRIOR", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Shield Wall
[64382] = {cooldown = 180, duration = false, specs = {64,65,66}, talent =false, charges = 1, class = "WARRIOR", type = ENUM_SPELL_TYPE.PersonalUtility}, --Shattering Throw
[5246] = {cooldown = 90, duration = 8, specs = {64,65,66}, talent =false, charges = 1, class = "WARRIOR", type = ENUM_SPELL_TYPE.PersonalUtility}, --Intimidating Shout
--warlock
-- 88 - Affliction
-- 89 - Destruction
-- 90 - Demonology
[1122] = {cooldown = 180, duration = 30, specs = {88,89,90}, talent =false, charges = 1, class = "WARLOCK", type = ENUM_SPELL_TYPE.AttackCooldown}, --Summon Infernal
[30283] = {cooldown = 60, duration = 3, specs = {88,89,90}, talent =false, charges = 1, class = "WARLOCK", type = ENUM_SPELL_TYPE.PersonalUtility}, --Shadowfury
[333889] = {cooldown = 180, duration = 15, specs = {90}, talent =false, charges = 1, class = "WARLOCK", type = ENUM_SPELL_TYPE.PersonalUtility}, --Fel Domination
[5484] = {cooldown = 40, duration = 20, specs = {88,89,90}, talent =23465, charges = 1, class = "WARLOCK", type = ENUM_SPELL_TYPE.PersonalUtility}, --Howl of Terror (talent)
--shaman
-- 82 - Elemental
-- 83 - Enchancment
-- 84 - Restoration
[198067] = {cooldown = 150, duration = 30, specs = {82,83,84}, talent =false, charges = 1, class = "SHAMAN", type = ENUM_SPELL_TYPE.AttackCooldown}, --Fire Elemental
[51533] = {cooldown = 120, duration = 15, specs = {83}, talent =false, charges = 1, class = "SHAMAN", type = ENUM_SPELL_TYPE.AttackCooldown}, --Feral Spirit
[108280] = {cooldown = 180, duration = 10, specs = {84}, talent =false, charges = 1, class = "SHAMAN", type = ENUM_SPELL_TYPE.RaidDefensive}, --Healing Tide Totem
[16191] = {cooldown = 180, duration = 8, specs = {8}, talent =false, charges = 1, class = "SHAMAN", type = ENUM_SPELL_TYPE.RaidDefensive}, --Mana Tide Totem
[198103] = {cooldown = 300, duration = 60, specs = {82,83,84}, talent =false, charges = 1, class = "SHAMAN", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Earth Elemental
--hunter
-- 70 - Beast Mastery
-- 71 - Marksmenship
-- 72 - Survival
[19574] = {cooldown = 90, duration = 12, specs = {70}, talent =false, charges = 1, class = "HUNTER", type = ENUM_SPELL_TYPE.AttackCooldown}, --Bestial Wrath
[19577] = {cooldown = 60, duration = 5, specs = {70}, talent =false, charges = 1, class = "HUNTER", type = ENUM_SPELL_TYPE.PersonalUtility}, --Intimidation
[187650] = {cooldown = 25, duration = 60, specs = {70,71,72}, talent =false, charges = 1, class = "HUNTER", type = ENUM_SPELL_TYPE.PersonalUtility}, --Freezing Trap
--druid
-- 91 - Balance
-- 92 - Feral
-- 93 - Restoration
[22812] = {cooldown = 60, duration = 12, specs = {91,92,93}, talent =false, charges = 1, class = "DRUID", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Barkskin
[29166] = {cooldown = 180, duration = 12, specs = {91,92,93}, talent =false, charges = 1, class = "DRUID", type = ENUM_SPELL_TYPE.ExternalDefensive}, --Innervate
[106951] = {cooldown = 180, duration = 15, specs = {92}, talent =false, charges = 1, class = "DRUID", type = ENUM_SPELL_TYPE.AttackCooldown}, --Berserk
[740] = {cooldown = 180, duration = 8, specs = {91,92,93}, talent =false, charges = 1, class = "DRUID", type = ENUM_SPELL_TYPE.RaidDefensive}, --Tranquility
[132469] = {cooldown = 30, duration = false, specs = {91}, talent =false, charges = 1, class = "DRUID", type = ENUM_SPELL_TYPE.PersonalUtility}, --Typhoon
--death knight
-- 79 - Blood
-- 80 - Frost
-- 81 - Unholy
[42650] = {cooldown = 480, duration = 30, specs = {79,80,81}, talent =false, charges = 1, class = "DEATHKNIGHT", type = ENUM_SPELL_TYPE.AttackCooldown}, --Army of the Dead
[49206] = {cooldown = 180, duration = 30, specs = {81}, talent =22110, charges = 1, class = "DEATHKNIGHT", type = ENUM_SPELL_TYPE.AttackCooldown}, --Summon Gargoyle (talent)
[48743] = {cooldown = 120, duration = 15, specs = {79}, talent =23373, charges = 1, class = "DEATHKNIGHT", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Death Pact (talent)
[48707] = {cooldown = 60, duration = 10, specs = {79,80,81}, talent =false, charges = 1, class = "DEATHKNIGHT", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Anti-magic Shell
[47568] = {cooldown = 120, duration = 20, specs = {80}, talent =false, charges = 1, class = "DEATHKNIGHT", type = ENUM_SPELL_TYPE.AttackCooldown}, --Empower Rune Weapon
[49028] = {cooldown = 120, duration = 8, specs = {79}, talent =false, charges = 1, class = "DEATHKNIGHT", type = ENUM_SPELL_TYPE.AttackCooldown}, --Dancing Rune Weapon
[55233] = {cooldown = 90, duration = 10, specs = {79}, talent =false, charges = 1, class = "DEATHKNIGHT", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Vampiric Blood
[48792] = {cooldown = 120, duration = 8, specs = {79,80,81}, talent =false, charges = 1, class = "DEATHKNIGHT", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Icebound Fortitude
[51052] = {cooldown = 120, duration = 10, specs = {80}, talent =false, charges = 1, class = "DEATHKNIGHT", type = ENUM_SPELL_TYPE.RaidDefensive}, --Anti-magic Zone
--mage
-- 85 - Arcane
-- 86 - Fire
-- 87 - Frost
[12042] = {cooldown = 90, duration = 10, specs = {85}, talent =false, charges = 1, class = "MAGE", type = ENUM_SPELL_TYPE.AttackCooldown}, --Arcane Power
[12051] = {cooldown = 90, duration = 6, specs = {85,86,87}, talent =false, charges = 1, class = "MAGE", type = ENUM_SPELL_TYPE.AttackCooldown}, --Evocation
[11426] = {cooldown = 25, duration = 60, specs = {87}, talent =false, charges = 1, class = "MAGE", type = ENUM_SPELL_TYPE.PersonalUtility}, --Ice Barrier
[190319] = {cooldown = 120, duration = 10, specs = {86}, talent =false, charges = 1, class = "MAGE", type = ENUM_SPELL_TYPE.AttackCooldown}, --Combustion
[55342] = {cooldown = 120, duration = 40, specs = {85,86,87}, talent =false, charges = 1, class = "MAGE", type = ENUM_SPELL_TYPE.AttackCooldown}, --Mirror Image
[66] = {cooldown = 300, duration = 20, specs = {85,86,87}, talent =false, charges = 1, class = "MAGE", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Invisibility
[12472] = {cooldown = 180, duration = 20, specs = {87}, talent =false, charges = 1, class = "MAGE", type = ENUM_SPELL_TYPE.AttackCooldown}, --Icy Veins
[45438] = {cooldown = 240, duration = 10, specs = {85,86,87}, talent =false, charges = 1, class = "MAGE", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Ice Block
[235219] = {cooldown = 300, duration = false, specs = {87}, talent =false, charges = 1, class = "MAGE", type = ENUM_SPELL_TYPE.PersonalUtility}, --Cold Snap
[113724] = {cooldown = 45, duration = 10, specs = {85,86,87}, talent =false, charges = 1, class = "MAGE", type = ENUM_SPELL_TYPE.PersonalUtility}, --Ring of Frost (talent)
--priest
-- 76 - Discipline
-- 77 - Holy
-- 78 - Shadow
[10060] = {cooldown = 120, duration = 20, specs = {76}, talent =false, charges = 1, class = "PRIEST", type = ENUM_SPELL_TYPE.AttackCooldown}, --Power Infusion
[34433] = {cooldown = 180, duration = 15, specs = {78}, talent =false, charges = 1, class = "PRIEST", type = ENUM_SPELL_TYPE.AttackCooldown}, --Shadowfiend
[33206] = {cooldown = 180, duration = 8, specs = {76}, talent =false, charges = 1, class = "PRIEST", type = ENUM_SPELL_TYPE.ExternalDefensive}, --Pain Suppression
[64843] = {cooldown = 180, duration = 8, specs = {76,77,78}, talent =false, charges = 1, class = "PRIEST", type = ENUM_SPELL_TYPE.RaidDefensive}, --Divine Hymn
[64901] = {cooldown = 300, duration = 6, specs = {76,77,78}, talent =false, charges = 1, class = "PRIEST", type = ENUM_SPELL_TYPE.RaidDefensive}, --Symbol of Hope
[8122] = {cooldown = 60, duration = 8, specs = {76,77,78}, talent =false, charges = 1, class = "PRIEST", type = ENUM_SPELL_TYPE.PersonalUtility}, --Psychic Scream
[47585] = {cooldown = 120, duration = 6, specs = {78}, talent =false, charges = 1, class = "PRIEST", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Dispersion
--rogue
-- 73 - Assasination
-- 74 - Combat
-- 75 - Subtlety
[1856] = {cooldown = 120, duration = 3, specs = {73,74,75}, talent =false, charges = 1, class = "ROGUE", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Vanish
[5277] = {cooldown = 120, duration = 10, specs = {73,74,75}, talent =false, charges = 1, class = "ROGUE", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Evasion
[31224] = {cooldown = 120, duration = 5, specs = {73,74,75}, talent =false, charges = 1, class = "ROGUE", type = ENUM_SPELL_TYPE.PersonalDefensive}, --Cloak of Shadows
[2094] = {cooldown = 120, duration = 60, specs = {73,74,75}, talent =false, charges = 1, class = "ROGUE", type = ENUM_SPELL_TYPE.PersonalUtility}, --Blind
[13750] = {cooldown = 180, duration = 20, specs = {74}, talent =false, charges = 1, class = "ROGUE", type = ENUM_SPELL_TYPE.AttackCooldown}, --Adrenaline Rush
[51690] = {cooldown = 120, duration = 2, specs = {74}, talent =23175, charges = 1, class = "ROGUE", type = ENUM_SPELL_TYPE.AttackCooldown}, --Killing Spree (talent)
}
--this table store all cooldowns the player currently have available
LIB_OPEN_RAID_PLAYERCOOLDOWNS = {}
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC = {};
for spellID,spellData in pairs(LIB_OPEN_RAID_COOLDOWNS_INFO) do
for _,specID in ipairs(spellData.specs) do
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID] = LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID] or {};
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID][spellID] = spellData.type;
end
end
--list of all crowd control spells
--it is not transmitted to other clients
LIB_OPEN_RAID_CROWDCONTROL = { --copied from retail
[334693] = {cooldown = 0, class = "DEAHTKNIGHT"}, --Absolute Zero
[221562] = {cooldown = 45, class = "DEATHKNIGHT"}, --Asphyxiate
[47528] = {cooldown = 15, class = "DEATHKNIGHT"}, --Mind Freeze
[207167] = {cooldown = 60, class = "DEATHKNIGHT"}, --Blinding Sleet
[91807] = {cooldown = 0, class = "DEATHKNIGHT"}, --Shambling Rush
[108194] = {cooldown = 45, class = "DEATHKNIGHT"}, --Asphyxiate
[211881] = {cooldown = 30, class = "DEMONHUNTER"}, --Fel Eruption
[200166] = {cooldown = 0, class = "DEMONHUNTER"}, --Metamorphosis
[217832] = {cooldown = 45, class = "DEMONHUNTER"}, --Imprison
[183752] = {cooldown = 15, class = "DEMONHUNTER"}, --Disrupt
[207685] = {cooldown = 0, class = "DEMONHUNTER"}, --Sigil of Misery
[179057] = {cooldown = 45, class = "DEMONHUNTER"}, --Chaos Nova
[221527] = {cooldown = 45, class = "DEMONHUNTER"}, --Imprison with detainment talent
[339] = {cooldown = 0, class = "DRUID"}, --Entangling Roots
[102359] = {cooldown = 30, class = "DRUID"}, --Mass Entanglement
[93985] = {cooldown = 0, class = "DRUID"}, --Skull Bash
[2637] = {cooldown = 0, class = "DRUID"}, --Hibernate
[5211] = {cooldown = 60, class = "DRUID"}, --Mighty Bash
[99] = {cooldown = 30, class = "DRUID"}, --Incapacitating Roar
[127797] = {cooldown = 0, class = "DRUID"}, --Ursol's Vortex
[203123] = {cooldown = 0, class = "DRUID"}, --Maim
[45334] = {cooldown = 0, class = "DRUID"}, --Immobilized
[33786] = {cooldown = 0, class = "DRUID"}, --Cyclone
[236748] = {cooldown = 30, class = "DRUID"}, --Intimidating Roar
[61391] = {cooldown = 0, class = "DRUID"}, --Typhoon
[163505] = {cooldown = 0, class = "DRUID"}, --Rake
[50259] = {cooldown = 0, class = "DRUID"}, --Dazed
[162480] = {cooldown = 0, class = "HUNTER"}, --Steel Trap
[187707] = {cooldown = 15, class = "HUNTER"}, --Muzzle
[147362] = {cooldown = 24, class = "HUNTER"}, --Counter Shot
[190927] = {cooldown = 6, class = "HUNTER"}, --Harpoon
[117526] = {cooldown = 45, class = "HUNTER"}, --Binding Shot
[24394] = {cooldown = 0, class = "HUNTER"}, --Intimidation
[117405] = {cooldown = 0, class = "HUNTER"}, --Binding Shot
[19577] = {cooldown = 60, class = "HUNTER"}, --Intimidation
[1513] = {cooldown = 0, class = "HUNTER"}, --Scare Beast
[3355] = {cooldown = 30, class = "HUNTER"}, --Freezing Trap
[203337] = {cooldown = 30, class = "HUNTER"}, --Freezing trap with diamond ice talent
[31661] = {cooldown = 45, class = "MAGE"}, --Dragon's Breath
[161353] = {cooldown = 0, class = "MAGE"}, --Polymorph
[277787] = {cooldown = 0, class = "MAGE"}, --Polymorph
[157981] = {cooldown = 30, class = "MAGE"}, --Blast Wave
[82691] = {cooldown = 0, class = "MAGE"}, --Ring of Frost
[118] = {cooldown = 0, class = "MAGE"}, --Polymorph
[161354] = {cooldown = 0, class = "MAGE"}, --Polymorph
[157997] = {cooldown = 25, class = "MAGE"}, --Ice Nova
[391622] = {cooldown = 0, class = "MAGE"}, --Polymorph
[28271] = {cooldown = 0, class = "MAGE"}, --Polymorph
[122] = {cooldown = 0, class = "MAGE"}, --Frost Nova
[277792] = {cooldown = 0, class = "MAGE"}, --Polymorph
[61721] = {cooldown = 0, class = "MAGE"}, --Polymorph
[126819] = {cooldown = 0, class = "MAGE"}, --Polymorph
[61305] = {cooldown = 0, class = "MAGE"}, --Polymorph
[28272] = {cooldown = 0, class = "MAGE"}, --Polymorph
[2139] = {cooldown = 24, class = "MAGE"}, --Counterspell
[198909] = {cooldown = 0, class = "MONK"}, --Song of Chi-Ji
[119381] = {cooldown = 60, class = "MONK"}, --Leg Sweep
[107079] = {cooldown = 120, class = "MONK"}, --Quaking Palm
[116706] = {cooldown = 0, class = "MONK"}, --Disable
[115078] = {cooldown = 45, class = "MONK"}, --Paralysis
[116705] = {cooldown = 15, class = "MONK"}, --Spear Hand Strike
[31935] = {cooldown = 15, class = "PALADIN"}, --Avenger's Shield
[20066] = {cooldown = 15, class = "PALADIN"}, --Repentance
[217824] = {cooldown = 0, class = "PALADIN"}, --Shield of Virtue
[105421] = {cooldown = 0, class = "PALADIN"}, --Blinding Light
[10326] = {cooldown = 15, class = "PALADIN"}, --Turn Evil
[853] = {cooldown = 60, class = "PALADIN"}, --Hammer of Justice
[96231] = {cooldown = 15, class = "PALADIN"}, --Rebuke
[205364] = {cooldown = 30, class = "PRIEST"}, --Dominate Mind
[64044] = {cooldown = 45, class = "PRIEST"}, --Psychic Horror
[226943] = {cooldown = 0, class = "PRIEST"}, --Mind Bomb
[15487] = {cooldown = 45, class = "PRIEST"}, --Silence
[605] = {cooldown = 0, class = "PRIEST"}, --Mind Control
[8122] = {cooldown = 45, class = "PRIEST"}, --Psychic Scream
[200200] = {cooldown = 60, class = "PRIEST"}, --Holy Word: Chastise
[9484] = {cooldown = 0, class = "PRIEST"}, --Shackle Undead
[200196] = {cooldown = 60, class = "PRIEST"}, --Holy Word: Chastise
[6770] = {cooldown = 0, class = "ROGUE"}, --Sap
[2094] = {cooldown = 120, class = "ROGUE"}, --Blind
[1766] = {cooldown = 15, class = "ROGUE"}, --Kick
[427773] = {cooldown = 0, class = "ROGUE"}, --Blind
[408] = {cooldown = 20, class = "ROGUE"}, --Kidney Shot
[1776] = {cooldown = 20, class = "ROGUE"}, --Gouge
[1833] = {cooldown = 0, class = "ROGUE"}, --Cheap Shot
[211015] = {cooldown = 30, class = "SHAMAN"}, --Hex
[269352] = {cooldown = 30, class = "SHAMAN"}, --Hex
[277778] = {cooldown = 30, class = "SHAMAN"}, --Hex
[64695] = {cooldown = 0, class = "SHAMAN"}, --Earthgrab
[57994] = {cooldown = 12, class = "SHAMAN"}, --Wind Shear
[197214] = {cooldown = 40, class = "SHAMAN"}, --Sundering
[118905] = {cooldown = 0, class = "SHAMAN"}, --Static Charge
[277784] = {cooldown = 30, class = "SHAMAN"}, --Hex
[309328] = {cooldown = 30, class = "SHAMAN"}, --Hex
[211010] = {cooldown = 30, class = "SHAMAN"}, --Hex
[210873] = {cooldown = 30, class = "SHAMAN"}, --Hex
[211004] = {cooldown = 30, class = "SHAMAN"}, --Hex
[51514] = {cooldown = 30, class = "SHAMAN"}, --Hex
[305485] = {cooldown = 30, class = "SHAMAN"}, --Lightning Lasso
[89766] = {cooldown = 30, class = "WARLOCK"}, --Axe Toss (pet felguard ability)
[6789] = {cooldown = 45, class = "WARLOCK"}, --Mortal Coil
[118699] = {cooldown = 0, class = "WARLOCK"}, --Fear
[710] = {cooldown = 0, class = "WARLOCK"}, --Banish
[212619] = {cooldown = 60, class = "WARLOCK"}, --Call Felhunter
[19647] = {cooldown = 24, class = "WARLOCK"}, --Spell Lock
[30283] = {cooldown = 60, class = "WARLOCK"}, --Shadowfury
[5484] = {cooldown = 40, class = "WARLOCK"}, --Howl of Terror
[6552] = {cooldown = 15, class = "WARRIOR"}, --Pummel
[132168] = {cooldown = 0, class = "WARRIOR"}, --Shockwave
[132169] = {cooldown = 0, class = "WARRIOR"}, --Storm Bolt
[5246] = {cooldown = 90, class = "WARRIOR"}, --Intimidating Shout
}
--[=[
Spell customizations:
Many times there's spells with the same name which does different effects
In here you find a list of spells which has its name changed to give more information to the player
you may add into the list any other parameter your addon uses declaring for example 'icon = ' or 'texcoord = ' etc.
Implamentation Example:
if (LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) then
for spellId, customTable in pairs(LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) do
local name = customTable.name
if (name) then
MyCustomSpellTable[spellId] = name
end
end
end
--]=]
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {
-- [44461] = {name = GetSpellInfo(44461) .. " (" .. L["STRING_EXPLOSION"] .. ")"}, --Living Bomb (explosion)
-- [59638] = {name = GetSpellInfo(59638) .. " (" .. L["STRING_MIRROR_IMAGE"] .. ")"}, --Mirror Image's Frost Bolt (mage)
-- [88082] = {name = GetSpellInfo(88082) .. " (" .. L["STRING_MIRROR_IMAGE"] .. ")"}, --Mirror Image's Fireball (mage)
-- [94472] = {name = GetSpellInfo(94472) .. " (" .. L["STRING_CRITICAL_ONLY"] .. ")"}, --Atonement critical hit (priest)
-- [33778] = {name = GetSpellInfo(33778) .. " (" .. L["STRING_BLOOM"] .. ")"}, --lifebloom (bloom)
-- [121414] = {name = GetSpellInfo(121414) .. " (" .. L["STRING_GLAIVE"] .. " #1)"}, --glaive toss (hunter)
-- [120761] = {name = GetSpellInfo(120761) .. " (" .. L["STRING_GLAIVE"] .. " #2)"}, --glaive toss (hunter)
-- [212739] = {name = GetSpellInfo(212739) .. " (" .. L["STRING_MAINTARGET"] .. ")"}, --DK Epidemic
-- [215969] = {name = GetSpellInfo(215969) .. " (" .. L["STRING_AOE"] .. ")"}, --DK Epidemic
-- [70890] = {name = GetSpellInfo(70890) .. " (" .. L["STRING_SHADOW"] .. ")"}, --DK Scourge Strike
-- [55090] = {name = GetSpellInfo(55090) .. " (" .. L["STRING_PHYSICAL"] .. ")"}, --DK Scourge Strike
-- [49184] = {name = GetSpellInfo(49184) .. " (" .. L["STRING_MAINTARGET"] .. ")"}, --DK Howling Blast
-- [237680] = {name = GetSpellInfo(237680) .. " (" .. L["STRING_AOE"] .. ")"}, --DK Howling Blast
-- [228649] = {name = GetSpellInfo(228649) .. " (" .. L["STRING_PASSIVE"] .. ")"}, --Monk Mistweaver Blackout kick - Passive Teachings of the Monastery
-- [339538] = {name = GetSpellInfo(224266) .. " (" .. L["STRING_TEMPLAR_VINDCATION"] .. ")"}, --
-- [343355] = {name = GetSpellInfo(343355) .. " (" .. L["STRING_PROC"] .. ")"}, --shadow priest's void bold proc
-- --shadowlands trinkets
-- [345020] = {name = GetSpellInfo(345020) .. " (" .. L["STRING_TRINKET"] .. ")"},
}
--interrupt list using proxy from cooldown list
--this list should be expansion and combatlog safe
LIB_OPEN_RAID_SPELL_INTERRUPT = {
[6552] = LIB_OPEN_RAID_COOLDOWNS_INFO[6552], --Pummel
[2139] = LIB_OPEN_RAID_COOLDOWNS_INFO[2139], --Counterspell
[15487] = LIB_OPEN_RAID_COOLDOWNS_INFO[15487], --Silence (shadow) Last Word Talent to reduce cooldown in 15 seconds
[1766] = LIB_OPEN_RAID_COOLDOWNS_INFO[1766], --Kick
[96231] = LIB_OPEN_RAID_COOLDOWNS_INFO[96231], --Rebuke (protection and retribution)
[116705] = LIB_OPEN_RAID_COOLDOWNS_INFO[116705], --Spear Hand Strike (brewmaster and windwalker)
[57994] = LIB_OPEN_RAID_COOLDOWNS_INFO[57994], --Wind Shear
[47528] = LIB_OPEN_RAID_COOLDOWNS_INFO[47528], --Mind Freeze
[106839] = LIB_OPEN_RAID_COOLDOWNS_INFO[106839], --Skull Bash (feral, guardian)
[78675] = LIB_OPEN_RAID_COOLDOWNS_INFO[78675], --Solar Beam (balance)
[147362] = LIB_OPEN_RAID_COOLDOWNS_INFO[147362], --Counter Shot (beast mastery, marksmanship)
[187707] = LIB_OPEN_RAID_COOLDOWNS_INFO[187707], --Muzzle (survival)
[183752] = LIB_OPEN_RAID_COOLDOWNS_INFO[183752], --Disrupt
[19647] = LIB_OPEN_RAID_COOLDOWNS_INFO[19647], --Spell Lock (pet felhunter ability)
[89766] = LIB_OPEN_RAID_COOLDOWNS_INFO[89766], --Axe Toss (pet felguard ability)
}
--override list of spells with more than one effect, example: multiple types of polymorph
LIB_OPEN_RAID_SPELL_DEFAULT_IDS = {
--[id_to_override] = original_id
}
LIB_OPEN_RAID_DATABASE_LOADED = true
-701
View File
@@ -1,701 +0,0 @@
--data for cataclysm expansion
--ToDo: Cata Data needed
local versionString, revision, launchDate, gameVersion = GetBuildInfo()
if (gameVersion >= 50000 or gameVersion < 30000) then
return
end
--localization
local gameLanguage = GetLocale()
local L = { --default localization
["STRING_EXPLOSION"] = "explosion",
["STRING_MIRROR_IMAGE"] = "Mirror Image",
["STRING_CRITICAL_ONLY"] = "critical",
["STRING_BLOOM"] = "Bloom", --lifebloom 'bloom' healing
["STRING_GLAIVE"] = "Glaive", --DH glaive toss
["STRING_MAINTARGET"] = "Main Target",
["STRING_AOE"] = "AoE", --multi targets
["STRING_SHADOW"] = "Shadow", --the spell school 'shadow'
["STRING_PHYSICAL"] = "Physical", --the spell school 'physical'
["STRING_PASSIVE"] = "Passive", --passive spell
["STRING_TEMPLAR_VINDCATION"] = "Templar's Vindication", --paladin spell
["STRING_PROC"] = "proc", --spell proc
["STRING_TRINKET"] = "Trinket", --trinket
}
if (gameLanguage == "enUS") then
--default language
elseif (gameLanguage == "deDE") then
L["STRING_EXPLOSION"] = "Explosion"
L["STRING_MIRROR_IMAGE"] = "Bilder spiegeln"
L["STRING_CRITICAL_ONLY"] = "kritisch"
elseif (gameLanguage == "esES") then
L["STRING_EXPLOSION"] = "explosión"
L["STRING_MIRROR_IMAGE"] = "Imagen de espejo"
L["STRING_CRITICAL_ONLY"] = "crítico"
elseif (gameLanguage == "esMX") then
L["STRING_EXPLOSION"] = "explosión"
L["STRING_MIRROR_IMAGE"] = "Imagen de espejo"
L["STRING_CRITICAL_ONLY"] = "crítico"
elseif (gameLanguage == "frFR") then
L["STRING_EXPLOSION"] = "explosion"
L["STRING_MIRROR_IMAGE"] = "Effet miroir"
L["STRING_CRITICAL_ONLY"] = "critique"
elseif (gameLanguage == "itIT") then
L["STRING_EXPLOSION"] = "esplosione"
L["STRING_MIRROR_IMAGE"] = "Immagine Speculare"
L["STRING_CRITICAL_ONLY"] = "critico"
elseif (gameLanguage == "koKR") then
L["STRING_EXPLOSION"] = "폭발"
L["STRING_MIRROR_IMAGE"] = "미러 이미지"
L["STRING_CRITICAL_ONLY"] = "치명타"
elseif (gameLanguage == "ptBR") then
L["STRING_EXPLOSION"] = "explosão"
L["STRING_MIRROR_IMAGE"] = "Imagem Espelhada"
L["STRING_CRITICAL_ONLY"] = "critico"
elseif (gameLanguage == "ruRU") then
L["STRING_EXPLOSION"] = "взрыв"
L["STRING_MIRROR_IMAGE"] = "Зеркальное изображение"
L["STRING_CRITICAL_ONLY"] = "критический"
elseif (gameLanguage == "zhCN") then
L["STRING_EXPLOSION"] = "爆炸"
L["STRING_MIRROR_IMAGE"] = "镜像"
L["STRING_CRITICAL_ONLY"] = "爆击"
elseif (gameLanguage == "zhTW") then
L["STRING_EXPLOSION"] = "爆炸"
L["STRING_MIRROR_IMAGE"] = "鏡像"
L["STRING_CRITICAL_ONLY"] = "致命"
end
LIB_OPEN_RAID_MANA_POTIONS = {}
LIB_OPEN_RAID_FOOD_BUFF = {} --default
LIB_OPEN_RAID_FLASK_BUFF = {} --default
LIB_OPEN_RAID_BLOODLUST = {
[2825] = true, --bloodlust
[32182] = true, --heroism
[80353] = true, --timewarp
[90355] = true, --ancient hysteria
[309658] = true, --current exp drums
}
--which gear slots can be enchanted on the latest retail version of the game
--when the value is a number, the slot only receives enchants for a specific attribute
LIB_OPEN_RAID_ENCHANT_SLOTS = {
--[INVSLOT_NECK] = true,
[INVSLOT_BACK] = true, --for all
[INVSLOT_CHEST] = true, --for all
[INVSLOT_FINGER1] = true, --for all
[INVSLOT_FINGER2] = true, --for all
[INVSLOT_MAINHAND] = true, --for all
[INVSLOT_FEET] = 2, --agility only
[INVSLOT_WRIST] = 1, --intellect only
[INVSLOT_HAND] = 3, --strenth only
}
LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 180653
LIB_OPEN_RAID_AUGMENTATED_RUNE = 0
LIB_OPEN_RAID_COVENANT_ICONS = {}
LIB_OPEN_RAID_ENCHANT_IDS = {}
LIB_OPEN_RAID_GEM_IDS = {}
LIB_OPEN_RAID_WEAPON_ENCHANT_IDS = {}
LIB_OPEN_RAID_FOOD_BUFF = {}
LIB_OPEN_RAID_FLASK_BUFF = {}
LIB_OPEN_RAID_ALL_POTIONS = {}
LIB_OPEN_RAID_HEALING_POTIONS = {
[33447] = true, --Runic Healing Potion
[41166] = true, --Runic Healing Injector
[47875] = true, --Warlock's Healthstone (0/2 Talent)
[47867] = true, --Warlock's Healthstone (1/2 Talent)
[47877] = true, --Warlock's Healthstone (2/2 Talent)
}
LIB_OPEN_RAID_MELEE_SPECS = {
[251] = "DEATHKNIGHT",
[252] = "DEATHKNIGHT",
[577] = "DEMONHUNTER",
[103] = "DRUID",
--[255] = "Survival", --not in the list due to the long interrupt time
[269] = "MONK",
[70] = "PALADIN",
[259] = "ROGUE",
[260] = "ROGUE",
[261] = "ROGUE",
[263] = "SHAMAN",
[71] = "WARRIOR",
[72] = "WARRIOR",
}
--tells the duration, requirements and cooldown
--information about a cooldown is mainly get from tooltips
--if talent is required, use the command:
--/dump GetTalentInfo (talentTier, talentColumn, 1)
--example: to get the second talent of the last talent line, use: /dump GetTalentInfo (7, 2, 1)
LIB_OPEN_RAID_COOLDOWNS_INFO = {
-- Filter Types:
-- 1 attack cooldown
-- 2 personal defensive cooldown
-- 3 targetted defensive cooldown
-- 4 raid defensive cooldown
-- 5 personal utility cooldown
-- 6 interrupt
--interrupts
[6552] = {class = "WARRIOR", specs = {71, 72, 73}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Pummel
[2139] = {class = "MAGE", specs = {62, 63, 64}, cooldown = 24, silence = 6, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Counterspell
[15487] = {class = "PRIEST", specs = {258}, cooldown = 45, silence = 4, talent = false, cooldownWithTalent = 30, cooldownTalentId = 23137, type = 6, charges = 1}, --Silence (shadow) Last Word Talent to reduce cooldown in 15 seconds
[1766] = {class = "ROGUE", specs = {259, 260, 261}, cooldown = 15, silence = 5, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Kick
[96231] = {class = "PALADIN", specs = {66, 70}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Rebuke (protection and retribution)
[116705] = {class = "MONK", specs = {268, 269}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Spear Hand Strike (brewmaster and windwalker)
[57994] = {class = "SHAMAN", specs = {262, 263, 264}, cooldown = 12, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Wind Shear
[47528] = {class = "DEATHKNIGHT", specs = {250, 251, 252}, cooldown = 15, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Mind Freeze
[106839] = {class = "DRUID", specs = {103, 104}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Skull Bash (feral, guardian)
[78675] = {class = "DRUID", specs = {102}, cooldown = 60, silence = 8, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Solar Beam (balance)
[147362] = {class = "HUNTER", specs = {253, 254}, cooldown = 24, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Counter Shot (beast mastery, marksmanship)
[187707] = {class = "HUNTER", specs = {255}, cooldown = 15, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Muzzle (survival)
[183752] = {class = "DEMONHUNTER", specs = {577, 581}, cooldown = 15, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Disrupt
[19647] = {class = "WARLOCK", specs = {265, 266, 267}, cooldown = 24, silence = 6, talent = false, cooldownWithTalent = false, cooldownTalentId = false, pet = 417, type = 6, charges = 1}, --Spell Lock (pet felhunter ability)
[89766] = {class = "WARLOCK", specs = {266}, cooldown = 30, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, pet = 17252, type = 6, charges = 1}, --Axe Toss (pet felguard ability)
--paladin
-- 65 - Holy
-- 66 - Protection
-- 70 - Retribution
[31884] = {cooldown = 120, duration = 20, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 1}, --Avenging Wrath
[216331] = {cooldown = 120, duration = 20, specs = {65}, talent =22190, charges = 1, class = "PALADIN", type = 1}, --Avenging Crusader (talent)
[498] = {cooldown = 60, duration = 8, specs = {65}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Divine Protection
[642] = {cooldown = 300, duration = 8, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Divine Shield
[105809] = {cooldown = 90, duration = 20, specs = {65,66,70}, talent =22164, charges = 1, class = "PALADIN", type = 2}, --Holy Avenger (talent)
[152262] = {cooldown = 45, duration = 15, specs = {65,66,70}, talent =17601, charges = 1, class = "PALADIN", type = 2}, --Seraphim
[633] = {cooldown = 600, duration = false, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 3}, --Lay on Hands
[1022] = {cooldown = 300, duration = 10, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 3}, --Blessing of Protection
[6940] = {cooldown = 120, duration = 12, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 3}, --Blessing of Sacrifice
[31821] = {cooldown = 180, duration = 8, specs = {65}, talent =false, charges = 1, class = "PALADIN", type = 4}, --Aura Mastery
[1044] = {cooldown = 25, duration = 8, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 5}, --Blessing of Freedom
[853] = {cooldown = 60, duration = 6, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 5}, --Hammer of Justice
[115750] = {cooldown = 90, duration = 6, specs = {65,66,70}, talent =21811, charges = 1, class = "PALADIN", type = 5}, --Blinding Light(talent)
[327193] = {cooldown = 90, duration = 15, specs = {66}, talent =23468, charges = 1, class = "PALADIN", type = 1}, --Moment of Glory (talent)
[31850] = {cooldown = 120, duration = 8, specs = {66}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Ardent Defender
[86659] = {cooldown = 300, duration = 8, specs = {66}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Guardian of Ancient Kings
[204018] = {cooldown = 180, duration = 10, specs = {66}, talent =22435, charges = 1, class = "PALADIN", type = 3}, --Blessing of Spellwarding (talent)
[231895] = {cooldown = 120, duration = 25, specs = {70}, talent =22215, charges = 1, class = "PALADIN", type = 1}, --Crusade (talent)
[205191] = {cooldown = 60, duration = 10, specs = {70}, talent =22183, charges = 1, class = "PALADIN", type = 2}, --Eye for an Eye (talent)
[184662] = {cooldown = 120, duration = 15, specs = {70}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Shield of Vengeance
--warrior
-- 71 - Arms
-- 72 - Fury
-- 73 - Protection
[107574] = {cooldown = 90, duration = 20, specs = {71,73}, talent =22397, charges = 1, class = "WARRIOR", type = 1}, --Avatar
[227847] = {cooldown = 90, duration = 5, specs = {71}, talent =false, charges = 1, class = "WARRIOR", type = 1}, --Bladestorm
[46924] = {cooldown = 60, duration = 4, specs = {72}, talent =22400, charges = 1, class = "WARRIOR", type = 1}, --Bladestorm (talent)
[152277] = {cooldown = 60, duration = 6, specs = {71}, talent =21667, charges = 1, class = "WARRIOR", type = 1}, --Ravager (talent)
[228920] = {cooldown = 60, duration = 6, specs = {73}, talent =23099, charges = 1, class = "WARRIOR", type = 1}, --Ravager (talent)
[118038] = {cooldown = 180, duration = 8, specs = {71}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Die by the Sword
[97462] = {cooldown = 180, duration = 10, specs = {71,72,73}, talent =false, charges = 1, class = "WARRIOR", type = 4}, --Rallying Cry
[1719] = {cooldown = 90, duration = 10, specs = {72}, talent =false, charges = 1, class = "WARRIOR", type = 1}, --Recklessness
[184364] = {cooldown = 120, duration = 8, specs = {72}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Enraged Regeneration
[12975] = {cooldown = 180, duration = 15, specs = {73}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Last Stand
[871] = {cooldown = 8, duration = 240, specs = {73}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Shield Wall
[64382] = {cooldown = 180, duration = false, specs = {71,72,73}, talent =false, charges = 1, class = "WARRIOR", type = 5}, --Shattering Throw
[5246] = {cooldown = 90, duration = 8, specs = {71,72,73}, talent =false, charges = 1, class = "WARRIOR", type = 5}, --Intimidating Shout
--warlock
-- 265 - Affliction
-- 266 - Demonology
-- 267 - Destruction
[205180] = {cooldown = 180, duration = 20, specs = {265}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Summon Darkglare
--[342601] = {cooldown = 3600, duration = false, specs = {}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Ritual of Doom
[113860] = {cooldown = 120, duration = 20, specs = {265}, talent =19293, charges = 1, class = "WARLOCK", type = 1}, --Dark Soul: Misery (talent)
[104773] = {cooldown = 180, duration = 8, specs = {265,266,267}, talent =false, charges = 1, class = "WARLOCK", type = 2}, --Unending Resolve
[108416] = {cooldown = 60, duration = 20, specs = {265,266,267}, talent =19286, charges = 1, class = "WARLOCK", type = 2}, --Dark Pact (talent)
[265187] = {cooldown = 90, duration = 15, specs = {266}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Summon Demonic Tyrant
[111898] = {cooldown = 120, duration = 15, specs = {266}, talent =21717, charges = 1, class = "WARLOCK", type = 1}, --Grimoire: Felguard (talent)
[267171] = {cooldown = 60, duration = false, specs = {266}, talent =23138, charges = 1, class = "WARLOCK", type = 1}, --Demonic Strength (talent)
[267217] = {cooldown = 180, duration = 20, specs = {266}, talent =23091, charges = 1, class = "WARLOCK", type = 1}, --Nether Portal
[1122] = {cooldown = 180, duration = 30, specs = {267}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Summon Infernal
[113858] = {cooldown = 120, duration = 20, specs = {267}, talent =23092, charges = 1, class = "WARLOCK", type = 1}, --Dark Soul: Instability (talent)
[30283] = {cooldown = 60, duration = 3, specs = {265,266,267}, talent =false, charges = 1, class = "WARLOCK", type = 5}, --Shadowfury
[333889] = {cooldown = 180, duration = 15, specs = {265,266,267}, talent =false, charges = 1, class = "WARLOCK", type = 5}, --Fel Domination
[5484] = {cooldown = 40, duration = 20, specs = {265,266,267}, talent =23465, charges = 1, class = "WARLOCK", type = 5}, --Howl of Terror (talent)
--shaman
-- 262 - Elemental
-- 263 - Enchancment
-- 264 - Restoration
[198067] = {cooldown = 150, duration = 30, specs = {262}, talent =false, charges = 1, class = "SHAMAN", type = 1}, --Fire Elemental
[192249] = {cooldown = 150, duration = 30, specs = {262}, talent =19272, charges = 1, class = "SHAMAN", type = 1}, --Storm Elemental (talent)
[108271] = {cooldown = 90, duration = 8, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 2}, --Astral Shift
[108281] = {cooldown = 120, duration = 10, specs = {262,263}, talent =22172, charges = 1, class = "SHAMAN", type = 4}, --Ancestral Guidance (talent)
[51533] = {cooldown = 120, duration = 15, specs = {263}, talent =false, charges = 1, class = "SHAMAN", type = 1}, --Feral Spirit
[114050] = {cooldown = 180, duration = 15, specs = {262}, talent =21675, charges = 1, class = "SHAMAN", type = 1}, --Ascendance (talent)
[114051] = {cooldown = 180, duration = 15, specs = {263}, talent =21972, charges = 1, class = "SHAMAN", type = 1}, --Ascendance (talent)
[114052] = {cooldown = 180, duration = 15, specs = {264}, talent =22359, charges = 1, class = "SHAMAN", type = 4}, --Ascendance (talent)
[98008] = {cooldown = 180, duration = 6, specs = {264}, talent =false, charges = 1, class = "SHAMAN", type = 4}, --Spirit Link Totem
[108280] = {cooldown = 180, duration = 10, specs = {264}, talent =false, charges = 1, class = "SHAMAN", type = 4}, --Healing Tide Totem
[207399] = {cooldown = 240, duration = 30, specs = {264}, talent =22323, charges = 1, class = "SHAMAN", type = 4}, --Ancestral Protection Totem (talent)
[16191] = {cooldown = 180, duration = 8, specs = {264}, talent =false, charges = 1, class = "SHAMAN", type = 4}, --Mana Tide Totem
[198103] = {cooldown = 300, duration = 60, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 2}, --Earth Elemental
[192058] = {cooldown = 60, duration = false, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 5}, --Capacitor Totem
[8143] = {cooldown = 60, duration = 10, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 5}, --Tremor Totem
[192077] = {cooldown = 120, duration = 15, specs = {262,263,264}, talent =21966, charges = 1, class = "SHAMAN", type = 5}, --Wind Rush Totem (talent)
--monk
-- 268 - Brewmaster
-- 269 - Windwalker
-- 270 - Restoration
[132578] = {cooldown = 180, duration = 25, specs = {268}, talent =false, charges = 1, class = "MONK", type = 1}, --Invoke Niuzao, the Black Ox
[115080] = {cooldown = 180, duration = false, specs = {268,269,270}, talent =false, charges = 1, class = "MONK", type = 1}, --Touch of Death
[115203] = {cooldown = 420, duration = 15, specs = {268}, talent =false, charges = 1, class = "MONK", type = 2}, --Fortifying Brew
[115176] = {cooldown = 300, duration = 8, specs = {268}, talent =false, charges = 1, class = "MONK", type = 2}, --Zen Meditation
[115399] = {cooldown = 120, duration = false, specs = {268}, talent =19992, charges = 1, class = "MONK", type = 2}, --Black Ox brew (talent)
[122278] = {cooldown = 120, duration = 10, specs = {268,269,270}, talent =20175, charges = 1, class = "MONK", type = 2}, --Dampen Harm (talent)
[137639] = {cooldown = 90, duration = 15, specs = {269}, talent =false, charges = 1, class = "MONK", type = 1}, --Storm, Earth, and Fire
[123904] = {cooldown = 120, duration = 24, specs = {269}, talent =false, charges = 1, class = "MONK", type = 1}, --Invoke Xuen, the White Tiger
[152173] = {cooldown = 90, duration = 12, specs = {269}, talent =21191, charges = 1, class = "MONK", type = 1}, --Serenity (talent)
[122470] = {cooldown = 90, duration = 6, specs = {269}, talent =false, charges = 1, class = "MONK", type = 2}, --Touch of Karma
[322118] = {cooldown = 180, duration = 25, specs = {270}, talent =false, charges = 1, class = "MONK", type = 4}, --Invoke Yulon, the Jade serpent
[243435] = {cooldown = 90, duration = 15, specs = {269,270}, talent =false, charges = 1, class = "MONK", type = 2}, --Fortifying Brew
[122783] = {cooldown = 90, duration = 6, specs = {269,270}, talent =20173, charges = 1, class = "MONK", type = 2}, --Diffuse Magic (talent)
[116849] = {cooldown = 120, duration = 12, specs = {270}, talent =false, charges = 1, class = "MONK", type = 3}, --Life Cocoon
[115310] = {cooldown = 180, duration = false, specs = {270}, talent =false, charges = 1, class = "MONK", type = 4}, --Revival
[197908] = {cooldown = 90, duration = 10, specs = {270}, talent =22166, charges = 1, class = "MONK", type = 5}, --Mana tea (talent)
[116844] = {cooldown = 45, duration = 5, specs = {268,269,270}, talent =19995, charges = 1, class = "MONK", type = 5}, --Ring of peace (talent)
[119381] = {cooldown = 50, duration = 3, specs = {268,269,270}, talent =false, charges = 1, class = "MONK", type = 5}, --Leg Sweep
--hunter
-- 253 - Beast Mastery
-- 254 - Marksmenship
-- 255 - Survival
[193530] = {cooldown = 120, duration = 20, specs = {253}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Aspect of the Wild
[19574] = {cooldown = 90, duration = 12, specs = {253}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Bestial Wrath
[201430] = {cooldown = 180, duration = 12, specs = {253}, talent =23044, charges = 1, class = "HUNTER", type = 1}, --Stampede (talent)
[288613] = {cooldown = 180, duration = 15, specs = {254}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Trueshot
[199483] = {cooldown = 60, duration = 60, specs = {253,254,255}, talent =23100, charges = 1, class = "HUNTER", type = 2}, --Camouflage (talent)
[281195] = {cooldown = 180, duration = 6, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 2}, --Survival of the Fittest
[266779] = {cooldown = 120, duration = 20, specs = {255}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Coordinated Assault
[186265] = {cooldown = 180, duration = 8, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 2}, --Aspect of the Turtle
[109304] = {cooldown = 120, duration = false, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 2}, --Exhilaration
[186257] = {cooldown = 144, duration = 14, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Aspect of the cheetah
[19577] = {cooldown = 60, duration = 5, specs = {253,255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Intimidation
[109248] = {cooldown = 45, duration = 10, specs = {253,254,255}, talent =22499, charges = 1, class = "HUNTER", type = 5}, --Binding Shot (talent)
[187650] = {cooldown = 25, duration = 60, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Freezing Trap
[186289] = {cooldown = 72, duration = 15, specs = {255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Aspect of the eagle
--druid
-- 102 - Balance
-- 103 - Feral
-- 104 - Guardian
-- 105 - Restoration
[77761] = {cooldown = 120, duration = 8, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 4}, --Stampeding Roar
[194223] = {cooldown = 180, duration = 20, specs = {102}, talent =false, charges = 1, class = "DRUID", type = 1}, --Celestial Alignment
[102560] = {cooldown = 180, duration = 30, specs = {102}, talent =21702, charges = 1, class = "DRUID", type = 1}, --Incarnation: Chosen of Elune (talent)
[22812] = {cooldown = 60, duration = 12, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 2}, --Barkskin
[108238] = {cooldown = 90, duration = false, specs = {102,103,104,105}, talent =18570, charges = 1, class = "DRUID", type = 2}, --Renewal (talent)
[29166] = {cooldown = 180, duration = 12, specs = {102,105}, talent =false, charges = 1, class = "DRUID", type = 3}, --Innervate
[106951] = {cooldown = 180, duration = 15, specs = {103,104}, talent =false, charges = 1, class = "DRUID", type = 1}, --Berserk
[102543] = {cooldown = 30, duration = 180, specs = {103}, talent =21704, charges = 1, class = "DRUID", type = 1}, --Incarnation: King of the Jungle (talent)
[61336] = {cooldown = 120, duration = 6, specs = {103,104}, talent =false, charges = 2, class = "DRUID", type = 2}, --Survival Instincts (2min feral 4min guardian, same spellid)
[102558] = {cooldown = 180, duration = 30, specs = {104}, talent =22388, charges = 1, class = "DRUID", type = 2}, --Incarnation: Guardian of Ursoc (talent)
[33891] = {cooldown = 180, duration = 30, specs = {105}, talent =22421, charges = 1, class = "DRUID", type = 2}, --Incarnation: Tree of Life (talent)
[102342] = {cooldown = 60, duration = 12, specs = {105}, talent =false, charges = 1, class = "DRUID", type = 3}, --Ironbark
[203651] = {cooldown = 60, duration = false, specs = {105}, talent =22422, charges = 1, class = "DRUID", type = 3}, --Overgrowth (talent)
[740] = {cooldown = 180, duration = 8, specs = {105}, talent =false, charges = 1, class = "DRUID", type = 4}, --Tranquility
[197721] = {cooldown = 90, duration = 8, specs = {105}, talent =22404, charges = 1, class = "DRUID", type = 4}, --Flourish (talent)
[132469] = {cooldown = 30, duration = false, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 5}, --Typhoon
[319454] = {cooldown = 300, duration = 45, specs = {102,103,104,105}, talent =18577, charges = 1, class = "DRUID", type = 5}, --Heart of the Wild (talent)
[102793] = {cooldown = 60, duration = 10, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 5}, --Ursol's Vortex
--death knight
-- 252 - Unholy
-- 251 - Frost
-- 252 - Blood
[275699] = {cooldown = 90, duration = 15, specs = {252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Apocalypse
[42650] = {cooldown = 480, duration = 30, specs = {252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Army of the Dead
[49206] = {cooldown = 180, duration = 30, specs = {252}, talent =22110, charges = 1, class = "DEATHKNIGHT", type = 1}, --Summon Gargoyle (talent)
[207289] = {cooldown = 78, duration = 12, specs = {252}, talent =22538, charges = 1, class = "DEATHKNIGHT", type = 1}, --Unholy Assault (talent)
[48743] = {cooldown = 120, duration = 15, specs = {250,251,252}, talent =23373, charges = 1, class = "DEATHKNIGHT", type = 2}, --Death Pact (talent)
[48707] = {cooldown = 60, duration = 10, specs = {250,251,252}, talent =23373, charges = 1, class = "DEATHKNIGHT", type = 2}, --Anti-magic Shell
[152279] = {cooldown = 120, duration = 5, specs = {251}, talent =22537, charges = 1, class = "DEATHKNIGHT", type = 1}, --Breath of Sindragosa (talent)
[47568] = {cooldown = 120, duration = 20, specs = {251}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Empower Rune Weapon
[279302] = {cooldown = 120, duration = 10, specs = {251}, talent =22535, charges = 1, class = "DEATHKNIGHT", type = 1}, --Frostwyrm's Fury (talent)
[49028] = {cooldown = 120, duration = 8, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Dancing Rune Weapon
[55233] = {cooldown = 90, duration = 10, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 2}, --Vampiric Blood
[48792] = {cooldown = 120, duration = 8, specs = {250,251,252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 2}, --Icebound Fortitude
[51052] = {cooldown = 120, duration = 10, specs = {250,251,252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 4}, --Anti-magic Zone
[219809] = {cooldown = 60, duration = 8, specs = {250}, talent =23454, charges = 1, class = "DEATHKNIGHT", type = 2}, --Tombstone (talent)
[108199] = {cooldown = 120, duration = false, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 5}, --Gorefiend's Grasp
[207167] = {cooldown = 60, duration = 5, specs = {251}, talent =22519, charges = 1, class = "DEATHKNIGHT", type = 5}, --Blinding Sleet (talent)
[108194] = {cooldown = 45, duration = 4, specs = {251,252}, talent =22520, charges = 1, class = "DEATHKNIGHT", type = 5}, --Asphyxiate (talent)
[221562] = {cooldown = 45, duration = 5, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 5}, --Asphyxiate
[212552] = {cooldown = 60, duration = 4, specs = {250,251,252}, talent =19228, charges = 1, class = "DEATHKNIGHT", type = 5}, --Wraith walk (talent)
--demon hunter
-- 577 - Havoc
-- 581 - Vengance
[191427] = {cooldown = 240, duration = 30, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 1}, --Metamorphosis
[198589] = {cooldown = 60, duration = 10, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 2}, --Blur
[196555] = {cooldown = 120, duration = 5, specs = {577}, talent =21865, charges = 1, class = "DEMONHUNTER", type = 2}, --Netherwalk (talent)
[187827] = {cooldown = 180, duration = 15, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 2}, --Metamorphosis
[196718] = {cooldown = 180, duration = 8, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 4}, --Darkness
[188501] = {cooldown = 30, duration = 10, specs = {577,581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Spectral Sight
[179057] = {cooldown = 60, duration = 2, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Chaos Nova
[211881] = {cooldown = 30, duration = 4, specs = {577}, talent =22767, charges = 1, class = "DEMONHUNTER", type = 5}, --Fel Eruption (talent)
[320341] = {cooldown = 90, duration = false, specs = {581}, talent =21902, charges = 1, class = "DEMONHUNTER", type = 1}, --Bulk Extraction (talent)
[204021] = {cooldown = 60, duration = 10, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 2}, --Fiery Brand
[263648] = {cooldown = 30, duration = 12, specs = {581}, talent =22768, charges = 1, class = "DEMONHUNTER", type = 2}, --Soul Barrier (talent)
[207684] = {cooldown = 90, duration = 12, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Sigil of Misery
[202137] = {cooldown = 60, duration = 8, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Sigil of Silence
[202138] = {cooldown = 90, duration = 6, specs = {581}, talent =22511, charges = 1, class = "DEMONHUNTER", type = 5}, --Sigil of Chains (talent)
--mage
-- 62 - Arcane
-- 63 - Fire
-- 64 - Frost
[12042] = {cooldown = 90, duration = 10, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 1}, --Arcane Power
[12051] = {cooldown = 90, duration = 6, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 1}, --Evocation
[110960] = {cooldown = 120, duration = 20, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 2}, --Greater Invisibility
[235450] = {cooldown = 25, duration = 60, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 5}, --Prismatic Barrier
[235313] = {cooldown = 25, duration = 60, specs = {63}, talent =false, charges = 1, class = "MAGE", type = 5}, --Blazing Barrier
[11426] = {cooldown = 25, duration = 60, specs = {64}, talent =false, charges = 1, class = "MAGE", type = 5}, --Ice Barrier
[190319] = {cooldown = 120, duration = 10, specs = {63}, talent =false, charges = 1, class = "MAGE", type = 1}, --Combustion
[55342] = {cooldown = 120, duration = 40, specs = {62,63,64}, talent =22445, charges = 1, class = "MAGE", type = 1}, --Mirror Image
[66] = {cooldown = 300, duration = 20, specs = {63,64}, talent =false, charges = 1, class = "MAGE", type = 2}, --Invisibility
[12472] = {cooldown = 180, duration = 20, specs = {64}, talent =false, charges = 1, class = "MAGE", type = 1}, --Icy Veins
[205021] = {cooldown = 78, duration = 5, specs = {64}, talent =22309, charges = 1, class = "MAGE", type = 1}, --Ray of Frost (talent)
[45438] = {cooldown = 240, duration = 10, specs = {62,63,64}, talent =false, charges = 1, class = "MAGE", type = 2}, --Ice Block
[235219] = {cooldown = 300, duration = false, specs = {64}, talent =false, charges = 1, class = "MAGE", type = 5}, --Cold Snap
[113724] = {cooldown = 45, duration = 10, specs = {62,63,64}, talent =22471, charges = 1, class = "MAGE", type = 5}, --Ring of Frost (talent)
--priest
-- 256 - Discipline
-- 257 - Holy
-- 258 - Shadow
[10060] = {cooldown = 120, duration = 20, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 1}, --Power Infusion
[34433] = {cooldown = 180, duration = 15, specs = {256,258}, talent =false, charges = 1, class = "PRIEST", type = 1, ignoredIfTalent = 21719}, --Shadowfiend
[200174] = {cooldown = 60, duration = 15, specs = {258}, talent =21719, charges = 1, class = "PRIEST", type = 1}, --Mindbender (talent)
[123040] = {cooldown = 60, duration = 12, specs = {256}, talent =22094, charges = 1, class = "PRIEST", type = 1}, --Mindbender (talent)
[33206] = {cooldown = 180, duration = 8, specs = {256}, talent =false, charges = 1, class = "PRIEST", type = 3}, --Pain Suppression
[62618] = {cooldown = 180, duration = 10, specs = {256}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Power Word: Barrier
[271466] = {cooldown = 180, duration = 10, specs = {256}, talent =21184, charges = 1, class = "PRIEST", type = 4}, --Luminous Barrier (talent)
[47536] = {cooldown = 90, duration = 10, specs = {256}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Rapture
[19236] = {cooldown = 90, duration = 10, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Desperate Prayer
[200183] = {cooldown = 120, duration = 20, specs = {257}, talent =21644, charges = 1, class = "PRIEST", type = 2}, --Apotheosis (talent)
[47788] = {cooldown = 180, duration = 10, specs = {257}, talent =false, charges = 1, class = "PRIEST", type = 3}, --Guardian Spirit
[64843] = {cooldown = 180, duration = 8, specs = {257}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Divine Hymn
[64901] = {cooldown = 300, duration = 6, specs = {257}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Symbol of Hope
[265202] = {cooldown = 720, duration = false, specs = {257}, talent =23145, charges = 1, class = "PRIEST", type = 4}, --Holy Word: Salvation (talent)
[109964] = {cooldown = 60, duration = 12, specs = {256}, talent =21184, charges = 1, class = "PRIEST", type = 4}, --Spirit Shell (talent)
[8122] = {cooldown = 60, duration = 8, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Psychic Scream
[193223] = {cooldown = 240, duration = 60, specs = {258}, talent =21979, charges = 1, class = "PRIEST", type = 1}, --Surrender to Madness (talent)
[47585] = {cooldown = 120, duration = 6, specs = {258}, talent =false, charges = 1, class = "PRIEST", type = 2}, --Dispersion
[15286] = {cooldown = 120, duration = 15, specs = {258}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Vampiric Embrace
[64044] = {cooldown = 45, duration = 4, specs = {258}, talent =21752, charges = 1, class = "PRIEST", type = 5}, --Psychic Horror
[205369] = {cooldown = 30, duration = 6, specs = {258}, talent =23375, charges = 1, class = "PRIEST", type = 5}, --Mind Bomb
[228260] = {cooldown = 90, duration = 15, specs = {258}, talent =false, charges = 1, class = "PRIEST", type = 1}, --Void Erruption
[73325] = {cooldown = 90, duration = false, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Leap of Faith
--rogue
-- 259 - Assasination
-- 260 - Outlaw
-- 261 - Subtlety
[79140] = {cooldown = 120, duration = 20, specs = {259}, talent =false, charges = 1, class = "ROGUE", type = 1}, --Vendetta
[1856] = {cooldown = 120, duration = 3, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Vanish
[5277] = {cooldown = 120, duration = 10, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Evasion
[31224] = {cooldown = 120, duration = 5, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Cloak of Shadows
[2094] = {cooldown = 120, duration = 60, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 5}, --Blind
[114018] = {cooldown = 360, duration = 15, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 5}, --Shroud of Concealment
[185311] = {cooldown = 30, duration = 15, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 5}, --Crimson Vial
[13750] = {cooldown = 180, duration = 20, specs = {260}, talent =false, charges = 1, class = "ROGUE", type = 1}, --Adrenaline Rush
[51690] = {cooldown = 120, duration = 2, specs = {260}, talent =23175, charges = 1, class = "ROGUE", type = 1}, --Killing Spree (talent)
[199754] = {cooldown = 120, duration = 10, specs = {260}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Riposte
[343142] = {cooldown = 90, duration = 10, specs = {260}, talent =19250, charges = 1, class = "ROGUE", type = 5}, --Dreadblades
[121471] = {cooldown = 180, duration = 20, specs = {261}, talent =false, charges = 1, class = "ROGUE", type = 1}, --Shadow Blades
}
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC = {};
for spellID,spellData in pairs(LIB_OPEN_RAID_COOLDOWNS_INFO) do
for _,specID in ipairs(spellData.specs) do
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID] = LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID] or {};
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID][spellID] = spellData.type;
end
end
-- DF Evoker
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[1467] = {};
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[1468] = {};
--list of all crowd control spells
--it is not transmitted to other clients
LIB_OPEN_RAID_CROWDCONTROL = { --copied from retail
[331866] = {cooldown = 0, class = "COVENANT|VENTHYR"}, --Agent of Chaos
[334693] = {cooldown = 0, class = "DEAHTKNIGHT"}, --Absolute Zero
[221562] = {cooldown = 45, class = "DEATHKNIGHT"}, --Asphyxiate
[47528] = {cooldown = 15, class = "DEATHKNIGHT"}, --Mind Freeze
[207167] = {cooldown = 60, class = "DEATHKNIGHT"}, --Blinding Sleet
[91807] = {cooldown = 0, class = "DEATHKNIGHT"}, --Shambling Rush
[108194] = {cooldown = 45, class = "DEATHKNIGHT"}, --Asphyxiate
[211881] = {cooldown = 30, class = "DEMONHUNTER"}, --Fel Eruption
[200166] = {cooldown = 0, class = "DEMONHUNTER"}, --Metamorphosis
[217832] = {cooldown = 45, class = "DEMONHUNTER"}, --Imprison
[183752] = {cooldown = 15, class = "DEMONHUNTER"}, --Disrupt
[207685] = {cooldown = 0, class = "DEMONHUNTER"}, --Sigil of Misery
[179057] = {cooldown = 45, class = "DEMONHUNTER"}, --Chaos Nova
[221527] = {cooldown = 45, class = "DEMONHUNTER"}, --Imprison with detainment talent
[339] = {cooldown = 0, class = "DRUID"}, --Entangling Roots
[102359] = {cooldown = 30, class = "DRUID"}, --Mass Entanglement
[93985] = {cooldown = 0, class = "DRUID"}, --Skull Bash
[2637] = {cooldown = 0, class = "DRUID"}, --Hibernate
[5211] = {cooldown = 60, class = "DRUID"}, --Mighty Bash
[99] = {cooldown = 30, class = "DRUID"}, --Incapacitating Roar
[127797] = {cooldown = 0, class = "DRUID"}, --Ursol's Vortex
[203123] = {cooldown = 0, class = "DRUID"}, --Maim
[45334] = {cooldown = 0, class = "DRUID"}, --Immobilized
[33786] = {cooldown = 0, class = "DRUID"}, --Cyclone
[236748] = {cooldown = 30, class = "DRUID"}, --Intimidating Roar
[61391] = {cooldown = 0, class = "DRUID"}, --Typhoon
[163505] = {cooldown = 0, class = "DRUID"}, --Rake
[50259] = {cooldown = 0, class = "DRUID"}, --Dazed
[372245] = {cooldown = 0, class = "EVOKER"}, --Terror of the Skies
[360806] = {cooldown = 15, class = "EVOKER"}, --Sleep Walk
[162480] = {cooldown = 0, class = "HUNTER"}, --Steel Trap
[187707] = {cooldown = 15, class = "HUNTER"}, --Muzzle
[147362] = {cooldown = 24, class = "HUNTER"}, --Counter Shot
[190927] = {cooldown = 6, class = "HUNTER"}, --Harpoon
[117526] = {cooldown = 45, class = "HUNTER"}, --Binding Shot
[24394] = {cooldown = 0, class = "HUNTER"}, --Intimidation
[117405] = {cooldown = 0, class = "HUNTER"}, --Binding Shot
[19577] = {cooldown = 60, class = "HUNTER"}, --Intimidation
[1513] = {cooldown = 0, class = "HUNTER"}, --Scare Beast
[3355] = {cooldown = 30, class = "HUNTER"}, --Freezing Trap
[203337] = {cooldown = 30, class = "HUNTER"}, --Freezing trap with diamond ice talent
[31661] = {cooldown = 45, class = "MAGE"}, --Dragon's Breath
[161353] = {cooldown = 0, class = "MAGE"}, --Polymorph
[277787] = {cooldown = 0, class = "MAGE"}, --Polymorph
[157981] = {cooldown = 30, class = "MAGE"}, --Blast Wave
[82691] = {cooldown = 0, class = "MAGE"}, --Ring of Frost
[118] = {cooldown = 0, class = "MAGE"}, --Polymorph
[161354] = {cooldown = 0, class = "MAGE"}, --Polymorph
[157997] = {cooldown = 25, class = "MAGE"}, --Ice Nova
[391622] = {cooldown = 0, class = "MAGE"}, --Polymorph
[28271] = {cooldown = 0, class = "MAGE"}, --Polymorph
[122] = {cooldown = 0, class = "MAGE"}, --Frost Nova
[277792] = {cooldown = 0, class = "MAGE"}, --Polymorph
[61721] = {cooldown = 0, class = "MAGE"}, --Polymorph
[126819] = {cooldown = 0, class = "MAGE"}, --Polymorph
[61305] = {cooldown = 0, class = "MAGE"}, --Polymorph
[28272] = {cooldown = 0, class = "MAGE"}, --Polymorph
[2139] = {cooldown = 24, class = "MAGE"}, --Counterspell
[198909] = {cooldown = 0, class = "MONK"}, --Song of Chi-Ji
[119381] = {cooldown = 60, class = "MONK"}, --Leg Sweep
[107079] = {cooldown = 120, class = "MONK"}, --Quaking Palm
[116706] = {cooldown = 0, class = "MONK"}, --Disable
[115078] = {cooldown = 45, class = "MONK"}, --Paralysis
[116705] = {cooldown = 15, class = "MONK"}, --Spear Hand Strike
[31935] = {cooldown = 15, class = "PALADIN"}, --Avenger's Shield
[20066] = {cooldown = 15, class = "PALADIN"}, --Repentance
[217824] = {cooldown = 0, class = "PALADIN"}, --Shield of Virtue
[105421] = {cooldown = 0, class = "PALADIN"}, --Blinding Light
[10326] = {cooldown = 15, class = "PALADIN"}, --Turn Evil
[853] = {cooldown = 60, class = "PALADIN"}, --Hammer of Justice
[96231] = {cooldown = 15, class = "PALADIN"}, --Rebuke
[205364] = {cooldown = 30, class = "PRIEST"}, --Dominate Mind
[64044] = {cooldown = 45, class = "PRIEST"}, --Psychic Horror
[226943] = {cooldown = 0, class = "PRIEST"}, --Mind Bomb
[15487] = {cooldown = 45, class = "PRIEST"}, --Silence
[605] = {cooldown = 0, class = "PRIEST"}, --Mind Control
[8122] = {cooldown = 45, class = "PRIEST"}, --Psychic Scream
[200200] = {cooldown = 60, class = "PRIEST"}, --Holy Word: Chastise
[9484] = {cooldown = 0, class = "PRIEST"}, --Shackle Undead
[200196] = {cooldown = 60, class = "PRIEST"}, --Holy Word: Chastise
[6770] = {cooldown = 0, class = "ROGUE"}, --Sap
[2094] = {cooldown = 120, class = "ROGUE"}, --Blind
[1766] = {cooldown = 15, class = "ROGUE"}, --Kick
[427773] = {cooldown = 0, class = "ROGUE"}, --Blind
[408] = {cooldown = 20, class = "ROGUE"}, --Kidney Shot
[1776] = {cooldown = 20, class = "ROGUE"}, --Gouge
[1833] = {cooldown = 0, class = "ROGUE"}, --Cheap Shot
[211015] = {cooldown = 30, class = "SHAMAN"}, --Hex
[269352] = {cooldown = 30, class = "SHAMAN"}, --Hex
[277778] = {cooldown = 30, class = "SHAMAN"}, --Hex
[64695] = {cooldown = 0, class = "SHAMAN"}, --Earthgrab
[57994] = {cooldown = 12, class = "SHAMAN"}, --Wind Shear
[197214] = {cooldown = 40, class = "SHAMAN"}, --Sundering
[118905] = {cooldown = 0, class = "SHAMAN"}, --Static Charge
[277784] = {cooldown = 30, class = "SHAMAN"}, --Hex
[309328] = {cooldown = 30, class = "SHAMAN"}, --Hex
[211010] = {cooldown = 30, class = "SHAMAN"}, --Hex
[210873] = {cooldown = 30, class = "SHAMAN"}, --Hex
[211004] = {cooldown = 30, class = "SHAMAN"}, --Hex
[51514] = {cooldown = 30, class = "SHAMAN"}, --Hex
[305485] = {cooldown = 30, class = "SHAMAN"}, --Lightning Lasso
[89766] = {cooldown = 30, class = "WARLOCK"}, --Axe Toss (pet felguard ability)
[6789] = {cooldown = 45, class = "WARLOCK"}, --Mortal Coil
[118699] = {cooldown = 0, class = "WARLOCK"}, --Fear
[710] = {cooldown = 0, class = "WARLOCK"}, --Banish
[212619] = {cooldown = 60, class = "WARLOCK"}, --Call Felhunter
[19647] = {cooldown = 24, class = "WARLOCK"}, --Spell Lock
[30283] = {cooldown = 60, class = "WARLOCK"}, --Shadowfury
[5484] = {cooldown = 40, class = "WARLOCK"}, --Howl of Terror
[6552] = {cooldown = 15, class = "WARRIOR"}, --Pummel
[132168] = {cooldown = 0, class = "WARRIOR"}, --Shockwave
[132169] = {cooldown = 0, class = "WARRIOR"}, --Storm Bolt
[5246] = {cooldown = 90, class = "WARRIOR"}, --Intimidating Shout
}
--[=[
Spell customizations:
Many times there's spells with the same name which does different effects
In here you find a list of spells which has its name changed to give more information to the player
you may add into the list any other parameter your addon uses declaring for example 'icon = ' or 'texcoord = ' etc.
Implamentation Example:
if (LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) then
for spellId, customTable in pairs(LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) do
local name = customTable.name
if (name) then
MyCustomSpellTable[spellId] = name
end
end
end
--]=]
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {} --default fallback
if (GetBuildInfo():match ("%d") == "1") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
elseif (GetBuildInfo():match ("%d") == "2") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
elseif (GetBuildInfo():match ("%d") == "3") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
elseif (GetBuildInfo():match ("%d") == "4") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
else
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {
[44461] = {name = GetSpellInfo(44461) .. " (" .. L["STRING_EXPLOSION"] .. ")"}, --Living Bomb (explosion)
[59638] = {name = GetSpellInfo(59638) .. " (" .. L["STRING_MIRROR_IMAGE"] .. ")"}, --Mirror Image's Frost Bolt (mage)
[88082] = {name = GetSpellInfo(88082) .. " (" .. L["STRING_MIRROR_IMAGE"] .. ")"}, --Mirror Image's Fireball (mage)
[94472] = {name = GetSpellInfo(94472) .. " (" .. L["STRING_CRITICAL_ONLY"] .. ")"}, --Atonement critical hit (priest)
[33778] = {name = GetSpellInfo(33778) .. " (" .. L["STRING_BLOOM"] .. ")"}, --lifebloom (bloom)
[121414] = {name = GetSpellInfo(121414) .. " (" .. L["STRING_GLAIVE"] .. " #1)"}, --glaive toss (hunter)
[120761] = {name = GetSpellInfo(120761) .. " (" .. L["STRING_GLAIVE"] .. " #2)"}, --glaive toss (hunter)
[212739] = {name = GetSpellInfo(212739) .. " (" .. L["STRING_MAINTARGET"] .. ")"}, --DK Epidemic
[215969] = {name = GetSpellInfo(215969) .. " (" .. L["STRING_AOE"] .. ")"}, --DK Epidemic
[70890] = {name = GetSpellInfo(70890) .. " (" .. L["STRING_SHADOW"] .. ")"}, --DK Scourge Strike
[55090] = {name = GetSpellInfo(55090) .. " (" .. L["STRING_PHYSICAL"] .. ")"}, --DK Scourge Strike
[49184] = {name = GetSpellInfo(49184) .. " (" .. L["STRING_MAINTARGET"] .. ")"}, --DK Howling Blast
[237680] = {name = GetSpellInfo(237680) .. " (" .. L["STRING_AOE"] .. ")"}, --DK Howling Blast
[228649] = {name = GetSpellInfo(228649) .. " (" .. L["STRING_PASSIVE"] .. ")"}, --Monk Mistweaver Blackout kick - Passive Teachings of the Monastery
[339538] = {name = GetSpellInfo(224266) .. " (" .. L["STRING_TEMPLAR_VINDCATION"] .. ")"}, --
[343355] = {name = GetSpellInfo(343355) .. " (" .. L["STRING_PROC"] .. ")"}, --shadow priest's void bold proc
--shadowlands trinkets
[345020] = {name = GetSpellInfo(345020) .. " (" .. L["STRING_TRINKET"] .. ")"},
}
end
--interrupt list using proxy from cooldown list
--this list should be expansion and combatlog safe
LIB_OPEN_RAID_SPELL_INTERRUPT = {
[6552] = LIB_OPEN_RAID_COOLDOWNS_INFO[6552], --Pummel
[2139] = LIB_OPEN_RAID_COOLDOWNS_INFO[2139], --Counterspell
[15487] = LIB_OPEN_RAID_COOLDOWNS_INFO[15487], --Silence (shadow) Last Word Talent to reduce cooldown in 15 seconds
[1766] = LIB_OPEN_RAID_COOLDOWNS_INFO[1766], --Kick
[96231] = LIB_OPEN_RAID_COOLDOWNS_INFO[96231], --Rebuke (protection and retribution)
[116705] = LIB_OPEN_RAID_COOLDOWNS_INFO[116705], --Spear Hand Strike (brewmaster and windwalker)
[57994] = LIB_OPEN_RAID_COOLDOWNS_INFO[57994], --Wind Shear
[47528] = LIB_OPEN_RAID_COOLDOWNS_INFO[47528], --Mind Freeze
[106839] = LIB_OPEN_RAID_COOLDOWNS_INFO[106839], --Skull Bash (feral, guardian)
[78675] = LIB_OPEN_RAID_COOLDOWNS_INFO[78675], --Solar Beam (balance)
[147362] = LIB_OPEN_RAID_COOLDOWNS_INFO[147362], --Counter Shot (beast mastery, marksmanship)
[187707] = LIB_OPEN_RAID_COOLDOWNS_INFO[187707], --Muzzle (survival)
[183752] = LIB_OPEN_RAID_COOLDOWNS_INFO[183752], --Disrupt
[19647] = LIB_OPEN_RAID_COOLDOWNS_INFO[19647], --Spell Lock (pet felhunter ability)
[89766] = LIB_OPEN_RAID_COOLDOWNS_INFO[89766], --Axe Toss (pet felguard ability)
}
--override list of spells with more than one effect, example: multiple types of polymorph
LIB_OPEN_RAID_SPELL_DEFAULT_IDS = {
--stampeding roar (druid)
[106898] = 77761,
[77764] = 77761, --"Uncategorized" on wowhead, need to test if still exists
--spell lock (warlock pet)
[119910] = 19647, --"Uncategorized" on wowhead
[132409] = 19647, --"Uncategorized" on wowhead
--[115781] = 19647, --optical blast used by old talent observer, still a thing?
--[251523] = 19647, --wowhead list this spell as sibling spell
--[251922] = 19647, --wowhead list this spell as sibling spell
--axe toss (warlock pet)
[119914] = 89766, --"Uncategorized" on wowhead
[347008] = 89766, --"Uncategorized" on wowhead
--hex (shaman)
[210873] = 51514, --Compy
[211004] = 51514, --Spider
[211010] = 51514, --Snake
[211015] = 51514, --Cockroach
[269352] = 51514, --Skeletal Hatchling
[277778] = 51514, --Zandalari Tendonripper
[277784] = 51514, --Wicker Mongrel
[309328] = 51514, --Living Honey
--typhoon
--[61391] = 132469,
--metamorphosis
[191427] = 200166,
--187827 vengeance need to test these spellIds
--191427 havoc
}
--need to add mass dispell (32375)
LIB_OPEN_RAID_DATABASE_LOADED = true
File diff suppressed because it is too large Load Diff
-312
View File
@@ -1,312 +0,0 @@
local versionString, revision, launchDate, gameVersion = GetBuildInfo()
if (gameVersion >= 20000) then
return
end
--localization
local gameLanguage = GetLocale()
local L = { --default localization
["STRING_EXPLOSION"] = "explosion",
["STRING_MIRROR_IMAGE"] = "Mirror Image",
["STRING_CRITICAL_ONLY"] = "critical",
["STRING_BLOOM"] = "Bloom", --lifebloom 'bloom' healing
["STRING_GLAIVE"] = "Glaive", --DH glaive toss
["STRING_MAINTARGET"] = "Main Target",
["STRING_AOE"] = "AoE", --multi targets
["STRING_SHADOW"] = "Shadow", --the spell school 'shadow'
["STRING_PHYSICAL"] = "Physical", --the spell school 'physical'
["STRING_PASSIVE"] = "Passive", --passive spell
["STRING_TEMPLAR_VINDCATION"] = "Templar's Vindication", --paladin spell
["STRING_PROC"] = "proc", --spell proc
["STRING_TRINKET"] = "Trinket", --trinket
}
if (gameLanguage == "enUS") then
--default language
elseif (gameLanguage == "deDE") then
L["STRING_EXPLOSION"] = "Explosion"
L["STRING_MIRROR_IMAGE"] = "Bilder spiegeln"
L["STRING_CRITICAL_ONLY"] = "kritisch"
elseif (gameLanguage == "esES") then
L["STRING_EXPLOSION"] = "explosión"
L["STRING_MIRROR_IMAGE"] = "Imagen de espejo"
L["STRING_CRITICAL_ONLY"] = "crítico"
elseif (gameLanguage == "esMX") then
L["STRING_EXPLOSION"] = "explosión"
L["STRING_MIRROR_IMAGE"] = "Imagen de espejo"
L["STRING_CRITICAL_ONLY"] = "crítico"
elseif (gameLanguage == "frFR") then
L["STRING_EXPLOSION"] = "explosion"
L["STRING_MIRROR_IMAGE"] = "Effet miroir"
L["STRING_CRITICAL_ONLY"] = "critique"
elseif (gameLanguage == "itIT") then
L["STRING_EXPLOSION"] = "esplosione"
L["STRING_MIRROR_IMAGE"] = "Immagine Speculare"
L["STRING_CRITICAL_ONLY"] = "critico"
elseif (gameLanguage == "koKR") then
L["STRING_EXPLOSION"] = "폭발"
L["STRING_MIRROR_IMAGE"] = "미러 이미지"
L["STRING_CRITICAL_ONLY"] = "치명타"
elseif (gameLanguage == "ptBR") then
L["STRING_EXPLOSION"] = "explosão"
L["STRING_MIRROR_IMAGE"] = "Imagem Espelhada"
L["STRING_CRITICAL_ONLY"] = "critico"
elseif (gameLanguage == "ruRU") then
L["STRING_EXPLOSION"] = "взрыв"
L["STRING_MIRROR_IMAGE"] = "Зеркальное изображение"
L["STRING_CRITICAL_ONLY"] = "критический"
elseif (gameLanguage == "zhCN") then
L["STRING_EXPLOSION"] = "爆炸"
L["STRING_MIRROR_IMAGE"] = "镜像"
L["STRING_CRITICAL_ONLY"] = "爆击"
elseif (gameLanguage == "zhTW") then
L["STRING_EXPLOSION"] = "爆炸"
L["STRING_MIRROR_IMAGE"] = "鏡像"
L["STRING_CRITICAL_ONLY"] = "致命"
end
LIB_OPEN_RAID_MANA_POTIONS = {}
LIB_OPEN_RAID_FOOD_BUFF = {} --default
LIB_OPEN_RAID_FLASK_BUFF = {} --default
LIB_OPEN_RAID_BLOODLUST = {
}
--which gear slots can be enchanted on the latest retail version of the game
--when the value is a number, the slot only receives enchants for a specific attribute
LIB_OPEN_RAID_ENCHANT_SLOTS = {
}
LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 180653
LIB_OPEN_RAID_AUGMENTATED_RUNE = 0
LIB_OPEN_RAID_COVENANT_ICONS = {}
LIB_OPEN_RAID_ENCHANT_IDS = {}
LIB_OPEN_RAID_GEM_IDS = {}
LIB_OPEN_RAID_WEAPON_ENCHANT_IDS = {}
LIB_OPEN_RAID_FOOD_BUFF = {}
LIB_OPEN_RAID_FLASK_BUFF = {}
LIB_OPEN_RAID_ALL_POTIONS = {}
LIB_OPEN_RAID_HEALING_POTIONS = {
}
LIB_OPEN_RAID_MELEE_SPECS = {
[251] = "DEATHKNIGHT",
[252] = "DEATHKNIGHT",
[577] = "DEMONHUNTER",
[103] = "DRUID",
--[255] = "Survival", --not in the list due to the long interrupt time
[269] = "MONK",
[70] = "PALADIN",
[259] = "ROGUE",
[260] = "ROGUE",
[261] = "ROGUE",
[263] = "SHAMAN",
[71] = "WARRIOR",
[72] = "WARRIOR",
}
--tells the duration, requirements and cooldown
--information about a cooldown is mainly get from tooltips
--if talent is required, use the command:
--/dump GetTalentInfo (talentTier, talentColumn, 1)
--example: to get the second talent of the last talent line, use: /dump GetTalentInfo (7, 2, 1)
LIB_OPEN_RAID_COOLDOWNS_INFO = {
}
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC = {};
for spellID,spellData in pairs(LIB_OPEN_RAID_COOLDOWNS_INFO) do
for _,specID in ipairs(spellData.specs) do
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID] = LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID] or {};
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID][spellID] = spellData.type;
end
end
-- DF Evoker
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[1467] = {};
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[1468] = {};
--[=[
Spell customizations:
Many times there's spells with the same name which does different effects
In here you find a list of spells which has its name changed to give more information to the player
you may add into the list any other parameter your addon uses declaring for example 'icon = ' or 'texcoord = ' etc.
Implamentation Example:
if (LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) then
for spellId, customTable in pairs(LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) do
local name = customTable.name
if (name) then
MyCustomSpellTable[spellId] = name
end
end
end
--]=]
--list of all crowd control spells
--it is not transmitted to other clients
LIB_OPEN_RAID_CROWDCONTROL = { --copied from retail
[331866] = {cooldown = 0, class = "COVENANT|VENTHYR"}, --Agent of Chaos
[334693] = {cooldown = 0, class = "DEAHTKNIGHT"}, --Absolute Zero
[221562] = {cooldown = 45, class = "DEATHKNIGHT"}, --Asphyxiate
[47528] = {cooldown = 15, class = "DEATHKNIGHT"}, --Mind Freeze
[207167] = {cooldown = 60, class = "DEATHKNIGHT"}, --Blinding Sleet
[91807] = {cooldown = 0, class = "DEATHKNIGHT"}, --Shambling Rush
[108194] = {cooldown = 45, class = "DEATHKNIGHT"}, --Asphyxiate
[211881] = {cooldown = 30, class = "DEMONHUNTER"}, --Fel Eruption
[200166] = {cooldown = 0, class = "DEMONHUNTER"}, --Metamorphosis
[217832] = {cooldown = 45, class = "DEMONHUNTER"}, --Imprison
[183752] = {cooldown = 15, class = "DEMONHUNTER"}, --Disrupt
[207685] = {cooldown = 0, class = "DEMONHUNTER"}, --Sigil of Misery
[179057] = {cooldown = 45, class = "DEMONHUNTER"}, --Chaos Nova
[221527] = {cooldown = 45, class = "DEMONHUNTER"}, --Imprison with detainment talent
[339] = {cooldown = 0, class = "DRUID"}, --Entangling Roots
[102359] = {cooldown = 30, class = "DRUID"}, --Mass Entanglement
[93985] = {cooldown = 0, class = "DRUID"}, --Skull Bash
[2637] = {cooldown = 0, class = "DRUID"}, --Hibernate
[5211] = {cooldown = 60, class = "DRUID"}, --Mighty Bash
[99] = {cooldown = 30, class = "DRUID"}, --Incapacitating Roar
[127797] = {cooldown = 0, class = "DRUID"}, --Ursol's Vortex
[203123] = {cooldown = 0, class = "DRUID"}, --Maim
[45334] = {cooldown = 0, class = "DRUID"}, --Immobilized
[33786] = {cooldown = 0, class = "DRUID"}, --Cyclone
[236748] = {cooldown = 30, class = "DRUID"}, --Intimidating Roar
[61391] = {cooldown = 0, class = "DRUID"}, --Typhoon
[163505] = {cooldown = 0, class = "DRUID"}, --Rake
[50259] = {cooldown = 0, class = "DRUID"}, --Dazed
[372245] = {cooldown = 0, class = "EVOKER"}, --Terror of the Skies
[360806] = {cooldown = 15, class = "EVOKER"}, --Sleep Walk
[162480] = {cooldown = 0, class = "HUNTER"}, --Steel Trap
[187707] = {cooldown = 15, class = "HUNTER"}, --Muzzle
[147362] = {cooldown = 24, class = "HUNTER"}, --Counter Shot
[190927] = {cooldown = 6, class = "HUNTER"}, --Harpoon
[117526] = {cooldown = 45, class = "HUNTER"}, --Binding Shot
[24394] = {cooldown = 0, class = "HUNTER"}, --Intimidation
[117405] = {cooldown = 0, class = "HUNTER"}, --Binding Shot
[19577] = {cooldown = 60, class = "HUNTER"}, --Intimidation
[1513] = {cooldown = 0, class = "HUNTER"}, --Scare Beast
[3355] = {cooldown = 30, class = "HUNTER"}, --Freezing Trap
[203337] = {cooldown = 30, class = "HUNTER"}, --Freezing trap with diamond ice talent
[31661] = {cooldown = 45, class = "MAGE"}, --Dragon's Breath
[161353] = {cooldown = 0, class = "MAGE"}, --Polymorph
[277787] = {cooldown = 0, class = "MAGE"}, --Polymorph
[157981] = {cooldown = 30, class = "MAGE"}, --Blast Wave
[82691] = {cooldown = 0, class = "MAGE"}, --Ring of Frost
[118] = {cooldown = 0, class = "MAGE"}, --Polymorph
[161354] = {cooldown = 0, class = "MAGE"}, --Polymorph
[157997] = {cooldown = 25, class = "MAGE"}, --Ice Nova
[391622] = {cooldown = 0, class = "MAGE"}, --Polymorph
[28271] = {cooldown = 0, class = "MAGE"}, --Polymorph
[122] = {cooldown = 0, class = "MAGE"}, --Frost Nova
[277792] = {cooldown = 0, class = "MAGE"}, --Polymorph
[61721] = {cooldown = 0, class = "MAGE"}, --Polymorph
[126819] = {cooldown = 0, class = "MAGE"}, --Polymorph
[61305] = {cooldown = 0, class = "MAGE"}, --Polymorph
[28272] = {cooldown = 0, class = "MAGE"}, --Polymorph
[2139] = {cooldown = 24, class = "MAGE"}, --Counterspell
[198909] = {cooldown = 0, class = "MONK"}, --Song of Chi-Ji
[119381] = {cooldown = 60, class = "MONK"}, --Leg Sweep
[107079] = {cooldown = 120, class = "MONK"}, --Quaking Palm
[116706] = {cooldown = 0, class = "MONK"}, --Disable
[115078] = {cooldown = 45, class = "MONK"}, --Paralysis
[116705] = {cooldown = 15, class = "MONK"}, --Spear Hand Strike
[31935] = {cooldown = 15, class = "PALADIN"}, --Avenger's Shield
[20066] = {cooldown = 15, class = "PALADIN"}, --Repentance
[217824] = {cooldown = 0, class = "PALADIN"}, --Shield of Virtue
[105421] = {cooldown = 0, class = "PALADIN"}, --Blinding Light
[10326] = {cooldown = 15, class = "PALADIN"}, --Turn Evil
[853] = {cooldown = 60, class = "PALADIN"}, --Hammer of Justice
[96231] = {cooldown = 15, class = "PALADIN"}, --Rebuke
[205364] = {cooldown = 30, class = "PRIEST"}, --Dominate Mind
[64044] = {cooldown = 45, class = "PRIEST"}, --Psychic Horror
[226943] = {cooldown = 0, class = "PRIEST"}, --Mind Bomb
[15487] = {cooldown = 45, class = "PRIEST"}, --Silence
[605] = {cooldown = 0, class = "PRIEST"}, --Mind Control
[8122] = {cooldown = 45, class = "PRIEST"}, --Psychic Scream
[200200] = {cooldown = 60, class = "PRIEST"}, --Holy Word: Chastise
[9484] = {cooldown = 0, class = "PRIEST"}, --Shackle Undead
[200196] = {cooldown = 60, class = "PRIEST"}, --Holy Word: Chastise
[6770] = {cooldown = 0, class = "ROGUE"}, --Sap
[2094] = {cooldown = 120, class = "ROGUE"}, --Blind
[1766] = {cooldown = 15, class = "ROGUE"}, --Kick
[427773] = {cooldown = 0, class = "ROGUE"}, --Blind
[408] = {cooldown = 20, class = "ROGUE"}, --Kidney Shot
[1776] = {cooldown = 20, class = "ROGUE"}, --Gouge
[1833] = {cooldown = 0, class = "ROGUE"}, --Cheap Shot
[211015] = {cooldown = 30, class = "SHAMAN"}, --Hex
[269352] = {cooldown = 30, class = "SHAMAN"}, --Hex
[277778] = {cooldown = 30, class = "SHAMAN"}, --Hex
[64695] = {cooldown = 0, class = "SHAMAN"}, --Earthgrab
[57994] = {cooldown = 12, class = "SHAMAN"}, --Wind Shear
[197214] = {cooldown = 40, class = "SHAMAN"}, --Sundering
[118905] = {cooldown = 0, class = "SHAMAN"}, --Static Charge
[277784] = {cooldown = 30, class = "SHAMAN"}, --Hex
[309328] = {cooldown = 30, class = "SHAMAN"}, --Hex
[211010] = {cooldown = 30, class = "SHAMAN"}, --Hex
[210873] = {cooldown = 30, class = "SHAMAN"}, --Hex
[211004] = {cooldown = 30, class = "SHAMAN"}, --Hex
[51514] = {cooldown = 30, class = "SHAMAN"}, --Hex
[305485] = {cooldown = 30, class = "SHAMAN"}, --Lightning Lasso
[89766] = {cooldown = 30, class = "WARLOCK"}, --Axe Toss (pet felguard ability)
[6789] = {cooldown = 45, class = "WARLOCK"}, --Mortal Coil
[118699] = {cooldown = 0, class = "WARLOCK"}, --Fear
[710] = {cooldown = 0, class = "WARLOCK"}, --Banish
[212619] = {cooldown = 60, class = "WARLOCK"}, --Call Felhunter
[19647] = {cooldown = 24, class = "WARLOCK"}, --Spell Lock
[30283] = {cooldown = 60, class = "WARLOCK"}, --Shadowfury
[5484] = {cooldown = 40, class = "WARLOCK"}, --Howl of Terror
[6552] = {cooldown = 15, class = "WARRIOR"}, --Pummel
[132168] = {cooldown = 0, class = "WARRIOR"}, --Shockwave
[132169] = {cooldown = 0, class = "WARRIOR"}, --Storm Bolt
[5246] = {cooldown = 90, class = "WARRIOR"}, --Intimidating Shout
}
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {} --default fallback
if (GetBuildInfo():match ("%d") == "1") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
elseif (GetBuildInfo():match ("%d") == "2") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
elseif (GetBuildInfo():match ("%d") == "3") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
else
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {
}
end
--interrupt list using proxy from cooldown list
--this list should be expansion and combatlog safe
LIB_OPEN_RAID_SPELL_INTERRUPT = {
}
--override list of spells with more than one effect, example: multiple types of polymorph
LIB_OPEN_RAID_SPELL_DEFAULT_IDS = {
}
LIB_OPEN_RAID_DATABASE_LOADED = true
@@ -1,679 +0,0 @@
--data for shadowlands expansion
local versionString, revision, launchDate, gameVersion = GetBuildInfo()
if (gameVersion >= 100000 or gameVersion < 90000) then
return
end
--localization
local gameLanguage = GetLocale()
local L = { --default localization
["STRING_EXPLOSION"] = "explosion",
["STRING_MIRROR_IMAGE"] = "Mirror Image",
["STRING_CRITICAL_ONLY"] = "critical",
["STRING_BLOOM"] = "Bloom", --lifebloom 'bloom' healing
["STRING_GLAIVE"] = "Glaive", --DH glaive toss
["STRING_MAINTARGET"] = "Main Target",
["STRING_AOE"] = "AoE", --multi targets
["STRING_SHADOW"] = "Shadow", --the spell school 'shadow'
["STRING_PHYSICAL"] = "Physical", --the spell school 'physical'
["STRING_PASSIVE"] = "Passive", --passive spell
["STRING_TEMPLAR_VINDCATION"] = "Templar's Vindication", --paladin spell
["STRING_PROC"] = "proc", --spell proc
["STRING_TRINKET"] = "Trinket", --trinket
}
if (gameLanguage == "enUS") then
--default language
elseif (gameLanguage == "deDE") then
L["STRING_EXPLOSION"] = "Explosion"
L["STRING_MIRROR_IMAGE"] = "Bilder spiegeln"
L["STRING_CRITICAL_ONLY"] = "kritisch"
elseif (gameLanguage == "esES") then
L["STRING_EXPLOSION"] = "explosión"
L["STRING_MIRROR_IMAGE"] = "Imagen de espejo"
L["STRING_CRITICAL_ONLY"] = "crítico"
elseif (gameLanguage == "esMX") then
L["STRING_EXPLOSION"] = "explosión"
L["STRING_MIRROR_IMAGE"] = "Imagen de espejo"
L["STRING_CRITICAL_ONLY"] = "crítico"
elseif (gameLanguage == "frFR") then
L["STRING_EXPLOSION"] = "explosion"
L["STRING_MIRROR_IMAGE"] = "Effet miroir"
L["STRING_CRITICAL_ONLY"] = "critique"
elseif (gameLanguage == "itIT") then
L["STRING_EXPLOSION"] = "esplosione"
L["STRING_MIRROR_IMAGE"] = "Immagine Speculare"
L["STRING_CRITICAL_ONLY"] = "critico"
elseif (gameLanguage == "koKR") then
L["STRING_EXPLOSION"] = "폭발"
L["STRING_MIRROR_IMAGE"] = "미러 이미지"
L["STRING_CRITICAL_ONLY"] = "치명타"
elseif (gameLanguage == "ptBR") then
L["STRING_EXPLOSION"] = "explosão"
L["STRING_MIRROR_IMAGE"] = "Imagem Espelhada"
L["STRING_CRITICAL_ONLY"] = "critico"
elseif (gameLanguage == "ruRU") then
L["STRING_EXPLOSION"] = "взрыв"
L["STRING_MIRROR_IMAGE"] = "Зеркальное изображение"
L["STRING_CRITICAL_ONLY"] = "критический"
elseif (gameLanguage == "zhCN") then
L["STRING_EXPLOSION"] = "爆炸"
L["STRING_MIRROR_IMAGE"] = "镜像"
L["STRING_CRITICAL_ONLY"] = "爆击"
elseif (gameLanguage == "zhTW") then
L["STRING_EXPLOSION"] = "爆炸"
L["STRING_MIRROR_IMAGE"] = "鏡像"
L["STRING_CRITICAL_ONLY"] = "致命"
end
LIB_OPEN_RAID_MANA_POTIONS = {}
LIB_OPEN_RAID_BLOODLUST = {
[2825] = true, --bloodlust
[32182] = true, --heroism
[80353] = true, --timewarp
[90355] = true, --ancient hysteria
[309658] = true, --current exp drums
}
LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 180653
LIB_OPEN_RAID_AUGMENTATED_RUNE = 347901
LIB_OPEN_RAID_COVENANT_ICONS = {
[[Interface\ICONS\UI_Sigil_Kyrian]], --kyrian
[[Interface\ICONS\UI_Sigil_Venthyr]], --venthyr
[[Interface\ICONS\UI_Sigil_NightFae]], --nightfae
[[Interface\ICONS\UI_Sigil_Necrolord]], --necrolords
}
--which gear slots can be enchanted on the latest retail version of the game
--when the value is a number, the slot only receives enchants for a specific attribute
LIB_OPEN_RAID_ENCHANT_SLOTS = {
--[INVSLOT_NECK] = true,
[INVSLOT_BACK] = true, --for all
[INVSLOT_CHEST] = true, --for all
[INVSLOT_FINGER1] = true, --for all
[INVSLOT_FINGER2] = true, --for all
[INVSLOT_MAINHAND] = true, --for all
[INVSLOT_FEET] = 2, --agility only
[INVSLOT_WRIST] = 1, --intellect only
[INVSLOT_HAND] = 3, --strenth only
}
-- how to get the enchantId:
-- local itemLink = GetInventoryItemLink("player", slotId)
-- local enchandId = select(3, strsplit(":", itemLink))
-- print("enchantId:", enchandId)
LIB_OPEN_RAID_ENCHANT_IDS = {
--FEET
--[6207] = INVSLOT_FEET, --[Enchant Boots - Speed of Soul]
[6211] = INVSLOT_FEET, --[Enchant Boots - Eternal Agility] + 15 agi
[6212] = INVSLOT_FEET, --[Enchant Boots - Agile Soulwalker] + 10 agi
--WRIST
--[6222] = INVSLOT_WRIST, [Enchant Bracers - Shaded Hearthing]
[6219] = INVSLOT_WRIST, --[Enchant Bracers - Illuminated Soul] + 10 int
[6220] = INVSLOT_WRIST, --[Enchant Bracers - Eternal Intellect] + 15 int
--HAND
--[6205] = INVSLOT_HAND, --[Enchant Gloves - Shadowlands Gathering]
[6209] = INVSLOT_HAND, --[Enchant Gloves - Strength of Soul] +10 str
[6210] = INVSLOT_HAND, --[Enchant Gloves - Eternal Strength] +15 str
--FINGER
[6164] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Critical Strike] +16
[6166] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Haste] +16
[6168] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Mastery] +16
[6170] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Versatility] +16
--BACK
[6202] = INVSLOT_BACK, --[Enchant Cloak - Fortified Speed] +20 stam +30 speed
[6203] = INVSLOT_BACK, --[Enchant Cloak - Fortified Avoidance] +20 stam +30 avoidance
[6204] = INVSLOT_BACK, --[Enchant Cloak - Fortified Leech]
[6208] = INVSLOT_BACK, --[Enchant Cloak - Soul Vitality]
--CHEST
[6213] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bulwark] +25 armor +20 agi or str
[6214] = INVSLOT_CHEST, --[Enchant Chest - Eternal Skirmish] +20 agi or str +more white damage
[6217] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bounds] +20 int + 6% mana
[6216] = INVSLOT_CHEST, --[Enchant Chest - Sacred Stats] +20 all stats
[6230] = INVSLOT_CHEST, --[Enchant Chest - Eternal Stats] +30 all stats
--MAINHAND
[6223] = INVSLOT_MAINHAND, --[Enchant Weapon - Lightless Force] + shadow wave damage
[6226] = INVSLOT_MAINHAND, --[Enchant Weapon - Eternal Grace] + burst of healing done
[6227] = INVSLOT_MAINHAND, --[Enchant Weapon - Ascended Vigor] + healing received increased
[6228] = INVSLOT_MAINHAND, --[Enchant Weapon - Sinful Revelation] + 6% bleed damage
[6229] = INVSLOT_MAINHAND, --[Enchant Weapon - Celestial Guidance] + 5% agility
[6243] = INVSLOT_MAINHAND, --[Runeforging: Rune of Hysteria]
[3370] = INVSLOT_MAINHAND, --[Runeforging: Rune of Razorice]
[6241] = INVSLOT_MAINHAND, --[Runeforging: Rune of Sanguination]
[6242] = INVSLOT_MAINHAND, --[Runeforging: Rune of Spellwarding]
[6245] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Apocalypse]
[3368] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Fallen Crusader]
[3847] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Stoneskin Gargoyle]
[6244] = INVSLOT_MAINHAND, --[Runeforging: Rune of Unending Thirst]
}
-- how to get the gemId:
-- local itemLink = GetInventoryItemLink("player", slotId)
-- local gemId = select(4, strsplit(":", itemLink))
-- print("gemId:", gemId)
LIB_OPEN_RAID_GEM_IDS = {
[173126] = true, --Straddling Jewel Doublet (green, +12 speed)
[173125] = true, --Revitalizing Jewel Doublet (green, +100 health)
[173130] = true, --Masterful Jewel Cluster (blue, master)
[173129] = true, --Versatile Jewel Cluster (blue, versatility)
[173127] = true, --Deadly Jewel Cluster (blue, crit)
[173128] = true, --Quick Jewel Cluster (blue, haste)
[168636] = true, --Leviathan's Eye of Strength (purple, strength)
[168638] = true, --Leviathan's Eye of Intellect (purple, intellect)
[169220] = true, --Straddling Sage Agate (blue, movement speed)
}
--/dump GetWeaponEnchantInfo()
LIB_OPEN_RAID_WEAPON_ENCHANT_IDS = {
[6188] = true, --shadowcore oil
[6190] = true, --embalmer's oil
[6201] = true, --weighted
[6200] = true, --sharpened
[5400] = true, --flametongue
[5401] = true, --windfury
}
--buff spellId, the value of the food is the tier level
LIB_OPEN_RAID_FOOD_BUFF = {
[259454] = 1, --(agility) Feast of Gluttonous Hedonism
[308434] = 1, --(critical) Phantasmal Souffle and Fries
[308397] = 1, --(critical +18) Butterscotch Marinated Ribs
[308400] = 1, --(critical +30) Spinefin Souffle and Fries
[308488] = 1, --(haste) Tenebrous Crown Roast Aspic
[308404] = 1, --(haste +18) Cinnamon Bonefish Stew
[308405] = 1, --(haste +30) Tenebrous Crown Roast Aspic
[308506] = 1, --(mastery) Crawler Ravioli with Apple Sauce
[308412] = 1, --(mastery +18) Meaty Apple Dumplings
[308413] = 1, --(mastery +30) Iridescent Ravioli with Apple Sauce
[308525] = 1, --(stamina) Banana Beef Pudding
[308414] = 1, --(stamina +14) Pickled Meat Smoothie
[308415] = 1, --(stamina +22) Banana Beef Pudding
[308514] = 1, --(versatility) Steak a la Mode
[308425] = 1, --(versatility +18) Sweet Silvergill Sausages
[308426] = 1, --(versatility +30) Steak a la Mode
[308419] = 1, --(periodicaly damage) Smothered Shank
[327715] = 1, --(speed) Fried Bonefish
--feasts
[327706] = 2, --strength +20
[327707] = 2, --stamina +20
[327708] = 2, --intellect +20
[327709] = 2, --agility +20
[327704] = 2, --intellect +18
[327701] = 2, --strength +18
[327705] = 2, --agility +18
}
LIB_OPEN_RAID_FLASK_BUFF = {
[307185] = true, --Spectral Flask of Power
[307187] = true, --Spectral Stamina Flask
[307166] = true, --Eternal Flask
}
LIB_OPEN_RAID_MELEE_SPECS = {
[251] = "DEATHKNIGHT",
[252] = "DEATHKNIGHT",
[577] = "DEMONHUNTER",
[103] = "DRUID",
--[255] = "Survival", --not in the list due to the long interrupt time
[269] = "MONK",
[70] = "PALADIN",
[259] = "ROGUE",
[260] = "ROGUE",
[261] = "ROGUE",
[263] = "SHAMAN",
[71] = "WARRIOR",
[72] = "WARRIOR",
}
--tells the duration, requirements and cooldown
--information about a cooldown is mainly get from tooltips
--if talent is required, use the command:
--/dump GetTalentInfo (talentTier, talentColumn, 1)
--example: to get the second talent of the last talent line, use: /dump GetTalentInfo (7, 2, 1)
LIB_OPEN_RAID_COOLDOWNS_INFO = {
-- Filter Types:
-- 1 attack cooldown
-- 2 personal defensive cooldown
-- 3 targetted defensive cooldown
-- 4 raid defensive cooldown
-- 5 personal utility cooldown
-- 6 interrupt
--interrupts
[6552] = {class = "WARRIOR", specs = {71, 72, 73}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Pummel
[2139] = {class = "MAGE", specs = {62, 63, 64}, cooldown = 24, silence = 6, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Counterspell
[15487] = {class = "PRIEST", specs = {258}, cooldown = 45, silence = 4, talent = false, cooldownWithTalent = 30, cooldownTalentId = 23137, type = 6, charges = 1}, --Silence (shadow) Last Word Talent to reduce cooldown in 15 seconds
[1766] = {class = "ROGUE", specs = {259, 260, 261}, cooldown = 15, silence = 5, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Kick
[96231] = {class = "PALADIN", specs = {66, 70}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Rebuke (protection and retribution)
[116705] = {class = "MONK", specs = {268, 269}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Spear Hand Strike (brewmaster and windwalker)
[57994] = {class = "SHAMAN", specs = {262, 263, 264}, cooldown = 12, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Wind Shear
[47528] = {class = "DEATHKNIGHT", specs = {250, 251, 252}, cooldown = 15, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Mind Freeze
[106839] = {class = "DRUID", specs = {103, 104}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Skull Bash (feral, guardian)
[78675] = {class = "DRUID", specs = {102}, cooldown = 60, silence = 8, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Solar Beam (balance)
[147362] = {class = "HUNTER", specs = {253, 254}, cooldown = 24, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Counter Shot (beast mastery, marksmanship)
[187707] = {class = "HUNTER", specs = {255}, cooldown = 15, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Muzzle (survival)
[183752] = {class = "DEMONHUNTER", specs = {577, 581}, cooldown = 15, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Disrupt
[19647] = {class = "WARLOCK", specs = {265, 266, 267}, cooldown = 24, silence = 6, talent = false, cooldownWithTalent = false, cooldownTalentId = false, pet = 417, type = 6, charges = 1}, --Spell Lock (pet felhunter ability)
[89766] = {class = "WARLOCK", specs = {266}, cooldown = 30, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, pet = 17252, type = 6, charges = 1}, --Axe Toss (pet felguard ability)
--paladin
-- 65 - Holy
-- 66 - Protection
-- 70 - Retribution
[31884] = {cooldown = 120, duration = 20, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 1}, --Avenging Wrath
[216331] = {cooldown = 120, duration = 20, specs = {65}, talent =22190, charges = 1, class = "PALADIN", type = 1}, --Avenging Crusader (talent)
[498] = {cooldown = 60, duration = 8, specs = {65}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Divine Protection
[642] = {cooldown = 300, duration = 8, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Divine Shield
[105809] = {cooldown = 90, duration = 20, specs = {65,66,70}, talent =22164, charges = 1, class = "PALADIN", type = 2}, --Holy Avenger (talent)
[152262] = {cooldown = 45, duration = 15, specs = {65,66,70}, talent =17601, charges = 1, class = "PALADIN", type = 2}, --Seraphim
[633] = {cooldown = 600, duration = false, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 3}, --Lay on Hands
[1022] = {cooldown = 300, duration = 10, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 3}, --Blessing of Protection
[6940] = {cooldown = 120, duration = 12, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 3}, --Blessing of Sacrifice
[31821] = {cooldown = 180, duration = 8, specs = {65}, talent =false, charges = 1, class = "PALADIN", type = 4}, --Aura Mastery
[1044] = {cooldown = 25, duration = 8, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 5}, --Blessing of Freedom
[853] = {cooldown = 60, duration = 6, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 5}, --Hammer of Justice
[115750] = {cooldown = 90, duration = 6, specs = {65,66,70}, talent =21811, charges = 1, class = "PALADIN", type = 5}, --Blinding Light(talent)
[327193] = {cooldown = 90, duration = 15, specs = {66}, talent =23468, charges = 1, class = "PALADIN", type = 1}, --Moment of Glory (talent)
[31850] = {cooldown = 120, duration = 8, specs = {66}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Ardent Defender
[86659] = {cooldown = 300, duration = 8, specs = {66}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Guardian of Ancient Kings
[204018] = {cooldown = 180, duration = 10, specs = {66}, talent =22435, charges = 1, class = "PALADIN", type = 3}, --Blessing of Spellwarding (talent)
[231895] = {cooldown = 120, duration = 25, specs = {70}, talent =22215, charges = 1, class = "PALADIN", type = 1}, --Crusade (talent)
[205191] = {cooldown = 60, duration = 10, specs = {70}, talent =22183, charges = 1, class = "PALADIN", type = 2}, --Eye for an Eye (talent)
[184662] = {cooldown = 120, duration = 15, specs = {70}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Shield of Vengeance
--warrior
-- 71 - Arms
-- 72 - Fury
-- 73 - Protection
[107574] = {cooldown = 90, duration = 20, specs = {71,73}, talent =22397, charges = 1, class = "WARRIOR", type = 1}, --Avatar
[227847] = {cooldown = 90, duration = 5, specs = {71}, talent =false, charges = 1, class = "WARRIOR", type = 1}, --Bladestorm
[46924] = {cooldown = 60, duration = 4, specs = {72}, talent =22400, charges = 1, class = "WARRIOR", type = 1}, --Bladestorm (talent)
[152277] = {cooldown = 60, duration = 6, specs = {71}, talent =21667, charges = 1, class = "WARRIOR", type = 1}, --Ravager (talent)
[228920] = {cooldown = 60, duration = 6, specs = {73}, talent =23099, charges = 1, class = "WARRIOR", type = 1}, --Ravager (talent)
[118038] = {cooldown = 180, duration = 8, specs = {71}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Die by the Sword
[97462] = {cooldown = 180, duration = 10, specs = {71,72,73}, talent =false, charges = 1, class = "WARRIOR", type = 4}, --Rallying Cry
[1719] = {cooldown = 90, duration = 10, specs = {72}, talent =false, charges = 1, class = "WARRIOR", type = 1}, --Recklessness
[184364] = {cooldown = 120, duration = 8, specs = {72}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Enraged Regeneration
[12975] = {cooldown = 180, duration = 15, specs = {73}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Last Stand
[871] = {cooldown = 8, duration = 240, specs = {73}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Shield Wall
[64382] = {cooldown = 180, duration = false, specs = {71,72,73}, talent =false, charges = 1, class = "WARRIOR", type = 5}, --Shattering Throw
[5246] = {cooldown = 90, duration = 8, specs = {71,72,73}, talent =false, charges = 1, class = "WARRIOR", type = 5}, --Intimidating Shout
--warlock
-- 265 - Affliction
-- 266 - Demonology
-- 267 - Destruction
[205180] = {cooldown = 180, duration = 20, specs = {265}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Summon Darkglare
--[342601] = {cooldown = 3600, duration = false, specs = {}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Ritual of Doom
[113860] = {cooldown = 120, duration = 20, specs = {265}, talent =19293, charges = 1, class = "WARLOCK", type = 1}, --Dark Soul: Misery (talent)
[104773] = {cooldown = 180, duration = 8, specs = {265,266,267}, talent =false, charges = 1, class = "WARLOCK", type = 2}, --Unending Resolve
[108416] = {cooldown = 60, duration = 20, specs = {265,266,267}, talent =19286, charges = 1, class = "WARLOCK", type = 2}, --Dark Pact (talent)
[265187] = {cooldown = 90, duration = 15, specs = {266}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Summon Demonic Tyrant
[111898] = {cooldown = 120, duration = 15, specs = {266}, talent =21717, charges = 1, class = "WARLOCK", type = 1}, --Grimoire: Felguard (talent)
[267171] = {cooldown = 60, duration = false, specs = {266}, talent =23138, charges = 1, class = "WARLOCK", type = 1}, --Demonic Strength (talent)
[267217] = {cooldown = 180, duration = 20, specs = {266}, talent =23091, charges = 1, class = "WARLOCK", type = 1}, --Nether Portal
[1122] = {cooldown = 180, duration = 30, specs = {267}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Summon Infernal
[113858] = {cooldown = 120, duration = 20, specs = {267}, talent =23092, charges = 1, class = "WARLOCK", type = 1}, --Dark Soul: Instability (talent)
[30283] = {cooldown = 60, duration = 3, specs = {265,266,267}, talent =false, charges = 1, class = "WARLOCK", type = 5}, --Shadowfury
[333889] = {cooldown = 180, duration = 15, specs = {265,266,267}, talent =false, charges = 1, class = "WARLOCK", type = 5}, --Fel Domination
[5484] = {cooldown = 40, duration = 20, specs = {265,266,267}, talent =23465, charges = 1, class = "WARLOCK", type = 5}, --Howl of Terror (talent)
--shaman
-- 262 - Elemental
-- 263 - Enchancment
-- 264 - Restoration
[198067] = {cooldown = 150, duration = 30, specs = {262}, talent =false, charges = 1, class = "SHAMAN", type = 1}, --Fire Elemental
[192249] = {cooldown = 150, duration = 30, specs = {262}, talent =19272, charges = 1, class = "SHAMAN", type = 1}, --Storm Elemental (talent)
[108271] = {cooldown = 90, duration = 8, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 2}, --Astral Shift
[108281] = {cooldown = 120, duration = 10, specs = {262,263}, talent =22172, charges = 1, class = "SHAMAN", type = 4}, --Ancestral Guidance (talent)
[51533] = {cooldown = 120, duration = 15, specs = {263}, talent =false, charges = 1, class = "SHAMAN", type = 1}, --Feral Spirit
[114050] = {cooldown = 180, duration = 15, specs = {262}, talent =21675, charges = 1, class = "SHAMAN", type = 1}, --Ascendance (talent)
[114051] = {cooldown = 180, duration = 15, specs = {263}, talent =21972, charges = 1, class = "SHAMAN", type = 1}, --Ascendance (talent)
[114052] = {cooldown = 180, duration = 15, specs = {264}, talent =22359, charges = 1, class = "SHAMAN", type = 4}, --Ascendance (talent)
[98008] = {cooldown = 180, duration = 6, specs = {264}, talent =false, charges = 1, class = "SHAMAN", type = 4}, --Spirit Link Totem
[108280] = {cooldown = 180, duration = 10, specs = {264}, talent =false, charges = 1, class = "SHAMAN", type = 4}, --Healing Tide Totem
[207399] = {cooldown = 240, duration = 30, specs = {264}, talent =22323, charges = 1, class = "SHAMAN", type = 4}, --Ancestral Protection Totem (talent)
[16191] = {cooldown = 180, duration = 8, specs = {264}, talent =false, charges = 1, class = "SHAMAN", type = 4}, --Mana Tide Totem
[198103] = {cooldown = 300, duration = 60, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 2}, --Earth Elemental
[192058] = {cooldown = 60, duration = false, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 5}, --Capacitor Totem
[8143] = {cooldown = 60, duration = 10, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 5}, --Tremor Totem
[192077] = {cooldown = 120, duration = 15, specs = {262,263,264}, talent =21966, charges = 1, class = "SHAMAN", type = 5}, --Wind Rush Totem (talent)
--monk
-- 268 - Brewmaster
-- 269 - Windwalker
-- 270 - Restoration
[132578] = {cooldown = 180, duration = 25, specs = {268}, talent =false, charges = 1, class = "MONK", type = 1}, --Invoke Niuzao, the Black Ox
[115080] = {cooldown = 180, duration = false, specs = {268,269,270}, talent =false, charges = 1, class = "MONK", type = 1}, --Touch of Death
[115203] = {cooldown = 420, duration = 15, specs = {268}, talent =false, charges = 1, class = "MONK", type = 2}, --Fortifying Brew
[115176] = {cooldown = 300, duration = 8, specs = {268}, talent =false, charges = 1, class = "MONK", type = 2}, --Zen Meditation
[115399] = {cooldown = 120, duration = false, specs = {268}, talent =19992, charges = 1, class = "MONK", type = 2}, --Black Ox brew (talent)
[122278] = {cooldown = 120, duration = 10, specs = {268,269,270}, talent =20175, charges = 1, class = "MONK", type = 2}, --Dampen Harm (talent)
[137639] = {cooldown = 90, duration = 15, specs = {269}, talent =false, charges = 1, class = "MONK", type = 1}, --Storm, Earth, and Fire
[123904] = {cooldown = 120, duration = 24, specs = {269}, talent =false, charges = 1, class = "MONK", type = 1}, --Invoke Xuen, the White Tiger
[152173] = {cooldown = 90, duration = 12, specs = {269}, talent =21191, charges = 1, class = "MONK", type = 1}, --Serenity (talent)
[122470] = {cooldown = 90, duration = 6, specs = {269}, talent =false, charges = 1, class = "MONK", type = 2}, --Touch of Karma
[322118] = {cooldown = 180, duration = 25, specs = {270}, talent =false, charges = 1, class = "MONK", type = 4}, --Invoke Yulon, the Jade serpent
[243435] = {cooldown = 90, duration = 15, specs = {269,270}, talent =false, charges = 1, class = "MONK", type = 2}, --Fortifying Brew
[122783] = {cooldown = 90, duration = 6, specs = {269,270}, talent =20173, charges = 1, class = "MONK", type = 2}, --Diffuse Magic (talent)
[116849] = {cooldown = 120, duration = 12, specs = {270}, talent =false, charges = 1, class = "MONK", type = 3}, --Life Cocoon
[115310] = {cooldown = 180, duration = false, specs = {270}, talent =false, charges = 1, class = "MONK", type = 4}, --Revival
[197908] = {cooldown = 90, duration = 10, specs = {270}, talent =22166, charges = 1, class = "MONK", type = 5}, --Mana tea (talent)
[116844] = {cooldown = 45, duration = 5, specs = {268,269,270}, talent =19995, charges = 1, class = "MONK", type = 5}, --Ring of peace (talent)
[119381] = {cooldown = 50, duration = 3, specs = {268,269,270}, talent =false, charges = 1, class = "MONK", type = 5}, --Leg Sweep
--hunter
-- 253 - Beast Mastery
-- 254 - Marksmenship
-- 255 - Survival
[193530] = {cooldown = 120, duration = 20, specs = {253}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Aspect of the Wild
[19574] = {cooldown = 90, duration = 12, specs = {253}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Bestial Wrath
[201430] = {cooldown = 180, duration = 12, specs = {253}, talent =23044, charges = 1, class = "HUNTER", type = 1}, --Stampede (talent)
[288613] = {cooldown = 180, duration = 15, specs = {254}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Trueshot
[199483] = {cooldown = 60, duration = 60, specs = {253,254,255}, talent =23100, charges = 1, class = "HUNTER", type = 2}, --Camouflage (talent)
[281195] = {cooldown = 180, duration = 6, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 2}, --Survival of the Fittest
[266779] = {cooldown = 120, duration = 20, specs = {255}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Coordinated Assault
[186265] = {cooldown = 180, duration = 8, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 2}, --Aspect of the Turtle
[109304] = {cooldown = 120, duration = false, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 2}, --Exhilaration
[186257] = {cooldown = 144, duration = 14, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Aspect of the cheetah
[19577] = {cooldown = 60, duration = 5, specs = {253,255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Intimidation
[109248] = {cooldown = 45, duration = 10, specs = {253,254,255}, talent =22499, charges = 1, class = "HUNTER", type = 5}, --Binding Shot (talent)
[187650] = {cooldown = 25, duration = 60, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Freezing Trap
[186289] = {cooldown = 72, duration = 15, specs = {255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Aspect of the eagle
--druid
-- 102 - Balance
-- 103 - Feral
-- 104 - Guardian
-- 105 - Restoration
[77761] = {cooldown = 120, duration = 8, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 4}, --Stampeding Roar
[194223] = {cooldown = 180, duration = 20, specs = {102}, talent =false, charges = 1, class = "DRUID", type = 1}, --Celestial Alignment
[102560] = {cooldown = 180, duration = 30, specs = {102}, talent =21702, charges = 1, class = "DRUID", type = 1}, --Incarnation: Chosen of Elune (talent)
[22812] = {cooldown = 60, duration = 12, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 2}, --Barkskin
[108238] = {cooldown = 90, duration = false, specs = {102,103,104,105}, talent =18570, charges = 1, class = "DRUID", type = 2}, --Renewal (talent)
[29166] = {cooldown = 180, duration = 12, specs = {102,105}, talent =false, charges = 1, class = "DRUID", type = 3}, --Innervate
[106951] = {cooldown = 180, duration = 15, specs = {103,104}, talent =false, charges = 1, class = "DRUID", type = 1}, --Berserk
[102543] = {cooldown = 30, duration = 180, specs = {103}, talent =21704, charges = 1, class = "DRUID", type = 1}, --Incarnation: King of the Jungle (talent)
[61336] = {cooldown = 120, duration = 6, specs = {103,104}, talent =false, charges = 2, class = "DRUID", type = 2}, --Survival Instincts (2min feral 4min guardian, same spellid)
[102558] = {cooldown = 180, duration = 30, specs = {104}, talent =22388, charges = 1, class = "DRUID", type = 2}, --Incarnation: Guardian of Ursoc (talent)
[33891] = {cooldown = 180, duration = 30, specs = {105}, talent =22421, charges = 1, class = "DRUID", type = 2}, --Incarnation: Tree of Life (talent)
[102342] = {cooldown = 60, duration = 12, specs = {105}, talent =false, charges = 1, class = "DRUID", type = 3}, --Ironbark
[203651] = {cooldown = 60, duration = false, specs = {105}, talent =22422, charges = 1, class = "DRUID", type = 3}, --Overgrowth (talent)
[740] = {cooldown = 180, duration = 8, specs = {105}, talent =false, charges = 1, class = "DRUID", type = 4}, --Tranquility
[197721] = {cooldown = 90, duration = 8, specs = {105}, talent =22404, charges = 1, class = "DRUID", type = 4}, --Flourish (talent)
[132469] = {cooldown = 30, duration = false, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 5}, --Typhoon
[319454] = {cooldown = 300, duration = 45, specs = {102,103,104,105}, talent =18577, charges = 1, class = "DRUID", type = 5}, --Heart of the Wild (talent)
[102793] = {cooldown = 60, duration = 10, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 5}, --Ursol's Vortex
--death knight
-- 252 - Unholy
-- 251 - Frost
-- 252 - Blood
[275699] = {cooldown = 90, duration = 15, specs = {252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Apocalypse
[42650] = {cooldown = 480, duration = 30, specs = {252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Army of the Dead
[49206] = {cooldown = 180, duration = 30, specs = {252}, talent =22110, charges = 1, class = "DEATHKNIGHT", type = 1}, --Summon Gargoyle (talent)
[207289] = {cooldown = 78, duration = 12, specs = {252}, talent =22538, charges = 1, class = "DEATHKNIGHT", type = 1}, --Unholy Assault (talent)
[48743] = {cooldown = 120, duration = 15, specs = {250,251,252}, talent =23373, charges = 1, class = "DEATHKNIGHT", type = 2}, --Death Pact (talent)
[48707] = {cooldown = 60, duration = 10, specs = {250,251,252}, talent =23373, charges = 1, class = "DEATHKNIGHT", type = 2}, --Anti-magic Shell
[152279] = {cooldown = 120, duration = 5, specs = {251}, talent =22537, charges = 1, class = "DEATHKNIGHT", type = 1}, --Breath of Sindragosa (talent)
[47568] = {cooldown = 120, duration = 20, specs = {251}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Empower Rune Weapon
[279302] = {cooldown = 120, duration = 10, specs = {251}, talent =22535, charges = 1, class = "DEATHKNIGHT", type = 1}, --Frostwyrm's Fury (talent)
[49028] = {cooldown = 120, duration = 8, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Dancing Rune Weapon
[55233] = {cooldown = 90, duration = 10, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 2}, --Vampiric Blood
[48792] = {cooldown = 120, duration = 8, specs = {250,251,252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 2}, --Icebound Fortitude
[51052] = {cooldown = 120, duration = 10, specs = {250,251,252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 4}, --Anti-magic Zone
[219809] = {cooldown = 60, duration = 8, specs = {250}, talent =23454, charges = 1, class = "DEATHKNIGHT", type = 2}, --Tombstone (talent)
[108199] = {cooldown = 120, duration = false, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 5}, --Gorefiend's Grasp
[207167] = {cooldown = 60, duration = 5, specs = {251}, talent =22519, charges = 1, class = "DEATHKNIGHT", type = 5}, --Blinding Sleet (talent)
[108194] = {cooldown = 45, duration = 4, specs = {251,252}, talent =22520, charges = 1, class = "DEATHKNIGHT", type = 5}, --Asphyxiate (talent)
[221562] = {cooldown = 45, duration = 5, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 5}, --Asphyxiate
[212552] = {cooldown = 60, duration = 4, specs = {250,251,252}, talent =19228, charges = 1, class = "DEATHKNIGHT", type = 5}, --Wraith walk (talent)
--demon hunter
-- 577 - Havoc
-- 581 - Vengance
[191427] = {cooldown = 240, duration = 30, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 1}, --Metamorphosis
[198589] = {cooldown = 60, duration = 10, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 2}, --Blur
[196555] = {cooldown = 120, duration = 5, specs = {577}, talent =21865, charges = 1, class = "DEMONHUNTER", type = 2}, --Netherwalk (talent)
[187827] = {cooldown = 180, duration = 15, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 2}, --Metamorphosis
[196718] = {cooldown = 180, duration = 8, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 4}, --Darkness
[188501] = {cooldown = 30, duration = 10, specs = {577,581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Spectral Sight
[179057] = {cooldown = 60, duration = 2, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Chaos Nova
[211881] = {cooldown = 30, duration = 4, specs = {577}, talent =22767, charges = 1, class = "DEMONHUNTER", type = 5}, --Fel Eruption (talent)
[320341] = {cooldown = 90, duration = false, specs = {581}, talent =21902, charges = 1, class = "DEMONHUNTER", type = 1}, --Bulk Extraction (talent)
[204021] = {cooldown = 60, duration = 10, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 2}, --Fiery Brand
[263648] = {cooldown = 30, duration = 12, specs = {581}, talent =22768, charges = 1, class = "DEMONHUNTER", type = 2}, --Soul Barrier (talent)
[207684] = {cooldown = 90, duration = 12, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Sigil of Misery
[202137] = {cooldown = 60, duration = 8, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Sigil of Silence
[202138] = {cooldown = 90, duration = 6, specs = {581}, talent =22511, charges = 1, class = "DEMONHUNTER", type = 5}, --Sigil of Chains (talent)
--mage
-- 62 - Arcane
-- 63 - Fire
-- 64 - Frost
[12042] = {cooldown = 90, duration = 10, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 1}, --Arcane Power
[12051] = {cooldown = 90, duration = 6, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 1}, --Evocation
[110960] = {cooldown = 120, duration = 20, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 2}, --Greater Invisibility
[235450] = {cooldown = 25, duration = 60, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 5}, --Prismatic Barrier
[235313] = {cooldown = 25, duration = 60, specs = {63}, talent =false, charges = 1, class = "MAGE", type = 5}, --Blazing Barrier
[11426] = {cooldown = 25, duration = 60, specs = {64}, talent =false, charges = 1, class = "MAGE", type = 5}, --Ice Barrier
[190319] = {cooldown = 120, duration = 10, specs = {63}, talent =false, charges = 1, class = "MAGE", type = 1}, --Combustion
[55342] = {cooldown = 120, duration = 40, specs = {62,63,64}, talent =22445, charges = 1, class = "MAGE", type = 1}, --Mirror Image
[66] = {cooldown = 300, duration = 20, specs = {63,64}, talent =false, charges = 1, class = "MAGE", type = 2}, --Invisibility
[12472] = {cooldown = 180, duration = 20, specs = {64}, talent =false, charges = 1, class = "MAGE", type = 1}, --Icy Veins
[205021] = {cooldown = 78, duration = 5, specs = {64}, talent =22309, charges = 1, class = "MAGE", type = 1}, --Ray of Frost (talent)
[45438] = {cooldown = 240, duration = 10, specs = {62,63,64}, talent =false, charges = 1, class = "MAGE", type = 2}, --Ice Block
[235219] = {cooldown = 300, duration = false, specs = {64}, talent =false, charges = 1, class = "MAGE", type = 5}, --Cold Snap
[113724] = {cooldown = 45, duration = 10, specs = {62,63,64}, talent =22471, charges = 1, class = "MAGE", type = 5}, --Ring of Frost (talent)
--priest
-- 256 - Discipline
-- 257 - Holy
-- 258 - Shadow
[10060] = {cooldown = 120, duration = 20, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 1}, --Power Infusion
[34433] = {cooldown = 180, duration = 15, specs = {256,258}, talent =false, charges = 1, class = "PRIEST", type = 1, ignoredIfTalent = 21719}, --Shadowfiend
[200174] = {cooldown = 60, duration = 15, specs = {258}, talent =21719, charges = 1, class = "PRIEST", type = 1}, --Mindbender (talent)
[123040] = {cooldown = 60, duration = 12, specs = {256}, talent =22094, charges = 1, class = "PRIEST", type = 1}, --Mindbender (talent)
[33206] = {cooldown = 180, duration = 8, specs = {256}, talent =false, charges = 1, class = "PRIEST", type = 3}, --Pain Suppression
[62618] = {cooldown = 180, duration = 10, specs = {256}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Power Word: Barrier
[271466] = {cooldown = 180, duration = 10, specs = {256}, talent =21184, charges = 1, class = "PRIEST", type = 4}, --Luminous Barrier (talent)
[47536] = {cooldown = 90, duration = 10, specs = {256}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Rapture
[19236] = {cooldown = 90, duration = 10, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Desperate Prayer
[200183] = {cooldown = 120, duration = 20, specs = {257}, talent =21644, charges = 1, class = "PRIEST", type = 2}, --Apotheosis (talent)
[47788] = {cooldown = 180, duration = 10, specs = {257}, talent =false, charges = 1, class = "PRIEST", type = 3}, --Guardian Spirit
[64843] = {cooldown = 180, duration = 8, specs = {257}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Divine Hymn
[64901] = {cooldown = 300, duration = 6, specs = {257}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Symbol of Hope
[265202] = {cooldown = 720, duration = false, specs = {257}, talent =23145, charges = 1, class = "PRIEST", type = 4}, --Holy Word: Salvation (talent)
[109964] = {cooldown = 60, duration = 12, specs = {256}, talent =21184, charges = 1, class = "PRIEST", type = 4}, --Spirit Shell (talent)
[8122] = {cooldown = 60, duration = 8, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Psychic Scream
[193223] = {cooldown = 240, duration = 60, specs = {258}, talent =21979, charges = 1, class = "PRIEST", type = 1}, --Surrender to Madness (talent)
[47585] = {cooldown = 120, duration = 6, specs = {258}, talent =false, charges = 1, class = "PRIEST", type = 2}, --Dispersion
[15286] = {cooldown = 120, duration = 15, specs = {258}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Vampiric Embrace
[64044] = {cooldown = 45, duration = 4, specs = {258}, talent =21752, charges = 1, class = "PRIEST", type = 5}, --Psychic Horror
[205369] = {cooldown = 30, duration = 6, specs = {258}, talent =23375, charges = 1, class = "PRIEST", type = 5}, --Mind Bomb
[228260] = {cooldown = 90, duration = 15, specs = {258}, talent =false, charges = 1, class = "PRIEST", type = 1}, --Void Erruption
[73325] = {cooldown = 90, duration = false, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Leap of Faith
--rogue
-- 259 - Assasination
-- 260 - Outlaw
-- 261 - Subtlety
[79140] = {cooldown = 120, duration = 20, specs = {259}, talent =false, charges = 1, class = "ROGUE", type = 1}, --Vendetta
[1856] = {cooldown = 120, duration = 3, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Vanish
[5277] = {cooldown = 120, duration = 10, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Evasion
[31224] = {cooldown = 120, duration = 5, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Cloak of Shadows
[2094] = {cooldown = 120, duration = 60, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 5}, --Blind
[114018] = {cooldown = 360, duration = 15, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 5}, --Shroud of Concealment
[185311] = {cooldown = 30, duration = 15, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 5}, --Crimson Vial
[13750] = {cooldown = 180, duration = 20, specs = {260}, talent =false, charges = 1, class = "ROGUE", type = 1}, --Adrenaline Rush
[51690] = {cooldown = 120, duration = 2, specs = {260}, talent =23175, charges = 1, class = "ROGUE", type = 1}, --Killing Spree (talent)
[199754] = {cooldown = 120, duration = 10, specs = {260}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Riposte
[343142] = {cooldown = 90, duration = 10, specs = {260}, talent =19250, charges = 1, class = "ROGUE", type = 5}, --Dreadblades
[121471] = {cooldown = 180, duration = 20, specs = {261}, talent =false, charges = 1, class = "ROGUE", type = 1}, --Shadow Blades
}
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC = {};
for spellID,spellData in pairs(LIB_OPEN_RAID_COOLDOWNS_INFO) do
for _,specID in ipairs(spellData.specs) do
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID] = LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID] or {};
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID][spellID] = spellData.type;
end
end
-- DF Evoker
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[1467] = {};
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[1468] = {};
--[=[
Spell customizations:
Many times there's spells with the same name which does different effects
In here you find a list of spells which has its name changed to give more information to the player
you may add into the list any other parameter your addon uses declaring for example 'icon = ' or 'texcoord = ' etc.
Implamentation Example:
if (LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) then
for spellId, customTable in pairs(LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) do
local name = customTable.name
if (name) then
MyCustomSpellTable[spellId] = name
end
end
end
--]=]
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {} --default fallback
if (GetBuildInfo():match ("%d") == "1") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
elseif (GetBuildInfo():match ("%d") == "2") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
elseif (GetBuildInfo():match ("%d") == "3") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
else
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {
[44461] = {name = GetSpellInfo(44461) .. " (" .. L["STRING_EXPLOSION"] .. ")"}, --Living Bomb (explosion)
[59638] = {name = GetSpellInfo(59638) .. " (" .. L["STRING_MIRROR_IMAGE"] .. ")"}, --Mirror Image's Frost Bolt (mage)
[88082] = {name = GetSpellInfo(88082) .. " (" .. L["STRING_MIRROR_IMAGE"] .. ")"}, --Mirror Image's Fireball (mage)
[94472] = {name = GetSpellInfo(94472) .. " (" .. L["STRING_CRITICAL_ONLY"] .. ")"}, --Atonement critical hit (priest)
[33778] = {name = GetSpellInfo(33778) .. " (" .. L["STRING_BLOOM"] .. ")"}, --lifebloom (bloom)
[121414] = {name = GetSpellInfo(121414) .. " (" .. L["STRING_GLAIVE"] .. " #1)"}, --glaive toss (hunter)
[120761] = {name = GetSpellInfo(120761) .. " (" .. L["STRING_GLAIVE"] .. " #2)"}, --glaive toss (hunter)
[212739] = {name = GetSpellInfo(212739) .. " (" .. L["STRING_MAINTARGET"] .. ")"}, --DK Epidemic
[215969] = {name = GetSpellInfo(215969) .. " (" .. L["STRING_AOE"] .. ")"}, --DK Epidemic
[70890] = {name = GetSpellInfo(70890) .. " (" .. L["STRING_SHADOW"] .. ")"}, --DK Scourge Strike
[55090] = {name = GetSpellInfo(55090) .. " (" .. L["STRING_PHYSICAL"] .. ")"}, --DK Scourge Strike
[49184] = {name = GetSpellInfo(49184) .. " (" .. L["STRING_MAINTARGET"] .. ")"}, --DK Howling Blast
[237680] = {name = GetSpellInfo(237680) .. " (" .. L["STRING_AOE"] .. ")"}, --DK Howling Blast
[228649] = {name = GetSpellInfo(228649) .. " (" .. L["STRING_PASSIVE"] .. ")"}, --Monk Mistweaver Blackout kick - Passive Teachings of the Monastery
[339538] = {name = GetSpellInfo(224266) .. " (" .. L["STRING_TEMPLAR_VINDCATION"] .. ")"}, --
[343355] = {name = GetSpellInfo(343355) .. " (" .. L["STRING_PROC"] .. ")"}, --shadow priest's void bold proc
--shadowlands trinkets
[345020] = {name = GetSpellInfo(345020) .. " (" .. L["STRING_TRINKET"] .. ")"},
}
end
--interrupt list using proxy from cooldown list
--this list should be expansion and combatlog safe
LIB_OPEN_RAID_SPELL_INTERRUPT = {
[6552] = LIB_OPEN_RAID_COOLDOWNS_INFO[6552], --Pummel
[2139] = LIB_OPEN_RAID_COOLDOWNS_INFO[2139], --Counterspell
[15487] = LIB_OPEN_RAID_COOLDOWNS_INFO[15487], --Silence (shadow) Last Word Talent to reduce cooldown in 15 seconds
[1766] = LIB_OPEN_RAID_COOLDOWNS_INFO[1766], --Kick
[96231] = LIB_OPEN_RAID_COOLDOWNS_INFO[96231], --Rebuke (protection and retribution)
[116705] = LIB_OPEN_RAID_COOLDOWNS_INFO[116705], --Spear Hand Strike (brewmaster and windwalker)
[57994] = LIB_OPEN_RAID_COOLDOWNS_INFO[57994], --Wind Shear
[47528] = LIB_OPEN_RAID_COOLDOWNS_INFO[47528], --Mind Freeze
[106839] = LIB_OPEN_RAID_COOLDOWNS_INFO[106839], --Skull Bash (feral, guardian)
[78675] = LIB_OPEN_RAID_COOLDOWNS_INFO[78675], --Solar Beam (balance)
[147362] = LIB_OPEN_RAID_COOLDOWNS_INFO[147362], --Counter Shot (beast mastery, marksmanship)
[187707] = LIB_OPEN_RAID_COOLDOWNS_INFO[187707], --Muzzle (survival)
[183752] = LIB_OPEN_RAID_COOLDOWNS_INFO[183752], --Disrupt
[19647] = LIB_OPEN_RAID_COOLDOWNS_INFO[19647], --Spell Lock (pet felhunter ability)
[89766] = LIB_OPEN_RAID_COOLDOWNS_INFO[89766], --Axe Toss (pet felguard ability)
}
--override list of spells with more than one effect, example: multiple types of polymorph
LIB_OPEN_RAID_SPELL_DEFAULT_IDS = {
--stampeding roar (druid)
[106898] = 77761,
[77764] = 77761, --"Uncategorized" on wowhead, need to test if still exists
--spell lock (warlock pet)
[119910] = 19647, --"Uncategorized" on wowhead
[132409] = 19647, --"Uncategorized" on wowhead
--[115781] = 19647, --optical blast used by old talent observer, still a thing?
--[251523] = 19647, --wowhead list this spell as sibling spell
--[251922] = 19647, --wowhead list this spell as sibling spell
--axe toss (warlock pet)
[119914] = 89766, --"Uncategorized" on wowhead
[347008] = 89766, --"Uncategorized" on wowhead
--hex (shaman)
[210873] = 51514, --Compy
[211004] = 51514, --Spider
[211010] = 51514, --Snake
[211015] = 51514, --Cockroach
[269352] = 51514, --Skeletal Hatchling
[277778] = 51514, --Zandalari Tendonripper
[277784] = 51514, --Wicker Mongrel
[309328] = 51514, --Living Honey
--typhoon
--[61391] = 132469,
--metamorphosis
[191427] = 200166,
--187827 vengeance need to test these spellIds
--191427 havoc
}
--need to add mass dispell (32375)
LIB_OPEN_RAID_DATABASE_LOADED = true
-697
View File
@@ -1,697 +0,0 @@
--data for wrath of the lich king expansion
local versionString, revision, launchDate, gameVersion = GetBuildInfo()
if (gameVersion >= 40000 or gameVersion < 30000) then
return
end
--localization
local gameLanguage = GetLocale()
local L = { --default localization
["STRING_EXPLOSION"] = "explosion",
["STRING_MIRROR_IMAGE"] = "Mirror Image",
["STRING_CRITICAL_ONLY"] = "critical",
["STRING_BLOOM"] = "Bloom", --lifebloom 'bloom' healing
["STRING_GLAIVE"] = "Glaive", --DH glaive toss
["STRING_MAINTARGET"] = "Main Target",
["STRING_AOE"] = "AoE", --multi targets
["STRING_SHADOW"] = "Shadow", --the spell school 'shadow'
["STRING_PHYSICAL"] = "Physical", --the spell school 'physical'
["STRING_PASSIVE"] = "Passive", --passive spell
["STRING_TEMPLAR_VINDCATION"] = "Templar's Vindication", --paladin spell
["STRING_PROC"] = "proc", --spell proc
["STRING_TRINKET"] = "Trinket", --trinket
}
if (gameLanguage == "enUS") then
--default language
elseif (gameLanguage == "deDE") then
L["STRING_EXPLOSION"] = "Explosion"
L["STRING_MIRROR_IMAGE"] = "Bilder spiegeln"
L["STRING_CRITICAL_ONLY"] = "kritisch"
elseif (gameLanguage == "esES") then
L["STRING_EXPLOSION"] = "explosión"
L["STRING_MIRROR_IMAGE"] = "Imagen de espejo"
L["STRING_CRITICAL_ONLY"] = "crítico"
elseif (gameLanguage == "esMX") then
L["STRING_EXPLOSION"] = "explosión"
L["STRING_MIRROR_IMAGE"] = "Imagen de espejo"
L["STRING_CRITICAL_ONLY"] = "crítico"
elseif (gameLanguage == "frFR") then
L["STRING_EXPLOSION"] = "explosion"
L["STRING_MIRROR_IMAGE"] = "Effet miroir"
L["STRING_CRITICAL_ONLY"] = "critique"
elseif (gameLanguage == "itIT") then
L["STRING_EXPLOSION"] = "esplosione"
L["STRING_MIRROR_IMAGE"] = "Immagine Speculare"
L["STRING_CRITICAL_ONLY"] = "critico"
elseif (gameLanguage == "koKR") then
L["STRING_EXPLOSION"] = "폭발"
L["STRING_MIRROR_IMAGE"] = "미러 이미지"
L["STRING_CRITICAL_ONLY"] = "치명타"
elseif (gameLanguage == "ptBR") then
L["STRING_EXPLOSION"] = "explosão"
L["STRING_MIRROR_IMAGE"] = "Imagem Espelhada"
L["STRING_CRITICAL_ONLY"] = "critico"
elseif (gameLanguage == "ruRU") then
L["STRING_EXPLOSION"] = "взрыв"
L["STRING_MIRROR_IMAGE"] = "Зеркальное изображение"
L["STRING_CRITICAL_ONLY"] = "критический"
elseif (gameLanguage == "zhCN") then
L["STRING_EXPLOSION"] = "爆炸"
L["STRING_MIRROR_IMAGE"] = "镜像"
L["STRING_CRITICAL_ONLY"] = "爆击"
elseif (gameLanguage == "zhTW") then
L["STRING_EXPLOSION"] = "爆炸"
L["STRING_MIRROR_IMAGE"] = "鏡像"
L["STRING_CRITICAL_ONLY"] = "致命"
end
LIB_OPEN_RAID_MANA_POTIONS = {}
LIB_OPEN_RAID_FOOD_BUFF = {} --default
LIB_OPEN_RAID_FLASK_BUFF = {} --default
LIB_OPEN_RAID_BLOODLUST = {
[2825] = true, --bloodlust
[32182] = true, --heroism
[80353] = true, --timewarp
[90355] = true, --ancient hysteria
[309658] = true, --current exp drums
}
--which gear slots can be enchanted on the latest retail version of the game
--when the value is a number, the slot only receives enchants for a specific attribute
LIB_OPEN_RAID_ENCHANT_SLOTS = {
--[INVSLOT_NECK] = true,
[INVSLOT_BACK] = true, --for all
[INVSLOT_CHEST] = true, --for all
[INVSLOT_FINGER1] = true, --for all
[INVSLOT_FINGER2] = true, --for all
[INVSLOT_MAINHAND] = true, --for all
[INVSLOT_FEET] = 2, --agility only
[INVSLOT_WRIST] = 1, --intellect only
[INVSLOT_HAND] = 3, --strenth only
}
LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 180653
LIB_OPEN_RAID_AUGMENTATED_RUNE = 0
LIB_OPEN_RAID_COVENANT_ICONS = {}
LIB_OPEN_RAID_ENCHANT_IDS = {}
LIB_OPEN_RAID_GEM_IDS = {}
LIB_OPEN_RAID_WEAPON_ENCHANT_IDS = {}
LIB_OPEN_RAID_FOOD_BUFF = {}
LIB_OPEN_RAID_FLASK_BUFF = {}
LIB_OPEN_RAID_ALL_POTIONS = {}
LIB_OPEN_RAID_HEALING_POTIONS = {
[33447] = true, --Runic Healing Potion
[41166] = true, --Runic Healing Injector
[47875] = true, --Warlock's Healthstone (0/2 Talent)
[47867] = true, --Warlock's Healthstone (1/2 Talent)
[47877] = true, --Warlock's Healthstone (2/2 Talent)
}
LIB_OPEN_RAID_MELEE_SPECS = {
[251] = "DEATHKNIGHT",
[252] = "DEATHKNIGHT",
[577] = "DEMONHUNTER",
[103] = "DRUID",
--[255] = "Survival", --not in the list due to the long interrupt time
[269] = "MONK",
[70] = "PALADIN",
[259] = "ROGUE",
[260] = "ROGUE",
[261] = "ROGUE",
[263] = "SHAMAN",
[71] = "WARRIOR",
[72] = "WARRIOR",
}
--tells the duration, requirements and cooldown
--information about a cooldown is mainly get from tooltips
--if talent is required, use the command:
--/dump GetTalentInfo (talentTier, talentColumn, 1)
--example: to get the second talent of the last talent line, use: /dump GetTalentInfo (7, 2, 1)
LIB_OPEN_RAID_COOLDOWNS_INFO = {
-- Filter Types:
-- 1 attack cooldown
-- 2 personal defensive cooldown
-- 3 targetted defensive cooldown
-- 4 raid defensive cooldown
-- 5 personal utility cooldown
-- 6 interrupt
--interrupts
[6552] = {class = "WARRIOR", specs = {71, 72, 73}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Pummel
[2139] = {class = "MAGE", specs = {62, 63, 64}, cooldown = 24, silence = 6, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Counterspell
[15487] = {class = "PRIEST", specs = {258}, cooldown = 45, silence = 4, talent = false, cooldownWithTalent = 30, cooldownTalentId = 23137, type = 6, charges = 1}, --Silence (shadow) Last Word Talent to reduce cooldown in 15 seconds
[1766] = {class = "ROGUE", specs = {259, 260, 261}, cooldown = 15, silence = 5, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Kick
[96231] = {class = "PALADIN", specs = {66, 70}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Rebuke (protection and retribution)
[116705] = {class = "MONK", specs = {268, 269}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Spear Hand Strike (brewmaster and windwalker)
[57994] = {class = "SHAMAN", specs = {262, 263, 264}, cooldown = 12, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Wind Shear
[47528] = {class = "DEATHKNIGHT", specs = {250, 251, 252}, cooldown = 15, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Mind Freeze
[106839] = {class = "DRUID", specs = {103, 104}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Skull Bash (feral, guardian)
[78675] = {class = "DRUID", specs = {102}, cooldown = 60, silence = 8, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Solar Beam (balance)
[147362] = {class = "HUNTER", specs = {253, 254}, cooldown = 24, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Counter Shot (beast mastery, marksmanship)
[187707] = {class = "HUNTER", specs = {255}, cooldown = 15, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Muzzle (survival)
[183752] = {class = "DEMONHUNTER", specs = {577, 581}, cooldown = 15, silence = 3, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Disrupt
[19647] = {class = "WARLOCK", specs = {265, 266, 267}, cooldown = 24, silence = 6, talent = false, cooldownWithTalent = false, cooldownTalentId = false, pet = 417, type = 6, charges = 1}, --Spell Lock (pet felhunter ability)
[89766] = {class = "WARLOCK", specs = {266}, cooldown = 30, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, pet = 17252, type = 6, charges = 1}, --Axe Toss (pet felguard ability)
--paladin
-- 65 - Holy
-- 66 - Protection
-- 70 - Retribution
[31884] = {cooldown = 120, duration = 20, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 1}, --Avenging Wrath
[216331] = {cooldown = 120, duration = 20, specs = {65}, talent =22190, charges = 1, class = "PALADIN", type = 1}, --Avenging Crusader (talent)
[498] = {cooldown = 60, duration = 8, specs = {65}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Divine Protection
[642] = {cooldown = 300, duration = 8, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Divine Shield
[105809] = {cooldown = 90, duration = 20, specs = {65,66,70}, talent =22164, charges = 1, class = "PALADIN", type = 2}, --Holy Avenger (talent)
[152262] = {cooldown = 45, duration = 15, specs = {65,66,70}, talent =17601, charges = 1, class = "PALADIN", type = 2}, --Seraphim
[633] = {cooldown = 600, duration = false, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 3}, --Lay on Hands
[1022] = {cooldown = 300, duration = 10, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 3}, --Blessing of Protection
[6940] = {cooldown = 120, duration = 12, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 3}, --Blessing of Sacrifice
[31821] = {cooldown = 180, duration = 8, specs = {65}, talent =false, charges = 1, class = "PALADIN", type = 4}, --Aura Mastery
[1044] = {cooldown = 25, duration = 8, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 5}, --Blessing of Freedom
[853] = {cooldown = 60, duration = 6, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 5}, --Hammer of Justice
[115750] = {cooldown = 90, duration = 6, specs = {65,66,70}, talent =21811, charges = 1, class = "PALADIN", type = 5}, --Blinding Light(talent)
[327193] = {cooldown = 90, duration = 15, specs = {66}, talent =23468, charges = 1, class = "PALADIN", type = 1}, --Moment of Glory (talent)
[31850] = {cooldown = 120, duration = 8, specs = {66}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Ardent Defender
[86659] = {cooldown = 300, duration = 8, specs = {66}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Guardian of Ancient Kings
[204018] = {cooldown = 180, duration = 10, specs = {66}, talent =22435, charges = 1, class = "PALADIN", type = 3}, --Blessing of Spellwarding (talent)
[231895] = {cooldown = 120, duration = 25, specs = {70}, talent =22215, charges = 1, class = "PALADIN", type = 1}, --Crusade (talent)
[205191] = {cooldown = 60, duration = 10, specs = {70}, talent =22183, charges = 1, class = "PALADIN", type = 2}, --Eye for an Eye (talent)
[184662] = {cooldown = 120, duration = 15, specs = {70}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Shield of Vengeance
--warrior
-- 71 - Arms
-- 72 - Fury
-- 73 - Protection
[107574] = {cooldown = 90, duration = 20, specs = {71,73}, talent =22397, charges = 1, class = "WARRIOR", type = 1}, --Avatar
[227847] = {cooldown = 90, duration = 5, specs = {71}, talent =false, charges = 1, class = "WARRIOR", type = 1}, --Bladestorm
[46924] = {cooldown = 60, duration = 4, specs = {72}, talent =22400, charges = 1, class = "WARRIOR", type = 1}, --Bladestorm (talent)
[152277] = {cooldown = 60, duration = 6, specs = {71}, talent =21667, charges = 1, class = "WARRIOR", type = 1}, --Ravager (talent)
[228920] = {cooldown = 60, duration = 6, specs = {73}, talent =23099, charges = 1, class = "WARRIOR", type = 1}, --Ravager (talent)
[118038] = {cooldown = 180, duration = 8, specs = {71}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Die by the Sword
[97462] = {cooldown = 180, duration = 10, specs = {71,72,73}, talent =false, charges = 1, class = "WARRIOR", type = 4}, --Rallying Cry
[1719] = {cooldown = 90, duration = 10, specs = {72}, talent =false, charges = 1, class = "WARRIOR", type = 1}, --Recklessness
[184364] = {cooldown = 120, duration = 8, specs = {72}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Enraged Regeneration
[12975] = {cooldown = 180, duration = 15, specs = {73}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Last Stand
[871] = {cooldown = 8, duration = 240, specs = {73}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Shield Wall
[64382] = {cooldown = 180, duration = false, specs = {71,72,73}, talent =false, charges = 1, class = "WARRIOR", type = 5}, --Shattering Throw
[5246] = {cooldown = 90, duration = 8, specs = {71,72,73}, talent =false, charges = 1, class = "WARRIOR", type = 5}, --Intimidating Shout
--warlock
-- 265 - Affliction
-- 266 - Demonology
-- 267 - Destruction
[205180] = {cooldown = 180, duration = 20, specs = {265}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Summon Darkglare
--[342601] = {cooldown = 3600, duration = false, specs = {}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Ritual of Doom
[113860] = {cooldown = 120, duration = 20, specs = {265}, talent =19293, charges = 1, class = "WARLOCK", type = 1}, --Dark Soul: Misery (talent)
[104773] = {cooldown = 180, duration = 8, specs = {265,266,267}, talent =false, charges = 1, class = "WARLOCK", type = 2}, --Unending Resolve
[108416] = {cooldown = 60, duration = 20, specs = {265,266,267}, talent =19286, charges = 1, class = "WARLOCK", type = 2}, --Dark Pact (talent)
[265187] = {cooldown = 90, duration = 15, specs = {266}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Summon Demonic Tyrant
[111898] = {cooldown = 120, duration = 15, specs = {266}, talent =21717, charges = 1, class = "WARLOCK", type = 1}, --Grimoire: Felguard (talent)
[267171] = {cooldown = 60, duration = false, specs = {266}, talent =23138, charges = 1, class = "WARLOCK", type = 1}, --Demonic Strength (talent)
[267217] = {cooldown = 180, duration = 20, specs = {266}, talent =23091, charges = 1, class = "WARLOCK", type = 1}, --Nether Portal
[1122] = {cooldown = 180, duration = 30, specs = {267}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Summon Infernal
[113858] = {cooldown = 120, duration = 20, specs = {267}, talent =23092, charges = 1, class = "WARLOCK", type = 1}, --Dark Soul: Instability (talent)
[30283] = {cooldown = 60, duration = 3, specs = {265,266,267}, talent =false, charges = 1, class = "WARLOCK", type = 5}, --Shadowfury
[333889] = {cooldown = 180, duration = 15, specs = {265,266,267}, talent =false, charges = 1, class = "WARLOCK", type = 5}, --Fel Domination
[5484] = {cooldown = 40, duration = 20, specs = {265,266,267}, talent =23465, charges = 1, class = "WARLOCK", type = 5}, --Howl of Terror (talent)
--shaman
-- 262 - Elemental
-- 263 - Enchancment
-- 264 - Restoration
[198067] = {cooldown = 150, duration = 30, specs = {262}, talent =false, charges = 1, class = "SHAMAN", type = 1}, --Fire Elemental
[192249] = {cooldown = 150, duration = 30, specs = {262}, talent =19272, charges = 1, class = "SHAMAN", type = 1}, --Storm Elemental (talent)
[108271] = {cooldown = 90, duration = 8, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 2}, --Astral Shift
[108281] = {cooldown = 120, duration = 10, specs = {262,263}, talent =22172, charges = 1, class = "SHAMAN", type = 4}, --Ancestral Guidance (talent)
[51533] = {cooldown = 120, duration = 15, specs = {263}, talent =false, charges = 1, class = "SHAMAN", type = 1}, --Feral Spirit
[114050] = {cooldown = 180, duration = 15, specs = {262}, talent =21675, charges = 1, class = "SHAMAN", type = 1}, --Ascendance (talent)
[114051] = {cooldown = 180, duration = 15, specs = {263}, talent =21972, charges = 1, class = "SHAMAN", type = 1}, --Ascendance (talent)
[114052] = {cooldown = 180, duration = 15, specs = {264}, talent =22359, charges = 1, class = "SHAMAN", type = 4}, --Ascendance (talent)
[98008] = {cooldown = 180, duration = 6, specs = {264}, talent =false, charges = 1, class = "SHAMAN", type = 4}, --Spirit Link Totem
[108280] = {cooldown = 180, duration = 10, specs = {264}, talent =false, charges = 1, class = "SHAMAN", type = 4}, --Healing Tide Totem
[207399] = {cooldown = 240, duration = 30, specs = {264}, talent =22323, charges = 1, class = "SHAMAN", type = 4}, --Ancestral Protection Totem (talent)
[16191] = {cooldown = 180, duration = 8, specs = {264}, talent =false, charges = 1, class = "SHAMAN", type = 4}, --Mana Tide Totem
[198103] = {cooldown = 300, duration = 60, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 2}, --Earth Elemental
[192058] = {cooldown = 60, duration = false, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 5}, --Capacitor Totem
[8143] = {cooldown = 60, duration = 10, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 5}, --Tremor Totem
[192077] = {cooldown = 120, duration = 15, specs = {262,263,264}, talent =21966, charges = 1, class = "SHAMAN", type = 5}, --Wind Rush Totem (talent)
--monk
-- 268 - Brewmaster
-- 269 - Windwalker
-- 270 - Restoration
[132578] = {cooldown = 180, duration = 25, specs = {268}, talent =false, charges = 1, class = "MONK", type = 1}, --Invoke Niuzao, the Black Ox
[115080] = {cooldown = 180, duration = false, specs = {268,269,270}, talent =false, charges = 1, class = "MONK", type = 1}, --Touch of Death
[115203] = {cooldown = 420, duration = 15, specs = {268}, talent =false, charges = 1, class = "MONK", type = 2}, --Fortifying Brew
[115176] = {cooldown = 300, duration = 8, specs = {268}, talent =false, charges = 1, class = "MONK", type = 2}, --Zen Meditation
[115399] = {cooldown = 120, duration = false, specs = {268}, talent =19992, charges = 1, class = "MONK", type = 2}, --Black Ox brew (talent)
[122278] = {cooldown = 120, duration = 10, specs = {268,269,270}, talent =20175, charges = 1, class = "MONK", type = 2}, --Dampen Harm (talent)
[137639] = {cooldown = 90, duration = 15, specs = {269}, talent =false, charges = 1, class = "MONK", type = 1}, --Storm, Earth, and Fire
[123904] = {cooldown = 120, duration = 24, specs = {269}, talent =false, charges = 1, class = "MONK", type = 1}, --Invoke Xuen, the White Tiger
[152173] = {cooldown = 90, duration = 12, specs = {269}, talent =21191, charges = 1, class = "MONK", type = 1}, --Serenity (talent)
[122470] = {cooldown = 90, duration = 6, specs = {269}, talent =false, charges = 1, class = "MONK", type = 2}, --Touch of Karma
[322118] = {cooldown = 180, duration = 25, specs = {270}, talent =false, charges = 1, class = "MONK", type = 4}, --Invoke Yulon, the Jade serpent
[243435] = {cooldown = 90, duration = 15, specs = {269,270}, talent =false, charges = 1, class = "MONK", type = 2}, --Fortifying Brew
[122783] = {cooldown = 90, duration = 6, specs = {269,270}, talent =20173, charges = 1, class = "MONK", type = 2}, --Diffuse Magic (talent)
[116849] = {cooldown = 120, duration = 12, specs = {270}, talent =false, charges = 1, class = "MONK", type = 3}, --Life Cocoon
[115310] = {cooldown = 180, duration = false, specs = {270}, talent =false, charges = 1, class = "MONK", type = 4}, --Revival
[197908] = {cooldown = 90, duration = 10, specs = {270}, talent =22166, charges = 1, class = "MONK", type = 5}, --Mana tea (talent)
[116844] = {cooldown = 45, duration = 5, specs = {268,269,270}, talent =19995, charges = 1, class = "MONK", type = 5}, --Ring of peace (talent)
[119381] = {cooldown = 50, duration = 3, specs = {268,269,270}, talent =false, charges = 1, class = "MONK", type = 5}, --Leg Sweep
--hunter
-- 253 - Beast Mastery
-- 254 - Marksmenship
-- 255 - Survival
[193530] = {cooldown = 120, duration = 20, specs = {253}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Aspect of the Wild
[19574] = {cooldown = 90, duration = 12, specs = {253}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Bestial Wrath
[201430] = {cooldown = 180, duration = 12, specs = {253}, talent =23044, charges = 1, class = "HUNTER", type = 1}, --Stampede (talent)
[288613] = {cooldown = 180, duration = 15, specs = {254}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Trueshot
[199483] = {cooldown = 60, duration = 60, specs = {253,254,255}, talent =23100, charges = 1, class = "HUNTER", type = 2}, --Camouflage (talent)
[281195] = {cooldown = 180, duration = 6, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 2}, --Survival of the Fittest
[266779] = {cooldown = 120, duration = 20, specs = {255}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Coordinated Assault
[186265] = {cooldown = 180, duration = 8, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 2}, --Aspect of the Turtle
[109304] = {cooldown = 120, duration = false, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 2}, --Exhilaration
[186257] = {cooldown = 144, duration = 14, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Aspect of the cheetah
[19577] = {cooldown = 60, duration = 5, specs = {253,255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Intimidation
[109248] = {cooldown = 45, duration = 10, specs = {253,254,255}, talent =22499, charges = 1, class = "HUNTER", type = 5}, --Binding Shot (talent)
[187650] = {cooldown = 25, duration = 60, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Freezing Trap
[186289] = {cooldown = 72, duration = 15, specs = {255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Aspect of the eagle
--druid
-- 102 - Balance
-- 103 - Feral
-- 104 - Guardian
-- 105 - Restoration
[77761] = {cooldown = 120, duration = 8, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 4}, --Stampeding Roar
[194223] = {cooldown = 180, duration = 20, specs = {102}, talent =false, charges = 1, class = "DRUID", type = 1}, --Celestial Alignment
[102560] = {cooldown = 180, duration = 30, specs = {102}, talent =21702, charges = 1, class = "DRUID", type = 1}, --Incarnation: Chosen of Elune (talent)
[22812] = {cooldown = 60, duration = 12, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 2}, --Barkskin
[108238] = {cooldown = 90, duration = false, specs = {102,103,104,105}, talent =18570, charges = 1, class = "DRUID", type = 2}, --Renewal (talent)
[29166] = {cooldown = 180, duration = 12, specs = {102,105}, talent =false, charges = 1, class = "DRUID", type = 3}, --Innervate
[106951] = {cooldown = 180, duration = 15, specs = {103,104}, talent =false, charges = 1, class = "DRUID", type = 1}, --Berserk
[102543] = {cooldown = 30, duration = 180, specs = {103}, talent =21704, charges = 1, class = "DRUID", type = 1}, --Incarnation: King of the Jungle (talent)
[61336] = {cooldown = 120, duration = 6, specs = {103,104}, talent =false, charges = 2, class = "DRUID", type = 2}, --Survival Instincts (2min feral 4min guardian, same spellid)
[102558] = {cooldown = 180, duration = 30, specs = {104}, talent =22388, charges = 1, class = "DRUID", type = 2}, --Incarnation: Guardian of Ursoc (talent)
[33891] = {cooldown = 180, duration = 30, specs = {105}, talent =22421, charges = 1, class = "DRUID", type = 2}, --Incarnation: Tree of Life (talent)
[102342] = {cooldown = 60, duration = 12, specs = {105}, talent =false, charges = 1, class = "DRUID", type = 3}, --Ironbark
[203651] = {cooldown = 60, duration = false, specs = {105}, talent =22422, charges = 1, class = "DRUID", type = 3}, --Overgrowth (talent)
[740] = {cooldown = 180, duration = 8, specs = {105}, talent =false, charges = 1, class = "DRUID", type = 4}, --Tranquility
[197721] = {cooldown = 90, duration = 8, specs = {105}, talent =22404, charges = 1, class = "DRUID", type = 4}, --Flourish (talent)
[132469] = {cooldown = 30, duration = false, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 5}, --Typhoon
[319454] = {cooldown = 300, duration = 45, specs = {102,103,104,105}, talent =18577, charges = 1, class = "DRUID", type = 5}, --Heart of the Wild (talent)
[102793] = {cooldown = 60, duration = 10, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 5}, --Ursol's Vortex
--death knight
-- 252 - Unholy
-- 251 - Frost
-- 252 - Blood
[275699] = {cooldown = 90, duration = 15, specs = {252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Apocalypse
[42650] = {cooldown = 480, duration = 30, specs = {252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Army of the Dead
[49206] = {cooldown = 180, duration = 30, specs = {252}, talent =22110, charges = 1, class = "DEATHKNIGHT", type = 1}, --Summon Gargoyle (talent)
[207289] = {cooldown = 78, duration = 12, specs = {252}, talent =22538, charges = 1, class = "DEATHKNIGHT", type = 1}, --Unholy Assault (talent)
[48743] = {cooldown = 120, duration = 15, specs = {250,251,252}, talent =23373, charges = 1, class = "DEATHKNIGHT", type = 2}, --Death Pact (talent)
[48707] = {cooldown = 60, duration = 10, specs = {250,251,252}, talent =23373, charges = 1, class = "DEATHKNIGHT", type = 2}, --Anti-magic Shell
[152279] = {cooldown = 120, duration = 5, specs = {251}, talent =22537, charges = 1, class = "DEATHKNIGHT", type = 1}, --Breath of Sindragosa (talent)
[47568] = {cooldown = 120, duration = 20, specs = {251}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Empower Rune Weapon
[279302] = {cooldown = 120, duration = 10, specs = {251}, talent =22535, charges = 1, class = "DEATHKNIGHT", type = 1}, --Frostwyrm's Fury (talent)
[49028] = {cooldown = 120, duration = 8, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Dancing Rune Weapon
[55233] = {cooldown = 90, duration = 10, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 2}, --Vampiric Blood
[48792] = {cooldown = 120, duration = 8, specs = {250,251,252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 2}, --Icebound Fortitude
[51052] = {cooldown = 120, duration = 10, specs = {250,251,252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 4}, --Anti-magic Zone
[219809] = {cooldown = 60, duration = 8, specs = {250}, talent =23454, charges = 1, class = "DEATHKNIGHT", type = 2}, --Tombstone (talent)
[108199] = {cooldown = 120, duration = false, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 5}, --Gorefiend's Grasp
[207167] = {cooldown = 60, duration = 5, specs = {251}, talent =22519, charges = 1, class = "DEATHKNIGHT", type = 5}, --Blinding Sleet (talent)
[108194] = {cooldown = 45, duration = 4, specs = {251,252}, talent =22520, charges = 1, class = "DEATHKNIGHT", type = 5}, --Asphyxiate (talent)
[221562] = {cooldown = 45, duration = 5, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 5}, --Asphyxiate
[212552] = {cooldown = 60, duration = 4, specs = {250,251,252}, talent =19228, charges = 1, class = "DEATHKNIGHT", type = 5}, --Wraith walk (talent)
--demon hunter
-- 577 - Havoc
-- 581 - Vengance
[191427] = {cooldown = 240, duration = 30, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 1}, --Metamorphosis
[198589] = {cooldown = 60, duration = 10, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 2}, --Blur
[196555] = {cooldown = 120, duration = 5, specs = {577}, talent =21865, charges = 1, class = "DEMONHUNTER", type = 2}, --Netherwalk (talent)
[187827] = {cooldown = 180, duration = 15, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 2}, --Metamorphosis
[196718] = {cooldown = 180, duration = 8, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 4}, --Darkness
[188501] = {cooldown = 30, duration = 10, specs = {577,581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Spectral Sight
[179057] = {cooldown = 60, duration = 2, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Chaos Nova
[211881] = {cooldown = 30, duration = 4, specs = {577}, talent =22767, charges = 1, class = "DEMONHUNTER", type = 5}, --Fel Eruption (talent)
[320341] = {cooldown = 90, duration = false, specs = {581}, talent =21902, charges = 1, class = "DEMONHUNTER", type = 1}, --Bulk Extraction (talent)
[204021] = {cooldown = 60, duration = 10, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 2}, --Fiery Brand
[263648] = {cooldown = 30, duration = 12, specs = {581}, talent =22768, charges = 1, class = "DEMONHUNTER", type = 2}, --Soul Barrier (talent)
[207684] = {cooldown = 90, duration = 12, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Sigil of Misery
[202137] = {cooldown = 60, duration = 8, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Sigil of Silence
[202138] = {cooldown = 90, duration = 6, specs = {581}, talent =22511, charges = 1, class = "DEMONHUNTER", type = 5}, --Sigil of Chains (talent)
--mage
-- 62 - Arcane
-- 63 - Fire
-- 64 - Frost
[12042] = {cooldown = 90, duration = 10, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 1}, --Arcane Power
[12051] = {cooldown = 90, duration = 6, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 1}, --Evocation
[110960] = {cooldown = 120, duration = 20, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 2}, --Greater Invisibility
[235450] = {cooldown = 25, duration = 60, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 5}, --Prismatic Barrier
[235313] = {cooldown = 25, duration = 60, specs = {63}, talent =false, charges = 1, class = "MAGE", type = 5}, --Blazing Barrier
[11426] = {cooldown = 25, duration = 60, specs = {64}, talent =false, charges = 1, class = "MAGE", type = 5}, --Ice Barrier
[190319] = {cooldown = 120, duration = 10, specs = {63}, talent =false, charges = 1, class = "MAGE", type = 1}, --Combustion
[55342] = {cooldown = 120, duration = 40, specs = {62,63,64}, talent =22445, charges = 1, class = "MAGE", type = 1}, --Mirror Image
[66] = {cooldown = 300, duration = 20, specs = {63,64}, talent =false, charges = 1, class = "MAGE", type = 2}, --Invisibility
[12472] = {cooldown = 180, duration = 20, specs = {64}, talent =false, charges = 1, class = "MAGE", type = 1}, --Icy Veins
[205021] = {cooldown = 78, duration = 5, specs = {64}, talent =22309, charges = 1, class = "MAGE", type = 1}, --Ray of Frost (talent)
[45438] = {cooldown = 240, duration = 10, specs = {62,63,64}, talent =false, charges = 1, class = "MAGE", type = 2}, --Ice Block
[235219] = {cooldown = 300, duration = false, specs = {64}, talent =false, charges = 1, class = "MAGE", type = 5}, --Cold Snap
[113724] = {cooldown = 45, duration = 10, specs = {62,63,64}, talent =22471, charges = 1, class = "MAGE", type = 5}, --Ring of Frost (talent)
--priest
-- 256 - Discipline
-- 257 - Holy
-- 258 - Shadow
[10060] = {cooldown = 120, duration = 20, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 1}, --Power Infusion
[34433] = {cooldown = 180, duration = 15, specs = {256,258}, talent =false, charges = 1, class = "PRIEST", type = 1, ignoredIfTalent = 21719}, --Shadowfiend
[200174] = {cooldown = 60, duration = 15, specs = {258}, talent =21719, charges = 1, class = "PRIEST", type = 1}, --Mindbender (talent)
[123040] = {cooldown = 60, duration = 12, specs = {256}, talent =22094, charges = 1, class = "PRIEST", type = 1}, --Mindbender (talent)
[33206] = {cooldown = 180, duration = 8, specs = {256}, talent =false, charges = 1, class = "PRIEST", type = 3}, --Pain Suppression
[62618] = {cooldown = 180, duration = 10, specs = {256}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Power Word: Barrier
[271466] = {cooldown = 180, duration = 10, specs = {256}, talent =21184, charges = 1, class = "PRIEST", type = 4}, --Luminous Barrier (talent)
[47536] = {cooldown = 90, duration = 10, specs = {256}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Rapture
[19236] = {cooldown = 90, duration = 10, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Desperate Prayer
[200183] = {cooldown = 120, duration = 20, specs = {257}, talent =21644, charges = 1, class = "PRIEST", type = 2}, --Apotheosis (talent)
[47788] = {cooldown = 180, duration = 10, specs = {257}, talent =false, charges = 1, class = "PRIEST", type = 3}, --Guardian Spirit
[64843] = {cooldown = 180, duration = 8, specs = {257}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Divine Hymn
[64901] = {cooldown = 300, duration = 6, specs = {257}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Symbol of Hope
[265202] = {cooldown = 720, duration = false, specs = {257}, talent =23145, charges = 1, class = "PRIEST", type = 4}, --Holy Word: Salvation (talent)
[109964] = {cooldown = 60, duration = 12, specs = {256}, talent =21184, charges = 1, class = "PRIEST", type = 4}, --Spirit Shell (talent)
[8122] = {cooldown = 60, duration = 8, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Psychic Scream
[193223] = {cooldown = 240, duration = 60, specs = {258}, talent =21979, charges = 1, class = "PRIEST", type = 1}, --Surrender to Madness (talent)
[47585] = {cooldown = 120, duration = 6, specs = {258}, talent =false, charges = 1, class = "PRIEST", type = 2}, --Dispersion
[15286] = {cooldown = 120, duration = 15, specs = {258}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Vampiric Embrace
[64044] = {cooldown = 45, duration = 4, specs = {258}, talent =21752, charges = 1, class = "PRIEST", type = 5}, --Psychic Horror
[205369] = {cooldown = 30, duration = 6, specs = {258}, talent =23375, charges = 1, class = "PRIEST", type = 5}, --Mind Bomb
[228260] = {cooldown = 90, duration = 15, specs = {258}, talent =false, charges = 1, class = "PRIEST", type = 1}, --Void Erruption
[73325] = {cooldown = 90, duration = false, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Leap of Faith
--rogue
-- 259 - Assasination
-- 260 - Outlaw
-- 261 - Subtlety
[79140] = {cooldown = 120, duration = 20, specs = {259}, talent =false, charges = 1, class = "ROGUE", type = 1}, --Vendetta
[1856] = {cooldown = 120, duration = 3, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Vanish
[5277] = {cooldown = 120, duration = 10, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Evasion
[31224] = {cooldown = 120, duration = 5, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Cloak of Shadows
[2094] = {cooldown = 120, duration = 60, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 5}, --Blind
[114018] = {cooldown = 360, duration = 15, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 5}, --Shroud of Concealment
[185311] = {cooldown = 30, duration = 15, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 5}, --Crimson Vial
[13750] = {cooldown = 180, duration = 20, specs = {260}, talent =false, charges = 1, class = "ROGUE", type = 1}, --Adrenaline Rush
[51690] = {cooldown = 120, duration = 2, specs = {260}, talent =23175, charges = 1, class = "ROGUE", type = 1}, --Killing Spree (talent)
[199754] = {cooldown = 120, duration = 10, specs = {260}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Riposte
[343142] = {cooldown = 90, duration = 10, specs = {260}, talent =19250, charges = 1, class = "ROGUE", type = 5}, --Dreadblades
[121471] = {cooldown = 180, duration = 20, specs = {261}, talent =false, charges = 1, class = "ROGUE", type = 1}, --Shadow Blades
}
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC = {};
for spellID,spellData in pairs(LIB_OPEN_RAID_COOLDOWNS_INFO) do
for _,specID in ipairs(spellData.specs) do
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID] = LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID] or {};
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID][spellID] = spellData.type;
end
end
-- DF Evoker
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[1467] = {};
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[1468] = {};
--list of all crowd control spells
--it is not transmitted to other clients
LIB_OPEN_RAID_CROWDCONTROL = { --copied from retail
[331866] = {cooldown = 0, class = "COVENANT|VENTHYR"}, --Agent of Chaos
[334693] = {cooldown = 0, class = "DEAHTKNIGHT"}, --Absolute Zero
[221562] = {cooldown = 45, class = "DEATHKNIGHT"}, --Asphyxiate
[47528] = {cooldown = 15, class = "DEATHKNIGHT"}, --Mind Freeze
[207167] = {cooldown = 60, class = "DEATHKNIGHT"}, --Blinding Sleet
[91807] = {cooldown = 0, class = "DEATHKNIGHT"}, --Shambling Rush
[108194] = {cooldown = 45, class = "DEATHKNIGHT"}, --Asphyxiate
[211881] = {cooldown = 30, class = "DEMONHUNTER"}, --Fel Eruption
[200166] = {cooldown = 0, class = "DEMONHUNTER"}, --Metamorphosis
[217832] = {cooldown = 45, class = "DEMONHUNTER"}, --Imprison
[183752] = {cooldown = 15, class = "DEMONHUNTER"}, --Disrupt
[207685] = {cooldown = 0, class = "DEMONHUNTER"}, --Sigil of Misery
[179057] = {cooldown = 45, class = "DEMONHUNTER"}, --Chaos Nova
[221527] = {cooldown = 45, class = "DEMONHUNTER"}, --Imprison with detainment talent
[339] = {cooldown = 0, class = "DRUID"}, --Entangling Roots
[102359] = {cooldown = 30, class = "DRUID"}, --Mass Entanglement
[93985] = {cooldown = 0, class = "DRUID"}, --Skull Bash
[2637] = {cooldown = 0, class = "DRUID"}, --Hibernate
[5211] = {cooldown = 60, class = "DRUID"}, --Mighty Bash
[99] = {cooldown = 30, class = "DRUID"}, --Incapacitating Roar
[127797] = {cooldown = 0, class = "DRUID"}, --Ursol's Vortex
[203123] = {cooldown = 0, class = "DRUID"}, --Maim
[45334] = {cooldown = 0, class = "DRUID"}, --Immobilized
[33786] = {cooldown = 0, class = "DRUID"}, --Cyclone
[236748] = {cooldown = 30, class = "DRUID"}, --Intimidating Roar
[61391] = {cooldown = 0, class = "DRUID"}, --Typhoon
[163505] = {cooldown = 0, class = "DRUID"}, --Rake
[50259] = {cooldown = 0, class = "DRUID"}, --Dazed
[372245] = {cooldown = 0, class = "EVOKER"}, --Terror of the Skies
[360806] = {cooldown = 15, class = "EVOKER"}, --Sleep Walk
[162480] = {cooldown = 0, class = "HUNTER"}, --Steel Trap
[187707] = {cooldown = 15, class = "HUNTER"}, --Muzzle
[147362] = {cooldown = 24, class = "HUNTER"}, --Counter Shot
[190927] = {cooldown = 6, class = "HUNTER"}, --Harpoon
[117526] = {cooldown = 45, class = "HUNTER"}, --Binding Shot
[24394] = {cooldown = 0, class = "HUNTER"}, --Intimidation
[117405] = {cooldown = 0, class = "HUNTER"}, --Binding Shot
[19577] = {cooldown = 60, class = "HUNTER"}, --Intimidation
[1513] = {cooldown = 0, class = "HUNTER"}, --Scare Beast
[3355] = {cooldown = 30, class = "HUNTER"}, --Freezing Trap
[203337] = {cooldown = 30, class = "HUNTER"}, --Freezing trap with diamond ice talent
[31661] = {cooldown = 45, class = "MAGE"}, --Dragon's Breath
[161353] = {cooldown = 0, class = "MAGE"}, --Polymorph
[277787] = {cooldown = 0, class = "MAGE"}, --Polymorph
[157981] = {cooldown = 30, class = "MAGE"}, --Blast Wave
[82691] = {cooldown = 0, class = "MAGE"}, --Ring of Frost
[118] = {cooldown = 0, class = "MAGE"}, --Polymorph
[161354] = {cooldown = 0, class = "MAGE"}, --Polymorph
[157997] = {cooldown = 25, class = "MAGE"}, --Ice Nova
[391622] = {cooldown = 0, class = "MAGE"}, --Polymorph
[28271] = {cooldown = 0, class = "MAGE"}, --Polymorph
[122] = {cooldown = 0, class = "MAGE"}, --Frost Nova
[277792] = {cooldown = 0, class = "MAGE"}, --Polymorph
[61721] = {cooldown = 0, class = "MAGE"}, --Polymorph
[126819] = {cooldown = 0, class = "MAGE"}, --Polymorph
[61305] = {cooldown = 0, class = "MAGE"}, --Polymorph
[28272] = {cooldown = 0, class = "MAGE"}, --Polymorph
[2139] = {cooldown = 24, class = "MAGE"}, --Counterspell
[198909] = {cooldown = 0, class = "MONK"}, --Song of Chi-Ji
[119381] = {cooldown = 60, class = "MONK"}, --Leg Sweep
[107079] = {cooldown = 120, class = "MONK"}, --Quaking Palm
[116706] = {cooldown = 0, class = "MONK"}, --Disable
[115078] = {cooldown = 45, class = "MONK"}, --Paralysis
[116705] = {cooldown = 15, class = "MONK"}, --Spear Hand Strike
[31935] = {cooldown = 15, class = "PALADIN"}, --Avenger's Shield
[20066] = {cooldown = 15, class = "PALADIN"}, --Repentance
[217824] = {cooldown = 0, class = "PALADIN"}, --Shield of Virtue
[105421] = {cooldown = 0, class = "PALADIN"}, --Blinding Light
[10326] = {cooldown = 15, class = "PALADIN"}, --Turn Evil
[853] = {cooldown = 60, class = "PALADIN"}, --Hammer of Justice
[96231] = {cooldown = 15, class = "PALADIN"}, --Rebuke
[205364] = {cooldown = 30, class = "PRIEST"}, --Dominate Mind
[64044] = {cooldown = 45, class = "PRIEST"}, --Psychic Horror
[226943] = {cooldown = 0, class = "PRIEST"}, --Mind Bomb
[15487] = {cooldown = 45, class = "PRIEST"}, --Silence
[605] = {cooldown = 0, class = "PRIEST"}, --Mind Control
[8122] = {cooldown = 45, class = "PRIEST"}, --Psychic Scream
[200200] = {cooldown = 60, class = "PRIEST"}, --Holy Word: Chastise
[9484] = {cooldown = 0, class = "PRIEST"}, --Shackle Undead
[200196] = {cooldown = 60, class = "PRIEST"}, --Holy Word: Chastise
[6770] = {cooldown = 0, class = "ROGUE"}, --Sap
[2094] = {cooldown = 120, class = "ROGUE"}, --Blind
[1766] = {cooldown = 15, class = "ROGUE"}, --Kick
[427773] = {cooldown = 0, class = "ROGUE"}, --Blind
[408] = {cooldown = 20, class = "ROGUE"}, --Kidney Shot
[1776] = {cooldown = 20, class = "ROGUE"}, --Gouge
[1833] = {cooldown = 0, class = "ROGUE"}, --Cheap Shot
[211015] = {cooldown = 30, class = "SHAMAN"}, --Hex
[269352] = {cooldown = 30, class = "SHAMAN"}, --Hex
[277778] = {cooldown = 30, class = "SHAMAN"}, --Hex
[64695] = {cooldown = 0, class = "SHAMAN"}, --Earthgrab
[57994] = {cooldown = 12, class = "SHAMAN"}, --Wind Shear
[197214] = {cooldown = 40, class = "SHAMAN"}, --Sundering
[118905] = {cooldown = 0, class = "SHAMAN"}, --Static Charge
[277784] = {cooldown = 30, class = "SHAMAN"}, --Hex
[309328] = {cooldown = 30, class = "SHAMAN"}, --Hex
[211010] = {cooldown = 30, class = "SHAMAN"}, --Hex
[210873] = {cooldown = 30, class = "SHAMAN"}, --Hex
[211004] = {cooldown = 30, class = "SHAMAN"}, --Hex
[51514] = {cooldown = 30, class = "SHAMAN"}, --Hex
[305485] = {cooldown = 30, class = "SHAMAN"}, --Lightning Lasso
[89766] = {cooldown = 30, class = "WARLOCK"}, --Axe Toss (pet felguard ability)
[6789] = {cooldown = 45, class = "WARLOCK"}, --Mortal Coil
[118699] = {cooldown = 0, class = "WARLOCK"}, --Fear
[710] = {cooldown = 0, class = "WARLOCK"}, --Banish
[212619] = {cooldown = 60, class = "WARLOCK"}, --Call Felhunter
[19647] = {cooldown = 24, class = "WARLOCK"}, --Spell Lock
[30283] = {cooldown = 60, class = "WARLOCK"}, --Shadowfury
[5484] = {cooldown = 40, class = "WARLOCK"}, --Howl of Terror
[6552] = {cooldown = 15, class = "WARRIOR"}, --Pummel
[132168] = {cooldown = 0, class = "WARRIOR"}, --Shockwave
[132169] = {cooldown = 0, class = "WARRIOR"}, --Storm Bolt
[5246] = {cooldown = 90, class = "WARRIOR"}, --Intimidating Shout
}
--[=[
Spell customizations:
Many times there's spells with the same name which does different effects
In here you find a list of spells which has its name changed to give more information to the player
you may add into the list any other parameter your addon uses declaring for example 'icon = ' or 'texcoord = ' etc.
Implamentation Example:
if (LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) then
for spellId, customTable in pairs(LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) do
local name = customTable.name
if (name) then
MyCustomSpellTable[spellId] = name
end
end
end
--]=]
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {} --default fallback
if (GetBuildInfo():match ("%d") == "1") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
elseif (GetBuildInfo():match ("%d") == "2") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
elseif (GetBuildInfo():match ("%d") == "3") then
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
else
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {
[44461] = {name = GetSpellInfo(44461) .. " (" .. L["STRING_EXPLOSION"] .. ")"}, --Living Bomb (explosion)
[59638] = {name = GetSpellInfo(59638) .. " (" .. L["STRING_MIRROR_IMAGE"] .. ")"}, --Mirror Image's Frost Bolt (mage)
[88082] = {name = GetSpellInfo(88082) .. " (" .. L["STRING_MIRROR_IMAGE"] .. ")"}, --Mirror Image's Fireball (mage)
[94472] = {name = GetSpellInfo(94472) .. " (" .. L["STRING_CRITICAL_ONLY"] .. ")"}, --Atonement critical hit (priest)
[33778] = {name = GetSpellInfo(33778) .. " (" .. L["STRING_BLOOM"] .. ")"}, --lifebloom (bloom)
[121414] = {name = GetSpellInfo(121414) .. " (" .. L["STRING_GLAIVE"] .. " #1)"}, --glaive toss (hunter)
[120761] = {name = GetSpellInfo(120761) .. " (" .. L["STRING_GLAIVE"] .. " #2)"}, --glaive toss (hunter)
[212739] = {name = GetSpellInfo(212739) .. " (" .. L["STRING_MAINTARGET"] .. ")"}, --DK Epidemic
[215969] = {name = GetSpellInfo(215969) .. " (" .. L["STRING_AOE"] .. ")"}, --DK Epidemic
[70890] = {name = GetSpellInfo(70890) .. " (" .. L["STRING_SHADOW"] .. ")"}, --DK Scourge Strike
[55090] = {name = GetSpellInfo(55090) .. " (" .. L["STRING_PHYSICAL"] .. ")"}, --DK Scourge Strike
[49184] = {name = GetSpellInfo(49184) .. " (" .. L["STRING_MAINTARGET"] .. ")"}, --DK Howling Blast
[237680] = {name = GetSpellInfo(237680) .. " (" .. L["STRING_AOE"] .. ")"}, --DK Howling Blast
[228649] = {name = GetSpellInfo(228649) .. " (" .. L["STRING_PASSIVE"] .. ")"}, --Monk Mistweaver Blackout kick - Passive Teachings of the Monastery
[339538] = {name = GetSpellInfo(224266) .. " (" .. L["STRING_TEMPLAR_VINDCATION"] .. ")"}, --
[343355] = {name = GetSpellInfo(343355) .. " (" .. L["STRING_PROC"] .. ")"}, --shadow priest's void bold proc
--shadowlands trinkets
[345020] = {name = GetSpellInfo(345020) .. " (" .. L["STRING_TRINKET"] .. ")"},
}
end
--interrupt list using proxy from cooldown list
--this list should be expansion and combatlog safe
LIB_OPEN_RAID_SPELL_INTERRUPT = {
[6552] = LIB_OPEN_RAID_COOLDOWNS_INFO[6552], --Pummel
[2139] = LIB_OPEN_RAID_COOLDOWNS_INFO[2139], --Counterspell
[15487] = LIB_OPEN_RAID_COOLDOWNS_INFO[15487], --Silence (shadow) Last Word Talent to reduce cooldown in 15 seconds
[1766] = LIB_OPEN_RAID_COOLDOWNS_INFO[1766], --Kick
[96231] = LIB_OPEN_RAID_COOLDOWNS_INFO[96231], --Rebuke (protection and retribution)
[116705] = LIB_OPEN_RAID_COOLDOWNS_INFO[116705], --Spear Hand Strike (brewmaster and windwalker)
[57994] = LIB_OPEN_RAID_COOLDOWNS_INFO[57994], --Wind Shear
[47528] = LIB_OPEN_RAID_COOLDOWNS_INFO[47528], --Mind Freeze
[106839] = LIB_OPEN_RAID_COOLDOWNS_INFO[106839], --Skull Bash (feral, guardian)
[78675] = LIB_OPEN_RAID_COOLDOWNS_INFO[78675], --Solar Beam (balance)
[147362] = LIB_OPEN_RAID_COOLDOWNS_INFO[147362], --Counter Shot (beast mastery, marksmanship)
[187707] = LIB_OPEN_RAID_COOLDOWNS_INFO[187707], --Muzzle (survival)
[183752] = LIB_OPEN_RAID_COOLDOWNS_INFO[183752], --Disrupt
[19647] = LIB_OPEN_RAID_COOLDOWNS_INFO[19647], --Spell Lock (pet felhunter ability)
[89766] = LIB_OPEN_RAID_COOLDOWNS_INFO[89766], --Axe Toss (pet felguard ability)
}
--override list of spells with more than one effect, example: multiple types of polymorph
LIB_OPEN_RAID_SPELL_DEFAULT_IDS = {
--stampeding roar (druid)
[106898] = 77761,
[77764] = 77761, --"Uncategorized" on wowhead, need to test if still exists
--spell lock (warlock pet)
[119910] = 19647, --"Uncategorized" on wowhead
[132409] = 19647, --"Uncategorized" on wowhead
--[115781] = 19647, --optical blast used by old talent observer, still a thing?
--[251523] = 19647, --wowhead list this spell as sibling spell
--[251922] = 19647, --wowhead list this spell as sibling spell
--axe toss (warlock pet)
[119914] = 89766, --"Uncategorized" on wowhead
[347008] = 89766, --"Uncategorized" on wowhead
--hex (shaman)
[210873] = 51514, --Compy
[211004] = 51514, --Spider
[211010] = 51514, --Snake
[211015] = 51514, --Cockroach
[269352] = 51514, --Skeletal Hatchling
[277778] = 51514, --Zandalari Tendonripper
[277784] = 51514, --Wicker Mongrel
[309328] = 51514, --Living Honey
--typhoon
--[61391] = 132469,
--metamorphosis
[191427] = 200166,
--187827 vengeance need to test these spellIds
--191427 havoc
}
--need to add mass dispell (32375)
LIB_OPEN_RAID_DATABASE_LOADED = true
+1 -1
View File
@@ -1,4 +1,4 @@

Open Raid is a library to share the player information while playing in a group or raid.
Install:
+2 -7
View File
@@ -1,11 +1,6 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
<Script file="LibOpenRaid.lua" />
<Script file="Functions.lua" />
<Script file="GetPlayerInformation.lua" />
<Script file="Deprecated.lua" />
<Script file="ThingsToMantain_Dragonflight.lua" />
<Script file="ThingsToMantain_Shadowlands.lua" />
<Script file="ThingsToMantain_Wrath.lua" />
<Script file="ThingsToMantain_Era.lua" />
<Script file="ThingsToMantain_Cata.lua" />
<Script file="ThingsToMantain_Ascension.lua" />
</Ui>
@@ -1,300 +0,0 @@
--[[
Name: LibSharedMedia-3.0
Revision: $Revision: 113 $
Author: Elkano (elkano@gmx.de)
Inspired By: SurfaceLib by Haste/Otravi (troeks@gmail.com)
Website: http://www.wowace.com/projects/libsharedmedia-3-0/
Description: Shared handling of media data (fonts, sounds, textures, ...) between addons.
Dependencies: LibStub, CallbackHandler-1.0
License: LGPL v2.1
]]
local MAJOR, MINOR = "LibSharedMedia-3.0", 8020002 -- 8.2.0 v2 / increase manually on changes
local lib = LibStub:NewLibrary(MAJOR, MINOR)
if not lib then return end
local _G = getfenv(0)
local pairs = _G.pairs
local type = _G.type
local band = _G.bit.band
local table_sort = _G.table.sort
local RESTRICTED_FILE_ACCESS = not not C_RaidLocks -- starting with 8.2, some rules for file access have changed; classic still uses the old way
local locale = GetLocale()
local locale_is_western
local LOCALE_MASK = 0
lib.LOCALE_BIT_koKR = 1
lib.LOCALE_BIT_ruRU = 2
lib.LOCALE_BIT_zhCN = 4
lib.LOCALE_BIT_zhTW = 8
lib.LOCALE_BIT_western = 128
local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0")
lib.callbacks = lib.callbacks or CallbackHandler:New(lib)
lib.DefaultMedia = lib.DefaultMedia or {}
lib.MediaList = lib.MediaList or {}
lib.MediaTable = lib.MediaTable or {}
lib.MediaType = lib.MediaType or {}
lib.OverrideMedia = lib.OverrideMedia or {}
local defaultMedia = lib.DefaultMedia
local mediaList = lib.MediaList
local mediaTable = lib.MediaTable
local overrideMedia = lib.OverrideMedia
-- create mediatype constants
lib.MediaType.BACKGROUND = "background" -- background textures
lib.MediaType.BORDER = "border" -- border textures
lib.MediaType.FONT = "font" -- fonts
lib.MediaType.STATUSBAR = "statusbar" -- statusbar textures
lib.MediaType.SOUND = "sound" -- sound files
-- populate lib with default Blizzard data
-- BACKGROUND
if not lib.MediaTable.background then lib.MediaTable.background = {} end
lib.MediaTable.background["None"] = [[]]
lib.MediaTable.background["Blizzard Collections Background"] = [[Interface\Collections\CollectionsBackgroundTile]]
lib.MediaTable.background["Blizzard Dialog Background"] = [[Interface\DialogFrame\UI-DialogBox-Background]]
lib.MediaTable.background["Blizzard Dialog Background Dark"] = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]]
lib.MediaTable.background["Blizzard Dialog Background Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Background]]
lib.MediaTable.background["Blizzard Garrison Background"] = [[Interface\Garrison\GarrisonUIBackground]]
lib.MediaTable.background["Blizzard Garrison Background 2"] = [[Interface\Garrison\GarrisonUIBackground2]]
lib.MediaTable.background["Blizzard Garrison Background 3"] = [[Interface\Garrison\GarrisonMissionUIInfoBoxBackgroundTile]]
lib.MediaTable.background["Blizzard Low Health"] = [[Interface\FullScreenTextures\LowHealth]]
lib.MediaTable.background["Blizzard Marble"] = [[Interface\FrameGeneral\UI-Background-Marble]]
lib.MediaTable.background["Blizzard Out of Control"] = [[Interface\FullScreenTextures\OutOfControl]]
lib.MediaTable.background["Blizzard Parchment"] = [[Interface\AchievementFrame\UI-Achievement-Parchment-Horizontal]]
lib.MediaTable.background["Blizzard Parchment 2"] = [[Interface\AchievementFrame\UI-GuildAchievement-Parchment-Horizontal]]
lib.MediaTable.background["Blizzard Rock"] = [[Interface\FrameGeneral\UI-Background-Rock]]
lib.MediaTable.background["Blizzard Tabard Background"] = [[Interface\TabardFrame\TabardFrameBackground]]
lib.MediaTable.background["Blizzard Tooltip"] = [[Interface\Tooltips\UI-Tooltip-Background]]
lib.MediaTable.background["Solid"] = [[Interface\Buttons\WHITE8X8]]
lib.DefaultMedia.background = "None"
-- BORDER
if not lib.MediaTable.border then lib.MediaTable.border = {} end
lib.MediaTable.border["None"] = [[]]
lib.MediaTable.border["Blizzard Achievement Wood"] = [[Interface\AchievementFrame\UI-Achievement-WoodBorder]]
lib.MediaTable.border["Blizzard Chat Bubble"] = [[Interface\Tooltips\ChatBubble-Backdrop]]
lib.MediaTable.border["Blizzard Dialog"] = [[Interface\DialogFrame\UI-DialogBox-Border]]
lib.MediaTable.border["Blizzard Dialog Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Border]]
lib.MediaTable.border["Blizzard Party"] = [[Interface\CHARACTERFRAME\UI-Party-Border]]
lib.MediaTable.border["Blizzard Tooltip"] = [[Interface\Tooltips\UI-Tooltip-Border]]
lib.DefaultMedia.border = "None"
-- FONT
if not lib.MediaTable.font then lib.MediaTable.font = {} end
local SML_MT_font = lib.MediaTable.font
--[[
All font files are currently in all clients, the following table depicts which font supports which charset as of 5.0.4
Fonts were checked using langcover.pl from DejaVu fonts (http://sourceforge.net/projects/dejavu/) and FontForge (http://fontforge.org/)
latin means check for: de, en, es, fr, it, pt
file name latin koKR ruRU zhCN zhTW
2002.ttf 2002 X X X - -
2002B.ttf 2002 Bold X X X - -
ARHei.ttf AR CrystalzcuheiGBK Demibold X - X X X
ARIALN.TTF Arial Narrow X - X - -
ARKai_C.ttf AR ZhongkaiGBK Medium (Combat) X - X X X
ARKai_T.ttf AR ZhongkaiGBK Medium X - X X X
bHEI00M.ttf AR Heiti2 Medium B5 - - - - X
bHEI01B.ttf AR Heiti2 Bold B5 - - - - X
bKAI00M.ttf AR Kaiti Medium B5 - - - - X
bLEI00D.ttf AR Leisu Demi B5 - - - - X
FRIZQT__.TTF Friz Quadrata TT X - - - -
FRIZQT___CYR.TTF FrizQuadrataCTT x - X - -
K_Damage.TTF YDIWingsM - X X - -
K_Pagetext.TTF MoK X X X - -
MORPHEUS.TTF Morpheus X - - - -
MORPHEUS_CYR.TTF Morpheus X - X - -
NIM_____.ttf Nimrod MT X - X - -
SKURRI.TTF Skurri X - - - -
SKURRI_CYR.TTF Skurri X - X - -
WARNING: Although FRIZQT___CYR is available on western clients, it doesn't support special European characters e.g. é, ï, ö
Due to this, we cannot use it as a replacement for FRIZQT__.TTF
]]
if locale == "koKR" then
LOCALE_MASK = lib.LOCALE_BIT_koKR
--
SML_MT_font["굵은 글꼴"] = [[Fonts\2002B.TTF]]
SML_MT_font["기본 글꼴"] = [[Fonts\2002.TTF]]
SML_MT_font["데미지 글꼴"] = [[Fonts\K_Damage.TTF]]
SML_MT_font["퀘스트 글꼴"] = [[Fonts\K_Pagetext.TTF]]
--
lib.DefaultMedia["font"] = "기본 글꼴" -- someone from koKR please adjust if needed
--
elseif locale == "zhCN" then
LOCALE_MASK = lib.LOCALE_BIT_zhCN
--
SML_MT_font["伤害数字"] = [[Fonts\ARKai_C.ttf]]
SML_MT_font["默认"] = [[Fonts\ARKai_T.ttf]]
SML_MT_font["聊天"] = [[Fonts\ARHei.ttf]]
--
lib.DefaultMedia["font"] = "默认" -- someone from zhCN please adjust if needed
--
elseif locale == "zhTW" then
LOCALE_MASK = lib.LOCALE_BIT_zhTW
--
SML_MT_font["提示訊息"] = [[Fonts\bHEI00M.ttf]]
SML_MT_font["聊天"] = [[Fonts\bHEI01B.ttf]]
SML_MT_font["傷害數字"] = [[Fonts\bKAI00M.ttf]]
SML_MT_font["預設"] = [[Fonts\bLEI00D.ttf]]
--
lib.DefaultMedia["font"] = "預設" -- someone from zhTW please adjust if needed
elseif locale == "ruRU" then
LOCALE_MASK = lib.LOCALE_BIT_ruRU
--
SML_MT_font["2002"] = [[Fonts\2002.TTF]]
SML_MT_font["2002 Bold"] = [[Fonts\2002B.TTF]]
SML_MT_font["AR CrystalzcuheiGBK Demibold"] = [[Fonts\ARHei.TTF]]
SML_MT_font["AR ZhongkaiGBK Medium (Combat)"] = [[Fonts\ARKai_C.TTF]]
SML_MT_font["AR ZhongkaiGBK Medium"] = [[Fonts\ARKai_T.TTF]]
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT___CYR.TTF]]
SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]]
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]]
SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]]
SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]]
--
lib.DefaultMedia.font = "Friz Quadrata TT"
--
else
LOCALE_MASK = lib.LOCALE_BIT_western
locale_is_western = true
--
SML_MT_font["2002"] = [[Fonts\2002.TTF]]
SML_MT_font["2002 Bold"] = [[Fonts\2002B.TTF]]
SML_MT_font["AR CrystalzcuheiGBK Demibold"] = [[Fonts\ARHei.TTF]]
SML_MT_font["AR ZhongkaiGBK Medium (Combat)"] = [[Fonts\ARKai_C.TTF]]
SML_MT_font["AR ZhongkaiGBK Medium"] = [[Fonts\ARKai_T.TTF]]
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]]
SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]]
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]]
SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]]
SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]]
--
lib.DefaultMedia.font = "Friz Quadrata TT"
--
end
-- STATUSBAR
if not lib.MediaTable.statusbar then lib.MediaTable.statusbar = {} end
lib.MediaTable.statusbar["Blizzard"] = [[Interface\TargetingFrame\UI-StatusBar]]
lib.MediaTable.statusbar["Blizzard Character Skills Bar"] = [[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]]
lib.MediaTable.statusbar["Blizzard Raid Bar"] = [[Interface\RaidFrame\Raid-Bar-Hp-Fill]]
lib.MediaTable.statusbar["Solid"] = [[Interface\Buttons\WHITE8X8]]
lib.DefaultMedia.statusbar = "Blizzard"
-- SOUND
if not lib.MediaTable.sound then lib.MediaTable.sound = {} end
lib.MediaTable.sound["None"] = RESTRICTED_FILE_ACCESS and 1 or [[Interface\Quiet.ogg]] -- Relies on the fact that PlaySound[File] doesn't error on these values.
lib.DefaultMedia.sound = "None"
local function rebuildMediaList(mediatype)
local mtable = mediaTable[mediatype]
if not mtable then return end
if not mediaList[mediatype] then mediaList[mediatype] = {} end
local mlist = mediaList[mediatype]
-- list can only get larger, so simply overwrite it
local i = 0
for k in pairs(mtable) do
i = i + 1
mlist[i] = k
end
table_sort(mlist)
end
function lib:Register(mediatype, key, data, langmask)
if type(mediatype) ~= "string" then
error(MAJOR..":Register(mediatype, key, data, langmask) - mediatype must be string, got "..type(mediatype))
end
if type(key) ~= "string" then
error(MAJOR..":Register(mediatype, key, data, langmask) - key must be string, got "..type(key))
end
mediatype = mediatype:lower()
if mediatype == lib.MediaType.FONT and ((langmask and band(langmask, LOCALE_MASK) == 0) or not (langmask or locale_is_western)) then
-- ignore fonts that aren't flagged as supporting local glyphs on non-western clients
return false
end
if type(data) == "string" and (mediatype == lib.MediaType.BACKGROUND or mediatype == lib.MediaType.BORDER or mediatype == lib.MediaType.STATUSBAR or mediatype == lib.MediaType.SOUND) then
local path = data:lower()
if RESTRICTED_FILE_ACCESS and not path:find("^interface") then
-- files accessed via path only allowed from interface folder
return false
end
if mediatype == lib.MediaType.SOUND and not (path:find(".ogg", nil, true) or not path:find(".mp3", nil, true)) then
-- Only ogg and mp3 are valid sounds.
return false
end
end
if not mediaTable[mediatype] then mediaTable[mediatype] = {} end
local mtable = mediaTable[mediatype]
if mtable[key] then return false end
mtable[key] = data
rebuildMediaList(mediatype)
self.callbacks:Fire("LibSharedMedia_Registered", mediatype, key)
return true
end
function lib:Fetch(mediatype, key, noDefault)
local mtt = mediaTable[mediatype]
local overridekey = overrideMedia[mediatype]
local result = mtt and ((overridekey and mtt[overridekey] or mtt[key]) or (not noDefault and defaultMedia[mediatype] and mtt[defaultMedia[mediatype]])) or nil
return result ~= "" and result or nil
end
function lib:IsValid(mediatype, key)
return mediaTable[mediatype] and (not key or mediaTable[mediatype][key]) and true or false
end
function lib:HashTable(mediatype)
return mediaTable[mediatype]
end
function lib:List(mediatype)
if not mediaTable[mediatype] then
return nil
end
if not mediaList[mediatype] then
rebuildMediaList(mediatype)
end
return mediaList[mediatype]
end
function lib:GetGlobal(mediatype)
return overrideMedia[mediatype]
end
function lib:SetGlobal(mediatype, key)
if not mediaTable[mediatype] then
return false
end
overrideMedia[mediatype] = (key and mediaTable[mediatype][key]) and key or nil
self.callbacks:Fire("LibSharedMedia_SetGlobal", mediatype, overrideMedia[mediatype])
return true
end
function lib:GetDefault(mediatype)
return defaultMedia[mediatype]
end
function lib:SetDefault(mediatype, key)
if mediaTable[mediatype] and mediaTable[mediatype][key] and not defaultMedia[mediatype] then
defaultMedia[mediatype] = key
return true
else
return false
end
end
-3
View File
@@ -1,3 +0,0 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
<Script file="LibSharedMedia-3.0.lua" />
</Ui>

Some files were not shown because too many files have changed in this diff Show More