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

Nourish spamming issue!

hazard

Well-Known Member
Joined
Sep 16, 2010
Messages
1,854
Reaction score
59
Is there a way that I can stop the CC from spamming a spell by blacklisting it for 5 seconds?

Example:

Code:
else if (tar.Guid == tank.Guid && hp < 59 && !isAuraActive("Rejuvenation", tar))
{
s = "Nourish";
needCast = true;
Blacklist.Spell(tar, new TimeSpan(0, 0, 5));
}
 
I don't know if Logic.Blacklist still exists in the API, but if it does, maybe you can do something with that (Don't have VS anymore so can't check for you currently).
Maybe it can be used to blacklist a spell on a target for a x amount of seconds.

Other than that you can try to use
Code:
TimeSpan.FromSeconds(5.00)
instead of what is in your current code
Code:
new TimeSpan(0, 0, 5)

I don't know what the error is you are receiving with the curent lines of code.

I've been out of coding anything for HB for a long time already, I just maintain the plugins and help where I think I can contribute.
 
I changed your HDD v1.1.1 to cast Nourish with Blacklisting for 5 Seconds per Target

- added using - directive
using System.Collections;
- added private variable for saving the blacklisted Targets and Times
private Hashtable _prvHTable = new Hashtable();

replaced old Nourish Casting / Logic with:
Code:
		            if (Convert.ToDateTime(_prvHTable[tar.Guid])<=DateTime.Now)
		            { 
                		s = "Nourish";
		                needCast = true;
				//Blacklisting
                		_prvHTable[tar.Guid]= DateTime.Now.AddSeconds(5);
		            }
			    else
			    {
	                        s = "Healing Touch";
				needCast = true;
			    }

Attention: THIS is untested (no HealingSpecc with druid atm)

My first try worked with Timers, but i thought this takes to much resources when healing in a raid or BG, so i decided to store only the expiration time per target, i think this should fit your needs

Please test it :) if something is missing or not working, contact me :)

I haven'T added a reset of the Hashtable, maybe this is needed

this should be done with:

Code:
	private Hashtable _prvHTable = new Hashtable();
    private bool resetHTable;
        public override void Pulse()
        {
            if (Me != null && Me.IsValid && Me.IsAlive && Me.IsInInstance)
            {
                resetHTable = false;
                tank = GetTank();
                if (tank == null)
                {
                    tank = Me;
                }
                Combat();
            }
            else
            {
                if (!resetHTable)
                {
                    _prvHTable.Clear();
                    resetHTable = true;
                }
            }
        }
 

Attachments

Last edited:
Tried it and still not casting Nourish. It just seems to blacklist the player from all healing for 5 seconds?
 
hmm okay i'll test today, when my druid is specced to heal
it shouldn't blacklist players from healing, because the only testing if a player is blacklisted, happens in the healing-part with nourish, regrowth etc isn't checking for blacklisted players
and if the player is blacklisted, the toon should use Healing Touch ...

i'll test ... tonight ... or befor raiding :)
 
Back
Top