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

@rrrrrrix can you explain this?

taskmanager

New Member
Joined
Mar 18, 2014
Messages
400
Reaction score
1
Code:
        /// <summary>
        /// Returns how many stacks of a particular buff there are
        /// </summary>
        /// <param name="power"></param>
        /// <returns></returns>
        public static int GetBuffStacks(SNOPower power)
        {
            int stacks;
            if (PlayerBuffs.TryGetValue((int)power, [COLOR="#FF0000"]out stacks[/COLOR]))
            {
                return stacks;
            }
            return 0;
        }

can you tell me the red text what/how this work?

if i understand it correct, does it mean that if wd has 5 stacks of soul harvest (+5, true or false)
-if false, < 5 stacks it would cast soul harvest again?
-if true, > 5 stacks it wouldn't cast soul harvest again?

im trying to get wd to stop casting soul harvest if stacks is at max 5.
 
Code:
if( GetBuffStacks(SNOPower.Witchdoctor_SoulHarvest) < 5 )
{
   // cast 
}
 
Code:
if( GetBuffStacks(SNOPower.Witchdoctor_SoulHarvest) < 5 )
{
   // cast 
}

Yea pretty much this. :-)

Would change the code in WitchDoctorCombat.cs to this:
Code:
if (CanCast(SNOPower.Witchdoctor_SoulHarvest) && (GetBuffStacks(SNOPower.Witchdoctor_SoulHarvest) < 5) && (TargetUtil.AnyMobsInRange(16f) || (hasSwallowYourSoul && Player.PrimaryResourcePct <= 0.50) || TargetUtil.IsEliteTargetInRange(16f)))
{
     return new TrinityPower(SNOPower.Witchdoctor_SoulHarvest);
}
 
Back
Top