// Token: 0x060002D0 RID: 720 RVA: 0x0001A898 File Offset: 0x00018A98 public override void AddDrawableAbility(List <IDrawableAbility> drawableAbilities, ParticleEffect particle, Team allyTeam, INotificator notificator) { Vector3 position = particle.GetControlPoint(base.ControlPoint); if (EntityManager9.Heroes.Any((Hero9 x) => x.IsUnit && x.Team == allyTeam && x.IsAlive && x.Distance(position) < 800f)) { return; } SimpleDrawableAbility drawableAbility = new SimpleDrawableAbility { AbilityTexture = base.AbilityId + "_rounded", ShowUntil = Game.RawGameTime + base.TimeToShow, Position = (base.RawParticlePosition ? particle.Position : particle.GetControlPoint(base.ControlPoint)).SetZ(new float?((float)350)) }; if (base.Replace) { IDrawableAbility drawableAbility2 = drawableAbilities.LastOrDefault((IDrawableAbility x) => x.AbilityTexture == drawableAbility.AbilityTexture && x.HeroTexture == drawableAbility.HeroTexture); if (drawableAbility2 != null) { drawableAbilities.Remove(drawableAbility2); } } drawableAbilities.Add(drawableAbility); if (base.ShowNotification && notificator != null) { notificator.PushNotification(new AbilityNotification(null, base.AbilityId.ToString())); } }
// Token: 0x06000287 RID: 647 RVA: 0x00015764 File Offset: 0x00013964 public virtual void AddDrawableAbility(List <IDrawableAbility> drawableAbilities, Ability9 ability, Unit unit, INotificator notificator) { if (this.IgnoreUnitAbility) { return; } Unit9 owner = ability.Owner; if (owner.IsVisible) { return; } string name = owner.Name; DrawableAbility item = new DrawableAbility { AbilityTexture = ability.Name + "_rounded", HeroTexture = name + "_rounded", MinimapHeroTexture = name + "_icon", Position = unit.Position, ShowUntil = Game.RawGameTime + this.TimeToShow }; drawableAbilities.Add(item); if (this.ShowNotification && notificator != null) { notificator.PushNotification(new AbilityNotification(name, ability.Name)); } }
// Token: 0x06000286 RID: 646 RVA: 0x0001562C File Offset: 0x0001382C public virtual void AddDrawableAbility(List <IDrawableAbility> drawableAbilities, Unit unit, INotificator notificator) { Entity owner = unit.Owner; if (owner == null) { return; } string name = owner.Name; Vector3 position = unit.Position; DrawableUnitAbility drawableUnitAbility = new DrawableUnitAbility { AbilityTexture = this.AbilityId + "_rounded", HeroTexture = name + "_rounded", MinimapHeroTexture = name + "_icon", Position = position.SetZ(new float?(Math.Min(position.Z, 350f))), Unit = unit, IsShowingRange = this.ShowRange, RangeColor = this.RangeColor, Range = this.Range, Duration = this.Duration, ShowUntil = Game.RawGameTime + this.Duration, ShowHeroUntil = Game.RawGameTime + this.TimeToShow, ShowTimer = this.ShowTimer, Owner = owner }; drawableUnitAbility.DrawRange(); drawableAbilities.Add(drawableUnitAbility); if (this.ShowNotification && notificator != null) { notificator.PushNotification(new AbilityNotification(name, this.AbilityId.ToString())); } }
// Token: 0x060002F8 RID: 760 RVA: 0x0001B2C0 File Offset: 0x000194C0 public override void AddDrawableAbility(List <IDrawableAbility> drawableAbilities, ParticleEffect particle, Team allyTeam, INotificator notificator) { Vector3 position = base.RawParticlePosition ? particle.Position : particle.GetControlPoint(base.ControlPoint); if (position.IsZero) { Logger.Error("ParticleZero", particle.Name); return; } Ability9 ability = (from x in EntityManager9.Abilities where x.Id == this.AbilityId && x.Owner.CanUseAbilities orderby x.Owner.Position.Distance2D(position, false) select x).FirstOrDefault <Ability9>(); Unit9 unit = (ability != null) ? ability.Owner : null; if (unit == null || unit.IsVisible || unit.Team == allyTeam) { return; } string name = unit.Name; DrawableAbility drawableAbility = new DrawableAbility { AbilityTexture = base.AbilityId + "_rounded", HeroTexture = name + "_rounded", MinimapHeroTexture = name + "_icon", ShowUntil = Game.RawGameTime + base.TimeToShow, Position = position.SetZ(new float?((float)350)) }; if (base.Replace) { IDrawableAbility drawableAbility2 = drawableAbilities.LastOrDefault((IDrawableAbility x) => x.AbilityTexture == drawableAbility.AbilityTexture && x.HeroTexture == drawableAbility.HeroTexture); if (drawableAbility2 != null) { drawableAbilities.Remove(drawableAbility2); } } drawableAbilities.Add(drawableAbility); if (base.ShowNotification && notificator != null) { notificator.PushNotification(new AbilityNotification(name, base.AbilityId.ToString())); } }
public virtual void AddDrawableAbility(List <IDrawableAbility> drawableAbilities, Unit unit, INotificator notificator) { var owner = unit.Owner; if (owner == null) { return; } var ownerName = owner.Name; var position = unit.Position; var drawableAbility = new DrawableUnitAbility { AbilityTexture = this.AbilityId + "_rounded", HeroTexture = ownerName + "_rounded", MinimapHeroTexture = ownerName + "_icon", Position = position.SetZ(Math.Min(position.Z, 350)), Unit = unit, IsShowingRange = this.ShowRange, RangeColor = this.RangeColor, Range = this.Range, Duration = this.Duration, ShowUntil = Game.RawGameTime + this.Duration, ShowHeroUntil = Game.RawGameTime + this.TimeToShow, ShowTimer = this.ShowTimer, Owner = owner, }; if (this.AbilityId != AbilityId.zuus_cloud) { EntityManager9.GetUnit(unit.Handle)?.ChangeBasePosition(drawableAbility.Position); } drawableAbility.DrawRange(); drawableAbilities.Add(drawableAbility); if (this.ShowNotification) { notificator?.PushNotification(new AbilityNotification(ownerName, this.AbilityId.ToString())); } }
public virtual void AddDrawableAbility( List <IDrawableAbility> drawableAbilities, Ability9 ability, Unit unit, INotificator notificator) { if (this.IgnoreUnitAbility) { return; } var owner = ability.Owner; if (owner.IsVisible) { return; } var ownerName = owner.Name; var drawableAbility = new DrawableAbility { AbilityTexture = ability.Name + "_rounded", HeroTexture = ownerName + "_rounded", MinimapHeroTexture = ownerName + "_icon", Position = unit.Position, ShowUntil = Game.RawGameTime + this.TimeToShow, }; if (ability.Id != AbilityId.zuus_cloud) { owner.ChangeBasePosition(drawableAbility.Position); } drawableAbilities.Add(drawableAbility); if (this.ShowNotification) { notificator?.PushNotification(new AbilityNotification(ownerName, ability.Name)); } }
public override void AddDrawableAbility( List <IDrawableAbility> drawableAbilities, Particle particle, Team allyTeam, INotificator notificator) { var position = particle.GetControlPoint(this.ControlPoint); if (EntityManager9.Heroes.Any(x => x.IsUnit && x.Team == allyTeam && x.IsAlive && x.Distance(position) < 800)) { return; } var drawableAbility = new SimpleDrawableAbility { AbilityTexture = this.AbilityId.ToString(), ShowUntil = GameManager.RawGameTime + this.TimeToShow, Position = (this.RawParticlePosition ? particle.Position : particle.GetControlPoint(this.ControlPoint)).SetZ(350) }; if (this.Replace) { var exist = drawableAbilities.LastOrDefault( x => x.AbilityTexture == drawableAbility.AbilityTexture && x.HeroTexture == drawableAbility.HeroTexture); if (exist != null) { drawableAbilities.Remove(exist); } } drawableAbilities.Add(drawableAbility); if (this.ShowNotification) { notificator?.PushNotification(new AbilityNotification(null, this.AbilityId.ToString())); } }
public virtual void AddDrawableAbility( List <IDrawableAbility> drawableAbilities, ParticleEffect particle, Team allyTeam, INotificator notificator) { var owner = this.SearchOwner || !(particle.Owner is Unit) ? EntityManager9.Abilities.FirstOrDefault( x => x.Id == this.AbilityId && x.Owner.Team != allyTeam && x.Owner.CanUseAbilities) ?.Owner : EntityManager9.GetUnit(particle.Owner.Handle); if (owner?.IsVisible != false) { return; } string ownerName; if (owner.IsHero) { if (owner.Name == nameof(HeroId.npc_dota_hero_rubick) && (this.AbilityId != AbilityId.rubick_fade_bolt || this.AbilityId != AbilityId.rubick_telekinesis)) { return; } ownerName = owner.Name; } else { ownerName = owner.Owner?.Name; if (ownerName == null) { return; } } var position = this.RawParticlePosition ? particle.Position : particle.GetControlPoint(this.ControlPoint); if (position.IsZero || (owner.IsHero && owner.Distance(position) < 50)) { return; } var drawableAbility = new DrawableAbility { AbilityTexture = this.AbilityId + "_rounded", HeroTexture = ownerName + "_rounded", MinimapHeroTexture = ownerName + "_icon", ShowUntil = Game.RawGameTime + this.TimeToShow, Position = position.SetZ(350) }; owner.ChangeBasePosition(drawableAbility.Position); if (this.Replace) { var exist = drawableAbilities.LastOrDefault( x => x.AbilityTexture == drawableAbility.AbilityTexture && x.HeroTexture == drawableAbility.HeroTexture); if (exist != null) { drawableAbilities.Remove(exist); } } drawableAbilities.Add(drawableAbility); if (this.ShowNotification) { notificator?.PushNotification(new AbilityNotification(ownerName, this.AbilityId.ToString())); } }
public override void AddDrawableAbility( List <IDrawableAbility> drawableAbilities, ParticleEffect particle, Team allyTeam, INotificator notificator) { var position = this.RawParticlePosition ? particle.Position : particle.GetControlPoint(this.ControlPoint); if (position.IsZero) { Logger.Error("ParticleZero", particle.Name); return; } var owners = EntityManager9.Abilities.Where(x => x.Id == this.AbilityId) .Select(x => x.Owner) .Where(x => x.CanUseAbilities && x.IsAlive) .ToList(); if (owners.Any(x => x.IsVisible && x.Distance(position) <= this.RangeCheck)) { return; } var owner = owners.Find(x => x.Team != allyTeam && !x.IsVisible); if (owner == null) { return; } var ownerName = owner.Name; var drawableAbility = new DrawableAbility { AbilityTexture = this.AbilityId + "_rounded", HeroTexture = ownerName + "_rounded", MinimapHeroTexture = ownerName + "_icon", ShowUntil = Game.RawGameTime + this.TimeToShow, Position = position.SetZ(350) }; owner.ChangeBasePosition(drawableAbility.Position); if (this.Replace) { var exist = drawableAbilities.LastOrDefault( x => x.AbilityTexture == drawableAbility.AbilityTexture && x.HeroTexture == drawableAbility.HeroTexture); if (exist != null) { drawableAbilities.Remove(exist); } } drawableAbilities.Add(drawableAbility); if (this.ShowNotification) { notificator?.PushNotification(new AbilityNotification(ownerName, this.AbilityId.ToString())); } }
// Token: 0x06000288 RID: 648 RVA: 0x00015814 File Offset: 0x00013A14 public virtual void AddDrawableAbility(List <IDrawableAbility> drawableAbilities, ParticleEffect particle, Team allyTeam, INotificator notificator) { Unit9 unit; if (!this.SearchOwner && particle.Owner is Unit) { unit = EntityManager9.GetUnit(particle.Owner.Handle); } else { Ability9 ability = EntityManager9.Abilities.FirstOrDefault((Ability9 x) => x.Id == this.AbilityId && x.Owner.Team != allyTeam && x.Owner.CanUseAbilities); unit = ((ability != null) ? ability.Owner : null); } Unit9 unit2 = unit; if (unit2 == null || unit2.IsVisible) { return; } string text; if (unit2.IsHero) { text = unit2.Name; } else { Unit9 owner = unit2.Owner; text = ((owner != null) ? owner.Name : null); if (text == null) { return; } } Vector3 v = this.RawParticlePosition ? particle.Position : particle.GetControlPoint(this.ControlPoint); if (v.IsZero) { Logger.Error("ParticleZero", particle.Name); return; } DrawableAbility drawableAbility = new DrawableAbility { AbilityTexture = this.AbilityId + "_rounded", HeroTexture = text + "_rounded", MinimapHeroTexture = text + "_icon", ShowUntil = Game.RawGameTime + this.TimeToShow, Position = v.SetZ(new float?((float)350)) }; if (this.Replace) { IDrawableAbility drawableAbility2 = drawableAbilities.LastOrDefault((IDrawableAbility x) => x.AbilityTexture == drawableAbility.AbilityTexture && x.HeroTexture == drawableAbility.HeroTexture); if (drawableAbility2 != null) { drawableAbilities.Remove(drawableAbility2); } } drawableAbilities.Add(drawableAbility); if (this.ShowNotification && notificator != null) { notificator.PushNotification(new AbilityNotification(text, this.AbilityId.ToString())); } }