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:
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)
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)