diff --git a/ConROC_Mage.toc b/ConROC_Mage.toc index ba9c0de..e50240a 100644 --- a/ConROC_Mage.toc +++ b/ConROC_Mage.toc @@ -1,11 +1,11 @@ ## Title:-|cffFFFFFFConROC|r- |cff69CCF0Mage|r -## Version: 1.15.2 -## Author: Vae, 1.15.2 updated by Lith -## Interface: 11501 +## Version: 1.15.10 +## Author: Vae +## Interface: 11505 ## SavedVariablesPerCharacter: ConROCMageSpells ## Dependencies: ConROC ## LoadOnDemand: 1 mage_ids.lua mage_spellmenu.lua -mage.lua +mage.lua \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 3e9ec8d..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Vae - -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. diff --git a/README.md b/README.md deleted file mode 100644 index efdaede..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# ConROC_Classic -This is an update to the ConROC rotation optimizer for WoW that fixes issues running the add-on in Classic. - -## License -MIT - Original copyright by Vae2009. Updates done by Lith77 \ No newline at end of file diff --git a/changes.txt b/changes.txt deleted file mode 100644 index 119af97..0000000 --- a/changes.txt +++ /dev/null @@ -1,26 +0,0 @@ -v1.15.2 - -Fixed rotation issue, that no spells when sugested when beeing level 10+ and not choosen any talents. Then you get the same rotation as pre level 10 - -talents and spec check reworked due to error for client languages -Ver 1.15.1 - -reworked SoD rotation, all specs. - -supported runes: Arcane Blast, Ice Lance, Icy Veins, Living Bomb & Living Flame -Ver 1.15.0 - -Support for Classic - -Started to add support for translations. -Ver 1.13.4 - -Updated to WotLK spells and talents - -Added support for not showing all spellranks - -Made Spellmenu into a scrolling area. - -Ver 1.13.3 - -Added Arcane Brilliance. - -Ver 1.13.2 - -Overhauled Rotation. - -Added Spellmenu. - -Ver 1.13.1 - -Fixed IceArmor/FrostArmor rank trail. - -Ver 1.13.0 - -Initial release for Classic WoW. \ No newline at end of file diff --git a/mage.lua b/mage.lua index 2ae6e56..5258f55 100644 --- a/mage.lua +++ b/mage.lua @@ -1,19 +1,18 @@ -local printTalentsMode = false - --- Slash command for printing talent tree with talent names and ID numbers -SLASH_CONROCPRINTTALENTS1 = "/ConROCPT" -SlashCmdList["CONROCPRINTTALENTS"] = function() - printTalentsMode = not printTalentsMode - ConROC:PopulateTalentIDs() -end - ConROC.Mage = {}; local ConROC_Mage, ids = ...; -local optionMaxIds = ...; local currentSpecName; local currentSpecID; +function ConROC:EnableRotationModule() + self.Description = "Mage"; + self.NextSpell = ConROC.Mage.Damage; + + self:RegisterEvent('UNIT_SPELLCAST_SUCCEEDED'); + self:RegisterEvent("PLAYER_TALENT_UPDATE"); + self.lastSpellId = 0; +end + function ConROC:EnableDefenseModule() self.NextDef = ConROC.Mage.Defense; end @@ -22,32 +21,10 @@ function ConROC:UNIT_SPELLCAST_SUCCEEDED(event, unitID, lineID, spellID) if unitID == 'player' then self.lastSpellId = spellID; end - - ConROC:JustCasted(spellID); -end -function ConROC:PopulateTalentIDs() - local numTabs = GetNumTalentTabs() - - for tabIndex = 1, numTabs do - local tabName = GetTalentTabInfo(tabIndex) - tabName = string.gsub(tabName, "[^%w]", "") .. "_Talent" -- Remove spaces from tab name - print("ids."..tabName.." = {") - local numTalents = GetNumTalents(tabIndex) - - for talentIndex = 1, numTalents do - local name, _, _, _, _ = GetTalentInfo(tabIndex, talentIndex) - - if name then - local talentID = string.gsub(name, "[^%w]", "") -- Remove spaces from talent name - print(talentID .." = ", talentIndex ..",") - end - end - print("}") - end + ConROC:JustCasted(spellID); end -local Racial, Spec, Caster, Arc_Ability, Arc_Talent, Fire_Ability, Fire_Talent, Frost_Ability, Frost_Talent, Player_Buff, Player_Debuff, Target_Debuff = ids.Racial, ids.Spec, ids.Caster, ids.Arc_Ability, ids.Arcane_Talent, ids.Fire_Ability, ids.Fire_Talent, ids.Frost_Ability, ids.Frost_Talent, ids.Player_Buff, ids.Player_Debuff, ids.Target_Debuff; function ConROC:SpecUpdate() currentSpecName = ConROC:currentSpec() currentSpecID = ConROC:currentSpec("ID") @@ -58,678 +35,513 @@ function ConROC:SpecUpdate() ConROC:Print(self.Colors.Error .. "You do not currently have a spec.") end end + ConROC:SpecUpdate() ---Ranks ---Arcane -local _Evocation = Arc_Ability.Evocation; -local _PresenceofMind = Arc_Ability.PresenceofMind; -local _ArcanePower = Arc_Ability.ArcanePower; -local _AmplifyMagic = Arc_Ability.AmplifyMagicRank1; -local _ArcaneBrilliance = Arc_Ability.ArcaneBrilliance; -local _ArcaneExplosion = Arc_Ability.ArcaneExplosionRank1; -local _ArcaneIntellect = Arc_Ability.ArcaneIntellectRank1; -local _ArcaneMissiles = Arc_Ability.ArcaneMissilesRank1; -local _DampenMagic = Arc_Ability.DampenMagicRank1; -local _MageArmor = Arc_Ability.MageArmorRank1; -local _ManaShield = Arc_Ability.ManaShieldRank1; ---Fire -local _BlastWave = Fire_Ability.BlastWaveRank1; -local _Combustion = Fire_Ability.Combustion; -local _FireBlast = Fire_Ability.FireBlastRank1; -local _FireWard = Fire_Ability.FireWardRank1; -local _Fireball = Fire_Ability.FireballRank1; -local _Flamestrike = Fire_Ability.FlamestrikeRank1; -local _FlamestrikeDR = Fire_Ability.FlamestrikeRank1; -local _Pyroblast = Fire_Ability.PyroblastRank1; -local _Scorch = Fire_Ability.ScorchRank1; ---Frost -local _Blizzard = Frost_Ability.BlizzardRank1; -local _ConeofCold = Frost_Ability.ConeofColdRank1; -local _IceBarrier = Frost_Ability.IceBarrierRank1; -local _IceArmor = Frost_Ability.FrostArmorRank1; -local _FrostNova = Frost_Ability.FrostNovaRank1; -local _FrostWard = Frost_Ability.FrostWardRank1; -local _Frostbolt = Frost_Ability.FrostboltRank1; ---runes -local _RuneArcaneBlast = ids.Runes.ArcaneBlast; -local _RuneArcaneSurge = ids.Runes.ArcaneSurge; -local _RuneIceLance = ids.Runes.IceLance; -local _RuneIcyVeins = ids.Runes.IcyVeins; -local _RuneLivingBomb = ids.Runes.LivingBomb; -local _RuneLivingFlame = ids.Runes.LivingFlame; -local _RuneMassRegeneration = ids.Runes.MassRegeneration; -local _RuneRegeneration = ids.Runes.Regeneration; -local _RuneRewindTime = ids.Runes.RewindTime; - -function ConROC:UpdateSpellID() - --Ranks - if IsSpellKnown(Arc_Ability.AmplifyMagicRank4) then _AmplifyMagic = Arc_Ability.AmplifyMagicRank4; - elseif IsSpellKnown(Arc_Ability.AmplifyMagicRank3) then _AmplifyMagic = Arc_Ability.AmplifyMagicRank3; - elseif IsSpellKnown(Arc_Ability.AmplifyMagicRank2) then _AmplifyMagic = Arc_Ability.AmplifyMagicRank2; end - - if IsSpellKnown(Arc_Ability.ArcaneExplosionRank6) then _ArcaneExplosion = Arc_Ability.ArcaneExplosionRank6; - elseif IsSpellKnown(Arc_Ability.ArcaneExplosionRank5) then _ArcaneExplosion = Arc_Ability.ArcaneExplosionRank5; - elseif IsSpellKnown(Arc_Ability.ArcaneExplosionRank4) then _ArcaneExplosion = Arc_Ability.ArcaneExplosionRank4; - elseif IsSpellKnown(Arc_Ability.ArcaneExplosionRank3) then _ArcaneExplosion = Arc_Ability.ArcaneExplosionRank3; - elseif IsSpellKnown(Arc_Ability.ArcaneExplosionRank2) then _ArcaneExplosion = Arc_Ability.ArcaneExplosionRank2; end - - if IsSpellKnown(Arc_Ability.ArcaneIntellectRank5) then _ArcaneIntellect = Arc_Ability.ArcaneIntellectRank5; - elseif IsSpellKnown(Arc_Ability.ArcaneIntellectRank4) then _ArcaneIntellect = Arc_Ability.ArcaneIntellectRank4; - elseif IsSpellKnown(Arc_Ability.ArcaneIntellectRank3) then _ArcaneIntellect = Arc_Ability.ArcaneIntellectRank3; - elseif IsSpellKnown(Arc_Ability.ArcaneIntellectRank2) then _ArcaneIntellect = Arc_Ability.ArcaneIntellectRank2; end - - if IsSpellKnown(Arc_Ability.ArcaneMissilesRank7) then _ArcaneMissiles = Arc_Ability.ArcaneMissilesRank7; - elseif IsSpellKnown(Arc_Ability.ArcaneMissilesRank6) then _ArcaneMissiles = Arc_Ability.ArcaneMissilesRank6; - elseif IsSpellKnown(Arc_Ability.ArcaneMissilesRank5) then _ArcaneMissiles = Arc_Ability.ArcaneMissilesRank5; - elseif IsSpellKnown(Arc_Ability.ArcaneMissilesRank4) then _ArcaneMissiles = Arc_Ability.ArcaneMissilesRank4; - elseif IsSpellKnown(Arc_Ability.ArcaneMissilesRank3) then _ArcaneMissiles = Arc_Ability.ArcaneMissilesRank3; - elseif IsSpellKnown(Arc_Ability.ArcaneMissilesRank2) then _ArcaneMissiles = Arc_Ability.ArcaneMissilesRank2; end - - if IsSpellKnown(Arc_Ability.DampenMagicRank5) then _DampenMagic = Arc_Ability.DampenMagicRank5; - elseif IsSpellKnown(Arc_Ability.DampenMagicRank4) then _DampenMagic = Arc_Ability.DampenMagicRank4; - elseif IsSpellKnown(Arc_Ability.DampenMagicRank3) then _DampenMagic = Arc_Ability.DampenMagicRank3; - elseif IsSpellKnown(Arc_Ability.DampenMagicRank2) then _DampenMagic = Arc_Ability.DampenMagicRank2; end - - if IsSpellKnown(Fire_Ability.BlastWaveRank5) then _BlastWave = Fire_Ability.BlastWaveRank5; - elseif IsSpellKnown(Fire_Ability.BlastWaveRank4) then _BlastWave = Fire_Ability.BlastWaveRank4; - elseif IsSpellKnown(Fire_Ability.BlastWaveRank3) then _BlastWave = Fire_Ability.BlastWaveRank3; - elseif IsSpellKnown(Fire_Ability.BlastWaveRank2) then _BlastWave = Fire_Ability.BlastWaveRank2; end - - if IsSpellKnown(Fire_Ability.FireBlastRank7) then _FireBlast = Fire_Ability.FireBlastRank7; - elseif IsSpellKnown(Fire_Ability.FireBlastRank6) then _FireBlast = Fire_Ability.FireBlastRank6; - elseif IsSpellKnown(Fire_Ability.FireBlastRank5) then _FireBlast = Fire_Ability.FireBlastRank5; - elseif IsSpellKnown(Fire_Ability.FireBlastRank4) then _FireBlast = Fire_Ability.FireBlastRank4; - elseif IsSpellKnown(Fire_Ability.FireBlastRank3) then _FireBlast = Fire_Ability.FireBlastRank3; - elseif IsSpellKnown(Fire_Ability.FireBlastRank2) then _FireBlast = Fire_Ability.FireBlastRank2; end - - if IsSpellKnown(Fire_Ability.FireWardRank5) then _FireWard = Fire_Ability.FireWardRank5; - elseif IsSpellKnown(Fire_Ability.FireWardRank4) then _FireWard = Fire_Ability.FireWardRank4; - elseif IsSpellKnown(Fire_Ability.FireWardRank3) then _FireWard = Fire_Ability.FireWardRank3; - elseif IsSpellKnown(Fire_Ability.FireWardRank2) then _FireWard = Fire_Ability.FireWardRank2; end - - if IsSpellKnown(Fire_Ability.FireballRank11) then _Fireball = Fire_Ability.FireballRank11; - elseif IsSpellKnown(Fire_Ability.FireballRank10) then _Fireball = Fire_Ability.FireballRank10; - elseif IsSpellKnown(Fire_Ability.FireballRank9) then _Fireball = Fire_Ability.FireballRank8; - elseif IsSpellKnown(Fire_Ability.FireballRank8) then _Fireball = Fire_Ability.FireballRank9; - elseif IsSpellKnown(Fire_Ability.FireballRank7) then _Fireball = Fire_Ability.FireballRank7; - elseif IsSpellKnown(Fire_Ability.FireballRank6) then _Fireball = Fire_Ability.FireballRank6; - elseif IsSpellKnown(Fire_Ability.FireballRank5) then _Fireball = Fire_Ability.FireballRank5; - elseif IsSpellKnown(Fire_Ability.FireballRank4) then _Fireball = Fire_Ability.FireballRank4; - elseif IsSpellKnown(Fire_Ability.FireballRank3) then _Fireball = Fire_Ability.FireballRank3; - elseif IsSpellKnown(Fire_Ability.FireballRank2) then _Fireball = Fire_Ability.FireballRank2; end - - if IsSpellKnown(Fire_Ability.FlamestrikeRank6) then _Flamestrike = Fire_Ability.FlamestrikeRank6; - elseif IsSpellKnown(Fire_Ability.FlamestrikeRank5) then _Flamestrike = Fire_Ability.FlamestrikeRank5; - elseif IsSpellKnown(Fire_Ability.FlamestrikeRank4) then _Flamestrike = Fire_Ability.FlamestrikeRank4; - elseif IsSpellKnown(Fire_Ability.FlamestrikeRank3) then _Flamestrike = Fire_Ability.FlamestrikeRank3; - elseif IsSpellKnown(Fire_Ability.FlamestrikeRank2) then _Flamestrike = Fire_Ability.FlamestrikeRank2; end - - --down ranked Flamestrike - if IsSpellKnown(Fire_Ability.FlamestrikeRank6) then _FlamestrikeDR = Fire_Ability.FlamestrikeRank5; - elseif IsSpellKnown(Fire_Ability.FlamestrikeRank5) then _FlamestrikeDR = Fire_Ability.FlamestrikeRank4; - elseif IsSpellKnown(Fire_Ability.FlamestrikeRank4) then _FlamestrikeDR = Fire_Ability.FlamestrikeRank3; - elseif IsSpellKnown(Fire_Ability.FlamestrikeRank3) then _FlamestrikeDR = Fire_Ability.FlamestrikeRank2; - elseif IsSpellKnown(Fire_Ability.FlamestrikeRank2) then _FlamestrikeDR = Fire_Ability.FlamestrikeRank1; end - - if IsSpellKnown(Fire_Ability.PyroblastRank8) then _Pyroblast = Fire_Ability.PyroblastRank8; - elseif IsSpellKnown(Fire_Ability.PyroblastRank7) then _Pyroblast = Fire_Ability.PyroblastRank7; - elseif IsSpellKnown(Fire_Ability.PyroblastRank6) then _Pyroblast = Fire_Ability.PyroblastRank6; - elseif IsSpellKnown(Fire_Ability.PyroblastRank5) then _Pyroblast = Fire_Ability.PyroblastRank5; - elseif IsSpellKnown(Fire_Ability.PyroblastRank4) then _Pyroblast = Fire_Ability.PyroblastRank4; - elseif IsSpellKnown(Fire_Ability.PyroblastRank3) then _Pyroblast = Fire_Ability.PyroblastRank3; - elseif IsSpellKnown(Fire_Ability.PyroblastRank2) then _Pyroblast = Fire_Ability.PyroblastRank2; end - - if IsSpellKnown(Fire_Ability.ScorchRank7) then _Scorch = Fire_Ability.ScorchRank7; - elseif IsSpellKnown(Fire_Ability.ScorchRank6) then _Scorch = Fire_Ability.ScorchRank6; - elseif IsSpellKnown(Fire_Ability.ScorchRank5) then _Scorch = Fire_Ability.ScorchRank5; - elseif IsSpellKnown(Fire_Ability.ScorchRank4) then _Scorch = Fire_Ability.ScorchRank4; - elseif IsSpellKnown(Fire_Ability.ScorchRank3) then _Scorch = Fire_Ability.ScorchRank3; - elseif IsSpellKnown(Fire_Ability.ScorchRank2) then _Scorch = Fire_Ability.ScorchRank2; end - - if IsSpellKnown(Frost_Ability.BlizzardRank6) then _Blizzard = Frost_Ability.BlizzardRank6; - elseif IsSpellKnown(Frost_Ability.BlizzardRank5) then _Blizzard = Frost_Ability.BlizzardRank5; - elseif IsSpellKnown(Frost_Ability.BlizzardRank4) then _Blizzard = Frost_Ability.BlizzardRank4; - elseif IsSpellKnown(Frost_Ability.BlizzardRank3) then _Blizzard = Frost_Ability.BlizzardRank3; - elseif IsSpellKnown(Frost_Ability.BlizzardRank2) then _Blizzard = Frost_Ability.BlizzardRank2; end - - if IsSpellKnown(Frost_Ability.ConeofColdRank5) then _ConeofCold = Frost_Ability.ConeofColdRank5; - elseif IsSpellKnown(Frost_Ability.ConeofColdRank4) then _ConeofCold = Frost_Ability.ConeofColdRank4; - elseif IsSpellKnown(Frost_Ability.ConeofColdRank3) then _ConeofCold = Frost_Ability.ConeofColdRank3; - elseif IsSpellKnown(Frost_Ability.ConeofColdRank2) then _ConeofCold = Frost_Ability.ConeofColdRank2; end - - if IsSpellKnown(Frost_Ability.FrostWardRank5) then _FrostWard = Frost_Ability.FrostWardRank5; - elseif IsSpellKnown(Frost_Ability.FrostWardRank4) then _FrostWard = Frost_Ability.FrostWardRank4; - elseif IsSpellKnown(Frost_Ability.FrostWardRank3) then _FrostWard = Frost_Ability.FrostWardRank3; - elseif IsSpellKnown(Frost_Ability.FrostWardRank2) then _FrostWard = Frost_Ability.FrostWardRank2; end - - if IsSpellKnown(Frost_Ability.FrostboltRank10) then _Frostbolt = Frost_Ability.FrostboltRank10; - elseif IsSpellKnown(Frost_Ability.FrostboltRank9) then _Frostbolt = Frost_Ability.FrostboltRank9; - elseif IsSpellKnown(Frost_Ability.FrostboltRank8) then _Frostbolt = Frost_Ability.FrostboltRank8; - elseif IsSpellKnown(Frost_Ability.FrostboltRank7) then _Frostbolt = Frost_Ability.FrostboltRank7; - elseif IsSpellKnown(Frost_Ability.FrostboltRank6) then _Frostbolt = Frost_Ability.FrostboltRank6; - elseif IsSpellKnown(Frost_Ability.FrostboltRank5) then _Frostbolt = Frost_Ability.FrostboltRank5; - elseif IsSpellKnown(Frost_Ability.FrostboltRank4) then _Frostbolt = Frost_Ability.FrostboltRank4; - elseif IsSpellKnown(Frost_Ability.FrostboltRank3) then _Frostbolt = Frost_Ability.FrostboltRank3; - elseif IsSpellKnown(Frost_Ability.FrostboltRank2) then _Frostbolt = Frost_Ability.FrostboltRank2; end - - --Ranks Defensive - if IsSpellKnown(Arc_Ability.MageArmorRank3) then _MageArmor = Arc_Ability.MageArmorRank3; - elseif IsSpellKnown(Arc_Ability.MageArmorRank2) then _MageArmor = Arc_Ability.MageArmorRank2; end - - if IsSpellKnown(Arc_Ability.ManaShieldRank6) then _ManaShield = Arc_Ability.ManaShieldRank6; - elseif IsSpellKnown(Arc_Ability.ManaShieldRank5) then _ManaShield = Arc_Ability.ManaShieldRank5; - elseif IsSpellKnown(Arc_Ability.ManaShieldRank4) then _ManaShield = Arc_Ability.ManaShieldRank4; - elseif IsSpellKnown(Arc_Ability.ManaShieldRank3) then _ManaShield = Arc_Ability.ManaShieldRank3; - elseif IsSpellKnown(Arc_Ability.ManaShieldRank2) then _ManaShield = Arc_Ability.ManaShieldRank2; end - - if IsSpellKnown(Frost_Ability.IceBarrierRank4) then _IceBarrier = Frost_Ability.IceBarrierRank4; - elseif IsSpellKnown(Frost_Ability.IceBarrierRank3) then _IceBarrier = Frost_Ability.IceBarrierRank3; - elseif IsSpellKnown(Frost_Ability.IceBarrierRank2) then _IceBarrier = Frost_Ability.IceBarrierRank2; end - - if IsSpellKnown(Frost_Ability.IceArmorRank4) then _IceArmor = Frost_Ability.IceArmorRank4; - elseif IsSpellKnown(Frost_Ability.IceArmorRank3) then _IceArmor = Frost_Ability.IceArmorRank3; - elseif IsSpellKnown(Frost_Ability.IceArmorRank2) then _IceArmor = Frost_Ability.IceArmorRank2; - elseif IsSpellKnown(Frost_Ability.IceArmorRank1) then _IceArmor = Frost_Ability.IceArmorRank1; - elseif IsSpellKnown(Frost_Ability.FrostArmorRank3) then _IceArmor = Frost_Ability.FrostArmorRank3; - elseif IsSpellKnown(Frost_Ability.FrostArmorRank2) then _IceArmor = Frost_Ability.FrostArmorRank2; end - - if IsSpellKnown(Frost_Ability.FrostNovaRank4) then _FrostNova = Frost_Ability.FrostNovaRank4; - elseif IsSpellKnown(Frost_Ability.FrostNovaRank3) then _FrostNova = Frost_Ability.FrostNovaRank3; - elseif IsSpellKnown(Frost_Ability.FrostNovaRank2) then _FrostNova = Frost_Ability.FrostNovaRank2; end - - ids.optionMaxIds = { - --Arcane - Evocation = _Evocation, - PresenceofMind = _PresenceofMind, - ArcanePower = _ArcanePower, - AmplifyMagic = _AmplifyMagic, - ArcaneBrilliance = _ArcaneBrilliance, - ArcaneExplosion = _ArcaneExplosion, - ArcaneIntellect = _ArcaneIntellect, - ArcaneMissiles = _ArcaneMissiles, - DampenMagic = _DampenMagic, - MageArmor = _MageArmor, - --Fire - BlastWave = _BlastWave, - Combustion = _Combustion, - FireBlast =_FireBlast, - FireWard =_FireWard, - Fireball = _Fireball, - Flamestrike = _Flamestrike, - FlamestrikeDR = _FlamestrikeDR, - Pyroblast =_Pyroblast, - Scorch =_Scorch, - --Frost - Blizzard = _Blizzard, - ConeofCold = _ConeofCold, - Frostbolt = _Frostbolt, - IceBarrier = _IceBarrier, - IceArmor = _IceArmor, - FrostNova = _FrostNova, - FrostWard = _FrostWard, - --Runes - RuneArcaneBlast = _RuneArcaneBlast, - RuneArcaneSurge = _RuneArcaneSurge, - RuneIceLance = _RuneIceLance, - RuneIcyVeins = _RuneIcyVeins, - RuneLivingBomb = _RuneLivingBomb, - RuneLivingFlame = _RuneLivingFlame, - RuneMassRegeneration = _RuneMassRegeneration, - RuneRegeneration = _RuneRegeneration, - RuneRewindTime = _RuneRewindTime, - } + +function ConROC:PLAYER_TALENT_UPDATE() + ConROC:SpecUpdate(); + ConROC:closeSpellmenu(); end -ConROC:UpdateSpellID() +local Racial, Spec, Caster, Ability, Rank, Arc_Talent, Fire_Talent, Frost_Talent, Runes, Buff, Debuff = ids.Racial, ids.Spec, ids.Caster, ids.Ability, ids.Rank, ids.Arcane_Talent, ids.Fire_Talent, ids.Frost_Talent, ids.Runes, ids.Buff, ids.Debuff; local wChillEXP = 0; local fVulEXP = 0; local fStrikeEXP = 0; local fStrikeDREXP = 0; -function ConROC:EnableRotationModule() - self.Description = "Mage"; - self.NextSpell = ConROC.Mage.Damage; +--Info +local _Player_Level = UnitLevel("player"); +local _Player_Percent_Health = ConROC:PercentHealth('player'); +local _is_PvP = ConROC:IsPvP(); +local _in_combat = UnitAffectingCombat('player'); +local _party_size = GetNumGroupMembers(); +local _is_PC = UnitPlayerControlled("target"); +local _is_Enemy = ConROC:TarHostile(); +local _Target_Health = UnitHealth('target'); +local _Target_Percent_Health = ConROC:PercentHealth('target'); - self:RegisterEvent('UNIT_SPELLCAST_SUCCEEDED'); - self:RegisterEvent("PLAYER_TALENT_UPDATE"); - self.lastSpellId = 0; - - ConROC:SpellmenuClass(); -end -function ConROC:PLAYER_TALENT_UPDATE() - ConROC:SpecUpdate(); - ConROC:closeSpellmenu(); -end +--Resources +local _Mana, _Mana_Max, _Mana_Percent = ConROC:PlayerPower('Mana'); -function ConROC.Mage.Damage(_, timeShift, currentSpell, gcd) - ConROC:UpdateSpellID() +--Conditions +local _Queue = 0; +local _Has_Wand = HasWandEquipped(); +local _is_moving = ConROC:PlayerSpeed(); +local _enemies_in_melee, _target_in_melee = ConROC:Targets("Melee"); +local _enemies_in_10yrds, _target_in_10yrds = ConROC:Targets("10"); +local _enemies_in_20yrds, _target_in_20yrds = ConROC:Targets("20"); +local _enemies_in_40yrds, _target_in_40yrds = ConROC:Targets("40"); +local _can_Execute = _Target_Percent_Health < 20; ---Character - local plvl = UnitLevel('player'); --Racials +local _Berserking, _Berserking_RDY = _, _; +local _EscapeArtist, _EscapeArtist_RDY = _, _; +local _Perception, _Perception_RDY = _, _; + +function ConROC:Stats() + _Player_Level = UnitLevel("player"); + _Player_Percent_Health = ConROC:PercentHealth('player'); + _is_PvP = ConROC:IsPvP(); + _in_combat = UnitAffectingCombat('player'); + _party_size = GetNumGroupMembers(); + _is_PC = UnitPlayerControlled("target"); + _is_Enemy = ConROC:TarHostile(); + _Target_Health = UnitHealth('target'); + _Target_Percent_Health = ConROC:PercentHealth('target'); + + _Mana, _Mana_Max, _Mana_Percent = ConROC:PlayerPower('Mana'); + + _Queue = 0; + _Has_Wand = HasWandEquipped(); + _is_moving = ConROC:PlayerSpeed(); + _enemies_in_melee, _target_in_melee = ConROC:Targets("Melee"); + _enemies_in_10yrds, _target_in_10yrds = ConROC:Targets("10"); + _enemies_in_20yrds, _target_in_20yrds = ConROC:Targets("20"); + _enemies_in_40yrds, _target_in_40yrds = ConROC:Targets("40"); + _can_Execute = _Target_Percent_Health < 20; + + _Berserking, _Berserking_RDY = ConROC:AbilityReady(Racial.Berserking, timeShift); + _EscapeArtist, _EscapeArtist_RDY = ConROC:AbilityReady(Racial.EscapeArtist, timeShift); + _Perception, _Perception_RDY = ConROC:AbilityReady(Racial.Perception, timeShift); +end ---Resources - local mana = UnitPower('player', Enum.PowerType.Mana); - local manaMax = UnitPowerMax('player', Enum.PowerType.Mana); - local manaPercent = math.max(0, mana) / math.max(1, manaMax) * 100; - +function ConROC.Mage.Damage(_, timeShift, currentSpell, gcd) + ConROC:UpdateSpellID(); + ConROC:Stats(); --Abilties - local ampMagRDY = ConROC:AbilityReady(_AmplifyMagic, timeShift); - local ampMagBUFF = ConROC:Buff(_AmplifyMagic, timeShift); - local aExpRDY = ConROC:AbilityReady(_ArcaneExplosion, timeShift); - local aIntRDY = ConROC:AbilityReady(_ArcaneIntellect, timeShift); - local aIntBUFF = ConROC:Buff(_ArcaneIntellect, timeShift); - local aBriBUFF = ConROC:Buff(_ArcaneBrilliance, timeShift); - local aMissRDY = ConROC:AbilityReady(_ArcaneMissiles, timeShift); - local aPowerRDY = ConROC:AbilityReady(_ArcanePower, timeShift); - local blinkRDY = ConROC:AbilityReady(Arc_Ability.Blink, timeShift); - local conAgateRDY = ConROC:AbilityReady(Arc_Ability.ConjureManaAgate, timeShift); - local conJadeRDY = ConROC:AbilityReady(Arc_Ability.ConjureManaJade, timeShift); - local conCitRDY = ConROC:AbilityReady(Arc_Ability.ConjureManaCitrine, timeShift); - local conRubyRDY = ConROC:AbilityReady(Arc_Ability.ConjureManaRuby, timeShift); - local cSpellRDY = ConROC:AbilityReady(Arc_Ability.Counterspell, timeShift); - local dampenMagRDY = ConROC:AbilityReady(_DampenMagic, timeShift); - local dampenMagBUFF = ConROC:Buff(_DampenMagic, timeShift); - local evoRDY = ConROC:AbilityReady(_Evocation, timeShift); - local pomRDY = ConROC:AbilityReady(_PresenceofMind, timeShift); - local pomBUFF = ConROC:Buff(_PresenceofMind, timeShift); - local bWaveRDY = ConROC:AbilityReady(_BlastWave, timeShift); - if ConROC:TalentChosen(Spec.Fire, Fire_Talent.Combustion) then - local combRDY = ConROC:AbilityReady(_Combustion, timeShift); - end - local fBlastRDY = ConROC:AbilityReady(_FireBlast, timeShift); - local fBallRDY = ConROC:AbilityReady(_Fireball, timeShift); - local fBallDEBUFF = ConROC:TargetDebuff(_Fireball, timeShift); - local fStrikeRDY = ConROC:AbilityReady(_Flamestrike, timeShift); - local fStrikeDUR = fStrikeEXP - GetTime(); - local fStrikeDRRDY = ConROC:AbilityReady(_FlamestrikeDR, timeShift); - local fStrikeDRDUR = fStrikeDREXP - GetTime(); - local pBlastRDY = ConROC:AbilityReady(_Pyroblast, timeShift); - local scorRDY = ConROC:AbilityReady(_Scorch, timeShift); - local blizRDY = ConROC:AbilityReady(_Blizzard, timeShift); - local cSnapRDY = ConROC:AbilityReady(Frost_Ability.ColdSnap, timeShift); - local cofcRDY = ConROC:AbilityReady(_ConeofCold, timeShift); - local frBoltRDY = ConROC:AbilityReady(_Frostbolt, timeShift); - local frBoltDEBUFF = ConROC:TargetDebuff(_Frostbolt, timeShift); - - local chillDEBUFF = ConROC:TargetDebuff(Target_Debuff.Chilled, timeShift); - local wChillDEBUFF, wChillCount = ConROC:TargetDebuff(Target_Debuff.WintersChill); - local wChillDUR = wChillEXP - GetTime(); - local fVulDEBUFF, fVulCount = ConROC:TargetDebuff(Target_Debuff.FireVulnerability); - local fVulDUR = fVulEXP - GetTime(); - local frNovaDEBUFF = ConROC:TargetDebuff(_FrostNova); - + local _AmplifyMagic, _AmplifyMagic_RDY = ConROC:AbilityReady(Ability.AmplifyMagic, timeShift); + local _AmplifyMagic_BUFF = ConROC:Aura(_AmplifyMagic, timeShift); + local _ArcaneExplosion, _ArcaneExplosion_RDY = ConROC:AbilityReady(Ability.ArcaneExplosion, timeShift); + local _ArcaneIntellect, _ArcaneIntellect_RDY = ConROC:AbilityReady(Ability.ArcaneIntellect, timeShift); + local _ArcaneIntellect_BUFF = ConROC:Aura(_ArcaneIntellect, timeShift); + local _ArcaneBrilliance, _ArcaneBrilliance_RDY = ConROC:AbilityReady(Ability.ArcaneBrilliance, timeShift); + local _ArcaneBrilliance_BUFF = ConROC:Aura(_ArcaneBrilliance, timeShift); + local _ArcaneMissiles, _ArcaneMissiles_RDY = ConROC:AbilityReady(Ability.ArcaneMissiles, timeShift); + local _ArcanePower, _ArcanePower_RDY = ConROC:AbilityReady(Ability.ArcanePower, timeShift); + local _Blink, _Blink_RDY = ConROC:AbilityReady(Ability.Blink, timeShift); + local _ConjureManaAgate, _ConjureManaAgate_RDY = ConROC:AbilityReady(Ability.ConjureManaAgate, timeShift); + local _ConjureManaJade, _ConjureManaJade_RDY = ConROC:AbilityReady(Ability.ConjureManaJade, timeShift); + local _ConjureManaCitrine, _ConjureManaCitrine_RDY = ConROC:AbilityReady(Ability.ConjureManaCitrine, timeShift); + local _ConjureManaRuby, _ConjureManaRuby_RDY = ConROC:AbilityReady(Ability.ConjureManaRuby, timeShift); + local _Counterspell, _Counterspell_RDY = ConROC:AbilityReady(Ability.Counterspell, timeShift); + local _DampenMagic, _DampenMagic_RDY = ConROC:AbilityReady(Ability.DampenMagic, timeShift); + local _DampenMagic_BUFF = ConROC:Aura(_DampenMagic, timeShift); + local _Evocation, _Evocation_RDY = ConROC:AbilityReady(Ability.Evocation, timeShift); + local _PresenceofMind, _PresenceofMind_RDY = ConROC:AbilityReady(Ability.PresenceofMind, timeShift); + local _PresenceofMind_BUFF = ConROC:Aura(_PresenceofMind, timeShift); + local _BlastWave, _BlastWave_RDY = ConROC:AbilityReady(Ability.BlastWave, timeShift); + local _Combustion, _Combustion_RDY = ConROC:AbilityReady(Ability.Combustion, timeShift); + local _FireBlast, _FireBlast_RDY = ConROC:AbilityReady(Ability.FireBlast, timeShift); + local _Fireball, _Fireball_RDY = ConROC:AbilityReady(Ability.Fireball, timeShift); + local _Fireball_DEBUFF = ConROC:TargetAura(_Fireball, timeShift); + local _Flamestrike, _Flamestrike_RDY = ConROC:AbilityReady(Ability.Flamestrike, timeShift); + local _Flamestrike_DUR = fStrikeEXP - GetTime(); + local _FlamestrikeDR, _FlamestrikeDR_RDY = ConROC:AbilityReady(Ability.FlamestrikeDR, timeShift); + local _FlamestrikeDR_DUR = fStrikeDREXP - GetTime(); + local _Pyroblast, _Pyroblast_RDY = ConROC:AbilityReady(Ability.Pyroblast, timeShift); + local _Scorch, _Scorch_RDY = ConROC:AbilityReady(Ability.Scorch, timeShift); + local _Blizzard, _Blizzard_RDY = ConROC:AbilityReady(Ability.Blizzard, timeShift); + local _ColdSnap, _ColdSnap_RDY = ConROC:AbilityReady(Ability.ColdSnap, timeShift); + local _ConeofCold, _ConeofCold_RDY = ConROC:AbilityReady(Ability.ConeofCold, timeShift); + local _Frostbolt, _Frostbolt_RDY = ConROC:AbilityReady(Ability.Frostbolt, timeShift); + local _Frostbolt_DEBUFF = ConROC:TargetAura(_Frostbolt, timeShift); + local _FrostNova, _FrostNova_RDY = ConROC:AbilityReady(Ability.FrostNova, timeShift); + local _FrostNova_DEBUFF = ConROC:TargetAura(_FrostNova); + + local _Chilled_DEBUFF = ConROC:TargetAura(Debuff.Chilled, timeShift); + local _WintersChill_DEBUFF, _WintersChill_COUNT = ConROC:TargetAura(Debuff.WintersChill); + local _WintersChill_DUR = wChillEXP - GetTime(); + local _FireVulnerability_DEBUFF, _FireVulnerability_COUNT = ConROC:TargetAura(Debuff.FireVulnerability); + local _FireVulnerability_DUR = fVulEXP - GetTime(); + local _, impArcPoints = ConROC:TalentChosen(Spec.Arcane, Arc_Talent.ImprovedArcaneMissiles) - ---runes - local raBlastRDY = ConROC:AbilityReady(_RuneArcaneBlast, timeShift); - local raBlastDEBUFF, raBlastCount = ConROC:TargetDebuff(Target_Debuff.ArcaneBlast); - local raSurgeRDY = ConROC:AbilityReady(_RuneArcaneSurge, timeShift); - local riLanceRDY = ConROC:AbilityReady(_RuneIceLance, timeShift); - local riVeinsRDY = ConROC:AbilityReady(_RuneIcyVeins, timeShift); - local rlBombRDY = ConROC:AbilityReady(_RuneLivingBomb, timeShift); - local rlBombDEBUFF = ConROC:TargetDebuff(_RuneLivingBomb, timeShift); - local rlFlameRDY = ConROC:AbilityReady(_RuneLivingFlame, timeShift); - local rlFlameDEBUFF = ConROC:TargetDebuff(Target_Debuff.LivingFlame, timeShift); - local rmRegenRDY = ConROC:AbilityReady(_RuneMassRegeneration, timeShift); - local rRegenRDY = ConROC:AbilityReady(_RuneRegeneration, timeShift); - local rrTimeRDY = ConROC:AbilityReady(_RuneRewindTime, timeShift); - local rFoFBUFF, rFoFCount, rFoFDUR = ConROC:UnitAura(Player_Buff.FingersofFrost, timeShift,'player', 'HELPFUL', false); + +--Runes + local _ArcaneBlast, _ArcaneBlast_RDY = ConROC:AbilityReady(Runes.ArcaneBlast, timeShift); + local _, _ArcaneBlast_COUNT = ConROC:TargetAura(_ArcaneBlast); + local _ArcaneSurge, _ArcaneSurge_COUNT = ConROC:AbilityReady(Runes.ArcaneSurge, timeShift); + local _IceLance, _IceLance_RDY = ConROC:AbilityReady(Runes.IceLance, timeShift); + local _IcyVeins, _IcyVeins_RDY = ConROC:AbilityReady(Runes.IcyVeins, timeShift); + local _LivingBomb, _LivingBomb_RDY = ConROC:AbilityReady(Runes.LivingBomb, timeShift); + local _LivingBomb_DEBUFF = ConROC:TargetAura(_LivingBomb, timeShift); + local _LivingFlame, _LivingFlame_RDY = ConROC:AbilityReady(Runes.LivingFlame, timeShift); + local _LivingFlame_DEBUFF = ConROC:TargetAura(Debuff.LivingFlame, timeShift); + local _MassRegeneration, _MassRegeneration_RDY = ConROC:AbilityReady(Runes.MassRegeneration, timeShift); + local _Regeneration, _Regeneration_RDY = ConROC:AbilityReady(Runes.Regeneration, timeShift); + local _RewindTime, _RewindTime_RDY = ConROC:AbilityReady(Runes.RewindTime, timeShift); + local _FingersofFrost_BUFF, _FingersofFrost_COUNT, _FingersofFrost_DUR = ConROC:Aura(Buff.FingersofFrost, timeShift); --Conditions - local inMelee = ConROC:IsMeleeRange()--checking range 5 yards - local targetPh = ConROC:PercentHealth('target'); - local hasWand = HasWandEquipped(); - local moving = ConROC:PlayerSpeed(); - local incombat = UnitAffectingCombat('player'); local resting = IsResting(); local mounted = IsMounted(); local onVehicle = UnitHasVehicleUI("player"); - local tarInAoe = 0; - - if ConROC_AoEButton:IsVisible() and IsSpellKnown(_ArcaneExplosion) then - tarInAoe = ConROC:Targets(_ArcaneExplosion); - end if onVehicle then return nil end - + --Indicators - ConROC:AbilityBurst(_Evocation, evoRDY and manaPercent <= 10); - ConROC:AbilityBurst(_PresenceofMind, pomRDY and incombat); - ConROC:AbilityBurst(_ArcanePower, aPowerRDY and incombat and (not ConROC:TalentChosen(Spec.Frost, Frost_Talent.WintersChill) or (ConROC:TalentChosen(Spec.Frost, Frost_Talent.WintersChill) and wChillCount == 5))) ; - ConROC:AbilityBurst(_Combustion, combRDY and incombat and (not ConROC:TalentChosen(Spec.Fire, Fire_Talent.ImprovedScorch) or (ConROC:TalentChosen(Spec.Fire, Fire_Talent.ImprovedScorch) and fVuCount == 5))); - - ConROC:AbilityRaidBuffs(_ArcaneIntellect, aIntRDY and not (aIntBUFF or aBriBUFF)); - ConROC:AbilityInterrupt(_Counterspell, ConROC:Interrupt() and cSpellRDY) - + ConROC:AbilityBurst(_Evocation, _Evocation_RDY and _Mana_Percent <= 10); + ConROC:AbilityBurst(_PresenceofMind, _PresenceofMind_RDY and _in_combat); + ConROC:AbilityBurst(_ArcanePower, _ArcanePower_RDY and _in_combat and (not ConROC:TalentChosen(Spec.Frost, Frost_Talent.WintersChill) or (ConROC:TalentChosen(Spec.Frost, Frost_Talent.WintersChill) and _WintersChill_COUNT == 5))) ; + ConROC:AbilityBurst(_Combustion, _Combustion_RDY and _in_combat and (not ConROC:TalentChosen(Spec.Fire, Fire_Talent.ImprovedScorch) or (ConROC:TalentChosen(Spec.Fire, Fire_Talent.ImprovedScorch) and _FireVulnerability_COUNT == 5))); + + ConROC:AbilityRaidBuffs(_ArcaneIntellect, _ArcaneIntellect_RDY and not (_ArcaneIntellect_BUFF or _ArcaneBrilliance_BUFF)); + ConROC:AbilityInterrupt(_Counterspell, _Counterspell_RDY and ConROC:Interrupt()) + --Warnings - + --Rotations - if ConROC:CheckBox(ConROC_SM_CD_Evocation) and evoRDY and manaPercent < 10 then + if ConROC:CheckBox(ConROC_SM_CD_Evocation) and _Evocation_RDY and _Mana_Percent < 10 then return _Evocation; end + if ConROC.Seasons.IsSoD then --DPS rotation for SoD - if plvl < 10 or not currentSpecID then - if ConROC:CheckBox(ConROC_SM_Rune_IcyVeins) and riVeinsRDY then - return _RuneIcyVeins; + if _Player_Level < 10 or not currentSpecID then + if ConROC:CheckBox(ConROC_SM_Rune_IcyVeins) and _IcyVeins_RDY then + return _IcyVeins; end - if ConROC:CheckBox(ConROC_SM_Rune_LivingFlame) and rlFlameRDY then - return _RuneLivingFlame; + + if ConROC:CheckBox(ConROC_SM_Rune_LivingFlame) and _LivingFlame_RDY then + return _LivingFlame; end - if ConROC:CheckBox(ConROC_SM_Rune_LivingBomb) and rlBombRDY and not rlBombDEBUFF and ((targetPh >= 5 and ConROC:Raidmob()) or (targetPh >= 20 and not ConROC:Raidmob())) then - return _RuneLivingBomb; + + if ConROC:CheckBox(ConROC_SM_Rune_LivingBomb) and _LivingBomb_RDY and not _LivingBomb_DEBUFF and ((_Target_Percent_Health >= 5 and ConROC:Raidmob()) or (_Target_Percent_Health >= 20 and not ConROC:Raidmob())) then + return _LivingBomb; end - if ConROC:CheckBox(ConROC_SM_Rune_ArcaneBlast) and raBlastRDY and raBlastCount < ConROC_SM_Rune_ArcaneBlastCount:GetNumber() then - return _RuneArcaneBlast; + + if ConROC:CheckBox(ConROC_SM_Rune_ArcaneBlast) and _ArcaneBlast_RDY and _ArcaneBlast_COUNT < ConROC_SM_Rune_ArcaneBlastCount:GetNumber() then + return _ArcaneBlast; end - --[[if ConROC:CheckBox(ConROC_SM_Rune_ArcaneSurge) and raSurgeRDY then + + --[[if ConROC:CheckBox(ConROC_SM_Rune_ArcaneSurge) and _ArcaneSurge_COUNT then return _RuneArcaneSurge; end]] - if ConROC:CheckBox(ConROC_SM_Rune_IceLance) and riLanceRDY and (moving or rFoFCount > 1) then - return _RuneIceLance; + + if ConROC:CheckBox(ConROC_SM_Rune_IceLance) and _IceLance_RDY and (_is_moving or _FingersofFrost_COUNT > 1) then + return _IceLance; end - if ConROC:CheckBox(ConROC_SM_Rune_MassRegeneration) and rmRegenRDY then - return _RuneMassRegeneration; + + if ConROC:CheckBox(ConROC_SM_Rune_MassRegeneration) and _MassRegeneration_RDY then + return _MassRegeneration; end - if ConROC:CheckBox(ConROC_SM_Rune_Regeneration) and rRegenRDY then - return _RuneRegeneration; + + if ConROC:CheckBox(ConROC_SM_Rune_Regeneration) and _Regeneration_RDY then + return _Regeneration; end - if ConROC:CheckBox(ConROC_SM_Rune_RewindTime) and rrTimeRDY then - return _RuneRewindTime; + + if ConROC:CheckBox(ConROC_SM_Rune_RewindTime) and _RewindTime_RDY then + return _RewindTime; end + if ConROC_AoEButton:IsVisible() then - if ConROC:CheckBox(ConROC_SM_AoE_ArcaneExplosion) and aExpRDY and inMelee then + if ConROC:CheckBox(ConROC_SM_AoE_ArcaneExplosion) and _ArcaneExplosion_RDY and _target_in_melee then return _ArcaneExplosion; end - if ConROC:CheckBox(ConROC_SM_AoE_Flamestrike) and fStrikeRDY and not inMelee and fStrikeDUR <= 2 then + if ConROC:CheckBox(ConROC_SM_AoE_Flamestrike) and _Flamestrike_RDY and not _target_in_melee and _Flamestrike_DUR <= 2 then return _Flamestrike; - end - - if ConROC:CheckBox(ConROC_SM_AoE_Blizzard) and blizRDY and not inMelee then + end + + if ConROC:CheckBox(ConROC_SM_AoE_Blizzard) and _Blizzard_RDY and not _target_in_melee then return _Blizzard; end end - if fBlastRDY and (targetPh <= 25 or inMelee) and not ConROC_AoEButton:IsVisible() then + + if _FireBlast_RDY and (_Target_Percent_Health <= 25 or _target_in_melee) and not ConROC_AoEButton:IsVisible() then return _FireBlast; end - if ConROC:CheckBox(ConROC_SM_Filler_Frostbolt) and frBoltRDY and rFoFCount == 1 then + if ConROC:CheckBox(ConROC_SM_Filler_Frostbolt) and _Frostbolt_RDY and _FingersofFrost_COUNT == 1 then return _Frostbolt; end - if ConROC:CheckBox(ConROC_SM_Rune_IceLance) and riLanceRDY and (moving or rFoFBUFF) then + if ConROC:CheckBox(ConROC_SM_Rune_IceLance) and _IceLance_RDY and (_is_moving or _FingersofFrost_BUFF) then return _RuneIceLance; end - - if ConROC:CheckBox(ConROC_SM_Filler_Fireball) and fBallRDY then + + if ConROC:CheckBox(ConROC_SM_Filler_Fireball) and _Fireball_RDY then return _Fireball; end - if ConROC:CheckBox(ConROC_SM_Filler_ArcaneMissiles) and aMissRDY then + + if ConROC:CheckBox(ConROC_SM_Filler_ArcaneMissiles) and _ArcaneMissiles_RDY then return _ArcaneMissiles; end - if ConROC:CheckBox(ConROC_SM_Filler_Frostbolt) and frBoltRDY then + + if ConROC:CheckBox(ConROC_SM_Filler_Frostbolt) and _Frostbolt_RDY then return _Frostbolt; end - if ConROC:CheckBox(ConROC_SM_Option_UseWand) and hasWand and ((manaPercent <= 10 and not evoRDY) or targetPh <= 5) then + + if ConROC:CheckBox(ConROC_SM_Option_UseWand) and _Has_Wand and ((_Mana_Percent <= 10 and not _Evocation_RDY) or _Target_Percent_Health <= 5) then return Caster.Shoot; end else if (currentSpecID == ids.Spec.Arcane) then if ConROC_AoEButton:IsVisible() then - if ConROC:CheckBox(ConROC_SM_Rune_LivingFlame) and rlFlameRDY then + if ConROC:CheckBox(ConROC_SM_Rune_LivingFlame) and _LivingFlame_RDY then return _RuneLivingFlame; end - --[[if ConROC:CheckBox(ConROC_SM_Rune_ArcaneBlast) and raBlastRDY and raBlastCount < ConROC_SM_Rune_ArcaneBlastCount:GetNumber() then + + --[[if ConROC:CheckBox(ConROC_SM_Rune_ArcaneBlast) and _ArcaneBlast_RDY and _ArcaneBlast_COUNT < ConROC_SM_Rune_ArcaneBlastCount:GetNumber() then return _RuneArcaneBlast; end]] - if aExpRDY and inMelee then + + if _ArcaneExplosion_RDY and _target_in_melee then return _ArcaneExplosion; end else - if aExpRDY and ((targetPh <= 25 and inMelee) or inMelee) then + if _ArcaneExplosion_RDY and ((_Target_Percent_Health <= 25 and _target_in_melee) or _target_in_melee) then return _ArcaneExplosion; - end - if ConROC:CheckBox(ConROC_SM_Rune_LivingFlame) and rlFlameRDY then - return _RuneLivingFlame; + end + + if ConROC:CheckBox(ConROC_SM_Rune_LivingFlame) and _LivingFlame_RDY then + return _LivingFlame; end - if ConROC:CheckBox(ConROC_SM_Rune_ArcaneBlast) and raBlastRDY and raBlastCount < ConROC_SM_Rune_ArcaneBlastCount:GetNumber() then - return _RuneArcaneBlast; + + if ConROC:CheckBox(ConROC_SM_Rune_ArcaneBlast) and _ArcaneBlast_RDY and _ArcaneBlast_COUNT < ConROC_SM_Rune_ArcaneBlastCount:GetNumber() then + return _ArcaneBlast; end - if ConROC:CheckBox(ConROC_SM_Filler_ArcaneMissiles) and aMissRDY then + + if ConROC:CheckBox(ConROC_SM_Filler_ArcaneMissiles) and _ArcaneMissiles_RDY then return _ArcaneMissiles; end end elseif (currentSpecID == ids.Spec.Fire) then if ConROC_AoEButton:IsVisible() then - if aExpRDY and (targetPh <= 25 or inMelee) and tarInAoe > 2 then + if _ArcaneExplosion_RDY and (_Target_Percent_Health <= 25 or _target_in_melee) and _enemies_in_10yrds > 2 then return _ArcaneExplosion; - elseif fBlastRDY and (targetPh <= 25 or inMelee) then + elseif _FireBlast_RDY and (_Target_Percent_Health <= 25 or _target_in_melee) then return _FireBlast; end - if ConROC:CheckBox(ConROC_SM_Rune_LivingBomb) and rlBombRDY and not rlBombDEBUFF and ((targetPh >= 5 and ConROC:Raidmob()) or (targetPh >= 20 and not ConROC:Raidmob())) then - return _RuneLivingBomb; - end - if ConROC:CheckBox(ConROC_SM_Rune_LivingFlame) and rlFlameRDY and ConROC_AoEButton:IsVisible() then - return _RuneLivingFlame; + + if ConROC:CheckBox(ConROC_SM_Rune_LivingBomb) and _LivingBomb_RDY and not _LivingBomb_DEBUFF and ((_Target_Percent_Health >= 5 and ConROC:Raidmob()) or (_Target_Percent_Health >= 20 and not ConROC:Raidmob())) then + return _LivingBomb; + end + + if ConROC:CheckBox(ConROC_SM_Rune_LivingFlame) and _LivingFlame_RDY and ConROC_AoEButton:IsVisible() then + return _LivingFlame; end - if aExpRDY and inMelee then + + if _ArcaneExplosion_RDY and _target_in_melee then return _ArcaneExplosion; end else - if pBlastRDY and not incombat then + if _Pyroblast_RDY and not _in_combat then return _Pyroblast end - if aExpRDY and (targetPh <= 25 or inMelee) and tarInAoe > 2 then + + if _ArcaneExplosion_RDY and (_Target_Percent_Health <= 25 or _target_in_melee) and _enemies_in_10yrds > 2 then return _ArcaneExplosion; - end - if fBlastRDY and (targetPh <= 25 or inMelee) then + end + + if _FireBlast_RDY and (_Target_Percent_Health <= 25 or _target_in_melee) then return _FireBlast; end - if ConROC:CheckBox(ConROC_SM_Rune_LivingFlame) and rlFlameRDY then - return _RuneLivingFlame; + + if ConROC:CheckBox(ConROC_SM_Rune_LivingFlame) and _LivingFlame_RDY then + return _LivingFlame; end - - if scorRDY and ConROC:TalentChosen(Spec.Fire, Fire_Talent.ImprovedScorch) and fVulCount < 5 then + + if _Scorch_RDY and ConROC:TalentChosen(Spec.Fire, Fire_Talent.ImprovedScorch) and _FireVulnerability_COUNT < 5 then return _Scorch; end - if ConROC:CheckBox(ConROC_SM_Rune_LivingBomb) and rlBombRDY and not rlBombDEBUFF and ((targetPh >= 5 and ConROC:Raidmob()) or (targetPh >= 20 and not ConROC:Raidmob())) then - return _RuneLivingBomb; + if ConROC:CheckBox(ConROC_SM_Rune_LivingBomb) and _LivingBomb_RDY and not _LivingBomb_DEBUFF and ((_Target_Percent_Health >= 5 and ConROC:Raidmob()) or (_Target_Percent_Health >= 20 and not ConROC:Raidmob())) then + return _LivingBomb; end - if ConROC:CheckBox(ConROC_SM_Rune_IcyVeins) and riVeinsRDY then - return _RuneIcyVeins; + + if ConROC:CheckBox(ConROC_SM_Rune_IcyVeins) and _IcyVeins_RDY then + return _IcyVeins; end - if fBallRDY then + + if _Fireball_RDY then return _Fireball; end - if ConROC:CheckBox(ConROC_SM_Option_UseWand) and hasWand and ((manaPercent <= 10 and not evoRDY) or targetPh <= 5) then + + if ConROC:CheckBox(ConROC_SM_Option_UseWand) and _Has_Wand and ((_Mana_Percent <= 10 and not _Evocation_RDY) or _Target_Percent_Health <= 5) then return Caster.Shoot; end end elseif (currentSpecID == ids.Spec.Frost) then if ConROC_AoEButton:IsVisible() then - if aExpRDY and ((targetPh <= 25 and inMelee) or inMelee) then + if _ArcaneExplosion_RDY and ((_Target_Percent_Health <= 25 and _target_in_melee) or _target_in_melee) then return _ArcaneExplosion; - end - if ConROC:CheckBox(ConROC_SM_Rune_LivingBomb) and rlBombRDY and not rlBombDEBUFF and ((targetPh >= 5 and ConROC:Raidmob()) or (targetPh >= 20 and not ConROC:Raidmob())) then - return _RuneLivingBomb; - end - if ConROC:CheckBox(ConROC_SM_Rune_LivingFlame) and rlFlameRDY and ConROC_AoEButton:IsVisible() then - return _RuneLivingFlame; + end + + if ConROC:CheckBox(ConROC_SM_Rune_LivingBomb) and _LivingBomb_RDY and not _LivingBomb_DEBUFF and ((_Target_Percent_Health >= 5 and ConROC:Raidmob()) or (_Target_Percent_Health >= 20 and not ConROC:Raidmob())) then + return _LivingBomb; + end + + if ConROC:CheckBox(ConROC_SM_Rune_LivingFlame) and _LivingFlame_RDY and ConROC_AoEButton:IsVisible() then + return _LivingFlame; end - if blizRDY then + + if _Blizzard_RDY then return _Blizzard end else - if aExpRDY and (targetPh <= 25 or inMelee) and tarInAoe > 2 then + if _ArcaneExplosion_RDY and (_Target_Percent_Health <= 25 or _target_in_melee) and _enemies_in_10yrds > 2 then return _ArcaneExplosion; - end - if fBlastRDY and (targetPh <= 25 or inMelee) then + end + + if _FireBlast_RDY and (_Target_Percent_Health <= 25 or _target_in_melee) then return _FireBlast; end - - if ConROC:CheckBox(ConROC_SM_Rune_IceLance) and riLanceRDY and (moving or rFoFCount > 1) then - return _RuneIceLance; + + if ConROC:CheckBox(ConROC_SM_Rune_IceLance) and _IceLance_RDY and (_is_moving or _FingersofFrost_COUNT > 1) then + return _IceLance; end - if ConROC:CheckBox(ConROC_SM_Rune_LivingBomb) and rlBombRDY and not rlBombDEBUFF and ((targetPh >= 5 and ConROC:Raidmob()) or (targetPh >= 20 and not ConROC:Raidmob())) then - return _RuneLivingBomb; + + if ConROC:CheckBox(ConROC_SM_Rune_LivingBomb) and _LivingBomb_RDY and not _LivingBomb_DEBUFF and ((_Target_Percent_Health >= 5 and ConROC:Raidmob()) or (_Target_Percent_Health >= 20 and not ConROC:Raidmob())) then + return _LivingBomb; end - if ConROC:CheckBox(ConROC_SM_Rune_IcyVeins) and riVeinsRDY then - return _RuneIcyVeins; + + if ConROC:CheckBox(ConROC_SM_Rune_IcyVeins) and _IcyVeins_RDY then + return _IcyVeins; end - if ConROC:CheckBox(ConROC_SM_Filler_Frostbolt) and frBoltRDY and rFoFCount == 1 then + + if ConROC:CheckBox(ConROC_SM_Filler_Frostbolt) and _Frostbolt_RDY and _FingersofFrost_COUNT == 1 then return _Frostbolt; end - if ConROC:CheckBox(ConROC_SM_Rune_IceLance) and riLanceRDY and (moving or rFoFBUFF) then - return _RuneIceLance; + + if ConROC:CheckBox(ConROC_SM_Rune_IceLance) and _IceLance_RDY and (_is_moving or _FingersofFrost_BUFF) then + return _IceLance; end - if ConROC:CheckBox(ConROC_SM_Filler_Frostbolt) and frBoltRDY then + + if ConROC:CheckBox(ConROC_SM_Filler_Frostbolt) and _Frostbolt_RDY then return _Frostbolt; end - if ConROC:CheckBox(ConROC_SM_Option_UseWand) and hasWand and ((manaPercent <= 10 and not evoRDY) or targetPh <= 5) then + + if ConROC:CheckBox(ConROC_SM_Option_UseWand) and _Has_Wand and ((_Mana_Percent <= 10 and not _Evocation_RDY) or _Target_Percent_Health <= 5) then return Caster.Shoot; end end - end + end end else --DPS rotation for Classic Era & Classic HC - - if pBlastRDY and (not incombat or pomBUFF) then + if _Pyroblast_RDY and (not _in_combat or _PresenceofMind_BUFF) then return _Pyroblast; end - - if wChillCount >= 1 and wChillDUR <= 4 then + + if _WintersChill_COUNT >= 1 and _WintersChill_DUR <= 4 then return _Frostbolt; end - - if fVulCount >= 1 and fVulDUR <= 4 then + + if _FireVulnerability_COUNT >= 1 and _FireVulnerability_DUR <= 4 then return _Scorch; - end - - if cofcRDY and frNovaDEBUFF and inMelee then + end + + if _ConeofCold_RDY and _FrostNova_DEBUFF and _target_in_melee then return _ConeofCold; end - - if fBlastRDY and (targetPh <= 25 or inMelee) and not ConROC_AoEButton:IsVisible() then + + if _FireBlast_RDY and (_Target_Percent_Health <= 25 or _target_in_melee) and not ConROC_AoEButton:IsVisible() then return _FireBlast; end - if ConROC:CheckBox(ConROC_SM_Option_UseWand) and hasWand and ((manaPercent <= 10 and not evoRDY) or targetPh <= 5) then + if ConROC:CheckBox(ConROC_SM_Option_UseWand) and _Has_Wand and ((_Mana_Percent <= 10 and not _Evocation_RDY) or _Target_Percent_Health <= 5) then return Caster.Shoot; end - - if ConROC_AoEButton:IsVisible() and bWaveRDY and inMelee then + + if ConROC_AoEButton:IsVisible() and _BlastWave_RDY and _target_in_melee then return _BlastWave; end - - if ConROC_AoEButton:IsVisible() and ConROC:CheckBox(ConROC_SM_AoE_ArcaneExplosion) and aExpRDY and inMelee then + + if ConROC_AoEButton:IsVisible() and ConROC:CheckBox(ConROC_SM_AoE_ArcaneExplosion) and _ArcaneExplosion_RDY and _target_in_melee then return _ArcaneExplosion; end - if ConROC_AoEButton:IsVisible() and ConROC:CheckBox(ConROC_SM_AoE_Flamestrike) and fStrikeRDY and not inMelee and fStrikeDUR <= 2 then + if ConROC_AoEButton:IsVisible() and ConROC:CheckBox(ConROC_SM_AoE_Flamestrike) and _Flamestrike_RDY and not _target_in_melee and _Flamestrike_DUR <= 2 then return _Flamestrike; - end - - if ConROC_AoEButton:IsVisible() and ConROC:CheckBox(ConROC_SM_AoE_Blizzard) and blizRDY and not inMelee then + end + + if ConROC_AoEButton:IsVisible() and ConROC:CheckBox(ConROC_SM_AoE_Blizzard) and _Blizzard_RDY and not _target_in_melee then return _Blizzard; - end - if ConROC:CheckBox(ConROC_SM_CD_Combustion) and combRDY and incombat and ConROC:TalentChosen(Spec.Fire, Fire_Talent.Combustion) and fVulCount == 5 then + end + + if ConROC:CheckBox(ConROC_SM_CD_Combustion) and _Combustion_RDY and _in_combat and ConROC:TalentChosen(Spec.Fire, Fire_Talent.Combustion) and _FireVulnerability_COUNT == 5 then return _Combustion end - if scorRDY and ConROC:TalentChosen(Spec.Fire, Fire_Talent.ImprovedScorch) and fVulCount < 5 then + + if _Scorch_RDY and ConROC:TalentChosen(Spec.Fire, Fire_Talent.ImprovedScorch) and _FireVulnerability_COUNT < 5 then return _Scorch; end - - if ConROC:CheckBox(ConROC_SM_Filler_Fireball) and fBallRDY then + + if ConROC:CheckBox(ConROC_SM_Filler_Fireball) and _Fireball_RDY then return _Fireball; end - - if ConROC:CheckBox(ConROC_SM_Filler_ArcaneMissiles) and aMissRDY then + + if ConROC:CheckBox(ConROC_SM_Filler_ArcaneMissiles) and _ArcaneMissiles_RDY then return _ArcaneMissiles; end - - if ConROC:CheckBox(ConROC_SM_Filler_Frostbolt) and frBoltRDY then + + if ConROC:CheckBox(ConROC_SM_Filler_Frostbolt) and _Frostbolt_RDY then return _Frostbolt; - end + end end - - return nil; +return nil; end function ConROC.Mage.Defense(_, timeShift, currentSpell, gcd) ---Character - local plvl = UnitLevel('player'); + ConROC:UpdateSpellID(); + ConROC:Stats(); ---Racials - ---Resources - local mana = UnitPower('player', Enum.PowerType.Mana); - local manaMax = UnitPowerMax('player', Enum.PowerType.Mana); - local manaPercent = math.max(0, mana) / math.max(1, manaMax) * 100; - --Abilties - local mageArmorRDY = ConROC:AbilityReady(_MageArmor, timeShift); - local mageArmorBUFF = ConROC:Buff(_MageArmor, timeShift); - local manaShieldRDY = ConROC:AbilityReady(_ManaShield, timeShift); - local manaShieldBUFF = ConROC:Buff(_ManaShield, timeShift); - local iBarRDY = ConROC:AbilityReady(_IceBarrier, timeShift); - local iBarBUFF = ConROC:Buff(_IceBarrier, timeShift); - local iArmorRDY = ConROC:AbilityReady(_IceArmor, timeShift); - local iArmorBUFF = ConROC:Buff(_IceArmor, timeShift); - local frNovaRDY = ConROC:AbilityReady(_FrostNova, timeShift); + local _MageArmor, _MageArmor_RDY = ConROC:AbilityReady(Ability.MageArmor, timeShift); + local _MageArmor_BUFF = ConROC:Aura(_MageArmor, timeShift); + local _ManaShield, _ManaShield_RDY = ConROC:AbilityReady(Ability.ManaShield, timeShift); + local _ManaShield_BUFF = ConROC:Aura(_ManaShield, timeShift); + local _IceBarrier, _IceBarrier_RDY = ConROC:AbilityReady(Ability.IceBarrier, timeShift); + local _IceBarrier_BUFF = ConROC:Aura(_IceBarrier, timeShift); + local _IceArmor, _IceArmor_RDY = ConROC:AbilityReady(Ability.IceArmor, timeShift); + local _IceArmor_BUFF = ConROC:Aura(_IceArmor, timeShift); + local _FrostNova, _FrostNova_RDY = ConROC:AbilityReady(Ability.FrostNova, timeShift); --Conditions - local inMelee = ConROC:IsMeleeRange()--CheckInteractDistance("target", 3); - local targetPh = ConROC:PercentHealth('target'); local onVehicle = UnitHasVehicleUI("player"); - + if onVehicle then return nil end - + --Indicators - --Rotations - if ConROC:CheckBox(ConROC_SM_Armor_Ice) and iArmorRDY and not iArmorBUFF then + if ConROC:CheckBox(ConROC_SM_Armor_Ice) and _IceArmor_RDY and not _IceArmor_BUFF then return _IceArmor; end - - if ConROC:CheckBox(ConROC_SM_Armor_Mage) and mageArmorRDY and not mageArmorBUFF then + + if ConROC:CheckBox(ConROC_SM_Armor_Mage) and _MageArmor_RDY and not _MageArmor_BUFF then return _MageArmor; end - - if frNovaRDY and inMelee and targetPh >= 20 then + + if _FrostNova_RDY and _target_in_melee and _Target_Percent_Health >= 20 then return _FrostNova; - end + end - if iBarRDY and not iBarBUFF then + if _IceBarrier_RDY and not _IceBarrier_BUFF then return _IceBarrier; end - - return nil; +return nil; end function ConROC:JustCasted(spellID) - if spellID == _Frostbolt then + if spellID == Ability.Frostbolt then local expTime = GetTime() + 15; wChillEXP = expTime; end - if spellID == _Flamestrike then + if spellID == Ability.Flamestrike then local expTime = GetTime() + 8; fStrikeEXP = expTime; end - if spellID == _FlamestrikeDR then + if spellID == Ability.FlamestrikeDR then local expTime = GetTime() + 8; fStrikeDREXP = expTime; end - if spellID == _Scorch then + if spellID == Ability.Scorch then local expTime = GetTime() + 30; fVulEXP = expTime; end diff --git a/mage_ids.lua b/mage_ids.lua index 51f7e2b..47912b0 100644 --- a/mage_ids.lua +++ b/mage_ids.lua @@ -1,276 +1,431 @@ local ConROC_Mage, ids = ...; -local ConROC_Mage, optionMaxIds = ...; --General - ids.Racial = { - EscapeArtist = 20589, - } - ids.Spec = { - Arcane = 1, - Fire = 2, - Frost = 3, - } - ids.Caster = { - Shoot = 5019, - } +ids.Racial = { + Berserking = 20554, + EscapeArtist = 20589, + Perception = 20600, +} +ids.Spec = { + Arcane = 1, + Fire = 2, + Frost = 3, +} +ids.Caster = { + Shoot = 5019, +} +ids.Ability = { --Arcane - ids.Arc_Ability = { - AmplifyMagicRank1 = 1008, - AmplifyMagicRank2 = 8455, - AmplifyMagicRank3 = 10169, - AmplifyMagicRank4 = 10170, - ArcaneBrilliance = 23028, - ArcaneExplosionRank1 = 1449, - ArcaneExplosionRank2 = 8437, - ArcaneExplosionRank3 = 8438, - ArcaneExplosionRank4 = 8439, - ArcaneExplosionRank5 = 10201, - ArcaneExplosionRank6 = 10202, - ArcaneIntellectRank1 = 1459, - ArcaneIntellectRank2 = 1460, - ArcaneIntellectRank3 = 1461, - ArcaneIntellectRank4 = 10156, - ArcaneIntellectRank5 = 10157, - ArcaneMissilesRank1 = 5143, - ArcaneMissilesRank2 = 5144, - ArcaneMissilesRank3 = 5145, - ArcaneMissilesRank4 = 8416, - ArcaneMissilesRank5 = 8417, - ArcaneMissilesRank6 = 10211, - ArcaneMissilesRank7 = 10212, - ArcanePower = 12042, - Blink = 1953, - ConjureFoodRank1 = 587, - ConjureFoodRank2 = 597, - ConjureFoodRank3 = 990, - ConjureFoodRank4 = 6129, - ConjureFoodRank5 = 10144, - ConjureFoodRank6 = 10145, - ConjureFoodRank7 = 28612, - ConjureManaAgate = 759, - ConjureManaJade = 3552, - ConjureManaCitrine = 10053, - ConjureManaRuby = 10054, - ConjureWaterRank1 = 5504, - ConjureWaterRank2 = 5505, - ConjureWaterRank3 = 5506, - ConjureWaterRank4 = 6127, - ConjureWaterRank5 = 10138, - ConjureWaterRank6 = 10139, - ConjureWaterRank7 = 10140, - Counterspell = 2139, - DampenMagicRank1 = 604, - DampenMagicRank2 = 8450, - DampenMagicRank3 = 8451, - DampenMagicRank4 = 10173, - DampenMagicRank5 = 10174, - DetectMagic = 2855, - Evocation = 12051, - MageArmorRank1 = 6117, - MageArmorRank2 = 22782, - MageArmorRank3 = 22783, - ManaShieldRank1 = 1463, - ManaShieldRank2 = 8494, - ManaShieldRank3 = 8495, - ManaShieldRank4 = 10191, - ManaShieldRank5 = 10192, - ManaShieldRank6 = 10193, - RemoveLesserCurse = 475, - SlowFall = 130, - PolymorphRank1 = 118, - PolymorphRank2 = 12824, - PolymorphRank3 = 12825, - PolymorphRank4 = 12826, - PresenceofMind = 12043, - } - ids.Arcane_Talent = { - ArcaneSubtlety = 1, - ArcaneConcentration = 2, - ArcaneFocus = 3, - ArcaneMind = 4, - WandSpecialization = 5, - ImprovedArcaneMissiles = 6, - ImprovedArcaneExplosion = 7, - MagicAttunement = 8, - ImprovedManaShield = 9, - ArcaneResilience = 10, - PresenceofMind = 11, - ArcanePower = 12, - ImprovedCounterspell = 13, - ArcaneInstability = 14, - ArcaneMeditation = 15, - MagicAbsorption = 16, - } - --Fire - ids.Fire_Ability = { - BlastWaveRank1 = 11113, - BlastWaveRank2 = 13018, - BlastWaveRank3 = 13019, - BlastWaveRank4 = 13020, - BlastWaveRank5 = 13021, - Combustion = 11129, - FireBlastRank1 = 2136, - FireBlastRank2 = 2137, - FireBlastRank3 = 2138, - FireBlastRank4 = 8412, - FireBlastRank5 = 8413, - FireBlastRank6 = 10197, - FireBlastRank7 = 10199, - FireWardRank1 = 543, - FireWardRank2 = 8457, - FireWardRank3 = 8458, - FireWardRank4 = 10223, - FireWardRank5 = 10225, - FireballRank1 = 133, - FireballRank2 = 143, - FireballRank3 = 145, - FireballRank4 = 3140, - FireballRank5 = 8400, - FireballRank6 = 8401, - FireballRank7 = 8402, - FireballRank8 = 10148, - FireballRank9 = 10149, - FireballRank10 = 10150, - FireballRank11 = 10151, - FlamestrikeRank1 = 2120, - FlamestrikeRank2 = 2121, - FlamestrikeRank3 = 8422, - FlamestrikeRank4 = 8423, - FlamestrikeRank5 = 10215, - FlamestrikeRank6 = 10216, - PyroblastRank1 = 11366, - PyroblastRank2 = 12505, - PyroblastRank3 = 12522, - PyroblastRank4 = 12523, - PyroblastRank5 = 12524, - PyroblastRank6 = 12525, - PyroblastRank7 = 12526, - PyroblastRank8 = 18809, - ScorchRank1 = 2948, - ScorchRank2 = 8444, - ScorchRank3 = 8445, - ScorchRank4 = 8446, - ScorchRank5 = 10205, - ScorchRank6 = 10206, - ScorchRank7 = 10207, - } - ids.Fire_Talent = { - BurningSoul = 1, - ImprovedFireWard = 2, - ImprovedScorch = 3, - ImprovedFireball = 4, - ImprovedFireBlast = 5, - FlameThrowing = 6, - Pyroblast = 7, - Impact = 8, - ImprovedFlamestrike = 9, - BlastWave = 10, - CriticalMass = 11, - Ignite = 12, - FirePower = 13, - Combustion = 14, - Incinerate = 15, - MasterofElements = 16, - } + AmplifyMagic = 1008, + ArcaneBrilliance = 23028, + ArcaneExplosion = 1449, + ArcaneIntellect = 1459, + ArcaneMissiles = 5143, + ArcanePower = 12042, + Blink = 1953, + ConjureFood = 587, + ConjureManaAgate = 759, + ConjureManaJade = 3552, + ConjureManaCitrine = 10053, + ConjureManaRuby = 10054, + ConjureWater = 5504, + Counterspell = 2139, + DampenMagic = 604, + DetectMagic = 2855, + Evocation = 12051, + MageArmor = 6117, + ManaShield = 1463, + RemoveLesserCurse = 475, + SlowFall = 130, + Polymorph = 118, + PresenceofMind = 12043, +--Fire + BlastWave = 11113, + Combustion = 11129, + FireBlast = 2136, + FireWard = 543, + Fireball = 133, + Flamestrike = 2120, + FlamestrikeDR = 2120, + Pyroblast = 11366, + Scorch = 2948, --Frost - ids.Frost_Ability = { - BlizzardRank1 = 10, - BlizzardRank2 = 6141, - BlizzardRank3 = 8427, - BlizzardRank4 = 10185, - BlizzardRank5 = 10186, - BlizzardRank6 = 10187, - ColdSnap = 12472, - ConeofColdRank1 = 120, - ConeofColdRank2 = 8492, - ConeofColdRank3 = 10159, - ConeofColdRank4 = 10160, - ConeofColdRank5 = 10161, - FrostArmorRank1 = 168, - FrostArmorRank2 = 7300, - FrostArmorRank3 = 7301, - FrostNovaRank1 = 122, - FrostNovaRank2 = 865, - FrostNovaRank3 = 6131, - FrostNovaRank4 = 10230, - FrostWardRank1 = 6143, - FrostWardRank2 = 8461, - FrostWardRank3 = 8462, - FrostWardRank4 = 10177, - FrostWardRank5 = 28609, - FrostboltRank1 = 116, - FrostboltRank2 = 205, - FrostboltRank3 = 837, - FrostboltRank4 = 7322, - FrostboltRank5 = 8406, - FrostboltRank6 = 8407, - FrostboltRank7 = 8408, - FrostboltRank8 = 10179, - FrostboltRank9 = 10180, - FrostboltRank10 = 10181, - FrostboltRank11 = 25304, - IceBarrierRank1 = 11426, - IceBarrierRank2 = 13031, - IceBarrierRank3 = 13032, - IceBarrierRank4 = 13033, - IceBlock = 11958, - IceArmorRank1 = 7302, - IceArmorRank2 = 7320, - IceArmorRank3 = 10219, - IceArmorRank4 = 10220, - } - ids.Frost_Talent = { - ImprovedFrostbolt = 1, - Frostbite = 2, - PiercingIce = 3, - ImprovedFrostNova = 4, - ImprovedBlizzard = 5, - ImprovedConeofCold = 6, - Permafrost = 7, - FrostChanneling = 8, - Shatter = 9, - WintersChill = 10, - ColdSnap = 11, - FrostWarding = 12, - IceBarrier = 13, - IceBlock = 14, - IceShards = 15, - ArcticReach = 16, - ElementalPrecision = 17, - } - ids.Runes = { - ArcaneBlast = 400574, - ArcaneSurge = 425124, - IceLance = 400640, - IcyVeins = 425121, - LivingBomb = 400613, - LivingFlame = 401556, - MassRegeneration = 412510, - Regeneration = 401417, - RewindTime = 401462, - MissileBarrage = 400589, --Phase 2 - Buff - SpellfrostBolt = 412532, --Phase 2 - Debuff - ChronostaticPreservation_Store = 425187, --Phase 2 - ChronostaticPreservation_Heal = 436517, --Phase 2 - } + Blizzard = 10, + ColdSnap = 12472, + ConeofCold = 120, + FrostArmor = 168, + FrostNova = 122, + FrostWard = 6143, + Frostbolt = 116, + IceBarrier = 11426, + IceBlock = 11958, + IceArmor = 7302, +} +ids.Rank = { +--Arcane + AmplifyMagicRank1 = 1008, + AmplifyMagicRank2 = 8455, + AmplifyMagicRank3 = 10169, + AmplifyMagicRank4 = 10170, + ArcaneExplosionRank1 = 1449, + ArcaneExplosionRank2 = 8437, + ArcaneExplosionRank3 = 8438, + ArcaneExplosionRank4 = 8439, + ArcaneExplosionRank5 = 10201, + ArcaneExplosionRank6 = 10202, + ArcaneIntellectRank1 = 1459, + ArcaneIntellectRank2 = 1460, + ArcaneIntellectRank3 = 1461, + ArcaneIntellectRank4 = 10156, + ArcaneIntellectRank5 = 10157, + ArcaneMissilesRank1 = 5143, + ArcaneMissilesRank2 = 5144, + ArcaneMissilesRank3 = 5145, + ArcaneMissilesRank4 = 8416, + ArcaneMissilesRank5 = 8417, + ArcaneMissilesRank6 = 10211, + ArcaneMissilesRank7 = 10212, + ConjureFoodRank1 = 587, + ConjureFoodRank2 = 597, + ConjureFoodRank3 = 990, + ConjureFoodRank4 = 6129, + ConjureFoodRank5 = 10144, + ConjureFoodRank6 = 10145, + ConjureFoodRank7 = 28612, + ConjureWaterRank1 = 5504, + ConjureWaterRank2 = 5505, + ConjureWaterRank3 = 5506, + ConjureWaterRank4 = 6127, + ConjureWaterRank5 = 10138, + ConjureWaterRank6 = 10139, + ConjureWaterRank7 = 10140, + DampenMagicRank1 = 604, + DampenMagicRank2 = 8450, + DampenMagicRank3 = 8451, + DampenMagicRank4 = 10173, + DampenMagicRank5 = 10174, + MageArmorRank1 = 6117, + MageArmorRank2 = 22782, + MageArmorRank3 = 22783, + ManaShieldRank1 = 1463, + ManaShieldRank2 = 8494, + ManaShieldRank3 = 8495, + ManaShieldRank4 = 10191, + ManaShieldRank5 = 10192, + ManaShieldRank6 = 10193, + PolymorphRank1 = 118, + PolymorphRank2 = 12824, + PolymorphRank3 = 12825, + PolymorphRank4 = 12826, +--Fire + BlastWaveRank1 = 11113, + BlastWaveRank2 = 13018, + BlastWaveRank3 = 13019, + BlastWaveRank4 = 13020, + BlastWaveRank5 = 13021, + FireBlastRank1 = 2136, + FireBlastRank2 = 2137, + FireBlastRank3 = 2138, + FireBlastRank4 = 8412, + FireBlastRank5 = 8413, + FireBlastRank6 = 10197, + FireBlastRank7 = 10199, + FireWardRank1 = 543, + FireWardRank2 = 8457, + FireWardRank3 = 8458, + FireWardRank4 = 10223, + FireWardRank5 = 10225, + FireballRank1 = 133, + FireballRank2 = 143, + FireballRank3 = 145, + FireballRank4 = 3140, + FireballRank5 = 8400, + FireballRank6 = 8401, + FireballRank7 = 8402, + FireballRank8 = 10148, + FireballRank9 = 10149, + FireballRank10 = 10150, + FireballRank11 = 10151, + FlamestrikeRank1 = 2120, + FlamestrikeRank2 = 2121, + FlamestrikeRank3 = 8422, + FlamestrikeRank4 = 8423, + FlamestrikeRank5 = 10215, + FlamestrikeRank6 = 10216, + PyroblastRank1 = 11366, + PyroblastRank2 = 12505, + PyroblastRank3 = 12522, + PyroblastRank4 = 12523, + PyroblastRank5 = 12524, + PyroblastRank6 = 12525, + PyroblastRank7 = 12526, + PyroblastRank8 = 18809, + ScorchRank1 = 2948, + ScorchRank2 = 8444, + ScorchRank3 = 8445, + ScorchRank4 = 8446, + ScorchRank5 = 10205, + ScorchRank6 = 10206, + ScorchRank7 = 10207, +--Frost + BlizzardRank1 = 10, + BlizzardRank2 = 6141, + BlizzardRank3 = 8427, + BlizzardRank4 = 10185, + BlizzardRank5 = 10186, + BlizzardRank6 = 10187, + ConeofColdRank1 = 120, + ConeofColdRank2 = 8492, + ConeofColdRank3 = 10159, + ConeofColdRank4 = 10160, + ConeofColdRank5 = 10161, + FrostArmorRank1 = 168, + FrostArmorRank2 = 7300, + FrostArmorRank3 = 7301, + FrostNovaRank1 = 122, + FrostNovaRank2 = 865, + FrostNovaRank3 = 6131, + FrostNovaRank4 = 10230, + FrostWardRank1 = 6143, + FrostWardRank2 = 8461, + FrostWardRank3 = 8462, + FrostWardRank4 = 10177, + FrostWardRank5 = 28609, + FrostboltRank1 = 116, + FrostboltRank2 = 205, + FrostboltRank3 = 837, + FrostboltRank4 = 7322, + FrostboltRank5 = 8406, + FrostboltRank6 = 8407, + FrostboltRank7 = 8408, + FrostboltRank8 = 10179, + FrostboltRank9 = 10180, + FrostboltRank10 = 10181, + FrostboltRank11 = 25304, + IceBarrierRank1 = 11426, + IceBarrierRank2 = 13031, + IceBarrierRank3 = 13032, + IceBarrierRank4 = 13033, + IceArmorRank1 = 7302, + IceArmorRank2 = 7320, + IceArmorRank3 = 10219, + IceArmorRank4 = 10220, +} +ids.Arcane_Talent = { + ArcaneSubtlety = 1, + ArcaneConcentration = 2, + ArcaneFocus = 3, + ArcaneMind = 4, + WandSpecialization = 5, + ImprovedArcaneMissiles = 6, + ImprovedArcaneExplosion = 7, + MagicAttunement = 8, + ImprovedManaShield = 9, + ArcaneResilience = 10, + PresenceofMind = 11, + ArcanePower = 12, + ImprovedCounterspell = 13, + ArcaneInstability = 14, + ArcaneMeditation = 15, + MagicAbsorption = 16, +} +ids.Fire_Talent = { + BurningSoul = 1, + ImprovedFireWard = 2, + ImprovedScorch = 3, + ImprovedFireball = 4, + ImprovedFireBlast = 5, + FlameThrowing = 6, + Pyroblast = 7, + Impact = 8, + ImprovedFlamestrike = 9, + BlastWave = 10, + CriticalMass = 11, + Ignite = 12, + FirePower = 13, + Combustion = 14, + Incinerate = 15, + MasterofElements = 16, +} +ids.Frost_Talent = { + ImprovedFrostbolt = 1, + Frostbite = 2, + PiercingIce = 3, + ImprovedFrostNova = 4, + ImprovedBlizzard = 5, + ImprovedConeofCold = 6, + Permafrost = 7, + FrostChanneling = 8, + Shatter = 9, + WintersChill = 10, + ColdSnap = 11, + FrostWarding = 12, + IceBarrier = 13, + IceBlock = 14, + IceShards = 15, + ArcticReach = 16, + ElementalPrecision = 17, +} +ids.Runes = { + ArcaneBlast = 400574, + ArcaneSurge = 425124, + IceLance = 400640, + IcyVeins = 425121, + LivingBomb = 400613, + LivingFlame = 401556, + MassRegeneration = 412510, + Regeneration = 401417, + RewindTime = 401462, + MissileBarrage = 400589, --Phase 2 - Buff + SpellfrostBolt = 412532, --Phase 2 - Debuff + ChronostaticPreservation_Store = 425187, --Phase 2 + ChronostaticPreservation_Heal = 436517, --Phase 2 +} -- Auras - ids.Player_Buff = { - TemporalBeacon = 400735, - FingersofFrost = 400647, - } - ids.Player_Debuff = { +ids.Buff = { + TemporalBeacon = 400735, + FingersofFrost = 400647, +} +ids.Debuff = { + Chilled = 6136, + FireVulnerability = 22959, + WintersChill = 12579, + LivingFlame = 401558, +} + +function ConROC:UpdateSpellID() + --Ranks + if IsSpellKnown(ids.Rank.AmplifyMagicRank4) then ids.Ability.AmplifyMagic = ids.Rank.AmplifyMagicRank4; + elseif IsSpellKnown(ids.Rank.AmplifyMagicRank3) then ids.Ability.AmplifyMagic = ids.Rank.AmplifyMagicRank3; + elseif IsSpellKnown(ids.Rank.AmplifyMagicRank2) then ids.Ability.AmplifyMagic = ids.Rank.AmplifyMagicRank2; end + + if IsSpellKnown(ids.Rank.ArcaneExplosionRank6) then ids.Ability.ArcaneExplosion = ids.Rank.ArcaneExplosionRank6; + elseif IsSpellKnown(ids.Rank.ArcaneExplosionRank5) then ids.Ability.ArcaneExplosion = ids.Rank.ArcaneExplosionRank5; + elseif IsSpellKnown(ids.Rank.ArcaneExplosionRank4) then ids.Ability.ArcaneExplosion = ids.Rank.ArcaneExplosionRank4; + elseif IsSpellKnown(ids.Rank.ArcaneExplosionRank3) then ids.Ability.ArcaneExplosion = ids.Rank.ArcaneExplosionRank3; + elseif IsSpellKnown(ids.Rank.ArcaneExplosionRank2) then ids.Ability.ArcaneExplosion = ids.Rank.ArcaneExplosionRank2; end + + if IsSpellKnown(ids.Rank.ArcaneIntellectRank5) then ids.Ability.ArcaneIntellect = ids.Rank.ArcaneIntellectRank5; + elseif IsSpellKnown(ids.Rank.ArcaneIntellectRank4) then ids.Ability.ArcaneIntellect = ids.Rank.ArcaneIntellectRank4; + elseif IsSpellKnown(ids.Rank.ArcaneIntellectRank3) then ids.Ability.ArcaneIntellect = ids.Rank.ArcaneIntellectRank3; + elseif IsSpellKnown(ids.Rank.ArcaneIntellectRank2) then ids.Ability.ArcaneIntellect = ids.Rank.ArcaneIntellectRank2; end + + if IsSpellKnown(ids.Rank.ArcaneMissilesRank7) then ids.Ability.ArcaneMissiles = ids.Rank.ArcaneMissilesRank7; + elseif IsSpellKnown(ids.Rank.ArcaneMissilesRank6) then ids.Ability.ArcaneMissiles = ids.Rank.ArcaneMissilesRank6; + elseif IsSpellKnown(ids.Rank.ArcaneMissilesRank5) then ids.Ability.ArcaneMissiles = ids.Rank.ArcaneMissilesRank5; + elseif IsSpellKnown(ids.Rank.ArcaneMissilesRank4) then ids.Ability.ArcaneMissiles = ids.Rank.ArcaneMissilesRank4; + elseif IsSpellKnown(ids.Rank.ArcaneMissilesRank3) then ids.Ability.ArcaneMissiles = ids.Rank.ArcaneMissilesRank3; + elseif IsSpellKnown(ids.Rank.ArcaneMissilesRank2) then ids.Ability.ArcaneMissiles = ids.Rank.ArcaneMissilesRank2; end + + if IsSpellKnown(ids.Rank.DampenMagicRank5) then ids.Ability.DampenMagic = ids.Rank.DampenMagicRank5; + elseif IsSpellKnown(ids.Rank.DampenMagicRank4) then ids.Ability.DampenMagic = ids.Rank.DampenMagicRank4; + elseif IsSpellKnown(ids.Rank.DampenMagicRank3) then ids.Ability.DampenMagic = ids.Rank.DampenMagicRank3; + elseif IsSpellKnown(ids.Rank.DampenMagicRank2) then ids.Ability.DampenMagic = ids.Rank.DampenMagicRank2; end + + if IsSpellKnown(ids.Rank.BlastWaveRank5) then ids.Ability.BlastWave = ids.Rank.BlastWaveRank5; + elseif IsSpellKnown(ids.Rank.BlastWaveRank4) then ids.Ability.BlastWave = ids.Rank.BlastWaveRank4; + elseif IsSpellKnown(ids.Rank.BlastWaveRank3) then ids.Ability.BlastWave = ids.Rank.BlastWaveRank3; + elseif IsSpellKnown(ids.Rank.BlastWaveRank2) then ids.Ability.BlastWave = ids.Rank.BlastWaveRank2; end + + if IsSpellKnown(ids.Rank.FireBlastRank7) then ids.Ability.FireBlast = ids.Rank.FireBlastRank7; + elseif IsSpellKnown(ids.Rank.FireBlastRank6) then ids.Ability.FireBlast = ids.Rank.FireBlastRank6; + elseif IsSpellKnown(ids.Rank.FireBlastRank5) then ids.Ability.FireBlast = ids.Rank.FireBlastRank5; + elseif IsSpellKnown(ids.Rank.FireBlastRank4) then ids.Ability.FireBlast = ids.Rank.FireBlastRank4; + elseif IsSpellKnown(ids.Rank.FireBlastRank3) then ids.Ability.FireBlast = ids.Rank.FireBlastRank3; + elseif IsSpellKnown(ids.Rank.FireBlastRank2) then ids.Ability.FireBlast = ids.Rank.FireBlastRank2; end + + if IsSpellKnown(ids.Rank.FireWardRank5) then ids.Ability.FireWard = ids.Rank.FireWardRank5; + elseif IsSpellKnown(ids.Rank.FireWardRank4) then ids.Ability.FireWard = ids.Rank.FireWardRank4; + elseif IsSpellKnown(ids.Rank.FireWardRank3) then ids.Ability.FireWard = ids.Rank.FireWardRank3; + elseif IsSpellKnown(ids.Rank.FireWardRank2) then ids.Ability.FireWard = ids.Rank.FireWardRank2; end + + if IsSpellKnown(ids.Rank.FireballRank11) then ids.Ability.Fireball = ids.Rank.FireballRank11; + elseif IsSpellKnown(ids.Rank.FireballRank10) then ids.Ability.Fireball = ids.Rank.FireballRank10; + elseif IsSpellKnown(ids.Rank.FireballRank9) then ids.Ability.Fireball = ids.Rank.FireballRank8; + elseif IsSpellKnown(ids.Rank.FireballRank8) then ids.Ability.Fireball = ids.Rank.FireballRank9; + elseif IsSpellKnown(ids.Rank.FireballRank7) then ids.Ability.Fireball = ids.Rank.FireballRank7; + elseif IsSpellKnown(ids.Rank.FireballRank6) then ids.Ability.Fireball = ids.Rank.FireballRank6; + elseif IsSpellKnown(ids.Rank.FireballRank5) then ids.Ability.Fireball = ids.Rank.FireballRank5; + elseif IsSpellKnown(ids.Rank.FireballRank4) then ids.Ability.Fireball = ids.Rank.FireballRank4; + elseif IsSpellKnown(ids.Rank.FireballRank3) then ids.Ability.Fireball = ids.Rank.FireballRank3; + elseif IsSpellKnown(ids.Rank.FireballRank2) then ids.Ability.Fireball = ids.Rank.FireballRank2; end + + if IsSpellKnown(ids.Rank.FlamestrikeRank6) then ids.Ability.Flamestrike = ids.Rank.FlamestrikeRank6; + elseif IsSpellKnown(ids.Rank.FlamestrikeRank5) then ids.Ability.Flamestrike = ids.Rank.FlamestrikeRank5; + elseif IsSpellKnown(ids.Rank.FlamestrikeRank4) then ids.Ability.Flamestrike = ids.Rank.FlamestrikeRank4; + elseif IsSpellKnown(ids.Rank.FlamestrikeRank3) then ids.Ability.Flamestrike = ids.Rank.FlamestrikeRank3; + elseif IsSpellKnown(ids.Rank.FlamestrikeRank2) then ids.Ability.Flamestrike = ids.Rank.FlamestrikeRank2; end + + --down ranked Flamestrike + if IsSpellKnown(ids.Rank.FlamestrikeRank6) then ids.Ability.FlamestrikeDR = ids.Rank.FlamestrikeRank5; + elseif IsSpellKnown(ids.Rank.FlamestrikeRank5) then ids.Ability.FlamestrikeDR = ids.Rank.FlamestrikeRank4; + elseif IsSpellKnown(ids.Rank.FlamestrikeRank4) then ids.Ability.FlamestrikeDR = ids.Rank.FlamestrikeRank3; + elseif IsSpellKnown(ids.Rank.FlamestrikeRank3) then ids.Ability.FlamestrikeDR = ids.Rank.FlamestrikeRank2; + elseif IsSpellKnown(ids.Rank.FlamestrikeRank2) then ids.Ability.FlamestrikeDR = ids.Rank.FlamestrikeRank1; end + + if IsSpellKnown(ids.Rank.PyroblastRank8) then ids.Ability.Pyroblast = ids.Rank.PyroblastRank8; + elseif IsSpellKnown(ids.Rank.PyroblastRank7) then ids.Ability.Pyroblast = ids.Rank.PyroblastRank7; + elseif IsSpellKnown(ids.Rank.PyroblastRank6) then ids.Ability.Pyroblast = ids.Rank.PyroblastRank6; + elseif IsSpellKnown(ids.Rank.PyroblastRank5) then ids.Ability.Pyroblast = ids.Rank.PyroblastRank5; + elseif IsSpellKnown(ids.Rank.PyroblastRank4) then ids.Ability.Pyroblast = ids.Rank.PyroblastRank4; + elseif IsSpellKnown(ids.Rank.PyroblastRank3) then ids.Ability.Pyroblast = ids.Rank.PyroblastRank3; + elseif IsSpellKnown(ids.Rank.PyroblastRank2) then ids.Ability.Pyroblast = ids.Rank.PyroblastRank2; end + + if IsSpellKnown(ids.Rank.ScorchRank7) then ids.Ability.Scorch = ids.Rank.ScorchRank7; + elseif IsSpellKnown(ids.Rank.ScorchRank6) then ids.Ability.Scorch = ids.Rank.ScorchRank6; + elseif IsSpellKnown(ids.Rank.ScorchRank5) then ids.Ability.Scorch = ids.Rank.ScorchRank5; + elseif IsSpellKnown(ids.Rank.ScorchRank4) then ids.Ability.Scorch = ids.Rank.ScorchRank4; + elseif IsSpellKnown(ids.Rank.ScorchRank3) then ids.Ability.Scorch = ids.Rank.ScorchRank3; + elseif IsSpellKnown(ids.Rank.ScorchRank2) then ids.Ability.Scorch = ids.Rank.ScorchRank2; end + + if IsSpellKnown(ids.Rank.BlizzardRank6) then ids.Ability.Blizzard = ids.Rank.BlizzardRank6; + elseif IsSpellKnown(ids.Rank.BlizzardRank5) then ids.Ability.Blizzard = ids.Rank.BlizzardRank5; + elseif IsSpellKnown(ids.Rank.BlizzardRank4) then ids.Ability.Blizzard = ids.Rank.BlizzardRank4; + elseif IsSpellKnown(ids.Rank.BlizzardRank3) then ids.Ability.Blizzard = ids.Rank.BlizzardRank3; + elseif IsSpellKnown(ids.Rank.BlizzardRank2) then ids.Ability.Blizzard = ids.Rank.BlizzardRank2; end + + if IsSpellKnown(ids.Rank.ConeofColdRank5) then ids.Ability.ConeofCold = ids.Rank.ConeofColdRank5; + elseif IsSpellKnown(ids.Rank.ConeofColdRank4) then ids.Ability.ConeofCold = ids.Rank.ConeofColdRank4; + elseif IsSpellKnown(ids.Rank.ConeofColdRank3) then ids.Ability.ConeofCold = ids.Rank.ConeofColdRank3; + elseif IsSpellKnown(ids.Rank.ConeofColdRank2) then ids.Ability.ConeofCold = ids.Rank.ConeofColdRank2; end + + if IsSpellKnown(ids.Rank.FrostWardRank5) then ids.Ability.FrostWard = ids.Rank.FrostWardRank5; + elseif IsSpellKnown(ids.Rank.FrostWardRank4) then ids.Ability.FrostWard = ids.Rank.FrostWardRank4; + elseif IsSpellKnown(ids.Rank.FrostWardRank3) then ids.Ability.FrostWard = ids.Rank.FrostWardRank3; + elseif IsSpellKnown(ids.Rank.FrostWardRank2) then ids.Ability.FrostWard = ids.Rank.FrostWardRank2; end + + if IsSpellKnown(ids.Rank.FrostboltRank10) then ids.Ability.Frostbolt = ids.Rank.FrostboltRank10; + elseif IsSpellKnown(ids.Rank.FrostboltRank9) then ids.Ability.Frostbolt = ids.Rank.FrostboltRank9; + elseif IsSpellKnown(ids.Rank.FrostboltRank8) then ids.Ability.Frostbolt = ids.Rank.FrostboltRank8; + elseif IsSpellKnown(ids.Rank.FrostboltRank7) then ids.Ability.Frostbolt = ids.Rank.FrostboltRank7; + elseif IsSpellKnown(ids.Rank.FrostboltRank6) then ids.Ability.Frostbolt = ids.Rank.FrostboltRank6; + elseif IsSpellKnown(ids.Rank.FrostboltRank5) then ids.Ability.Frostbolt = ids.Rank.FrostboltRank5; + elseif IsSpellKnown(ids.Rank.FrostboltRank4) then ids.Ability.Frostbolt = ids.Rank.FrostboltRank4; + elseif IsSpellKnown(ids.Rank.FrostboltRank3) then ids.Ability.Frostbolt = ids.Rank.FrostboltRank3; + elseif IsSpellKnown(ids.Rank.FrostboltRank2) then ids.Ability.Frostbolt = ids.Rank.FrostboltRank2; end + + --Ranks Defensive + if IsSpellKnown(ids.Rank.MageArmorRank3) then ids.Ability.MageArmor = ids.Rank.MageArmorRank3; + elseif IsSpellKnown(ids.Rank.MageArmorRank2) then ids.Ability.MageArmor = ids.Rank.MageArmorRank2; end + + if IsSpellKnown(ids.Rank.ManaShieldRank6) then ids.Ability.ManaShield = ids.Rank.ManaShieldRank6; + elseif IsSpellKnown(ids.Rank.ManaShieldRank5) then ids.Ability.ManaShield = ids.Rank.ManaShieldRank5; + elseif IsSpellKnown(ids.Rank.ManaShieldRank4) then ids.Ability.ManaShield = ids.Rank.ManaShieldRank4; + elseif IsSpellKnown(ids.Rank.ManaShieldRank3) then ids.Ability.ManaShield = ids.Rank.ManaShieldRank3; + elseif IsSpellKnown(ids.Rank.ManaShieldRank2) then ids.Ability.ManaShield = ids.Rank.ManaShieldRank2; end + + if IsSpellKnown(ids.Rank.IceBarrierRank4) then ids.Ability.IceBarrier = ids.Rank.IceBarrierRank4; + elseif IsSpellKnown(ids.Rank.IceBarrierRank3) then ids.Ability.IceBarrier = ids.Rank.IceBarrierRank3; + elseif IsSpellKnown(ids.Rank.IceBarrierRank2) then ids.Ability.IceBarrier = ids.Rank.IceBarrierRank2; end - } - ids.target_Buff = { + if IsSpellKnown(ids.Rank.IceArmorRank4) then ids.Ability.IceArmor = ids.Rank.IceArmorRank4; + elseif IsSpellKnown(ids.Rank.IceArmorRank3) then ids.Ability.IceArmor = ids.Rank.IceArmorRank3; + elseif IsSpellKnown(ids.Rank.IceArmorRank2) then ids.Ability.IceArmor = ids.Rank.IceArmorRank2; + elseif IsSpellKnown(ids.Rank.IceArmorRank1) then ids.Ability.IceArmor = ids.Rank.IceArmorRank1; + elseif IsSpellKnown(ids.Rank.FrostArmorRank3) then ids.Ability.IceArmor = ids.Rank.FrostArmorRank3; + elseif IsSpellKnown(ids.Rank.FrostArmorRank2) then ids.Ability.IceArmor = ids.Rank.FrostArmorRank2; end - } - ids.Target_Debuff = { - Chilled = 6136, - FireVulnerability = 22959, - WintersChill = 12579, - LivingFlame = 401558, - ArcaneBlast = 400574, - } - ids.optionMaxIds = { - - } + if IsSpellKnown(ids.Rank.FrostNovaRank4) then ids.Ability.FrostNova = ids.Rank.FrostNovaRank4; + elseif IsSpellKnown(ids.Rank.FrostNovaRank3) then ids.Ability.FrostNova = ids.Rank.FrostNovaRank3; + elseif IsSpellKnown(ids.Rank.FrostNovaRank2) then ids.Ability.FrostNova = ids.Rank.FrostNovaRank2; end +end \ No newline at end of file diff --git a/mage_spellmenu.lua b/mage_spellmenu.lua index b49b25b..b381b77 100644 --- a/mage_spellmenu.lua +++ b/mage_spellmenu.lua @@ -7,7 +7,6 @@ local debugOptions = { local L = LibStub("AceLocale-3.0"):GetLocale("ConROC"); local ConROC_Mage, ids = ...; -local optionMaxIds = ...; local ConROC_RolesTable = {}; local wandFrame =0; local lastFrame = 0; @@ -104,6 +103,7 @@ local function CheckScrollbarVisibility() end function ConROC:SpellmenuClass() + ConROC:UpdateSpellID(); ConROC_RoleSettingsTable = { { frameName = "Caster", @@ -122,50 +122,50 @@ function ConROC:SpellmenuClass() { frameName = "Runes", spells = { - {spellID = ids.optionMaxIds.RuneArcaneBlast, spellCheckbox = "Rune_ArcaneBlast", reqLevel = 1, type="rune"}, - {spellID = ids.optionMaxIds.RuneArcaneBlast, spellCheckbox = "Rune_ArcaneBlastCount", reqLevel = 1, type="textfield", icon=nil, customName="Number of Arcane Blast"}, - --{spellID = ids.optionMaxIds.RuneArcaneSurge, spellCheckbox = "Rune_ArcaneSurge", reqLevel = 1, type="rune"}, - {spellID = ids.optionMaxIds.RuneIceLance, spellCheckbox = "Rune_IceLance", reqLevel = 1, type="rune"}, - {spellID = ids.optionMaxIds.RuneIcyVeins, spellCheckbox = "Rune_IcyVeins", reqLevel = 1, type="rune"}, - {spellID = ids.optionMaxIds.RuneLivingBomb, spellCheckbox = "Rune_LivingBomb", reqLevel = 1, type="rune"}, - {spellID = ids.optionMaxIds.RuneLivingFlame, spellCheckbox = "Rune_LivingFlame", reqLevel = 1, type="rune"}, - {spellID = ids.optionMaxIds.RuneMassRegeneration, spellCheckbox = "Rune_MassRegeneration", reqLevel = 1, type="rune"}, - {spellID = ids.optionMaxIds.RuneRegeneration, spellCheckbox = "Rune_Regeneration", reqLevel = 1, type="rune"}, - {spellID = ids.optionMaxIds.RuneRewindTime, spellCheckbox = "Rune_RewindTime", reqLevel = 1, type="rune"}, + {spellID = ids.Runes.ArcaneBlast, spellCheckbox = "Rune_ArcaneBlast", reqLevel = 1, type = "rune"}, + {spellID = ids.Runes.ArcaneBlast, spellCheckbox = "Rune_ArcaneBlastCount", reqLevel = 1, type = "textfield", icon = ids.Runes.ArcaneBlast, customName = "Number of Arcane Blast"}, + --{spellID = ids.Runes.ArcaneSurge, spellCheckbox = "Rune_ArcaneSurge", reqLevel = 1, type = "rune"}, + {spellID = ids.Runes.IceLance, spellCheckbox = "Rune_IceLance", reqLevel = 1, type = "rune"}, + {spellID = ids.Runes.IcyVeins, spellCheckbox = "Rune_IcyVeins", reqLevel = 1, type = "rune"}, + {spellID = ids.Runes.LivingBomb, spellCheckbox = "Rune_LivingBomb", reqLevel = 1, type = "rune"}, + {spellID = ids.Runes.LivingFlame, spellCheckbox = "Rune_LivingFlame", reqLevel = 1, type = "rune"}, + {spellID = ids.Runes.MassRegeneration, spellCheckbox = "Rune_MassRegeneration", reqLevel = 1, type = "rune"}, + {spellID = ids.Runes.Regeneration, spellCheckbox = "Rune_Regeneration", reqLevel = 1, type = "rune"}, + {spellID = ids.Runes.RewindTime, spellCheckbox = "Rune_RewindTime", reqLevel = 1, type = "rune"}, }, groupType = "checkBoxes" },{ frameName = "Armors", spells = { - {spellID = ids.optionMaxIds.IceArmor, spellCheckbox = "Armor_Ice", reqLevel = 1, type="spell"}, - {spellID = ids.optionMaxIds.MageArmor, spellCheckbox = "Armor_Mage", reqLevel = 34, type="spell"}, + {spellID = ids.Ability.IceArmor, spellCheckbox = "Armor_Ice", reqLevel = 1, type="spell"}, + {spellID = ids.Ability.MageArmor, spellCheckbox = "Armor_Mage", reqLevel = 34, type="spell"}, }, groupType = "radioButtons" }, { frameName = "Filler", spells = { - {spellID = ids.optionMaxIds.Fireball, spellCheckbox = "Filler_Fireball", reqLevel = 1, type="spell"}, - {spellID = ids.optionMaxIds.Frostbolt, spellCheckbox = "Filler_Frostbolt", reqLevel = 4, type="spell"}, - {spellID = ids.optionMaxIds.ArcaneMissiles, spellCheckbox = "Filler_ArcaneMissiles", reqLevel = 8, type="spell"} + {spellID = ids.Ability.Fireball, spellCheckbox = "Filler_Fireball", reqLevel = 1, type="spell"}, + {spellID = ids.Ability.Frostbolt, spellCheckbox = "Filler_Frostbolt", reqLevel = 4, type="spell"}, + {spellID = ids.Ability.ArcaneMissiles, spellCheckbox = "Filler_ArcaneMissiles", reqLevel = 8, type="spell"} }, groupType = "radioButtons" }, { frameName = "Cooldowns", spells = { - {spellID = ids.optionMaxIds.Evocation, spellCheckbox = "CD_Evocation", reqLevel = 20, type="spell"}, - {spellID = ids.optionMaxIds.ArcanePower, spellCheckbox = "CD_ArcanePower", reqLevel = 40, type="spell"}, - {spellID = ids.optionMaxIds.Combustion, spellCheckbox = "CD_Combustion", reqLevel = 40, type="spell"}, + {spellID = ids.Ability.Evocation, spellCheckbox = "CD_Evocation", reqLevel = 20, type="spell"}, + {spellID = ids.Ability.ArcanePower, spellCheckbox = "CD_ArcanePower", reqLevel = 40, type="spell"}, + {spellID = ids.Ability.Combustion, spellCheckbox = "CD_Combustion", reqLevel = 40, type="spell"}, }, groupType = "checkBoxes" }, { frameName = "AoEs", spells = { - {spellID = ids.optionMaxIds.ArcaneExplosion, spellCheckbox = "AoE_ArcaneExplosion", reqLevel = 14, type="spell"}, - {spellID = ids.optionMaxIds.Flamestrike, spellCheckbox = "AoE_Flamestrike", reqLevel = 16, type="spell"}, - {spellID = ids.optionMaxIds.Blizzard, spellCheckbox = "AoE_Blizzard", reqLevel = 20, type="spell"} + {spellID = ids.Ability.ArcaneExplosion, spellCheckbox = "AoE_ArcaneExplosion", reqLevel = 14, type="spell"}, + {spellID = ids.Ability.Flamestrike, spellCheckbox = "AoE_Flamestrike", reqLevel = 16, type="spell"}, + {spellID = ids.Ability.Blizzard, spellCheckbox = "AoE_Blizzard", reqLevel = 20, type="spell"} }, groupType = "checkBoxes" }, @@ -409,7 +409,7 @@ function ConROC_OptionsWindow(_table, _roles) if _table[i].groupType == "radioButtons" then ConROC:OptionRadioButtonSpell(_spellData, i, j, _spellFrame, radioButtonsTable); else - ConROC:OptionCheckboxSpell(_spellData, i, j, _spellFrame); + ConROC:OptionCheckboxSpell(_spellData, i, j, _spellFrame); end elseif _spellData.type == "wand" then ConROC:OptionWand(_spellData, i, j, _spellFrame); @@ -1056,3 +1056,5 @@ function ConROC:RoleProfile() end end end + +ConROC:SpellmenuClass(); \ No newline at end of file