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

Anyway of Knowing if a particular Monster is marked for death

rimmi2002

New Member
Joined
Apr 28, 2014
Messages
138
Reaction score
2
anyway of knowing if a particaular monster already has a particualr affix. ie: Marked for death or exploding palm. I am currently using Marked for Death Contagion with my DH, it will keep casting it on the "currenttarget" even though the monster is already marked. I'd rather have it cast it on other monsters in the area. Thanks.
 
to know if target has a buff use either.

Code:
        public static bool IsUnitTracked(int acdGuid, SNOPower power)

        public static bool IsUnitTracked(TrinityCacheObject unit, SNOPower power)

for example:

Code:
SpellTracker.IsUnitTracked(CurrentTarget, SNOPower.Witchdoctor_Haunt))

i did something similar to this in https://www.thebuddyforum.com/demon...67163-combat-routine-exploding-palm-monk.html . If the current target has the debuff, blacklist it. that will force the bot to target someone else. and you can check if the next target has the buff and so on and so forth. The blacklists are temporary so eventually it will cycle back to them. The code below is not your solution but should have some of the key pieces you can use.

Code:
            // Spread exploding palm around for a mega-splosion
            if (Player.PrimaryResourcePct > 0.30 && TargetUtil.ClusterExists(15f, 4) &&


                // dont bother spreading EP if its already spread
                !MonkUtils.UnitWithDebuffInRangeOfPosition(15f, TargetUtil.GetBestClusterPoint(15f), SNOPower.Monk_ExplodingPalm, 3) &&


                // Avoid rapidly changing targets
                DateTime.UtcNow.Subtract(LastTargetChange).TotalMilliseconds > 1500 &&


                // Dont switch target if we're chasing a goblin
                !AnyTreasureGoblinsPresent && CurrentTarget != null && CurrentTargetIsUnit() &&
                
                CurrentTarget != null && CurrentTarget.CommonData != null && CurrentTarget.CommonData.IsValid)
            {
                Logger.LogNormal("{0} Blacklisted 3s - Changing Target", CurrentTarget.CommonData.Name);
                LastTargetChange = DateTime.UtcNow;
                Blacklist3Seconds.Add(CurrentTarget.RActorGuid);
            }
 
Last edited:
Thanks this is great. I can use to to change Mark of death around. Appreciate it!
 
Had one quick question to use "IsUnitTracked" Do I first have to use TrackSpellOnUnit.
For example when MArk for death is cast I tell it to track or it that something that is done automatically internally? Thanks.
 
It's doing TrackSpellOnUnit automatically when spells are cast.

Code:
[TABLE="width: 342"]
[TR]
[TD]Combat\HandleTarget.cs(1531):[/TD]
[TD]SpellTracker.TrackSpellOnUnit(CombatBase.CurrentPower.TargetACDGUID, CombatBase.CurrentPower.SNOPower);[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[/TABLE]
 
Hello. Can you write a code fore Marked for death please.
 
to know if target has a buff use either.

Code:
        public static bool IsUnitTracked(int acdGuid, SNOPower power)

        public static bool IsUnitTracked(TrinityCacheObject unit, SNOPower power)

Does this will work with barbs Rend?
 
Back
Top