Closed cassrgs closed 8 years ago
It would probably help if you can identify a specific buff and show the 2 different ID's on it so he knows exactly what he's looking for.
the id changes each time any buff goes out and its cast again, as we can see below
[DefaultCombat] Rotation Paused
#MYSELF# -> Buff Name: Harnessed Darkness ID: 157009388541
#MYSELF# -> Buff Name: Harnessed Darkness ID: 157009390352 Hotkey pressed: Pause Rotation (F8) [DefaultCombat] Rotation Resumed Hotkey pressed: Pause Rotation (F8) [DefaultCombat] Rotation Paused
#MYSELF# -> Buff Name: Harnessed Darkness ID: 157009393458
#MYSELF# -> Buff Name: Harnessed Darkness ID: 157009393812
also on extension.cs on helpers of defaultcombat the buffcount function gets only the first entry and have no check in case the buff count its 0
public static int BuffCount(this TorCharacter p, string buffName)
{
return !p.HasMyBuff(buffName)
? 0
: p.Buffs.FirstOrDefault(b => b.Name.Contains(buffName) && b.CasterGuid == BuddyTor.Me.Guid).GetStacks();
}
i guess it would be needed to use another kind of LINQ function to get the second entry of the buff and this issue should be moved to the defaulcombat github instead of here
We can add a method that takes all occurrences of a specific buff name, something along the lines of
BuddyTor.Me.Buffs.Count(s => s.Name.Equals("Harnessed Darkness")
For obvious reasons, this can't be the default behaviour (because it doesn't work for spells that actually have stacks opposed to multiple instances of the same spell), but it can definitely be an addition if the game decided to use this behaviour.
Implemented IList<TorEffect> GetBuffsByName(string name)
in TorCharacter
- int buffCount = GetBuffsByName("Some buff").Count;
will return the total amount of spells with the specified name active on the character at any given time.
Some buffs with stacks are showing twice with different ids
One of those ids doesnt count the stacks the other do count.
This is making the bot randomly recognize or not recognize the buff with stacks when using Me.Buffcount on the routines.
Classes affected Assassin Darkness. Sorcerer Madness and their republic counterparts