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

Pet Counter Fix (WD dogs, DH sentries and so on...)

heinz

New Member
Joined
Feb 25, 2013
Messages
11
Reaction score
0
Yes! There is final fix for annoying problem "WitchDoctor spamming Zombie Dogs out of combat by cooldown". And not just dogs - all pet counters, that Trinity maintains, are working now! And all combat routines, that relies on count of pets, must to work properly now too.

It affects:
WD Zombie Dogs
WD Gargantuan
DH Pets
DH Sentries
Wizard Hydras
Monk Mystic Allies

All you need is:
in Plugins\Trinity\Cache\RefreshObject.cs

1. Initialize variable in this fragment (find "bool AddToCache;" and insert " = true" there)...
Code:
/*
 *  Initialize Variables
 */
bool AddToCache[B][COLOR="#00FF00"][COLOR="#008000"] = true[/COLOR][/COLOR][/B];
2. Find this code snippet, CUT it...
Code:
// Summons by the player 
AddToCache = RefreshStepCachedSummons();
if (!AddToCache) { c_IgnoreReason = "CachedPlayerSummons"; return false; }using (new PerformanceLogger("RefreshDiaObject.CachedType"))
...and PASTE it below end line of the next snippet
Code:
using (new PerformanceLogger("RefreshDiaObject.CachedType"))
{
    /*
     * Set Object Type
     */
    AddToCache = RefreshStepCachedObjectType(AddToCache);
    if (!AddToCache) { c_IgnoreReason = "CachedObjectType"; return AddToCache; }
}
Or simply download modified file, as it keeps unchanged from previous Trinity versions: View attachment RefreshObject.cs

3. Switch off automatic updates, if you using it, as changes your have made will be reverted to original code!

Update:
To count DemonHunter sentries it is necessary to patch Plugins\Configuration\DataDictionary.cs
find this code...
Code:
        public static HashSet<int> DemonHunterSentryIds { get { return demonHunterSentryIds; } }
        private static readonly HashSet<int> demonHunterSentryIds = new HashSet<int> { 
            141402
        };
...and extend it to
Code:
        public static HashSet<int> DemonHunterSentryIds { get { return demonHunterSentryIds; } }
        private static readonly HashSet<int> demonHunterSentryIds = new HashSet<int> { 
            141402,
            150024,
            150025,
            150026,
            150027,
            168815
        };
Tested on Trinity v2.1.21 from SVN with
Hardcore WD: works flawlessly through several consequent games (counts dogs 0..6, gargantuan 0..1, recasts by combat routine conditions (for ex., if i dismiss the dogs one by one manually), no CD recasts). I can't test softcore-specific cases such as "after death" as i haven't softcore characters. Sorry.
Hardcore DH: works ok, counting pets 0..9, sentries 0..3+

Enjoy!

This mod only repairs the original logic to work as intended (i truly hope!), unlocks function RefreshStepCachedSummons() that maintains pet counters. This may not affect the builds which have the authorized recast interval less than cooldown, such as in WD Sacrifice build.
 
Last edited:
I made the edits myself and it didnt change pet behavior. They are constantly being summoned still... I will copy your RefreshObject.cs and edit my post if it works or doesn't.

Edit: I copied your RefreshObject.cs and it now works. Your file size was 0.1 kb larger than mine and after checking to make sure I did all the edits right there has to be more to edit than what you said in your post. Is it possible?

Anyways it works now! Thanks :)
 
Last edited:
Im not having this problem with my DH and WD bots with latest DB & Trinity verions.
 
ye i have this problem in OOC mode with WD
will test your changes
 
I noticed my bot is no longer summoning pets now after death and Gargantuant is still being summoned randomly. It really broke a lot of things for me so I'm going to revert back.
 
I tried again with a clean installation and it seems to be working. I used your RefreshObject.cs file instead of modifying. Thanks.
 
dont work for me
...
i edit file by myself

I edited the head post to be more clear. Downloaded the file from SVN and modified it according to instructions. As a result, there is no difference from the file that I uploaded earlier. And it works )))
Okay, okay... I'll edit future versions myself. ))
 
Back
Top