What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

How to Modify WD Soul Harvest to be w/in Range of Mob?

toddn25

New Member
Joined
Oct 5, 2013
Messages
14
Reaction score
2
I run Jade Harvest Set which only performs if Soul Harvest hits (Witch Doctor). I typically run Ghom and I notice sometimes I cast Soul Harvest out of range of Ghom and must wait for cooldown to use again. Is there a way to correct this?

I Figured it out ..changed Trinity Witch Doctor Setting from 15f to like 5f
 
Last edited:
I could not find this setting. Could you be more specific about where you found it?
 
I'll fill ya in on what he changed.

1. Find the file: WitchDoctorCombat.cs

2. Located here: *DB*\Plugins\Trinity\Combat\Abilities

3. Now make a copy\backup of: WitchDoctorCombat.cs

4. Open WitchDoctorCombat.cs with Notepad.

5. Look for these lines:
// Soul Harvest Any Elites or to increase buff stacks
if (CanCast(SNOPower.Witchdoctor_SoulHarvest) &&
(TargetUtil.AnyMobsInRange(16f, GetBuffStacks(SNOPower.Witchdoctor_SoulHarvest) + 1, false) || (hasSwallowYourSoul && Player.PrimaryResourcePct <= 0.50) || TargetUtil.IsEliteTargetInRange(16f)))

The numbers in bold are the ones that you would change to get the desired effect you are looking for. The numbers are in distance... like 16 feet away or 5 feet away before the spell is cast.

The first number is the distance away it will cast Soul Harvest for any\trash mob: "AnyMobsInRange"
The second number is the distance away it will cast Soul Harvest for elite mobs: "IsEliteTargetInRange"

Hope that helps and is clear enough.

Take Care.
 
I too noticed that soul harvest wasn't very reliable. Even when there were lots of enemies around, it would pop off as soon as the first got in range, and the "number of enemies in range" didn't seem very reliable for some reason. I borrowed the hostile unit count function from GearSwap's 3enemy/5enemy conditions, and placed it inside the WitchDoctorCombat class:
Code:
    	private static float validDistance = 16f;

	private static bool IsValidHosileUnit(DiaUnit unit)
	{
		try
		{
			if (unit != null && unit.IsAlive && unit.IsAttackable && unit.Distance <= validDistance && unit.IsHostile)
				return true;
			else
				return false;
		}
		catch
		{
			return false;
		}

	}


I then changed the soul harvest area to be this:

Code:
                bool hasSwallowYourSoul = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Witchdoctor_SoulHarvest && s.RuneIndex == 3);
                
                int enemyCount = ZetaDia.Actors.GetActorsOfType<DiaUnit>(true, false).Count(IsValidHosileUnit);

                // Soul Harvest Any Elites or to increase buff stacks
                if (CanCast(SNOPower.Witchdoctor_SoulHarvest) &&
                    (enemyCount >= 5 
                    || (hasSwallowYourSoul && Player.PrimaryResourcePct <= 0.50) 
                    || (TargetUtil.IsEliteTargetInRange(12f)&& enemyCount > GetBuffStacks(SNOPower.Witchdoctor_SoulHarvest))))
                	
                
                {
                    return new TrinityPower(SNOPower.Witchdoctor_SoulHarvest);
                }

This replaces everything between:
Code:
// Witch Doctor - Terror

[old code replaced here]

// Sacrifice

Basically, it will always use it when it's up and there are at least 5 hostile enemies in range. If you use SYS rune, it'll also use it if you need mana (I haven't tested this, since I don't use SYS, so this may need to be tweaked). If there's an elite in range, and there are more enemies in range than you have stacks, it will use it, since some damage increase is better than none on elites.

These changes will prevent it from overwriting a 5 stack with a 3 stack "just because" it's available. It seems pretty reliable to me so far with my tests, however I've changed to the Soul to Waste rune while botting, just to ensure that there's always a 5 stack up.
 
Last edited:
Back
Top