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

Zunimassa Fetish Army Summoning

gt5000

New Member
Joined
Aug 24, 2014
Messages
16
Reaction score
1
I was tinkering with a code so Fetish Army summons like Zombie Dogs instead of just on Elite packs.
Code:
	//Zunimassa Fetish Army
	bool hasZuni = Sets.ZunimassasHaunt.IsThirdBonusActive;
	if (!hasZuni)
	{
		// Fetish Army, elites only				
		if (CanCast(SNOPower.Witchdoctor_FetishArmy) && (TargetUtil.EliteOrTrashInRange(30f) || TargetUtil.IsEliteTargetInRange(30f) || Settings.Combat.WitchDoctor.UseFetishArmyOffCooldown))
			{
			return new TrinityPower(SNOPower.Witchdoctor_FetishArmy);
			}
	}
	else
	{
		if (UseOOCBuff && CanCast(SNOPower.Witchdoctor_FetishArmy))
			{
			return new TrinityPower(SNOPower.Witchdoctor_FetishArmy);
			}
	}
This is what I have but from what I can gather its not recognizing the Zuni set bonus is active ?
 
Last edited:
Without knowing too much about the function calls within DB, it looks like your logic is switched around.
The following line
bool hasZuni = Sets.ZunimassaHaunt.IsThirdBonusActive;

Is either true or false.
In the beginning of your if-statement you then enter the "elites only"-block if hasZuni is the inverse of false (true).
So remove the !-mark from your if-statement and it should work properly
 
I based it off of a similar set bonus function in the DemonHunter.cs
Code:
            // Impale
            bool hasM6 = Sets.EmbodimentOfTheMarauder.IsThirdBonusActive;
            bool impalecheck = !UseOOCBuff && !IsCurrentlyAvoiding && Hotbar.Contains(SNOPower.DemonHunter_Impale) && !Player.IsIncapacitated && (!TargetUtil.AnyMobsInRange(12, 4));
            if (!hasM6)
            {
                if (impalecheck &&
                    ((Player.PrimaryResource >= 25 && !Player.WaitingForReserveEnergy) || Player.PrimaryResource >= MinEnergyReserve) &&
                    CurrentTarget.RadiusDistance <= 50f)
                {
                    return new TrinityPower(SNOPower.DemonHunter_Impale, 50f, Vector3.Zero, -1, CurrentTarget.ACDGuid, 0, 1);
                }
            }
            //We don't want to spam Impale if we have M6 equipped
            else
            {
                if (impalecheck && ((Player.PrimaryResource >= 75 && !Player.WaitingForReserveEnergy)) &&
                CurrentTarget.RadiusDistance <= 50f)
                {
                    return new TrinityPower(SNOPower.DemonHunter_Impale, 50f, Vector3.Zero, -1, CurrentTarget.ACDGuid, 0, 1);
                }
            }
So I assumed !hasM6 returned a false, based on the logic that when you have M6 and are using Impale (for whatever reason) you wouldnt want to spam it, so you set Player.PrimaryResource >= 75 when you are using M6
 
I have refined this coding, have gotten it to cast out of combat trying to keep it similar to the Zombie Dog code. My new code in red.
Code:
            // Buffs
            if (UseOOCBuff)
            {
                // Spirit Walk OOC 
                if (CanCast(SNOPower.Witchdoctor_SpiritWalk) && Settings.Combat.Misc.AllowOOCMovement)
                {
                    return new TrinityPower(SNOPower.Witchdoctor_SpiritWalk);
                }
				
				
				//Spam fear at all times if Tiklandian Visage is ewquipped and fear spam is selected to keep fear buff active
				if (CanCast(SNOPower.Witchdoctor_Horrify) && Settings.Combat.WitchDoctor.SpamHorrify && Legendary.TiklandianVisage.IsEquipped)
                {
					return new TrinityPower(SNOPower.Witchdoctor_Horrify);
                }
				
				bool hasStalker = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Witchdoctor_Horrify && s.RuneIndex == 4);
                // Horrify Buff When not in combat for movement speed -- Stalker
                if (CanCast(SNOPower.Witchdoctor_Horrify) && hasStalker)
                {
                    return new TrinityPower(SNOPower.Witchdoctor_Horrify);
                }

                // Zombie Dogs non-sacrifice build
                if (CanCast(SNOPower.Witchdoctor_SummonZombieDog) &&
                ((Legendary.TheTallMansFinger.IsEquipped && Trinity.PlayerOwnedZombieDogCount < 1) ||
                (!Legendary.TheTallMansFinger.IsEquipped && Trinity.PlayerOwnedZombieDogCount <= 2)))
                {
                    return new TrinityPower(SNOPower.Witchdoctor_SummonZombieDog);
                }

                bool hasRestlessGiant = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Witchdoctor_Gargantuan && s.RuneIndex == 0);
                bool hasWrathfulProtector = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Witchdoctor_Gargantuan && s.RuneIndex == 3);

                if (CanCast(SNOPower.Witchdoctor_Gargantuan) && !hasRestlessGiant && !hasWrathfulProtector && Trinity.PlayerOwnedGargantuanCount == 0)
                {
                    return new TrinityPower(SNOPower.Witchdoctor_Gargantuan);
                }
				
[COLOR="#FF0000"]		if (Sets.ZunimassasHaunt.IsMaxBonusActive)
		{
			if (CanCast(SNOPower.Witchdoctor_FetishArmy) && Trinity.PlayerOwnedVoodooSoldierCount < 8)
			{
			return new TrinityPower(SNOPower.Witchdoctor_FetishArmy);
			}
		}[/COLOR]
            }

Now I'm having trouble with getting it to not cast if there is a Fetish Army already up. I was looking through Variables.cs and found the function for tracking pets.
Since they added a new Fetish tracker I tried to add a similar function for tracking them. Pretty sure it is not working since it will still cast Fetish Army out of combat regardless of how many Voodoo Soldiers the Diablo 3 in game tracker says (yes I have tried FetishSoldierCount)
Code:
        // A count for player mystic ally, gargantuans, and zombie dogs
        internal static int PlayerOwnedMysticAllyCount = 0;
        internal static int PlayerOwnedGargantuanCount = 0;
        internal static int PlayerOwnedZombieDogCount = 0;
[COLOR="#FF0000"]	internal static int PlayerOwnedVoodooSoldierCount = 0;[/COLOR]		
        internal static int PlayerOwnedDHPetsCount = 0;
        internal static int PlayerOwnedDHSentryCount = 0;
        internal static int PlayerOwnedHydraCount = 0;
 
Now I'm having trouble with getting it to not cast if there is a Fetish Army already up. I was looking through Variables.cs and found the function for tracking pets.
Since they added a new Fetish tracker I tried to add a similar function for tracking them. Pretty sure it is not working since it will still cast Fetish Army out of combat regardless of how many Voodoo Soldiers the Diablo 3 in game tracker says (yes I have tried FetishSoldierCount)

Did u just add the "internal static int PlayerOwnedVoodooSoldierCount = 0;" to "Variables.cs" ?
You must edit the files "RefreshUnit.cs", "RefreshObjects.cs", "DataDictionary.cs" and "Variable.cs" to implement the new PlayerOwnedFetishSoldierCount-Tracker.

Dublicate the PlayerOwnedZombieDogCount-Tracker-Parts and change them to "FetishSoldier".
(hint: fetishSoldierIds-hash: 87189)

@rrrix: could u implement the FetishSoldier Tracker to Trinity?

Greets
kleinerMann
 
Last edited:
@rrrix: could u implement the FetishSoldier Tracker to Trinity?

subscribing to this thread. hope the fetish army counter can be implemented, so my WD with zuni don't have to keep recasting FA unless needed. might be the difference between life/death on higher torments/grifts. :)
 
Yes I just added it to Variables.cs, I stopped getting errors during the db start up so I thought it was good to go thanks for the info.

Also are there different ids-hash for Fetish Army-Fetish Soldiers and Fetish Sycophants-Fetish Soldiers ? The D3 UI has them both named as Voodoo Soldiers.
 
Last edited:
Tested works like a charm after adding to "RefreshUnit.cs", "RefreshObjects.cs", and "DataDictionary.cs"

Okay by observation, Fetish Army-Fetish Soldiers and Fetish Sycophant-Fetish Soldier must have different IDs. I dismissed one Fetish Army with one Fetish Sycophant up and the bot recasted Fetish Army (7 FA 1 FS)
 
Last edited:
Okay by observation, Fetish Army-Fetish Soldiers and Fetish Sycophant-Fetish Soldier must have different IDs. I dismissed one Fetish Army with one Fetish Sycophant up and the bot recasted Fetish Army (7 FA 1 FS)

You are right. Fetish_Melee_Sycophants hash = 409590.
 
yay...new trinity broke my edits, I have no clue where its broken but doesnt seem like the tracker works any more

WitchDoctorCombat.cs
Code:
            // Buffs
            if (UseOOCBuff)
            {
                // Spirit Walk OOC 
                if (CanCast(SNOPower.Witchdoctor_SpiritWalk) && Settings.Combat.Misc.AllowOOCMovement)
                {
                    return new TrinityPower(SNOPower.Witchdoctor_SpiritWalk);
                }
				
				
				//Spam fear at all times if Tiklandian Visage is ewquipped and fear spam is selected to keep fear buff active
				if (CanCast(SNOPower.Witchdoctor_Horrify) && Settings.Combat.WitchDoctor.SpamHorrify && Legendary.TiklandianVisage.IsEquipped)
                {
					return new TrinityPower(SNOPower.Witchdoctor_Horrify);
                }
				
				bool hasStalker = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Witchdoctor_Horrify && s.RuneIndex == 4);
                // Horrify Buff When not in combat for movement speed -- Stalker
                if (CanCast(SNOPower.Witchdoctor_Horrify) && hasStalker)
                {
                    return new TrinityPower(SNOPower.Witchdoctor_Horrify);
                }

                // Zombie Dogs non-sacrifice build
                if (CanCast(SNOPower.Witchdoctor_SummonZombieDog) &&
                ((Legendary.TheTallMansFinger.IsEquipped && Trinity.PlayerOwnedZombieDogCount < 1) ||
                (!Legendary.TheTallMansFinger.IsEquipped && Trinity.PlayerOwnedZombieDogCount <= 2)))
                {
                    return new TrinityPower(SNOPower.Witchdoctor_SummonZombieDog);
                }

                bool hasRestlessGiant = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Witchdoctor_Gargantuan && s.RuneIndex == 0);
                bool hasWrathfulProtector = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Witchdoctor_Gargantuan && s.RuneIndex == 3);

                if (CanCast(SNOPower.Witchdoctor_Gargantuan) && !hasRestlessGiant && !hasWrathfulProtector && Trinity.PlayerOwnedGargantuanCount == 0)
                {
                    return new TrinityPower(SNOPower.Witchdoctor_Gargantuan);
                }

[COLOR="#FF0000"]		if (Sets.ZunimassasHaunt.IsMaxBonusActive)
		{
			if (CanCast(SNOPower.Witchdoctor_FetishArmy) && Trinity.PlayerOwnedFetishSoldierCount < 8)
			{
				return new TrinityPower(SNOPower.Witchdoctor_FetishArmy);
			}
		}[/COLOR]
            }

Variables.cs
Code:
        // A count for player mystic ally, gargantuans, and zombie dogs
        internal static int PlayerOwnedMysticAllyCount = 0;
        internal static int PlayerOwnedGargantuanCount = 0;
        internal static int PlayerOwnedZombieDogCount = 0;
[COLOR="#FF0000"]	internal static int PlayerOwnedFetishSoldierCount = 0;[/COLOR]
        internal static int PlayerOwnedDHPetsCount = 0;
        internal static int PlayerOwnedDHSentryCount = 0;
        internal static int PlayerOwnedHydraCount = 0;

DataDictionary.cs
Code:
        public static HashSet<int> GargantuanIds { get { return gargantuanIds; } }
        private static readonly HashSet<int> gargantuanIds = new HashSet<int> { 
            179780, 179778, 179772, 179779, 179776, 122305 };

        public static HashSet<int> ZombieDogIds { get { return zombieDogIds; } }
        private static readonly HashSet<int> zombieDogIds = new HashSet<int> { 
            110959, 103235, 103215, 105763, 103217, 51353 
        };
		
[COLOR="#FF0000"]	public static HashSet<int> FetishSoldierIds { get { return fetishSoldierIds; } }
        private static readonly HashSet<int> fetishSoldierIds = new HashSet<int> { 
            87189
        };[/COLOR]

RefreshObjects.cs
Code:
                // Reset the counters for player-owned things
                PlayerOwnedMysticAllyCount = 0;
                PlayerOwnedGargantuanCount = 0;
                PlayerOwnedZombieDogCount = 0;
[COLOR="#FF0000"]		PlayerOwnedFetishSoldierCount = 0;[/COLOR]
                PlayerOwnedDHPetsCount = 0;
                PlayerOwnedDHSentryCount = 0;

RefreshUnit.cs
Code:
                // Count up zombie dogs and gargantuans next
                if (Player.ActorClass == ActorClass.Witchdoctor)
                {
                    if (DataDictionary.GargantuanIds.Contains(CurrentCacheObject.ActorSNO))
                    {
                        if (CurrentCacheObject.IsSummonedByPlayer)
                        {
                            PlayerOwnedGargantuanCount++;
                            c_IgnoreSubStep = "IsPlayerSummoned";
                        }
                        return false;
                    }
                    if (DataDictionary.ZombieDogIds.Contains(CurrentCacheObject.ActorSNO))
                    {
                        if (CurrentCacheObject.IsSummonedByPlayer)
                        {
                            PlayerOwnedZombieDogCount++;
                            c_IgnoreSubStep = "IsPlayerSummoned";
                        }
                        return false;
                    }
[COLOR="#FF0000"]                    if (DataDictionary.FetishSoldierIds.Contains(CurrentCacheObject.ActorSNO))
                    {
                        if (CurrentCacheObject.IsSummonedByPlayer)
                        {
                            PlayerOwnedFetishSoldierCount++;
                            c_IgnoreSubStep = "IsPlayerSummoned";
                        }
                        return false;
                    }[/COLOR]
                }
 
Last edited:
its works sometimes
Not sure whats wrong with the OOC coding but it casts it out of combat regardless of how many fetish army you have alive (and on CD)

Fetish Soldier Counter Doesnt Work
Code:
                // Fetish Army, elites only
                if (CanCast(SNOPower.Witchdoctor_FetishArmy) &&
                    (TargetUtil.EliteOrTrashInRange(30f) || TargetUtil.IsEliteTargetInRange(30f) || Settings.Combat.WitchDoctor.UseFetishArmyOffCooldown) [COLOR="#FF0000"]&& Trinity.PlayerOwnedFetishSoldierCount <= 7[/COLOR])
                {
                    return new TrinityPower(SNOPower.Witchdoctor_FetishArmy);
                }

Code:
            // Buffs
            if (UseOOCBuff)
            {
                // Spirit Walk OOC 
                if (CanCast(SNOPower.Witchdoctor_SpiritWalk) && Settings.Combat.Misc.AllowOOCMovement)
                {
                    return new TrinityPower(SNOPower.Witchdoctor_SpiritWalk);
                }
				
				
		//Spam fear at all times if Tiklandian Visage is ewquipped and fear spam is selected to keep fear buff active
		if (CanCast(SNOPower.Witchdoctor_Horrify) && Settings.Combat.WitchDoctor.SpamHorrify && Legendary.TiklandianVisage.IsEquipped)
                {
		return new TrinityPower(SNOPower.Witchdoctor_Horrify);
                }
				
		bool hasStalker = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Witchdoctor_Horrify && s.RuneIndex == 4);
                // Horrify Buff When not in combat for movement speed -- Stalker
                if (CanCast(SNOPower.Witchdoctor_Horrify) && hasStalker)
                {
                    return new TrinityPower(SNOPower.Witchdoctor_Horrify);
                }

[COLOR="#FF0000"]		if (Sets.ZunimassasHaunt.IsMaxBonusActive)
		{
                    if (CanCast(SNOPower.Witchdoctor_FetishArmy) && Trinity.PlayerOwnedFetishSoldierCount <= 7)
                    {
                    return new TrinityPower(SNOPower.Witchdoctor_FetishArmy);
                    }
		}[/COLOR]
				
                // Zombie Dogs non-sacrifice build
                if (CanCast(SNOPower.Witchdoctor_SummonZombieDog) &&
                ((Legendary.TheTallMansFinger.IsEquipped && Trinity.PlayerOwnedZombieDogCount < 1) ||
                (!Legendary.TheTallMansFinger.IsEquipped && Trinity.PlayerOwnedZombieDogCount <= 2)))
                {
                    return new TrinityPower(SNOPower.Witchdoctor_SummonZombieDog);
                }

                bool hasRestlessGiant = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Witchdoctor_Gargantuan && s.RuneIndex == 0);
                bool hasWrathfulProtector = HotbarSkills.AssignedSkills.Any(s => s.Power == SNOPower.Witchdoctor_Gargantuan && s.RuneIndex == 3);

                if (CanCast(SNOPower.Witchdoctor_Gargantuan) && !hasRestlessGiant && !hasWrathfulProtector && Trinity.PlayerOwnedGargantuanCount == 0)
                {
                    return new TrinityPower(SNOPower.Witchdoctor_Gargantuan);
                }
            }

Edit: I was wrong the counter just doesnt work
 
Last edited:
maybe an issue with trinity? the latest version seems to keep on recasting zombie dogs.
read another post on trinity thread that his gargantuan also keeps on recasting cd.
maybe tracking of pets has been changed on db / trinity or patch 2.1.1?
 
Back
Top