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

Problem with Health and Mana Percent Logging

spriestdev

New Member
Joined
Sep 19, 2011
Messages
236
Reaction score
11
Hey everyone,

I am sure that I am just missing something somewhere, but I'm having a bit of trouble getting a Custom Class to report the player's Health and Mana percentages in the log.

Here's what I've convinced myself should work:

Code:
                    AltarboyComposites.CastSpellSimple("Life Tap", ret => 
                        ShouldLifeTap(TargetManager.ActiveTarget), string.Format("Health: {0:F1}% Mana: {1:F1}%", Me.HealthPercent, Me.ManaPercent)
                    ),

However, this seems to only return the Health and Mana values from when the bot was started. Like so:

"[Altarboy] Casting Life Tap on WarlockPlayer - Health: 100.0% Mana: 100.0"

I guess what I'm having trouble wrapping my brain around, is how the bot is correctly identifying when to Life Tap (as those same values are used in the "ShouldLifeTap" method) but isn't being accurately delivered to the log.

If you'd like to see the rest of the code it's available at:
altarboy - Revision 728: /branches/lock
(Code referenced is from Altarboy/Warlock/Altarboy.AfflictionWarlock.cs - Line 150)
 
heres how i did it.

heres the log output
Code:
Me.healthPerceent = 96.09
Me.healthPerceent = 97.1
Me.healthPerceent = 98.12
Me.healthPerceent = 99.14
Me.healthPerceent = 100

heres the code
Code:
Logging.Write("Me.healthPerceent = {0}", Me.HealthPercent.ToString("###.##"));
 
Hmm... sadly I'm still getting the same value returned each time. Any other suggestions? I'm at a loss.
 
Back
Top