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

WitchDoctor.cs - Spirit Barrage fixes, Piranha support, and build suggestions.

firerebel

New Member
Joined
Aug 24, 2012
Messages
84
Reaction score
1
I'll start by saying I'm not experienced at doing this, I don't even know what language these files are written in, and I could not write one from scratch. But I did manage to get some of the more broken skills working and therefore allow a more efficient witch doctor. All of the traditional builds I've tried were pretty bad, in comparison to my own play at least. All of the heavy spender builds like acid rain, bears, or acid bats suffered from fairly bad aoe clear speed and running out of mana constantly, combined with bad survivability. This is partially due to the lack of Piranhado in the default file, 4 second cc that also groups the mobs up to be aoe'd is very important. Vampire bats would have worked but the logic for them is pretty awful and it was out of my league to fix that. Pet builds are strong with the right gear, but its really hard to get them to a point where they rival anything else in clear speed.

For me, this is the fastest killspeed/strongest survivability build the witch doctor has in trinity. Witch Doctor - Game Guide - Diablo III It does require a certain amount of weapon damage to pull off as you need to chain soul harvests to clear trash. I'd say about 750k would be good, before that I would use firebomb with bears instead. Do note that this build simply won't work on higher torments because it relies on chain cooldown resets. Higher torments are less efficient anyway, there is no reason to bot them.

To make this work I changed three things. I had to remove the part of the soul harvest logic that makes it wait until the stacks run out to use it again so that it would spam it on cooldown for damage. I fixed the spirit barrage, although I'm honestly unsure what was wrong with it in the first place. And I added basic support for the new Piranha skill which should be a staple in any build. So even if you think I'm full of shit about everything else, I'd add the piranha support. Also, if something doesn't work for you and you didn't do anything wrong the only thing I can think of is version incompatibility. I am using the latest demonbuddy beta and trinity 1.8.15.

Skip to the bottom for the changed file if you would like all three changes and you won't have to do any of this editing.

I will break this down into 3 sections, you don't need to do them all if you don't want. If you use soul harvest as purely a buff and don't want it spammed, don't make the soul harvest changes, simple stuff.


Soul Harvest Damage Spam

Find your WitchDoctor.cs file and open it in notepad. It is in your Demonbuddy Folder>Plugins>Trinity>Combat>Abilities

Search for Harvest. You should arrive here.
Code:
            // Witch Doctor - Terror
            //skillDict.Add("SoulHarvest", SNOPower.Witchdoctor_SoulHarvest);
            //runeDict.Add("SwallowYourSoul", 3);
            //runeDict.Add("Siphon", 0);
            //runeDict.Add("Languish", 2);
            //runeDict.Add("SoulToWaste", 1);
            //runeDict.Add("VengefulSpirit", 4);

            bool hasVengefulSpirit = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Witchdoctor_SoulHarvest && s.RuneIndex == 4);
            bool hasSwallowYourSoul = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Witchdoctor_SoulHarvest && s.RuneIndex == 3);

            // Soul Harvest Any Elites or 2+ Norms and baby it's harvest season
            if (!UseOOCBuff && CombatBase.CanCast(SNOPower.Witchdoctor_SoulHarvest) && !Player.IsIncapacitated && Player.PrimaryResource >= 59 &&
                (TargetUtil.AnyMobsInRange(16f, GetBuffStacks(SNOPower.Witchdoctor_SoulHarvest) + 1, false) || (hasSwallowYourSoul && Player.PrimaryResourcePct <= 0.50) || TargetUtil.IsEliteTargetInRange(16f)))
            {
                return new TrinityPower(SNOPower.Witchdoctor_SoulHarvest, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 0, 0, WAIT_FOR_ANIM);
            }

            // Soul Harvest with VengefulSpirit
            if (!UseOOCBuff && !IsCurrentlyAvoiding && !Player.IsIncapacitated && CombatBase.CanCast(SNOPower.Witchdoctor_SoulHarvest) && hasVengefulSpirit && Player.PrimaryResource >= 59
                && TargetUtil.AnyMobsInRange(16, 3) && GetBuffStacks(SNOPower.Witchdoctor_SoulHarvest) <= 4)
            {
                return new TrinityPower(SNOPower.Witchdoctor_SoulHarvest, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 0, 0, WAIT_FOR_ANIM);
            }

We are going to replace all of that, with this.
Code:
            // Soul Harvest with VengefulSpirit
            if (!UseOOCBuff && !IsCurrentlyAvoiding && !Player.IsIncapacitated && CombatBase.CanCast(SNOPower.Witchdoctor_SoulHarvest) && Player.PrimaryResource >= 59
                && TargetUtil.AnyMobsInRange(16, 3))
            {
                return new TrinityPower(SNOPower.Witchdoctor_SoulHarvest, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 0, 0, WAIT_FOR_ANIM);
            }

Spirit Barrage Fix

This will remove support for the manitou rune which is uselss anyway. As I said before I am not quite experienced in doing this and I have no idea what was causing the problem before, so I just deleted this section because it didn't make sense to me to have spirit barrage cast at 0 range.

Search for Barrage.
Code:
            //skillDict.Add("SpiritBarage", SNOPower.Witchdoctor_SpiritBarrage);
            //runeDict.Add("TheSpiritIsWilling", 3);
            //runeDict.Add("WellOfSouls", 1);
            //runeDict.Add("Phantasm", 2);
            //runeDict.Add("Phlebotomize", 0);
            //runeDict.Add("Manitou", 4);

            bool hasManitou = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Witchdoctor_SpiritBarrage && s.RuneIndex == 4);

            // Spirit Barrage Manitou
            if (CombatBase.CanCast(SNOPower.Witchdoctor_SpiritBarrage) && Player.PrimaryResource >= 100 && TimeSinceUse(SNOPower.Witchdoctor_SpiritBarrage) > 18000 && hasManitou)
            {
                return new TrinityPower(SNOPower.Witchdoctor_SpiritBarrage, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 2, 2, WAIT_FOR_ANIM);
            }

            // Regular spirita barage
            if (CombatBase.CanCast(SNOPower.Witchdoctor_SpiritBarrage) && Player.PrimaryResource >= 100 && !hasManitou)
            {
                return new TrinityPower(SNOPower.Witchdoctor_SpiritBarrage, 0f, Vector3.Zero, CurrentWorldDynamicId, -1, 2, 2, WAIT_FOR_ANIM);
            }
Delete everything here. Then search for Barrage again.
Code:
            bool hasWellOfSouls = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Witchdoctor_SpiritBarrage && s.RuneIndex == 1);
            bool hasRushOfEssence = ZetaDia.CPlayer.PassiveSkills.Any(s => s == SNOPower.Witchdoctor_Passive_RushOfEssence);

            // Spirit Barrage + Rush of Essence
            if (!UseOOCBuff && !IsCurrentlyAvoiding && !Player.IsIncapacitated && CombatBase.CanCast(SNOPower.Witchdoctor_SpiritBarrage) && Player.PrimaryResource >= 108 &&
                hasRushOfEssence && Player.PrimaryResourcePct <= 0.25 && !hasManitou)
            {
                if (hasWellOfSouls)
                    return new TrinityPower(SNOPower.Witchdoctor_SpiritBarrage, 2, 2);

                return new TrinityPower(SNOPower.Witchdoctor_SpiritBarrage, 21f, Vector3.Zero, -1, CurrentTarget.ACDGuid, 2, 2, WAIT_FOR_ANIM);
            }

Delete all of this too. Search for barrage once more, or scroll down about 10 lines.
Code:
            // Spirit Barrage
            if (!UseOOCBuff && !IsCurrentlyAvoiding && !Player.IsIncapacitated && CombatBase.CanCast(SNOPower.Witchdoctor_SpiritBarrage) && Player.PrimaryResource >= 108 && !hasManitou)
            {
                return new TrinityPower(SNOPower.Witchdoctor_SpiritBarrage, 21f, Vector3.Zero, -1, CurrentTarget.ACDGuid, 2, 2, WAIT_FOR_ANIM);
            }
Replace the above with this.
Code:
            // Spirit Barrage
            if (!UseOOCBuff && !IsCurrentlyAvoiding && !Player.IsIncapacitated && CombatBase.CanCast(SNOPower.Witchdoctor_SpiritBarrage) && Player.PrimaryResource >= 108)
            {
                return new TrinityPower(SNOPower.Witchdoctor_SpiritBarrage, 21f, Vector3.Zero, -1, CurrentTarget.ACDGuid, 2, 2, WAIT_FOR_ANIM);
            }

Piranha Support

Search for Grasp. It is near the middle of the file, and you should find this.
Code:
            // Grasp of the Dead, look below, droping globes and dogs when using it on elites and 3 norms
            if (!UseOOCBuff && !IsCurrentlyAvoiding && CombatBase.CanCast(SNOPower.Witchdoctor_GraspOfTheDead) && !Player.IsIncapacitated &&
                (TargetUtil.AnyMobsInRange(30, 2)) &&
                Player.PrimaryResource >= 78)
            {
                var bestClusterPoint = TargetUtil.GetBestClusterPoint(15);

                return new TrinityPower(SNOPower.Witchdoctor_GraspOfTheDead, 25f, bestClusterPoint, CurrentWorldDynamicId, -1, 0, 0, WAIT_FOR_ANIM);
            }
            //skillDict.Add("Horrify", SNOPower.Witchdoctor_Horrify);
            //runeDict.Add("Phobia", 2);
            //runeDict.Add("Stalker", 4);
            //runeDict.Add("FaceOfDeath", 1);
            //runeDict.Add("FrighteningAspect", 0);
            //runeDict.Add("RuthlessTerror", 3);

Replace it with this.
Code:
            // Grasp of the Dead, look below, droping globes and dogs when using it on elites and 3 norms
            if (!UseOOCBuff && !IsCurrentlyAvoiding && CombatBase.CanCast(SNOPower.Witchdoctor_GraspOfTheDead) && !Player.IsIncapacitated &&
                (TargetUtil.AnyMobsInRange(30, 2)) &&
                Player.PrimaryResource >= 78)
            {
                var bestClusterPoint = TargetUtil.GetBestClusterPoint(15);

                return new TrinityPower(SNOPower.Witchdoctor_GraspOfTheDead, 25f, bestClusterPoint, CurrentWorldDynamicId, -1, 0, 0, WAIT_FOR_ANIM);
            }
			
			
	    if (!UseOOCBuff && !IsCurrentlyAvoiding && CombatBase.CanCast(SNOPower.Witchdoctor_Piranhas) && !Player.IsIncapacitated &&
                (TargetUtil.AnyMobsInRange(30, 2)) &&
                Player.PrimaryResource >= 250)
            {
                var bestClusterPoint = TargetUtil.GetBestClusterPoint(15);

                return new TrinityPower(SNOPower.Witchdoctor_Piranhas, 25f, bestClusterPoint, CurrentWorldDynamicId, -1, 0, 0, WAIT_FOR_ANIM);
            }
			
			
			
            //skillDict.Add("Horrify", SNOPower.Witchdoctor_Horrify);
            //runeDict.Add("Phobia", 2);
            //runeDict.Add("Stalker", 4);
            //runeDict.Add("FaceOfDeath", 1);
            //runeDict.Add("FrighteningAspect", 0);
            //runeDict.Add("RuthlessTerror", 3);
 

Attachments

Last edited:
wont work

demonbuddy will not start or initialize
and will spam errors
 
Last edited:
my dear friend allthough i have asked rrrix for a fix too thank you for the effort
i havent tried it yet but i will allthough i want spirit barrage to be cast all the time no matter the range cause i use it as my main hit sinc ei have enough mana regen
kinda like the wiz uses disintegrate...
if thats the case ill try it or ill wait for the official fix...
 
wont work

demonbuddy will not start or initialize
and will spam errors

well.. i know it works so you made a mistake

make sure you have the same versions as me and just use the attached file so you dont have to edit it
 
Last edited:
not sure what im doing wrong, i just downloaded your rar file and put it in my plugins folder for trinity in the combat section, its spamming spirit barage now which is nice but its still not casting Piranha for some reason. i am using that bigben profile atm so i only fight the 1 elite guy.
ill try and use demonbuddy beta next, thats the onlything different i can see between yours and mine.
 
Last edited:
did you take the .cs file out of the rar?

beyond that i'm not really sure what it could be, make sure you're using the newest trinity and demonbuddy beta
 
gonna try that next, and yes i extracted the rar file to Plugins\Trinity\Combat\Abilities and overwrited the current witchdoctor.cs file.
gonna try and use demonbuddy beta now because im using the most recent released version
 
make sure you reload demonbuddy entirely just reloading the trinity plugin wont refresh these changes
 
Awesome work dude! Seriously, everyone in this forum needs to realize what you just did. You don't know any coding or that this is written in C, but you still managed to fix abilities to your liking. I wish more people would figure shit out on their own instead of asking questions that take 2 minutes of searching to find the answer for.

Big props.
 
I incorporated a few changes into the latest Trinity. Using your .cs files completely breaks some specific builds though...
 
It works! I see that the latest trinity (16) has the fixes included now. I thank you a 1000 times, greetings one happy witch doctor.
Edit: Your version works alot better. When loading cursed chest runs act 1, your profile kills the skeleton king on time. The trinity version seems to be a lot slower. I think it has something to do with haunt and locust not used properly in the trinity one. I have the witch doctor mask that cuts the duration of haunt and locust in half (quatzalcoatal or something like that). Really imporant to keep them both up and your cfg seems to do that just right. Running like a champ (wizzard). Fuckin A dude!
 
Last edited:
I incorporated a few changes into the latest Trinity. Using your .cs files completely breaks some specific builds though...
I didnt know if leaving the regular soul harvest logic would take precedence over the one I used so I just removed it, its only useful for the specific build I run anyway. Optimally, I would have made it use the skill on cooldown for damage only when the vengeful spirit rune is detected but I didn't know how to do that.
 
Last edited:
So .. it isnt using piranhas on a single target, like a boss. I'm doing Manglemaw atm and its not beeing used. I reinstalled DB and trinity but still nothing. Any way to change that ?
 
as rrrix yet havent answered my requests on 1.8.17 thread.. i'll re-quote them here and see if you guys can make it work for me:
Hi there rrrix, so i got this build working for a hardcore WD
Witch Doctor - Game Guide - Diablo III

The problem is, the bot will only cast Spirit Barrage.

The logic for this build would be like this:
cast at least once haunt per pack or till it expire.
cast locust swarm on 10+ packs of monsters.
Cast all two above on elitepacks and keep refreshing it.

If you try this build you'll see it is a beasty build for HC characters. could you please implement these changes on next Trinity?
 
Back
Top