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

ActiveAuras TimeLeft Wrong?

Vastico

New Member
Joined
Jul 28, 2011
Messages
424
Reaction score
10
Improved Soul Fire valid, time remaining 00:00:00.2900000
Improved Soul Fire valid, time remaining 00:00:00.1820000
Improved Soul Fire valid, time remaining 00:00:00.0430000
Improved Soul Fire valid, time remaining 00:00:03.2970000
Improved Soul Fire valid, time remaining 00:00:03.3400000
Improved Soul Fire valid, time remaining 00:00:03.8080000
Improved Soul Fire valid, time remaining 00:00:03.7000000

Buff Time remaining is 20/19 seconds.
 
You should post your code to see what's wrong, because I tried in HB Console and I got correct results.

With the following code
PHP:
Log("============");
foreach(KeyValuePair<string, Styx.Logic.Combat.WoWAura> aura in Me.ActiveAuras)
{
    Log(String.Format("{0} : {1}", aura.Value.TimeLeft, aura.Value.Name));
}

I got this

============
00:07:11.2870000 : Mark of the Wild
00:00:07.4170000 : Rejuvenation
00:00:04.6680000 : Regrowth
============
00:07:10.4590000 : Mark of the Wild
00:00:06.5880000 : Rejuvenation
00:00:03.8390000 : Regrowth
============
00:07:09.6520000 : Mark of the Wild
00:00:05.7790000 : Rejuvenation
00:00:03.0300000 : Regrowth
============
00:07:08.7750000 : Mark of the Wild
00:00:04.9040000 : Rejuvenation
00:00:02.1550000 : Regrowth
============
00:07:06.5300000 : Mark of the Wild
00:00:02.6590000 : Rejuvenation
</string,styx.logic.combat.wowaura>
 
Code:
		public static Composite TargetLocalBuff(string name, string auraName, int timeLeft)
		{
            return new Decorator(CanRunDeleagotor => !Me.ActiveAuras.ContainsKey(auraName) || Me.ActiveAuras[auraName].TimeLeft.TotalSeconds < timeLeft,
                new Sequence(TargetSpell(name, CanCastDelegator => true),
                    new WaitContinue(5, CanRunWaitDelegator =>
                    {
					
						if (Me.ActiveAuras.ContainsKey(auraName))
						{
							Logger.Info("{0} valid, time remaining {1}", Me.ActiveAuras[auraName], Me.ActiveAuras[auraName].TimeLeft);
						} else {
							Logger.Info("{0} invalid", auraName);
						}
					
                        return !LocalSpell.LocalHasBuff(auraName, timeLeft);
                    }, new ActionAlwaysSucceed())
                )
            );		
		}
 
Back
Top