[V9.1] [INTERNATIONAL] [RNN] Spirit Barrage && COE menu

User Tag List

Page 2 of 5 FirstFirst 12345 LastLast
Results 16 to 30 of 61
  1. #16
    RNN's Avatar Legendary
    Reputation
    811
    Join Date
    Sep 2018
    Posts
    1,051
    Thanks G/R
    103/774
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    The number of health globes that are on the ground (near), those that have not yet been collected
    ShowGlobes = false if you don't want to show that counter

    [V9.1] [INTERNATIONAL] [RNN] Spirit Barrage && COE
  2. #17
    wtfdc's Avatar Member
    Reputation
    1
    Join Date
    Mar 2020
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by RNN View Post
    The number of health globes that are on the ground (near), those that have not yet been collected
    ShowGlobes = false if you don't want to show that counter
    Thank you mucho

  3. #18
    Jembo's Avatar Active Member
    Reputation
    33
    Join Date
    Nov 2018
    Posts
    112
    Thanks G/R
    28/30
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I love the Health Globe Count, would it be possible to have it as an individual plugin and/or part of [HandH] HealthGlobePlugin ?
    I managed to comment out the other buffs + coe to show only the Health Globes Count but it doesn't seem efficient use of code of my end

  4. #19
    RNN's Avatar Legendary
    Reputation
    811
    Join Date
    Sep 2018
    Posts
    1,051
    Thanks G/R
    103/774
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    A basic code would be like this:

    Code:
    using Turbo.Plugins.Default;  
    using System.Linq;    
    
    namespace Turbo.Plugins.RNN
    {        
    	public class HealthGlobesCounter : BasePlugin, IInGameTopPainter
    	{		
    		private IFont FontWhite { get; set; }
    		private IBrush BrushRed { get; set; }
    				
    		public HealthGlobesCounter()
    		{
    			Enabled = true;    
    		}
    		
    		public override void Load(IController hud)
            {
    			base.Load(hud);	
    			FontWhite = Hud.Render.CreateFont("tahoma", 8f, 255, 255, 255, 255, true, false, 255, 0, 0, 0, true);
    			BrushRed = Hud.Render.CreateBrush(255, 255, 50 , 50, 0);	
    		}
    
    		public void PaintTopInGame(ClipState clipState)
    		{
    			var n = Hud.Game.Actors.Where(a => a.SnoActor.Kind == ActorKind.HealthGlobe).Count();
    			if (n > 0)
    			{
    				var layout = FontWhite.GetTextLayout(n.ToString());
    				var x = Hud.Window.Size.Width * 0.831f; var y = Hud.Window.Size.Height * 0.060f; 
    				var w = (n < 10)? layout.Metrics.Width:(layout.Metrics.Width/2 + 1);
    				BrushRed.DrawEllipse(x , y , w, w);
    				FontWhite.DrawText(layout, x - layout.Metrics.Width/2 , y - layout.Metrics.Height / 2  -  1 );
    			}												
    		}
    	}
    }
    And modify the colored text to modify the size, opacity, position
    Last edited by RNN; 03-12-2020 at 01:28 PM. Reason: fix when there are more than 9

  5. Thanks Jembo, mois (2 members gave Thanks to RNN for this useful post)
  6. #20
    Jembo's Avatar Active Member
    Reputation
    33
    Join Date
    Nov 2018
    Posts
    112
    Thanks G/R
    28/30
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much !

  7. #21
    RNN's Avatar Legendary
    Reputation
    811
    Join Date
    Sep 2018
    Posts
    1,051
    Thanks G/R
    103/774
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Update1
    Fixed timeleft Spirit barrage Phantasm

    Update2
    Check that buff 484270 is active (Gazing Demise)
    Last edited by RNN; 03-11-2020 at 10:47 AM.

  8. Thanks BeeAntOS (1 members gave Thanks to RNN for this useful post)
  9. #22
    rogue00722's Avatar Member
    Reputation
    4
    Join Date
    Mar 2018
    Posts
    45
    Thanks G/R
    22/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you always for good information.^^

  10. #23
    SoThOr's Avatar Member
    Reputation
    3
    Join Date
    Jun 2019
    Posts
    1
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure if this is appropriate to post here or if I should start my own thread. But I made a few of modifications to this plugin (and a bunch of refactoring, mostly to improve code readability for myself).

    - Added (ShowIndividualPhantasms = true) Phantasm timers for 3 newest Phantasms. Newest to the left, yellow for placed, grey (very briefly) for when exploding after timing out, red for unplaced phantasm. Appears on its own row above other skills
    - Modified (ShowIndividualPhantasms = false) Spirit barrage icon to show Phantasm timer of newest Phantasm. Appears on same row as other skills.
    - Added BigBadVodoo buff status, Yellow for active, Grey for inactive but on cooldown, red for off cooldown and no BBV. Cooldown timer shown top left and with clock, Buff duration remaining shown bottom right.
    - Added Rush of Essence stack count and buff timer
    - Added options to hide skills
    - CoE Highlights which element is currently active with yellow frame, inactive elements show as red.
    - CoE Bar height scales with icon sizes.

    I did this for myself really but thought I should share it. Maybe RNN will decide to include some of the features.



    Code:
    using System;
    using Turbo.Plugins.Default;  
    using System.Linq;
    using System.Collections.Generic;
    using SharpDX;
    using SharpDX.Direct2D1;
    
    namespace Turbo.Plugins.RNN
    {
    	public class SpiritBarrageAndCoE : BasePlugin, IInGameTopPainter
    	{
    		private int[] _IndexToBonus = new int[8] { 7, 5, 3, 1, 6, 2, 0, 4 };
    		private List<int> _WDBonusElements =  new List<int> {3,6,7,2}; // 1 = Arcane, 2 = Cold, 3 = Fire, 4 = Holy, 5 = Lightning, 6 = Physical, 7 = Poison
    
    		private float _SizeIconWidth;
    		private float _SizeIconHeight;
    
    		private float _CurrentX;
    		private float _CurrentY;
    
    		public IFont FontCoeNoBestElement { get; set; }
    		public IFont FontCoeActiveElement { get; set; }
    		public IFont FontCoeBestElementActive { get; set; }
    		public IFont FontCoeBestElementWarn { get; set; }
    		public IFont FontCoeBestElementInactive { get; set; }
    		public IFont FontCoeElementBonus { get; set; }
    
    
    		public IFont FontNoStacksTimeLeft { get; set; }
    		public IFont FontGlobeCount { get; set; }
    		public IFont FontStacks { get; set; }
    		public IFont FontTimeLeft { get; set; }
    		public IFont FontStacksNone { get; set; }
    
    		public IBrush TimeLeftClockBrush { get; set; }
    		public IBrush BrushGlobesBackground { get; set; }
    
    		public IBrush BrushCoeBackground { get; set; }
    		public IBrush BrushCoeBestElementActive  { get; set; }
    		public IBrush BrushCoeBestElementWarn { get; set; }
    		public IBrush BrushCoeBestElementInactive { get; set; }
    		public IBrush BrushCoeNoPrimaryElement { get; set; }
    		public IBrush BrushDefault { get; set; }
    
    		public float OffsetX  { get; set; }
    		public float OffsetY  { get; set; }
    
    		public bool ShowIndividualPhantasms { get; set; }
    		public bool ShowSoulHarvest { get; set; }
    		public bool ShowBigBadVoodoo { get; set; }
    		public bool ShowRushOfEssence { get; set; }
    		public bool ShowGruesomeFeast { get; set; }
    		public bool ShowGlobes { get; set; }
    		public bool ShowCoe { get; set; }
    		public bool OnlyGR { get; set; }
    		public bool OnlyMe { get; set; }
    		public float Opacity { get; set; }
    
    		private float _SizeMultiplier;
    		public float SizeMultiplier  { 
    			get	{ return _SizeMultiplier; }
    			set {
    				_SizeMultiplier = value;
    
    				_SizeIconWidth = Hud.Texture.BuffFrameTexture.Width * _SizeMultiplier;
    				_SizeIconHeight = Hud.Texture.BuffFrameTexture.Height * _SizeMultiplier;
    			}
    		}
    
    		public SpiritBarrageAndCoE() {
    			Enabled = true;
    		}
    
    		public override void Load(IController hud) {
    			base.Load(hud);
    
    			Order = 30001;
    
    			OffsetX = 0.75f;				// To set the x coordinate of the icon
    			OffsetY = 0.05f;				// To set the y coordinate of the icon
    			SizeMultiplier = 0.9f;			// Size multiplier for icons
    			ShowSoulHarvest = true;			// Show SoulHarvest status for WD
    			ShowBigBadVoodoo = true; 		// Show BigBadVoodoo status for WD
    			ShowRushOfEssence = true; 		// Show RushOfEssence status for WD
    			ShowGruesomeFeast = true; 		// Show GruesomeFeast status for WD
    			ShowGlobes = true;				// Health Globes Counter (floor)
    			ShowCoe = true;					// Show COE status for WD
    			ShowIndividualPhantasms = true;	// Show Phantasm status seperately for WD
    			OnlyMe = false;					// Show  only for my character
    			OnlyGR = false;					// Show  in GR only
    			Opacity = 0.85f;				// 0f..1f  Opacity for icon texture
    
    			var OpacityBrush = (int) (Opacity * 255);
    
    			FontNoStacksTimeLeft = Hud.Render.CreateFont("tahoma", 10f * SizeMultiplier, 255, 0, 255, 0, true, false, 255, 0, 0, 0, true);		// Green
    
    			FontStacks = Hud.Render.CreateFont("tahoma", 10f * SizeMultiplier, 255, 255, 225, 0, true, false, 160, 0, 0, 0, true);
    			FontStacksNone = Hud.Render.CreateFont("tahoma", 10f * SizeMultiplier, 255, 255, 0, 0, true, false, 160, 0, 0, 0, true);
    			FontTimeLeft = Hud.Render.CreateFont("tahoma", 8f * SizeMultiplier, 255, 0, 255, 0, true, false, 255, 0, 0, 0, true);
    			TimeLeftClockBrush = Hud.Render.CreateBrush(220, 0, 0, 0, 0);
    
    			FontGlobeCount = Hud.Render.CreateFont("tahoma", 9f, 255, 255, 255, 255, true, false, 255, 0, 0, 0, true);  //White
    			BrushGlobesBackground = Hud.Render.CreateBrush(OpacityBrush, 255, 50 , 50, 0);
    
    			FontCoeNoBestElement = Hud.Render.CreateFont("tahoma", 9f * SizeMultiplier, 255, 255, 255, 255, true, false, 255, 0, 0, 0, true);		// White
    			FontCoeActiveElement = Hud.Render.CreateFont("tahoma", 8f * SizeMultiplier, 235, 235, 235, 235, true, false, 255, 0, 0, 0, true); 		// Grey
    			FontCoeBestElementActive = Hud.Render.CreateFont("tahoma", 12f * SizeMultiplier, 255, 0, 255, 0, true, false, 255, 0, 0, 0, true);		// Green
    			FontCoeBestElementWarn = Hud.Render.CreateFont("tahoma", 12f * SizeMultiplier, 255, 255, 255, 0, true, false, 255, 0, 0, 0, true);		// Yellow
    			FontCoeBestElementInactive = Hud.Render.CreateFont("tahoma", 12f * SizeMultiplier, 255, 255, 150, 0, true, false, 255, 0, 0, 0, true);	// Orange
    			FontCoeElementBonus = Hud.Render.CreateFont("tahoma", 8f * SizeMultiplier, 255, 50, 150, 250, true, false, 255, 0, 0, 0, true);			// Blue
    
    			BrushCoeBackground = Hud.Render.CreateBrush(255, 80, 80, 80, 0); 				// Grey 
    			BrushCoeBestElementActive = Hud.Render.CreateBrush(255, 0, 255 , 0, 0); 		// Green
    			BrushCoeBestElementWarn = Hud.Render.CreateBrush(255, 255, 255 , 0, 0);			// Yellow
    			BrushCoeBestElementInactive = Hud.Render.CreateBrush(255, 255, 185 , 0, 0);		// Orange
    			BrushCoeNoPrimaryElement = Hud.Render.CreateBrush(255, 50, 150 , 250, 0);		// Blue
    		}
    
    		private void DrawTimeLeftClock(RectangleF rect, double elapsed, double timeLeft) { // plugins\Default\BuffLists\Painter\BuffPainter.cs
    			if ((timeLeft > 0) && (elapsed >= 0) && (TimeLeftClockBrush != null)) {
    				var endAngle = Convert.ToInt32(360.0d / (timeLeft + elapsed) * elapsed);
    				var startAngle = 0;
    				TimeLeftClockBrush.Opacity = 1 - (float)(0.3f / (timeLeft + elapsed) * elapsed);
    				var rad = rect.Width * 0.45f;
    				using (var pg = Hud.Render.CreateGeometry()) {
    					using (var gs = pg.Open()) {
    						gs.BeginFigure(rect.Center, FigureBegin.Filled);
    						for (var angle = startAngle; angle <= endAngle; angle++) {
    							var mx = rad * (float)Math.Cos((angle - 90) * Math.PI / 180.0f);
    							var my = rad * (float)Math.Sin((angle - 90) * Math.PI / 180.0f);
    							var vec = new Vector2(rect.Center.X + mx, rect.Center.Y + my);
    							gs.AddLine(vec);
    						}
    						gs.EndFigure(FigureEnd.Closed);
    						gs.Close();
    					}
    					TimeLeftClockBrush.DrawGeometry(pg);
    				}
    			}
    		}
    
    		public void DrawIcon(uint idtexture, double timeleft, double elapsed, int stacks) {
    			Hud.Texture.GetTexture(idtexture).Draw(_CurrentX, _CurrentY, _SizeIconWidth, _SizeIconHeight, Opacity);
    			if (stacks > 0) Hud.Texture.BuffFrameTexture.Draw(_CurrentX, _CurrentY, _SizeIconWidth, _SizeIconHeight, Opacity);
    			else if ( timeleft <=0) Hud.Texture.DebuffFrameTexture.Draw(_CurrentX, _CurrentY, _SizeIconWidth, _SizeIconHeight, Opacity);
    
    			if (timeleft > 0) {
    				DrawTimeLeftClock(new RectangleF(_CurrentX, _CurrentY , _SizeIconWidth, _SizeIconHeight), elapsed , timeleft);
    				var layout1 = FontTimeLeft.GetTextLayout(timeleft.ToString( (timeleft < 1)? "F1" : "F0") );
    				FontTimeLeft.DrawText(layout1, _CurrentX + ((_SizeIconWidth - (float)Math.Ceiling(layout1.Metrics.Width))/5.0f), _CurrentY + ((_SizeIconHeight - (float)Math.Ceiling(layout1.Metrics.Height))/10.0f));
    			}
    			var layout2 = FontStacks.GetTextLayout( stacks.ToString() );
    			(stacks == 0?FontStacksNone:FontStacks).DrawText(layout2, _CurrentX + _SizeIconWidth - (float)Math.Ceiling(layout2.Metrics.Width) - 3, _CurrentY + _SizeIconHeight - (float)Math.Ceiling(layout2.Metrics.Height) - 1 );
    			_CurrentX += _SizeIconWidth;
    		}
    		public void DrawIconNoStacks(uint idtexture, double timeleft, double elapsed) {
    			Hud.Texture.GetTexture(idtexture).Draw(_CurrentX, _CurrentY, _SizeIconWidth, _SizeIconHeight, Opacity);
    			if ( timeleft > 0) Hud.Texture.BuffFrameTexture.Draw(_CurrentX, _CurrentY, _SizeIconWidth, _SizeIconHeight, Opacity);
    
    			if (timeleft > 0) {
    				DrawTimeLeftClock(new RectangleF(_CurrentX, _CurrentY , _SizeIconWidth, _SizeIconHeight), elapsed , timeleft);
    				var layout = FontNoStacksTimeLeft.GetTextLayout(timeleft.ToString( (timeleft < 1)? "F1" : "F0") );
    				FontNoStacksTimeLeft.DrawText(layout, _CurrentX + ((_SizeIconWidth - (float)Math.Ceiling(layout.Metrics.Width))/2.0f), _CurrentY + ((_SizeIconHeight - (float)Math.Ceiling(layout.Metrics.Height))/2.0f));
    			}
    			_CurrentX += _SizeIconWidth;
    		}
    		public void DrawIconNoBuff(uint idtexture) {
    			Hud.Texture.GetTexture(idtexture).Draw(_CurrentX, _CurrentY, _SizeIconWidth, _SizeIconHeight, Opacity);
    			Hud.Texture.DebuffFrameTexture.Draw(_CurrentX, _CurrentY, _SizeIconWidth, _SizeIconHeight, Opacity);
    			_CurrentX += _SizeIconWidth;
    		}
    
    		public void PaintTopInGame(ClipState clipState) {
    			if (clipState != ClipState.BeforeClip) return;
    			if (!Hud.Game.IsInGame) return;
    			if (OnlyGR && !Hud.Game.Me.InGreaterRift) return;
    
    			var players = Hud.Game.Players.Where(p => p.HasValidActor && p.Powers.UsedSkills.Any(s => s.SnoPower.Sno == Hud.Sno.SnoPowers.WitchDoctor_SpiritBarrage.Sno /* && s.Rune == 4 */ )).OrderBy(p => p.PortraitIndex); // 108506
    			if (players.Count() == 0) return;
    
    			_CurrentY =  Hud.Window.Size.Height * OffsetY ;
    
    			foreach(var player in players) {
    				if (OnlyMe && !player.IsMe) continue;
    
    				_CurrentX =  Hud.Window.Size.Width * OffsetX;
    
    				IPlayerSkill SpiritBarrage = player.Powers.UsedWitchDoctorPowers.SpiritBarrage;
    				if (SpiritBarrage != null) {
    					double TimeElapsedSeconds = 0d;
    					double TimeLeftSeconds = 0d;
    					var Phantasms = Hud.Game.Actors.Where(a => a.SnoActor.Sno == ActorSnoEnum._wd_spiritbarragerune_aoe_ghostmodel && (a.SummonerAcdDynamicId == player.SummonerId)).OrderByDescending(a => a.CreatedAtInGameTick);
    					if (ShowIndividualPhantasms)
    					{
    						int NumPhantasms = 0;
    						foreach (var Phantasm in Phantasms){
    							if (NumPhantasms++ == 3) break;
    							TimeElapsedSeconds = (Hud.Game.CurrentGameTick - Phantasm.CreatedAtInGameTick) / 60d;
    							TimeLeftSeconds = (player.Powers.BuffIsActive(Hud.Sno.SnoPowers.GazingDemise.Sno, 0) ? 10d : 5d) - TimeElapsedSeconds; //484270
    							DrawIconNoStacks(SpiritBarrage.SnoPower.NormalIconTextureId, TimeLeftSeconds, TimeElapsedSeconds); // 1117784160
    						}
    						for (var NoPhantasmCount = NumPhantasms; NoPhantasmCount < 3; NoPhantasmCount++)  {
    							DrawIconNoBuff(Hud.Sno.SnoPowers.WitchDoctor_SpiritBarrage.NormalIconTextureId);
    						}
    						_CurrentX =  Hud.Window.Size.Width * OffsetX; _CurrentY = _CurrentY + _SizeIconHeight;
    					}
    					else {
    						if (Phantasms.Count()>0){
    							TimeElapsedSeconds = (Hud.Game.CurrentGameTick - Phantasms.First().CreatedAtInGameTick) / 60d;
    							TimeLeftSeconds = (player.Powers.BuffIsActive(Hud.Sno.SnoPowers.GazingDemise.Sno, 0) ? 10d : 5d) - TimeElapsedSeconds; //484270
    						}
    						DrawIcon(SpiritBarrage.SnoPower.NormalIconTextureId, TimeLeftSeconds, TimeElapsedSeconds, Math.Min(Phantasms.Count(),3)); // 1117784160
    					}
    				}
    
    				if (ShowSoulHarvest) {
    					IPlayerSkill SoulHarvest = player.Powers.UsedWitchDoctorPowers.SoulHarvest; 
    					if (SoulHarvest != null) {
    						if (SoulHarvest.Buff != null) {
    							DrawIcon(SoulHarvest.SnoPower.NormalIconTextureId, SoulHarvest.Buff.TimeLeftSeconds[0], SoulHarvest.Buff.TimeElapsedSeconds[0], SoulHarvest.Buff.IconCounts[0]); // 2196086897
    						}
    						else {
    							DrawIcon(SoulHarvest.SnoPower.NormalIconTextureId, 0, 0, 0); // 2196086897
    						}
    					}
    					else {
    						DrawIconNoBuff(Hud.Sno.SnoPowers.WitchDoctor_SoulHarvest.NormalIconTextureId);// 2196086897
    					}
    				}
    
    				if (ShowBigBadVoodoo) {
    					IPlayerSkill BigBadVoodoo = player.Powers.UsedWitchDoctorPowers.BigBadVoodoo;		 
    					if (BigBadVoodoo != null) {
    						double CooldownRemaining = 0d;
    						double CooldownElapsed = 0d;
    						if (BigBadVoodoo.CooldownFinishTick > Hud.Game.CurrentGameTick) {
    							CooldownRemaining = (BigBadVoodoo.CooldownFinishTick - Hud.Game.CurrentGameTick) / 60.0d;
    							CooldownElapsed = (Hud.Game.CurrentGameTick - BigBadVoodoo.CooldownStartTick) / 60.0d;
    						}
    						DrawIcon(BigBadVoodoo.SnoPower.NormalIconTextureId, CooldownRemaining, CooldownElapsed, (int)(BigBadVoodoo.Buff != null? BigBadVoodoo.Buff.TimeLeftSeconds[4] : 0));
    					}
    					else {
    						DrawIconNoBuff(Hud.Sno.SnoPowers.WitchDoctor_BigBadVoodoo.NormalIconTextureId);
    					}
    				}
    
    				if (ShowRushOfEssence) {
    					IBuff BuffRushOfEssence = player.Powers.GetBuff(Hud.Sno.SnoPowers.WitchDoctor_Passive_RushOfEssence.Sno); // 208594
    					if (BuffRushOfEssence != null && BuffRushOfEssence.Active) {
    						DrawIcon(Hud.Sno.SnoPowers.WitchDoctor_Passive_RushOfEssence.NormalIconTextureId, BuffRushOfEssence.TimeLeftSeconds[1], BuffRushOfEssence.TimeElapsedSeconds[1], BuffRushOfEssence.IconCounts[1]);
    					}
    				}
    
    				if (ShowGruesomeFeast) {
    					IBuff BuffGruesomeFeast = player.Powers.GetBuff(Hud.Sno.SnoPowers.WitchDoctor_Passive_GruesomeFeast.Sno); // 208594
    					if (BuffGruesomeFeast != null && BuffGruesomeFeast.Active) {
    						DrawIcon(Hud.Sno.SnoPowers.WitchDoctor_Passive_GruesomeFeast.NormalIconTextureId, BuffGruesomeFeast.TimeLeftSeconds[1], BuffGruesomeFeast.TimeElapsedSeconds[1], BuffGruesomeFeast.IconCounts[1]); // 1591242582
    					}
    				}
    
    				if (ShowGlobes) {
    					var HealthGlobeCount = Hud.Game.Actors.Where(a => a.SnoActor.Kind == ActorKind.HealthGlobe).Count();
    					if (HealthGlobeCount > 0) {
    						var layout = FontGlobeCount.GetTextLayout(HealthGlobeCount.ToString());
    						BrushGlobesBackground.DrawEllipse(_CurrentX + _SizeIconWidth / 2 , _CurrentY + _SizeIconHeight / 2 , layout.Metrics.Width + 1, layout.Metrics.Width + 1);
    						FontGlobeCount.DrawText(layout,_CurrentX + (_SizeIconWidth - layout.Metrics.Width) / 2 , _CurrentY + (_SizeIconHeight - layout.Metrics.Height) / 2 );
    						_CurrentX += _SizeIconWidth;
    					}
    				}
    				if (_CurrentX != Hud.Window.Size.Width * OffsetX)
    				{
    					_CurrentY =  _CurrentY + _SizeIconHeight;
    					_CurrentX =  Hud.Window.Size.Width * OffsetX;
    				}
    
    				var CoEBarheight = _SizeIconHeight * 0.1f;
    				_CurrentY =  _CurrentY + CoEBarheight;
    				if (ShowCoe){
    					IBuff BuffCoE = player.Powers.GetBuff(Hud.Sno.SnoPowers.ConventionOfElements.Sno); // 430674
    					if (BuffCoE != null)
    					{
    						var j =	_WDBonusElements.Count;	var ActiveElement = -1; var BestElement = -1;  double MaxBonus = -1; 	bool UniqueBestElement = false;
    						for(var k = j - 1; k > -1 ; k--)
    						{
    							var index = _WDBonusElements[k];
    							if (BuffCoE.IconCounts[index] > 0) {  ActiveElement = index;  }
    
    							var bonus = player.Offense.ElementalDamageBonus[_IndexToBonus[index]];
    							if (bonus > MaxBonus) 
    							{
    								MaxBonus = bonus; 
    								BestElement = index;
    								UniqueBestElement = true;
    							}
    							else if (bonus == MaxBonus) UniqueBestElement = false;
    						}
    						if ((ActiveElement != -1) && (BestElement != -1) )
    						{
    							for (var l = 0; l < j; l++)
    							{
    								if (_WDBonusElements[j - 1] != BestElement)
    								{
    									_WDBonusElements.Insert(0,_WDBonusElements[j - 1]);
    									_WDBonusElements.RemoveAt(j);
    								}
    								else  {   break;  }
    							} 
    
    							foreach(var index in _WDBonusElements) 
    							{
    								IFont FontDefault = null;
    
    								Hud.Texture.GetTexture(BuffCoE.SnoPower.Icons[index].TextureId).Draw(_CurrentX, _CurrentY, _SizeIconWidth, _SizeIconHeight, Opacity);
    
    								DrawTimeLeftClock(new RectangleF(_CurrentX, _CurrentY, _SizeIconWidth, _SizeIconHeight), BuffCoE.TimeElapsedSeconds[index], BuffCoE.TimeLeftSeconds[index]);
    
    								double s = 0; 
    								if (UniqueBestElement)
    								{
    									if (index == ActiveElement)
    									{
    										s = BuffCoE.TimeLeftSeconds[index];
    										if (index == BestElement) { FontDefault = FontCoeBestElementActive; BrushDefault = BrushCoeBestElementActive; }
    										else { FontDefault = FontCoeActiveElement; }
    										Hud.Texture.BuffFrameTexture.Draw(_CurrentX, _CurrentY, _SizeIconWidth, _SizeIconHeight, Opacity);
    									}
    									else
    									{
    										if (index == BestElement)
    										{
    											s = (j - _WDBonusElements.IndexOf(ActiveElement) - 1) * 4 - BuffCoE.TimeElapsedSeconds[ActiveElement] ;
    											if (  s >  ((j - 1) * 2) ) { FontDefault = FontCoeBestElementInactive;	BrushDefault = BrushCoeBestElementInactive; }
    											else { FontDefault = FontCoeBestElementWarn; BrushDefault = BrushCoeBestElementWarn; }
    										}
    										Hud.Texture.DebuffFrameTexture.Draw(_CurrentX, _CurrentY, _SizeIconWidth, _SizeIconHeight, Opacity);
    									}
    								}
    								else
    								{
    									if (player.Offense.ElementalDamageBonus[_IndexToBonus[index]] == player.Offense.HighestElementalDamageBonus) 
    									{
    										var layout1 = FontCoeElementBonus.GetTextLayout( (player.Offense.HighestElementalDamageBonus * 100).ToString() );
    										FontCoeElementBonus.DrawText(layout1, _CurrentX + _SizeIconWidth - (float)Math.Ceiling(layout1.Metrics.Width) - 3, _CurrentY + _SizeIconHeight - (float)Math.Ceiling(layout1.Metrics.Height) - 2);
    									}
    									s = BuffCoE.TimeLeftSeconds[index];
    									BrushDefault = BrushCoeNoPrimaryElement;	FontDefault = FontCoeNoBestElement;
    								}
    
    								if (s > 0) 
    								{
    									var layout2 = FontDefault.GetTextLayout(s.ToString( (s < 1)? "F1" : "F0") );
    									FontDefault.DrawText(layout2, _CurrentX + ((_SizeIconWidth - (float)Math.Ceiling(layout2.Metrics.Width))/2.0f), _CurrentY + ((_SizeIconHeight - (float)Math.Ceiling(layout2.Metrics.Height))/2.0f));
    								}
    								_CurrentX += _SizeIconWidth;
    							}
    							BrushCoeBackground.DrawRectangle(_CurrentX, _CurrentY - CoEBarheight, - _SizeIconWidth * j , CoEBarheight);
    							BrushDefault.DrawRectangle(_CurrentX, _CurrentY - CoEBarheight, (float) ( (_SizeIconWidth * ( (j - _WDBonusElements.IndexOf(ActiveElement)) * 4 - BuffCoE.TimeElapsedSeconds[ActiveElement] )) / -4) , CoEBarheight);
    							_CurrentX =  Hud.Window.Size.Width * OffsetX; _CurrentY = _CurrentY + _SizeIconHeight;
    						}
    					}
    				}
    				_CurrentY = _CurrentY + _SizeIconHeight / 2;
    			}
    		}
    	}
    }
    Last edited by SoThOr; 03-12-2020 at 01:41 AM. Reason: fixed some null instance issues

  11. Thanks afrojax, Jembo (2 members gave Thanks to SoThOr for this useful post)
  12. #24
    RNN's Avatar Legendary
    Reputation
    811
    Join Date
    Sep 2018
    Posts
    1,051
    Thanks G/R
    103/774
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by SoThOr View Post
    I'm not sure if this is appropriate to post here or if I should start my own thread. But I made a few of modifications to this plugin (and a bunch of refactoring, mostly to improve code readability for myself).
    ..
    I did this for myself really but thought I should share it. Maybe RNN will decide to include some of the features.
    Thanks for sharing. Any modification to bring something new or simply improve it is welcome by all. I don't care at all if you post it in this thread
    Then I look at it with more time, just a comment:
    I liked the modification for the coe, but maybe under line 346 :
    Code:
    BrushDefault = BrushCoeNoPrimaryElement;	FontDefault = FontCoeNoBestElement;
    you should add
    Code:
    Hud.Texture.BuffFrameTexture.Draw(_CurrentX, _CurrentY, _SizeIconWidth, _SizeIconHeight, Opacity);
    or
    Code:
    Hud.Texture.DebuffFrameTexture.Draw(_CurrentX, _CurrentY, _SizeIconWidth, _SizeIconHeight, Opacity);
    Equip the bracer and the necklace with the same damage bonus and different elements (valid for wd, for example physical and cold) and you will see what I mean.

  13. #25
    RNN's Avatar Legendary
    Reputation
    811
    Join Date
    Sep 2018
    Posts
    1,051
    Thanks G/R
    103/774
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Update
    Fix when there are more than 9 globes.
    +
    Edited #14 (added version experimental and fixed bug)

  14. Thanks rvj, BeeAntOS (2 members gave Thanks to RNN for this useful post)
  15. #26
    rvj's Avatar Member
    Reputation
    2
    Join Date
    Mar 2017
    Posts
    8
    Thanks G/R
    11/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi RNN, you can do SpiritBarrageAndCoe as SpiritBarrageIcon - image example - with 3 times.[V9.1] [INTERNATIONAL] [RNN] Spirit Barrage &amp;&amp; COE-spiritbarrage-png

    Thanks

  16. #27
    RNN's Avatar Legendary
    Reputation
    811
    Join Date
    Sep 2018
    Posts
    1,051
    Thanks G/R
    103/774
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by rvj View Post
    Hi RNN, you can do SpiritBarrageAndCoe as SpiritBarrageIcon - image example - with 3 times.[V9.1] [INTERNATIONAL] [RNN] Spirit Barrage &amp;&amp; COE-spiritbarrage-png
    Update1:
    Improved the adjustment of the text in the icons
    Added SBGrouped : You can choose between seeing 1 or 3 Timeleft for spirit barrage
    Added SBWarning (only for SBGrouped = false)



    Update2
    Added InactiveRedFrame : Inactive elements (coe) are shown as red (active yellow)
    Bug Counter Spirit Barrage, solved
    Last edited by RNN; 03-13-2020 at 07:50 AM.

  17. Thanks Alessendro, BeeAntOS, mois, rvj (4 members gave Thanks to RNN for this useful post)
  18. #28
    kleks's Avatar Member
    Reputation
    1
    Join Date
    Sep 2019
    Posts
    25
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    RNN\spiritbarrageandcoe.cs(204,11) : error CS0815: Cannot assign method group to an implicitly-typed variable

  19. #29
    RNN's Avatar Legendary
    Reputation
    811
    Join Date
    Sep 2018
    Posts
    1,051
    Thanks G/R
    103/774
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kleks View Post
    RNN\spiritbarrageandcoe.cs(204,11) : error CS0815: Cannot assign method group to an implicitly-typed variable
    Download the file again

  20. #30
    FoxPox's Avatar Member
    Reputation
    12
    Join Date
    Jun 2018
    Posts
    83
    Thanks G/R
    19/11
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by RNN View Post
    plugins\RNN\OtherCoeBar.cs


    plugins\RNN\OtherCoeBar2.cs

    how to render only on a particular class?

Page 2 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. [V9.0] [INTERNATIONAL] [RNN] Icount
    By RNN in forum TurboHUD Community Plugins
    Replies: 21
    Last Post: 1 Week Ago, 04:48 AM
  2. [V9.0] [INTERNATIONAL] [RNN] OtherShrinePlugin
    By RNN in forum TurboHUD Community Plugins
    Replies: 137
    Last Post: 3 Weeks Ago, 04:25 PM
  3. [V9.0] [INTERNATIONAL] [RNN] BLueLines
    By RNN in forum TurboHUD Community Plugins
    Replies: 28
    Last Post: 03-20-2022, 07:48 PM
  4. [V9.0] [INTERNATIONAL] [RNN] TimersBarGR
    By RNN in forum TurboHUD Community Plugins
    Replies: 37
    Last Post: 04-09-2021, 09:20 AM
  5. [V9.0] [INTERNATIONAL] [RNN] LogChat
    By RNN in forum TurboHUD Community Plugins
    Replies: 19
    Last Post: 01-08-2021, 09:14 AM
All times are GMT -5. The time now is 03:07 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search