/// <summary> /// The particle is from hero. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="args"> /// The args. /// </param> /// <param name="info"> /// The info. /// </param> public virtual void ParticleIsFromHero( Entity sender, ParticleEffectAddedEventArgs args, ParticleEffectMoreInfo info) { // Console.WriteLine(this.Unit.Name + " ParticleIsFromHero : " + info.StringContainingHeroName + " was detected " + sender.Name); var pos = args.ParticleEffect.GetControlPoint(0); this.PositionUpdated(pos); }
public override void ParticleIsFromHero( Entity sender, ParticleEffectAddedEventArgs args, ParticleEffectMoreInfo info) { if (info.StringContainingHeroName.Contains("forged_spirit_projectile")) { return; } base.ParticleIsFromHero(sender, args, info); }
/// <summary> /// The entity_ on particle effect added. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="args"> /// The args. /// </param> public void Entity_OnParticleEffectAdded( Entity sender, ParticleEffectAddedEventArgs args, ParticleEffectMoreInfo info) { if (this.Unit.SourceUnit.IsVisible) { return; } if (info.SenderIsHero && !sender.IsVisible && sender.Handle.Equals(this.Unit.UnitHandle)) { this.Unit.PositionTracker.SenderIsHero(sender, args, info); return; } if (info.IsHeroParticle && info.StringContainingHeroName.Contains(this.Unit.Name.Substring("npc_dota_hero_".Length))) { this.Unit.PositionTracker.ParticleIsFromHero(sender, args, info); } }