private void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (args.Name == "particles/units/heroes/hero_disruptor/disruptor_glimpse_targetend.vpcf") { this.glimpseParticle = args.ParticleEffect; } }
/// <summary> /// The sender is hero. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="args"> /// The args. /// </param> /// <param name="info"> /// The info. /// </param> public virtual void SenderIsHero(Entity sender, ParticleEffectAddedEventArgs args, ParticleEffectMoreInfo info) { // Console.WriteLine(this.Unit.Name + " SenderIsHero : " + info.StringContainingHeroName + " was detected " + sender.Name); var pos = args.ParticleEffect.GetControlPoint(0); this.PositionUpdated(pos); }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { var caster = particleArgs.Name.Contains("caster"); tempTime = Game.RawGameTime; DelayAction.Add( 1, () => { if (caster) { StartPosition = particleArgs.ParticleEffect.GetControlPoint(0); } else { StartCast = tempTime; EndPosition = StartPosition.Extend( particleArgs.ParticleEffect.GetControlPoint(1), GetCastRange()); EndCast = StartCast + GetCastRange() / GetProjectileSpeed(); Obstacle = Pathfinder.AddObstacle(StartPosition, EndPosition, GetRadius(), Obstacle); } }); }
private static void Entity_OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (args.Name.Contains("ui_")) { return; } /*if (args.Name.Contains("base")) * return;*/ if (sender.Name.Contains("port")) { return; } /*if (sender.Name.Contains("sven")) * Printer.PrintInfo($"{sender.Name}: {args.Name}");*/ /*if (args.Name.Contains("flame")) * { * return; * } * if (args.Name.Contains("head_fire")) * { * return; * }*/ if (!args.ParticleEffect.Position.IsZero) { Points.Add(args.ParticleEffect.Position); } Printer.Print($"{sender.Name}: {args.Name}"); //effect322 = new ParticleEffect("particles/units/heroes/hero_spirit_breaker/spirit_breaker_charge_target.vpcf", v, ParticleAttachment.OverheadFollow); //effect322[num++] = new ParticleEffect("particles/units/heroes/hero_spirit_breaker/spirit_breaker_charge_target.vpcf",args.ParticleEffect.Position); }
// Token: 0x060005F1 RID: 1521 RVA: 0x0001DD44 File Offset: 0x0001BF44 private void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { try { ParticleEffect particle = args.ParticleEffect; Entity owner = particle.Owner; EntityHandle? entityHandle = (owner != null) ? new EntityHandle?(owner.Handle) : null; if (!(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) != this.playerHandle)) { string name = args.Name; if (!(name == "particles/units/heroes/hero_kunkka/kunkka_spell_x_spot.vpcf") && !(name == "particles/econ/items/kunkka/divine_anchor/hero_kunkka_dafx_skills/kunkka_spell_x_spot_fxset.vpcf")) { if (name == "particles/units/heroes/hero_kunkka/kunkka_ghostship_marker.vpcf") { float time = Game.RawGameTime - Game.Ping / 2000f; UpdateManager.BeginInvoke(delegate { this.ship.CalculateTimings(particle.GetControlPoint(0u), time); }, 0); } } else { UpdateManager.BeginInvoke(delegate { this.xMark.Position = particle.GetControlPoint(0u); }, 0); } } } catch (Exception ex) { Logger.Error(ex, null); } }
// Token: 0x06000640 RID: 1600 RVA: 0x0002132C File Offset: 0x0001F52C private void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { try { if (!(args.ParticleEffect.Name != "particles/items_fx/immunity_sphere.vpcf")) { SpellBlockTalent spellBlockTalent = this.linkensSphereTalent; if (spellBlockTalent != null && spellBlockTalent.IsValid && this.linkensSphereTalent.Level > 0u) { UpdateManager.BeginInvoke(delegate { try { if (this.IsValid && this.IsVisible && this.Distance(args.ParticleEffect.GetControlPoint(0u)) < 15f) { this.talentSleeper.Sleep(this.linkensSphereTalent.SpellBlockCooldown); } } catch (Exception exception2) { Logger.Error(exception2, null); } }, 0); } } } catch (Exception exception) { Logger.Error(exception, null); Entity.OnParticleEffectAdded -= this.OnParticleEffectAdded; } }
private async void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { Console.WriteLine($"pre {Thread.CurrentThread.ManagedThreadId}"); await Task.Delay(100); Console.WriteLine($"post {Thread.CurrentThread.ManagedThreadId}"); }
private void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { try { var particle = args.ParticleEffect; if (particle.Owner?.Handle != this.playerHandle) { return; } switch (args.Name) { case "particles/units/heroes/hero_kunkka/kunkka_spell_x_spot.vpcf": case "particles/econ/items/kunkka/divine_anchor/hero_kunkka_dafx_skills/kunkka_spell_x_spot_fxset.vpcf": { UpdateManager.BeginInvoke(() => this.xMark.Position = particle.GetControlPoint(0)); break; } case "particles/units/heroes/hero_kunkka/kunkka_ghostship_marker.vpcf": { var time = Game.RawGameTime - (Game.Ping / 2000); UpdateManager.BeginInvoke(() => this.ship.CalculateTimings(particle.GetControlPoint(0), time)); break; } } } catch (Exception e) { Logger.Error(e); } }
private async void EntityOnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { await Task.Delay(1); var particle = args.ParticleEffect; if (!this.IsValid(sender, particle, args.Name)) { return; } var item = new LogItem(LogType.Particle, Color.LightGreen, "Particle added"); item.AddLine("Name: " + args.Name, args.Name); item.AddLine("Highest control point: " + particle.HighestControlPoint, particle.HighestControlPoint); if (this.showCpValues) { for (var i = 0u; i <= args.ParticleEffect.HighestControlPoint; i++) { var point = args.ParticleEffect.GetControlPoint(i); if (this.ignoreZeroCp && point.IsZero) { continue; } item.AddLine("CP " + i + ": " + point, point); } } this.log.Display(item); }
private void OnLastHit(Entity sender, ParticleEffectAddedEventArgs args) { if ((sender == this.Player) && (args.Name == "particles/msg_fx/msg_gold.vpcf")) { this.LastHitTime = Game.GameTime; } }
private void OnParticleEvent(Entity sender, ParticleEffectAddedEventArgs args) { if (args.ParticleEffect.Owner == null || !args.ParticleEffect.IsValid || args.ParticleEffect.Owner.IsVisible) { return; } if (!sender.Name.Contains("npc_dota_neutral_") || args.Name.Contains("generic_creep_sleep")) { return; } UpdateManager.BeginInvoke( () => { var rawGameTime = Game.RawGameTime; Pos.RemoveAll(x => x.GetPos.Distance(args.ParticleEffect.GetControlPoint(0)) < 500); Pos.Add(new Position(args.ParticleEffect.GetControlPoint(0))); UpdateManager.BeginInvoke( () => { Pos.RemoveAll(x => x.GetGameTime == rawGameTime); }, Config.TimerItem.Value * 1000); }, 20); }
private void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { switch (args.Name) { case "particles/items2_fx/teleport_start.vpcf": case "particles/econ/items/tinker/boots_of_travel/teleport_start_bots.vpcf": case "particles/econ/events/ti10/teleport/teleport_start_ti10.vpcf": case "particles/econ/events/ti10/teleport/teleport_start_ti10_lvl2.vpcf": case "particles/econ/events/ti10/teleport/teleport_start_ti10_lvl3.vpcf": UpdateManager.BeginInvoke(() => this.CheckTeleport(args.ParticleEffect, true), 100); break; case "particles/items2_fx/teleport_end.vpcf": case "particles/econ/items/tinker/boots_of_travel/teleport_end_bots.vpcf": case "particles/econ/events/ti10/teleport/teleport_end_ti10.vpcf": case "particles/econ/events/ti10/teleport/teleport_end_ti10_lvl2.vpcf": case "particles/econ/events/ti10/teleport/teleport_end_ti10_lvl3.vpcf": UpdateManager.BeginInvoke(() => this.CheckTeleport(args.ParticleEffect, false)); break; //default: //{ // var name = args.ParticleEffect.Name; // if ((name.Contains("teleport_start") || name.Contains("teleport_end")) && !name.Contains("furion")) // { // Logger.Error("TP Particle", name); // } // break; //} } }
// Token: 0x06000234 RID: 564 RVA: 0x00011C48 File Offset: 0x0000FE48 private void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { try { AbilityFullData data; if (this.abilityData.Particles.TryGetValue(args.Name, out data)) { UpdateManager.BeginInvoke(delegate { try { ParticleEffect particleEffect = args.ParticleEffect; if (particleEffect.IsValid) { data.AddDrawableAbility(this.drawableAbilities, particleEffect, this.allyTeam, this.notificationsEnabled ? this.notificator : null); } } catch (Exception exception2) { Logger.Error(exception2, null); } }, 0); } } catch (Exception exception) { Logger.Error(exception, null); } }
public void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (args.Name.Contains("x_spot")) { DelayAction.Add(10, () => xMark.Position = args.ParticleEffect.Position); } }
public void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (args.Name == "particles/units/heroes/hero_kunkka/kunkka_spell_x_spot.vpcf") { xMark.ParticleEffect = args.ParticleEffect; } }
public void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (!Menu.Hotkeys.EnabledEvader) { return; } var particleName = args.Name; if (Menu.Debug.LogParticles) { if (particleName.Contains("ui_mouseactions") || particleName.Contains("generic_hit_blood") || particleName.Contains("base_attacks") || particleName.Contains("generic_gameplay") || particleName.Contains("ensage_ui")) { return; } Debugger.WriteLine("====", Debugger.Type.Particles); Debugger.WriteLine("particle: " + particleName, Debugger.Type.Particles); } var abilityName = AdditionalAbilityData.Particles.FirstOrDefault(x => particleName.Contains(x.Key)).Value; if (string.IsNullOrEmpty(abilityName)) { return; } var ability = abilityUpdater.EvadableAbilities.FirstOrDefault(x => x.Name == abilityName && x.Enabled) as IParticle; ability?.AddParticle(args.ParticleEffect); }
private void OnParticleAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (!args.Name.Contains("/teleport_start") && !args.Name.Contains("sandking_epicenter_tell")) { return; } if (Particle) { return; } UpdateManager.BeginInvoke( () => { Position = args.ParticleEffect.GetControlPoint(0); var ignore = EntityManager <Hero> .Entities.Any(x => x.IsValid && x.IsAlly(Owner) && x.Distance2D(Position) < 100); if (!ignore) { Particle = true; ParticleName = args.Name; UpdateManager.BeginInvoke(() => { Particle = false; }, 3000); } }, 20); }
private void OnParticleEvent(Entity sender, ParticleEffectAddedEventArgs args) { if (Bool(args.ParticleEffect)) { return; } if (sender.Name.Contains("npc_dota_neutral_")) { UpdateManager.BeginInvoke( () => { var RawGameTime = Game.RawGameTime; Pos.RemoveAll( x => x.GetPos.Distance(args.ParticleEffect.GetControlPoint(0)) < 500); Pos.Add(new Position(args.ParticleEffect.GetControlPoint(0))); UpdateManager.BeginInvoke( () => { Pos.RemoveAll( x => x.GetGameTime == RawGameTime); }, Config.TimerItem.Value * 1000); }, 20); } }
private void OnNewParticle(Entity sender, ParticleEffectAddedEventArgs args) { var name = args.Name; if (name.Contains("particles/units/heroes/hero_invoker/invoker_emp.vpcf")) { DelayAction.Add(10, async() => { var effect = args.ParticleEffect; var a = effect.GetControlPoint(0); var rangeEffect = new ParticleEffect("materials/ensage_ui/particles/range_display_mod.vpcf", a); var range = 675; rangeEffect.SetControlPoint(1, new Vector3(range, 255, 0)); rangeEffect.SetControlPoint(2, new Vector3(139, 0, 255)); //EmpRanger.Add(effect, rangeEffect); await Task.Delay(2900); rangeEffect.Dispose(); }); } if (name == "particles/units/heroes/hero_ancient_apparition/ancient_apparition_cold_feet.vpcf") { DelayAction.Add(10, async() => { var effect = args.ParticleEffect; var a = effect.GetControlPoint(0); var rangeEffect = new ParticleEffect("materials/ensage_ui/particles/range_display_mod.vpcf", a); var range = 740; rangeEffect.SetControlPoint(1, new Vector3(range, 255, 0)); rangeEffect.SetControlPoint(2, new Vector3(0, 155, 255)); await Task.Delay(4000); rangeEffect.Dispose(); }); } }
/// <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) { if (this.Skill.Json.ParticleNames.Any(particleName => args.Name.EndsWith(particleName))) { this.Skill.AbilityParticle.ParticleAdded(args.ParticleEffect); } }
private void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { try { var particleName = args.Name; if (!this.addedParticles.TryGetValue(particleName, out var abilityId)) { return; } if (!(this.evadableAbilities.Find(x => x.Ability.Id == abilityId) is IParticle ability)) { return; } var allyAbility = EntityManager9.Heroes.Any( x => x.IsAlly(this.owner.Team) && (x.Id == HeroId.npc_dota_hero_rubick || x.Id == HeroId.npc_dota_hero_morphling) && x.IsAlive && x.Abilities.Any(z => z.Id == abilityId && z.TimeSinceCasted < 0.5f)); if (allyAbility) { return; } ability.AddParticle(args.ParticleEffect, particleName); } catch (Exception e) { Logger.Error(e); } }
private async void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { Log.Warn("Particle added: " + args.Name); await Task.Delay(1000); Log.Warn("Task completed"); }
/// <summary> /// The entity_ on particle effect added. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="args"> /// The args. /// </param> private void Entity_OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (args.Name.StartsWith(@"particles/ui_mouseactions") || args.Name.StartsWith(@"particles/base_attacks") || args.Name.StartsWith(@"materials/ensage_ui") || args.Name.StartsWith(@"particles/generic_gameplay") || args.Name.StartsWith(@"particles/siege_fx")) { return; } var isHeroParticle = args.Name.Contains("units/heroes"); var info = new ParticleEffectMoreInfo( sender is Hero, isHeroParticle, isHeroParticle ? args.Name.Substring("particles/units/heroes".Length) : null, args.ParticleEffect.GetControlPoint(0) == Vector3.Zero); DelayAction.Add( -1, () => { // Console.WriteLine( // args.Name + " " + args.ParticleEffect.GetControlPoint(2) + " " // + args.ParticleEffect.GetControlPoint(3) + " " + args.ParticleEffect.GetControlPoint(4) // + " " + args.ParticleEffect.Owner?.Name); if (args.Name == "particles/items_fx/blink_dagger_start.vpcf") { this.lastBlinkPosition = args.ParticleEffect.GetControlPoint(0); return; } else if (args.Name == "particles/items_fx/blink_dagger_end.vpcf") { if (args.ParticleEffect.Owner.IsVisible) { return; } var unit = this.AbilityUnitManager.Value.Enemies.FirstOrDefault( x => x.Key.Equals(args.ParticleEffect.Owner.Handle)); // unit.Value?.PositionTracker.PositionUpdated(this.lastBlinkPosition); return; } if (info.PositionIsKnown) { foreach (var keyValuePair in this.AbilityUnitManager.Value.Units) { keyValuePair.Value.DataReceiver.Entity_OnParticleEffectAdded(sender, args, info); } } // foreach (var particleSkill in this.particleSkills) // { // particleSkill.Value.DataReceiver.Entity_OnParticleEffectAdded(sender, args); // } }); }
private static void ParticleDetector(Entity entity, ParticleEffectAddedEventArgs effect) { //Game.PrintMessage(effect.Name, MessageType.ChatMessage); if (effect.Name.Contains("smoke_of_deceit")) { if (teaminformer.Item("tell").GetValue <bool>()) { if (teaminformer.Item("humanizer").GetValue <bool>()) { humanizer("Smoke", ""); } else { Game.ExecuteCommand("say_team Smoke Detected"); } } if (teaminformer.Item("print").GetValue <bool>()) { Game.PrintMessage("Smoke Detected"); } } else if (effect.Name.Contains("mirana_moonlight_cast") && effect.ParticleEffect.Owner.Team != ObjectManager.LocalHero.Team) { if (teaminformer.Item("tell").GetValue <bool>()) { if (teaminformer.Item("humanizer").GetValue <bool>()) { humanizer("Moonlight", ""); } else { Game.ExecuteCommand("say_team Moonlight Detected"); } } if (teaminformer.Item("print").GetValue <bool>()) { Game.PrintMessage("Moonlight Detected"); } } else if (effect.Name.Contains("sandking_epicenter_tell") && effect.ParticleEffect.Owner.Team != ObjectManager.LocalHero.Team) { if (teaminformer.Item("tell").GetValue <bool>()) { if (teaminformer.Item("humanizer").GetValue <bool>()) { humanizer("Epicenter", ""); } else { Game.ExecuteCommand("say_team Epicenter Detected"); } } if (teaminformer.Item("print").GetValue <bool>()) { Game.PrintMessage("Epicenter Detected"); } } }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { if (Obstacle != null || !AbilityOwner.IsVisible) { return; } StartCast = Game.RawGameTime; particleAdded = true; }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { if (Obstacle != null || !AbilityOwner.IsVisible) { return; } StartCast = Game.RawGameTime; particleAdded = true; }
// Token: 0x060001D3 RID: 467 RVA: 0x0000F0E4 File Offset: 0x0000D2E4 private void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (args.Name != "particles/generic_gameplay/generic_hit_blood.vpcf") { return; } UpdateManager.BeginInvoke(delegate { this.CheckAttack(args.ParticleEffect); }, 0); }
// Token: 0x060001C2 RID: 450 RVA: 0x0000EC28 File Offset: 0x0000CE28 private void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (args.Name != "particles/generic_gameplay/rune_bounty_owner.vpcf") { return; } UpdateManager.BeginInvoke(delegate { this.CheckRune(args.ParticleEffect); }, 0); }
public void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (args.Name.Contains("x_spot")) { DelayAction.Add(10, () => xMark.Position = args.ParticleEffect.GetControlPoint(0)); } else if (args.Name.Contains("ghostship")) { DelayAction.Add(10, () => ghostShip.Position = args.ParticleEffect.GetControlPoint(0)); } }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { if (Obstacle != null || !AbilityOwner.IsVisible) { return; } StartCast = Game.RawGameTime; StartPosition = AbilityOwner.NetworkPosition; EndCast = StartCast + tavelTime; Obstacle = Pathfinder.AddObstacle(StartPosition, GetRadius(), Obstacle); }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { StartCast = Game.RawGameTime; DelayAction.Add( 1, () => { StartPosition = particleArgs.ParticleEffect.GetControlPoint(0); EndCast = StartCast + AdditionalDelay; Obstacle = Pathfinder.AddObstacle(StartPosition, GetRadius(), Obstacle); }); }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { if (Obstacle != null || !AbilityOwner.IsVisible) { return; } StartCast = Game.RawGameTime; StartPosition = AbilityOwner.NetworkPosition; EndCast = StartCast + tavelTime; Obstacle = Pathfinder.AddObstacle(StartPosition, GetRadius(), Obstacle); }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { if (particleArgs.Name.Contains("channel")) { StartCast = Game.RawGameTime; DelayAction.Add(1, () => initialPosition = particleArgs.ParticleEffect.GetControlPoint(0).SetZ(350)); } else { EndCast = Game.RawGameTime + StartPosition.Distance2D(initialPosition) / speed; } }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { if (particleArgs.Name.Contains("final")) { flies = true; } else { flies = false; End(); } }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { StartCast = Game.RawGameTime; DelayAction.Add( 1, () => { StartPosition = particleArgs.ParticleEffect.GetControlPoint(1); EndCast = StartCast + AdditionalDelay; Obstacle = Pathfinder.AddObstacle(StartPosition, GetRadius(), Obstacle); }); }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { if (Obstacle != null || !AbilityOwner.IsVisible) { return; } StartCast = Game.RawGameTime; StartPosition = AbilityOwner.NetworkPosition; EndPosition = AbilityOwner.InFront(GetCastRange()); EndCast = StartCast + GetCastRange() / GetProjectileSpeed(); Obstacle = Pathfinder.AddObstacle(StartPosition, EndPosition, GetRadius(), Obstacle); }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { StartCast = Game.RawGameTime; DelayAction.Add( 1, () => { startPosition = particleArgs.ParticleEffect.GetControlPoint(0); endPosition = particleArgs.ParticleEffect.GetControlPoint(1); heroPosition = startPosition; Obstacle = Pathfinder.AddObstacle(startPosition, 75, Obstacle, 350); EndCast = StartCast + GetRemainingTime(); }); }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { if (Obstacle != null || !AbilityOwner.IsVisible) { return; } StartCast = Game.RawGameTime; StartPosition = AbilityOwner.NetworkPosition; EndPosition = StartPosition + (Vector3)(VectorExtensions.FromPolarAngle(AbilityOwner.RotationRad) * GetCastRange()); EndCast = StartCast + GetCastRange() / GetProjectileSpeed(); Obstacle = Pathfinder.AddObstacle(StartPosition, EndPosition, GetRadius(), Obstacle); }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { StartCast = Game.RawGameTime; DelayAction.Add( 1, () => { var start = particleArgs.ParticleEffect.GetControlPoint(0); var end = particleArgs.ParticleEffect.GetControlPoint(1); var distance = start.Distance2D(end); StartPosition = start; EndPosition = start.Extend(end, distance); EndCast = StartCast + distance / GetProjectileSpeed(); Obstacle = Pathfinder.AddObstacle(StartPosition, EndPosition, GetRadius(), Obstacle); }); }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { StartCast = Game.RawGameTime; DelayAction.Add( 1, () => { StartPosition = particleArgs.ParticleEffect.GetControlPoint(0); EndPosition = StartPosition.Extend( StartPosition + particleArgs.ParticleEffect.GetControlPoint(1), GetCastRange()); EndCast = StartCast + StartPosition.Distance2D(EndPosition) / GetProjectileSpeed(); Obstacle = Pathfinder.AddObstacle(StartPosition, EndPosition, GetRadius(), Obstacle); }); }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { StartCast = Game.RawGameTime + AdditionalDelay; DelayAction.Add( 1, () => { var cp0 = particleArgs.ParticleEffect.GetControlPoint(0).SetZ(350); var cp1 = particleArgs.ParticleEffect.GetControlPoint(1).SetZ(350); StartPosition = cp1.Extend(cp0, GetRadius() / 2); EndPosition = cp0.Extend(StartPosition, GetCastRange() + cp0.Distance2D(cp1)); EndCast = StartCast + AdditionalDelay + GetCastRange() / GetProjectileSpeed() - 0.5f; Obstacle = Pathfinder.AddObstacle(StartPosition, EndPosition, GetRadius(), Obstacle); }); }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { if (particleArgs.Name.Contains("illumination")) { return; } StartCast = Game.RawGameTime; DelayAction.Add( 1, () => { StartPosition = particleArgs.ParticleEffect.GetControlPoint(1); initialPosition = particleArgs.ParticleEffect.GetControlPoint(0); EndCast = StartCast + StartPosition.Distance2D(initialPosition) / projectileSpeed; Obstacle = Pathfinder.AddObstacle(StartPosition, GetRadius(), Obstacle); }); }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { if (particleArgs.Name.Contains("charge")) { DelayAction.Add(1, () => StartPosition = particleArgs.ParticleEffect.GetControlPoint(0).SetZ(350)); } else { StartCast = Game.RawGameTime; EndCast = StartCast + GetCastRange() / GetProjectileSpeed(); DelayAction.Add( 1, () => { var position = particleArgs.ParticleEffect.GetControlPoint(0).SetZ(350); StartPosition = StartPosition.Extend(position, 150); EndPosition = position.Extend(StartPosition, GetCastRange()); Obstacle = Pathfinder.AddObstacle(StartPosition, EndPosition, GetRadius(), Obstacle); }); } }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { if (particleArgs.Name.Contains("caster")) { return; } StartCast = Game.RawGameTime; DelayAction.Add( 1, () => { StartPosition = particleArgs.ParticleEffect.GetControlPoint(0); var units = ObjectManager.GetEntities<Unit>() .Count( x => x.IsValid && !(x is Building) && x.IsAlive && x.Team == HeroTeam && x.IsSpawned && x.Distance2D(StartPosition) < GetRadius()); EndCast = StartCast + units * jumpTime; Obstacle = Pathfinder.AddObstacle(StartPosition, GetRadius(), Obstacle); }); }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { var caster = particleArgs.Name.Contains("caster"); tempTime = Game.RawGameTime; DelayAction.Add( 1, () => { if (caster) { StartPosition = particleArgs.ParticleEffect.GetControlPoint(0); } else { StartCast = tempTime; EndPosition = StartPosition.Extend( particleArgs.ParticleEffect.GetControlPoint(1), GetCastRange()); EndCast = StartCast + GetCastRange() / GetProjectileSpeed(); Obstacle = Pathfinder.AddObstacle(StartPosition, EndPosition, GetRadius(), Obstacle); } }); }
private static void Entity_OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (args.Name.Contains("ui_")) return; /*if (args.Name.Contains("base")) return;*/ if (sender.Name.Contains("port")) return; /*if (sender.Name.Contains("sven")) Printer.PrintInfo($"{sender.Name}: {args.Name}");*/ /*if (args.Name.Contains("flame")) { return; } if (args.Name.Contains("head_fire")) { return; }*/ if (!args.ParticleEffect.Position.IsZero) Points.Add(args.ParticleEffect.Position); Printer.Print($"{sender.Name}: {args.Name}"); //effect322 = new ParticleEffect("particles/units/heroes/hero_spirit_breaker/spirit_breaker_charge_target.vpcf", v, ParticleAttachment.OverheadFollow); //effect322[num++] = new ParticleEffect("particles/units/heroes/hero_spirit_breaker/spirit_breaker_charge_target.vpcf",args.ParticleEffect.Position); }
private static async void ParticleDetector (Entity entity, ParticleEffectAddedEventArgs effect) { if (effect.Name.Contains("smoke_of_deceit")) { if (teaminformer.Item("tell").GetValue<bool>()) { Game.ExecuteCommand("say_team Smoke Detected"); } if (teaminformer.Item("print").GetValue<bool>()) { Game.PrintMessage("Smoke Detected", MessageType.ChatMessage); } } else if (effect.Name.Contains("mirana_moonlight_cast")) { if (teaminformer.Item("tell").GetValue<bool>()) { Game.ExecuteCommand("say_team Moonlight Detected"); } if (teaminformer.Item("print").GetValue<bool>()) { Game.PrintMessage("Moonlight Detected", MessageType.ChatMessage); } } else if (effect.Name.Contains("sandking_epicenter_tell")) { if (teaminformer.Item("tell").GetValue<bool>()) { Game.ExecuteCommand("say_team Epicenter Detected"); } if (teaminformer.Item("print").GetValue<bool>()) { Game.PrintMessage("Epicenter Detected", MessageType.ChatMessage); } } }
private void Entity_OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { visionControl.OnParticleEffectAdded(sender, args); }
public void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (!Menu.Hotkeys.EnabledEvader) { return; } var particleName = args.Name; if (Menu.Debug.LogParticles) { if (particleName.Contains("ui_mouseactions") || particleName.Contains("generic_hit_blood") || particleName.Contains("base_attacks") || particleName.Contains("generic_gameplay") || particleName.Contains("ensage_ui")) { return; } DelayAction.Add( 1, () => { Debugger.WriteLine("====", Debugger.Type.Particles); Debugger.WriteLine("particle: " + particleName, Debugger.Type.Particles); for (var i = 0u; i <= args.ParticleEffect.HighestControlPoint; i++) { Debugger.WriteLine( i + " // " + args.ParticleEffect.GetControlPoint(i), Debugger.Type.Particles); } }); } var abilityName = AdditionalAbilityData.Particles.FirstOrDefault(x => particleName.Contains(x.Key)).Value; if (string.IsNullOrEmpty(abilityName)) { return; } var ability = abilityUpdater.EvadableAbilities.FirstOrDefault(x => x.Name == abilityName && x.Enabled) as IParticle; ability?.AddParticle(args); }
public void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (args.Name.Contains("x_spot")) { DelayAction.Add(10, () => xMark.Position = args.ParticleEffect.Position); } }
private static void EntityOnOnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (sender.ClassID!=ClassID.CDOTA_Wisp_Spirit) return; if (sender.Team!=Members.MyTeam) return; //Printer.Print($"{args.Name}/{args.ParticleEffect.Name}"); _trackList.Add(new Tracker(sender,args.ParticleEffect)); }
public static void Entity_OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (!Checker.IsActive()) return; if (!IsEnableTpCather) return; var name = args.Name; if (name.Contains("teleport_start") || name.Contains("teleport_end")) { DelayAction.Add(10, () => { var effect = args.ParticleEffect; var a = effect.GetControlPoint(0); var b = effect.GetControlPoint(2); Printer.Print($"{(name.Contains("start")?"start":"end")}=>A:{a.PrintVector()} B:{b.PrintVector()}"); TeleportCatcher.Add(effect, a, b); }); } }
public void AddParticle(ParticleEffectAddedEventArgs particleArgs) { particleEffect = particleArgs.ParticleEffect; }
private void Entity_OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { evader.OnParticleEffectAdded(sender, args); }