• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Nourish spamming issue!

    Discussion in 'Archives' started by hazard, Mar 14, 2011.

    1. hazard

      hazard Well-Known Member Buddy Store Developer

      Joined:
      Sep 16, 2010
      Messages:
      1,854
      Likes Received:
      59
      Trophy Points:
      48
      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));
      } 
      
       
    2. Stormchasing

      Stormchasing Community Developer

      Joined:
      Jan 15, 2011
      Messages:
      4,029
      Likes Received:
      48
      Trophy Points:
      48
      u need to blacklist nourish per tar?
       
    3. LiquidAtoR

      LiquidAtoR Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,430
      Likes Received:
      52
      Trophy Points:
      48
      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.
       
    4. hazard

      hazard Well-Known Member Buddy Store Developer

      Joined:
      Sep 16, 2010
      Messages:
      1,854
      Likes Received:
      59
      Trophy Points:
      48
      Yes we need to black list Nourish per a target other wise it wont use it on another player followed by Healing Touch.
       
    5. Stormchasing

      Stormchasing Community Developer

      Joined:
      Jan 15, 2011
      Messages:
      4,029
      Likes Received:
      48
      Trophy Points:
      48
      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;
                      }
                  }
              }
      
       

      Attached Files:

      Last edited: Mar 16, 2011
    6. hazard

      hazard Well-Known Member Buddy Store Developer

      Joined:
      Sep 16, 2010
      Messages:
      1,854
      Likes Received:
      59
      Trophy Points:
      48
      Tried it and still not casting Nourish. It just seems to blacklist the player from all healing for 5 seconds?
       
    7. Stormchasing

      Stormchasing Community Developer

      Joined:
      Jan 15, 2011
      Messages:
      4,029
      Likes Received:
      48
      Trophy Points:
      48
      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 :)
       

    Share This Page