UPCOMING BIG CHANGES

Information about addon, how it works, how to install, etc.
1 post Page 1 of 1
Kaminaris
Site Admin
Posts: 325
Joined: 25 Jun 2017, 03:45


MaxDps will have a few upcoming big changes:

1. Every information that was passed into function as parameter is now available in FrameData ex.
This does affect custom rotations as well.

previously:
  1. function Warlock:Destruction(timeShift, currentSpell, gcd, talents, azerite)
  2.     ...
  3. end

currently:
  1. function Warlock:Destruction()
  2.     local fd = MaxDps.FrameData;
  3.     local cooldown, buff, debuff, timeShift, talents, azerite = fd.cooldown, fd.buff, fd.debuff, fd.timeShift, fd.talents, fd.azerite;
  4.     ...
  5. end
For time being MaxDps will continue to stay backwards compatible (will also pass these as parameters). But will be removed once i convert all existing rotation classes.

2. No need to use timeShift anymore when:
  • Checking a debuff on target
  • Checking a buff on player
  • Checking spell availability

3. New api to check buffs or debuffs:
If you wish to check pet or other unit aura you will still need to call function MaxDps:UnitAura.

  1. -- buffs and debuffs follows the same format but are accessed by different table (array)
  2.  
  3. -- if buff is available use SomeSpell
  4. if buff[[SpellId].up then return SomeSpell; end
  5.  
  6. -- if buff has less than 3 seconds remaining use SomeSpell
  7. if buff[[SpellId].remains < 3 then return SomeSpell; end
  8.  
  9. -- if buff has stack count equals or greater than 2 use SomeSpell
  10. if buff[[SpellId].count >= 2 then return SomeSpell; end
  11.  
  12. -- If debuff has less than 30% original duration (pandemic) use SomeSpell
  13. if debuff[SpellId].refreshable then use SomeSpell; end
  14.  
  15. both buffs and debufs contains auras in following format:
  16. local aura = {
  17.     name           = name,
  18.     up             = true,
  19.     count          = count,
  20.     expirationTime = expirationTime,
  21.     remains        = remains,
  22.     refreshable    = remains < 0.3 * duration,
  23. };

4. New api to check spell availability. This does include spell stacks:

  1. -- Spells can now be accessed in cooldown table (array)
  2.  
  3. -- if spell fractional charges (1.5 means 1 full charge + halfway thru CD to next one)
  4. if cooldown[WD.Conflagrate].charges > 1.5 then
  5.     return WD.Conflagrate;
  6. end
  7.  
  8. -- spell is available
  9. if talents[WD.Shadowburn] and cooldown[WD.Shadowburn].ready then
  10.     return WD.Shadowburn;
  11. end
  12.  
  13. -- similar to buffs, cooldown has few properies:
  14. local cooldown = {
  15.     ready = remains <= 0,
  16.     remains = remains,
  17.     charges = charges,
  18.     maxCharges = maxCharges
  19. };

Example rotation in new format:

  1. local WD = {
  2.     Immolate            = 348,
  3.     ImmolateAura        = 157736,
  4.     ChaosBolt           = 116858,
  5.     Conflagrate         = 17962,
  6.     ChannelDemonfire    = 196447,
  7.     Eradication         = 196412,
  8.     Cataclysm           = 152108,
  9.     Incinerate          = 29722,
  10.     SummonInfernal      = 1122,
  11.     DarkSoulInstability = 113858,
  12.     RainOfFire          = 5740,
  13.     Havoc               = 80240,
  14.     Shadowburn          = 17877,
  15.     Backdraft           = 117828,
  16.     FireAndBrimstone    = 196408,
  17.     SummonImp           = 688,
  18.     SummonVoidwalker    = 697,
  19.     SummonSuccubus      = 712,
  20.     SummonFelhunter     = 691,
  21.     Soulfire            = 6353,
  22. };
  23.  
  24. function Warlock:Destruction()
  25.     local fd = MaxDps.FrameData;
  26.     local cooldown, buff, debuff, timeShift, talents, azerite, currentSpell =
  27.         fd.cooldown, fd.buff, fd.debuff, fd.timeShift, fd.talents, fd.azerite, fd.currentSpell;
  28.     local SoulShards = UnitPower('player', EnumPowerType.SoulShards, true) / 10;
  29.  
  30.     --local era = MaxDps:TargetAura(WD.Eradication, timeShift + 2);
  31.  
  32.     if currentSpell == WD.ChaosBolt then
  33.         SoulShards = SoulShards - 2;
  34.     end
  35.  
  36.     --Cooldowns
  37.     MaxDps:GlowCooldown(WD.Havoc, cooldown[WD.Havoc].ready);
  38.     MaxDps:GlowCooldown(WD.SummonInfernal, cooldown[WD.SummonInfernal].ready);
  39.  
  40.     if talents[WD.DarkSoulInstability] then
  41.         MaxDps:GlowCooldown(WD.DarkSoulInstability, cooldown[WD.DarkSoulInstability].ready);
  42.     end
  43.  
  44.     --Rotation Start
  45.  
  46.     if talents[WD.Cataclysm] and cooldown[WD.Cataclysm].ready and currentSpell ~= WD.Cataclysm then
  47.         return WD.Cataclysm;
  48.     end
  49.  
  50.     --1. Cast ChaosBolt if Backdraft is active and at least 2 seconds left
  51.     if buff[WD.Backdraft].remains < 2 and SoulShards >= 2 and currentSpell ~= WD.ChaosBolt then
  52.         return WD.ChaosBolt;
  53.     end
  54.  
  55.     --2. Cast Soulfire on cd if Talented
  56.     if talents[WD.Soulfire] and cooldown[WD.Soulfire].ready and currentSpell ~= WD.Soulfire then
  57.         return WD.Soulfire;
  58.     end
  59.  
  60.     --3. Apply or Reapply Immolate
  61.     if debuff[WD.ImmolateAura].refreshable and currentSpell ~= WD.Immolate and currentSpell ~= WD.Cataclysm then
  62.         return WD.Immolate;
  63.     end
  64.  
  65.     --4. Cast ChaosBolt if Capped
  66.     if SoulShards >= 4 then
  67.         return WD.ChaosBolt;
  68.     end
  69.  
  70.     --5. Cast Conflagrate on CD but keep almost 1 Charge for Burst
  71.     if cooldown[WD.Conflagrate].charges > 1.5 then
  72.         return WD.Conflagrate;
  73.     end
  74.  
  75.     --6. Cast Demonfire Whenever Possible and Target has Immolate applied for at least 3 seconds
  76.     if talents[WD.ChannelDemonfire] and cooldown[WD.ChannelDemonfire].ready and
  77.         debuff[WD.ImmolateAura].remains >= 3 and currentSpell ~= WD.ChannelDemonfire then
  78.         return WD.ChannelDemonfire;
  79.     end
  80.  
  81.     --7. Cast Shadowburn dont know why cause Talent seems to bee quiet shit...
  82.     if talents[WD.Shadowburn] and cooldown[WD.Shadowburn].ready then
  83.         return WD.Shadowburn;
  84.     end
  85.  
  86.     return WD.Incinerate;
  87. end
1 post Page 1 of 1
drogie łóżka stolik kawowy stół dębowy rozkładany