Unholy DK Fixes

1 post Page 1 of 1
Laag
Posts: 3
Joined: 20 Jul 2018, 12:43


I did some minor updates to the Unholy DK main.lua file:
  • Only return Soulreaper when talented for Soulreaper (fixes errors that otherwise occur)
  • Return Apocalypse when festering wounds are >= 4 instead of 6 (to match Icy Veins rotation)
  • Return Death Coil when runic power >= 80 instead of >80 (to match Icy Veins rotation)
  • Only Return Death and Decay if talented for Pestilence (to match Icy Veins rotation)
  • Only return Scourge Strike / Clawing Shadows if Apocalypse is not available (otherwise, you never reach the 4 Festering Wounds required for Apocalypse
Code: Select all
function DeathKnight:Unholy(timeShift, currentSpell, gcd, talents)
	local runic = UnitPower('player', Enum.PowerType.RunicPower);
	local runicMax = UnitPowerMax('player', Enum.PowerType.RunicPower);
	local runes, runeCd = DeathKnight:Runes(timeShift);

	--Get wounds on target.
	local festering, festeringCharges, festeringCd = MaxDps:TargetAura(_FesteringWound, timeShift);

	local scourgeStrike = (talents[_ClawingShadows] and _ClawingShadows) or _ScourgeStrike;
	local deathanddecay = (talents[_Defile] and _Defile) or _DeathandDecay;

	MaxDps:GlowCooldown(_ArmyoftheDead, MaxDps:SpellAvailable(_ArmyoftheDead, timeShift) and runes >= 3);
	if talents[_UnholyFrenzy] then
		MaxDps:GlowCooldown(_UnholyFrenzy, MaxDps:SpellAvailable(_UnholyFrenzy, timeShift));
	end

	if not UnitExists('pet') and MaxDps:SpellAvailable(_RaiseDead, timeShift) then
		return _RaiseDead;
	end

	if not MaxDps:TargetAura(_VirulentPlague, timeShift + 1.5) and runes >= 1 then
		return _Outbreak;
	end

	if talents[_SoulReaper] and runes < 2 and MaxDps:SpellAvailable(_SoulReaper, timeShift) then
		return _SoulReaper;
	end

	if MaxDps:SpellAvailable(_DarkTransformation, timeShift) then
		return _DarkTransformation;
	end

	if MaxDps:SpellAvailable(_Apocalypse, timeShift) and festeringCharges >= 4 then
		return _Apocalypse;
	end

	if runic >= 80 or MaxDps:Aura(_SuddenDoom, timeShift) then
		return _DeathCoil;
	end

	if talents[_Pestilence] and MaxDps:SpellAvailable(deathanddecay, timeShift) and runes >= 1 then
		return deathanddecay;
	end

	if festeringCharges >= 1 and runes >= 1 and not MaxDps:SpellAvailable(_Apocalypse, timeShift) then
		return scourgeStrike;
	end

	if festeringCharges < 6 and runes >= 2 then
		return _FesteringStrike;
	end

	return nil;
end
1 post Page 1 of 1
drogie łóżka stolik kawowy stół dębowy rozkładany