diff --git a/LogicDruid.lua b/LogicDruid.lua index fbd54e6..a8aecfa 100644 --- a/LogicDruid.lua +++ b/LogicDruid.lua @@ -2,72 +2,61 @@ local THIS_ADDON_NAME=...; local g_Addon = getfenv(0)[THIS_ADDON_NAME]; local g_Consts = g_Addon.Constants; ------------------------------------ --- Cat ------------------------------------ -g_Addon.LogicDruidCatTigersFury = +g_Addon.Logics.Druid_Barkskin = { - Texture = g_Addon.GetMyImage("TigersFury.tga"), - TextureSpecial = g_Addon.GetMyImage("TigersFury-Blue.tga"), - Type = g_Consts.LOGIC_TYPE_SKILL, - SpellID = 5217, + Texture = g_Addon.GetMyImage("Barkskin.tga"), + Type = g_Consts.LOGIC_TYPE_BURST, + SpellID = 22812, }; -g_Addon.LogicDruidCatSavageRoar = +g_Addon.Logics.Druid_Berserk = { - Texture = g_Addon.GetMyImage("SavageRoar.tga"), - TextureSpecial = g_Addon.GetMyImage("SavageRoar-Blue.tga"), - Type = g_Consts.LOGIC_TYPE_BUFF, - SpellID = 52610, + Texture = g_Addon.GetMyImage("Berserk.tga"), + Type = g_Consts.LOGIC_TYPE_BURST, + SpellID = 106951, }; -g_Addon.LogicDruidCatThrash = +g_Addon.Logics.Druid_BristlingFur = { - Texture = g_Addon.GetMyImage("Thrash.tga"), - TextureSpecial = g_Addon.GetMyImage("Thrash-Blue.tga"), - Type = g_Consts.LOGIC_TYPE_DEBUFF, - SpellID = 106830, - SkillID = 106832, - CastByMe = true, + Texture = g_Addon.GetMyImage("BristlingFur.tga"), + Type = g_Consts.LOGIC_TYPE_SKILL, + SpellID = 155835, + TalentID = 22425, }; -g_Addon.LogicDruidCatRake = +g_Addon.Logics.Druid_BrutalSlash = { - Texture = g_Addon.GetMyImage("Rake.tga"), - TextureSpecial = g_Addon.GetMyImage("Rake-Blue.tga"), - Type = g_Consts.LOGIC_TYPE_DEBUFF, - SpellID = 59881, - SkillID = 1822, - CastByMe = true, + Texture = g_Addon.GetMyImage("BrutalSlash.tga"), + TextureSpecial = g_Addon.GetMyImage("BrutalSlash-Blue.tga"), + Type = g_Consts.LOGIC_TYPE_SKILL, + SpellID = 202028, + TalentID = 21646, }; -g_Addon.LogicDruidCatRip = +g_Addon.Logics.Druid_ElunesGuidance = { - Texture = g_Addon.GetMyImage("Rip.tga"), - TextureSpecial = g_Addon.GetMyImage("Rip-Blue.tga"), - Type = g_Consts.LOGIC_TYPE_DEBUFF, - SpellID = 1079, - CastByMe = true, + Texture = g_Addon.GetMyImage("ElunesGuidance.tga"), + Type = g_Consts.LOGIC_TYPE_SKILL, + SpellID = 202060, + TalentID = 22370, }; - -g_Addon.LogicDruidCatPredatorySwiftness = +g_Addon.Logics.Druid_GalacticGuardian = { - Texture = g_Addon.GetMyImage("PredatoryStrikes.tga"), + Texture = g_Addon.GetMyImage("Moonfire.tga"), Type = g_Consts.LOGIC_TYPE_PROC, - SpellID = 69369, - SkillID = 16974, + SpellID = 213708, + TalentID = 22421, }; -g_Addon.LogicDruidCatLunarInspiration = +g_Addon.Logics.Druid_Incarnation_Bear = { - Texture = g_Addon.GetMyImage("Moonfire.tga"), - TextureSpecial = g_Addon.GetMyImage("Moonfire-Blue.tga"), - Type = g_Consts.LOGIC_TYPE_DEBUFF, - SpellID = 155625, - TalentID = 22365, + Texture = g_Addon.GetMyImage("Incarnation.tga"), + Type = g_Consts.LOGIC_TYPE_SKILL, + SpellID = 102558, + TalentID = 21706, }; -g_Addon.LogicDruidCatIncarnation = +g_Addon.Logics.Druid_Incarnation_Cat = { Texture = g_Addon.GetMyImage("Incarnation.tga"), Type = g_Consts.LOGIC_TYPE_SKILL, @@ -75,115 +64,116 @@ g_Addon.LogicDruidCatIncarnation = TalentID = 21705, }; -g_Addon.LogicDruidCatElunesGuidance = +g_Addon.Logics.Druid_LunarBeam = { - Texture = g_Addon.GetMyImage("ElunesGuidance.tga"), + Texture = g_Addon.GetMyImage("LunarBeam.tga"), Type = g_Consts.LOGIC_TYPE_SKILL, - SpellID = 202060, - TalentID = 22370, + SpellID = 204066, + TalentID = 22427, }; -g_Addon.LogicDruidCatBrutalSlash = +g_Addon.Logics.Druid_LunarInspiration = { - Texture = g_Addon.GetMyImage("BrutalSlash.tga"), - TextureSpecial = g_Addon.GetMyImage("BrutalSlash-Blue.tga"), - Type = g_Consts.LOGIC_TYPE_SKILL, - SpellID = 202028, - TalentID = 21646, + Texture = g_Addon.GetMyImage("Moonfire.tga"), + TextureSpecial = g_Addon.GetMyImage("Moonfire-Blue.tga"), + Type = g_Consts.LOGIC_TYPE_DEBUFF, + SpellID = 155625, + TalentID = 22365, }; ------------------------------------ --- Bear ------------------------------------ -g_Addon.LogicDruidBearMangle = +g_Addon.Logics.Druid_Mangle_Bear = { Texture = g_Addon.GetMyImage("Mangle.tga"), Type = g_Consts.LOGIC_TYPE_SKILL, SpellID = 33917, }; -g_Addon.LogicDruidBearThrash = -{ - Texture = g_Addon.GetMyImage("Thrash.tga"), - Type = g_Consts.LOGIC_TYPE_SKILL, - SpellID = 77758, - SkillID = 106832, -}; - -g_Addon.LogicDruidBearGalacticGuardian = +g_Addon.Logics.Druid_PredatorySwiftness = { - Texture = g_Addon.GetMyImage("Moonfire.tga"), + Texture = g_Addon.GetMyImage("PredatoryStrikes.tga"), Type = g_Consts.LOGIC_TYPE_PROC, - SpellID = 213708, - TalentID = 22421, + SpellID = 69369, + SkillID = 16974, }; -g_Addon.LogicDruidBearPulverize = +g_Addon.Logics.Druid_Pulverize = { Texture = g_Addon.GetMyImage("Pulverize.tga"), Type = g_Consts.LOGIC_TYPE_BUFF, SpellID = 158792, }; -g_Addon.LogicDruidBearBarkskin = +g_Addon.Logics.Druid_Rake = { - Texture = g_Addon.GetMyImage("Barkskin.tga"), - Type = g_Consts.LOGIC_TYPE_BURST, - SpellID = 22812, + Texture = g_Addon.GetMyImage("Rake.tga"), + TextureSpecial = g_Addon.GetMyImage("Rake-Blue.tga"), + Type = g_Consts.LOGIC_TYPE_DEBUFF, + SpellID = 59881, + SkillID = 1822, + CastByMe = true, }; -g_Addon.LogicDruidBearIncarnation = +g_Addon.Logics.Druid_Renewal = { - Texture = g_Addon.GetMyImage("Incarnation.tga"), + Texture = g_Addon.GetMyImage("Renewal.tga"), Type = g_Consts.LOGIC_TYPE_SKILL, - SpellID = 102558, - TalentID = 21706, + SpellID = 108238, + TalentID = 19283, }; -g_Addon.LogicDruidBearLunarBeam = +g_Addon.Logics.Druid_Rip = { - Texture = g_Addon.GetMyImage("LunarBeam.tga"), - Type = g_Consts.LOGIC_TYPE_SKILL, - SpellID = 204066, - TalentID = 22427, + Texture = g_Addon.GetMyImage("Rip.tga"), + TextureSpecial = g_Addon.GetMyImage("Rip-Blue.tga"), + Type = g_Consts.LOGIC_TYPE_DEBUFF, + SpellID = 1079, + CastByMe = true, }; -g_Addon.LogicDruidBearBristlingFur = +g_Addon.Logics.Druid_SavageRoar = { - Texture = g_Addon.GetMyImage("BristlingFur.tga"), - Type = g_Consts.LOGIC_TYPE_SKILL, - SpellID = 155835, - TalentID = 22425, + Texture = g_Addon.GetMyImage("SavageRoar.tga"), + TextureSpecial = g_Addon.GetMyImage("SavageRoar-Blue.tga"), + Type = g_Consts.LOGIC_TYPE_BUFF, + SpellID = 52610, }; ------------------------------------ --- Cat & Bear ------------------------------------ -g_Addon.LogicDruidSurvivalInstincts = +g_Addon.Logics.Druid_SurvivalInstincts = { Texture = g_Addon.GetMyImage("SurvivalInstincts.tga"), Type = g_Consts.LOGIC_TYPE_BURST, SpellID = 61336, }; -g_Addon.LogicDruidBerserk = +g_Addon.Logics.Druid_TigersFury = { - Texture = g_Addon.GetMyImage("Berserk.tga"), - Type = g_Consts.LOGIC_TYPE_BURST, - SpellID = 106951, + Texture = g_Addon.GetMyImage("TigersFury.tga"), + TextureSpecial = g_Addon.GetMyImage("TigersFury-Blue.tga"), + Type = g_Consts.LOGIC_TYPE_SKILL, + SpellID = 5217, }; -g_Addon.LogicDruidWildCharge = +g_Addon.Logics.Druid_Thrash_Bear = { - Texture = g_Addon.GetMyImage("FeralCharge.tga"), + Texture = g_Addon.GetMyImage("Thrash.tga"), Type = g_Consts.LOGIC_TYPE_SKILL, - SpellID = 102401, + SpellID = 77758, + SkillID = 106832, }; -g_Addon.LogicDruidRenewal = +g_Addon.Logics.Druid_Thrash_Cat = { - Texture = g_Addon.GetMyImage("Renewal.tga"), + Texture = g_Addon.GetMyImage("Thrash.tga"), + TextureSpecial = g_Addon.GetMyImage("Thrash-Blue.tga"), + Type = g_Consts.LOGIC_TYPE_DEBUFF, + SpellID = 106830, + SkillID = 106832, + CastByMe = true, +}; + +g_Addon.Logics.Druid_WildCharge = +{ + Texture = g_Addon.GetMyImage("FeralCharge.tga"), Type = g_Consts.LOGIC_TYPE_SKILL, - SpellID = 108238, - TalentID = 19283, + SpellID = 102401, }; diff --git a/PackageDruid.lua b/PackageDruid.lua index 15eba53..c293c87 100644 --- a/PackageDruid.lua +++ b/PackageDruid.lua @@ -21,29 +21,29 @@ local function GetPackage_DruidCat() -- Main box logicList = newPackage.LogicLists[1]; - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidCatTigersFury); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidCatSavageRoar); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidCatRake); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidCatLunarInspiration); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidCatRip); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidCatThrash); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidCatBrutalSlash); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_TigersFury); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_SavageRoar); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_Rake); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_LunarInspiration); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_Rip); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_Thrash_Cat); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_BrutalSlash); g_Addon.AddLogicUnused(logicList, 5); -- Events box logicList = newPackage.LogicLists[2]; - g_Addon.AddLogicFirstAvailable(logicList, g_Addon.LogicDruidCatIncarnation, g_Addon.LogicDruidBerserk, g_Addon.LogicDruidBearIncarnation); -- BearIncarnation - In case of Guardian in cat form - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidCatElunesGuidance); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidWildCharge); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidCatPredatorySwiftness); + g_Addon.AddLogicFirstAvailable(logicList, g_Addon.Logics.Druid_Incarnation_Cat, g_Addon.Logics.Druid_Berserk, g_Addon.Logics.Druid_Incarnation_Bear); -- BearIncarnation - In case of Guardian in cat form + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_ElunesGuidance); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_WildCharge); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_PredatorySwiftness); -- Survival box logicList = newPackage.LogicLists[3]; - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidSurvivalInstincts); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidBearBarkskin); -- In case of Guardian in cat form - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidRenewal); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidBearLunarBeam); -- In case of Guardian in cat form - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidBearBristlingFur); -- In case of Guardian in cat form + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_SurvivalInstincts); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_Barkskin); -- In case of Guardian in cat form + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_Renewal); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_LunarBeam); -- In case of Guardian in cat form + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_BristlingFur); -- In case of Guardian in cat form return newPackage; end @@ -52,7 +52,7 @@ local function GetPackage_DruidBear() local newPackage = { GetComboPoints = function() - local name, stacks, expTime = g_Addon.GetTargetDebuffInfo(g_Addon.LogicDruidBearThrash.SpellID, true); + local name, stacks, expTime = g_Addon.GetTargetDebuffInfo(g_Addon.Logics.Druid_Thrash_Bear.SpellID, true); if (name == nil) then return 0; end @@ -72,25 +72,25 @@ local function GetPackage_DruidBear() -- Main box logicList = newPackage.LogicLists[1]; - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidBearMangle); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidBearThrash); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidBearPulverize); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidBearGalacticGuardian); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_Mangle_Bear); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_Thrash_Bear); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_Pulverize); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_GalacticGuardian); g_Addon.AddLogicUnused(logicList, 3); -- Events box logicList = newPackage.LogicLists[2]; - g_Addon.AddLogicFirstAvailable(logicList, g_Addon.LogicDruidBearIncarnation, g_Addon.LogicDruidCatIncarnation, g_Addon.LogicDruidBerserk); -- CatIncarnation/Berserk - in case of Feral in bear form - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidCatElunesGuidance); -- In case of Feral in bear form - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidWildCharge); + g_Addon.AddLogicFirstAvailable(logicList, g_Addon.Logics.Druid_Incarnation_Bear, g_Addon.Logics.Druid_Incarnation_Cat, g_Addon.Logics.Druid_Berserk); -- CatIncarnation/Berserk - in case of Feral in bear form + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_ElunesGuidance); -- In case of Feral in bear form + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_WildCharge); -- Survival box logicList = newPackage.LogicLists[3]; - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidSurvivalInstincts); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidBearBarkskin); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidRenewal); -- In case of Feral in bear form - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidBearLunarBeam); - g_Addon.AddLogicIfAvailable(logicList, g_Addon.LogicDruidBearBristlingFur); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_SurvivalInstincts); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_Barkskin); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_Renewal); -- In case of Feral in bear form + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_LunarBeam); + g_Addon.AddLogicIfAvailable(logicList, g_Addon.Logics.Druid_BristlingFur); return newPackage; end diff --git a/_Module.lua b/_Module.lua index 0f5a17f..913e353 100644 --- a/_Module.lua +++ b/_Module.lua @@ -4,3 +4,4 @@ getfenv(0)[THIS_ADDON_NAME] = g_Addon; g_Addon.GetPackage = {}; g_Addon.FrameLists = {{}, {}, {}}; +g_Addon.Logics = {};