private static void OnCreate(GameObject sender) { try { if (!sender.Name.Contains("Katarina_")) { return; } switch (sender.Name) { case "Katarina_Base_Q_Dagger_Land_Stone.troy": case "Katarina_Base_W_indicator_Ally.troy": case "Katarina_Base_E_Beam.troy": case "Katarina_Base_Dagger_Ground_Indicator.troy": Daggers.Add(new MyDaggerManager(sender, sender.ServerPosition, Game.TickCount)); break; case "Katarina_Base_Dagger_PickUp_Cas.troy": case "Katarina_Base_Dagger_PickUp_Tar.troy": Daggers.RemoveAll(x => x.obj.NetworkId == sender.NetworkId); break; } } catch (Exception ex) { Console.WriteLine("Error in MyEventManager.OnCreate." + ex); } }
private static void GameObject_OnCreate(GameObject sender, EventArgs args) { //if (sender.Name.ToLower().Contains("katarina")) //{ // Game.PrintChat(sender.Name); //} if (sender is MissileClient && (sender as MissileClient).SpellCaster.IsMe) { var missile = sender as MissileClient; //Game.PrintChat(missile.SData.Name); if (missile.SData.Name.ToLower().Contains("katarinarmis")) { RMis.Add(missile); LastRMis = Environment.TickCount + 168; } if (missile.SData.Name.ToLower().Contains("katarinawdaggerarc")) { WMis.Add(missile); } } if (sender.Name.ToLower().Contains("katarina_base_e_beam.troy")) { MyBeam.Add(sender); } if (sender.Name.ToLower().Contains("katarina_base_w_indicator")) { Daggers.Add(new KatarinaDagger { Dagger = sender, CreationTime = Environment.TickCount }); } }
private static void OnCreate(GameObject sender) { try { if (!sender.Name.Contains("Katarina_")) { return; } switch (sender.Name) { case "Katarina_Base_Q_Dagger_Land_Stone": case "Katarina_Base_Q_Dagger_Land_Water": case "Katarina_Base_Q_Dagger_Land_Grass": case "Katarina_Base_Q_Dagger_Land_Dirt": case "Katarina_Base_W_Indicator_Ally": case "Katarina_Base_E_Beam": case "Katarina_Base_Dagger_Ground_Indicator": Daggers.Add(new MyDaggerManager(sender, sender.Position, Variables.GameTimeTickCount)); break; case "Katarina_Base_Dagger_PickUp_Cas": case "Katarina_Base_Dagger_PickUp_Tar": var firstDagger = Daggers.OrderBy(x => x.Dagger.Position.Distance(sender.Position)) .FirstOrDefault(); Daggers.Remove(firstDagger); break; } } catch (Exception ex) { Console.WriteLine("Error in MyEventManager.OnCreate." + ex); } }
internal static void Init(GameObject sender, EventArgs Args) { if (!sender.Name.Contains("Katarina")) { return; } //Katarina_Base_Q_Darrger_Land_Dirt.troy //Katarina_Base_W_indicator_Ally.troy //Katarina_Base_E_Beam.troy //Katarina_Base_Dagger_PickUp_Cas.troy if (sender.Name.Contains("Katarina_Base_Q_Darrger_Land_Dirt")) { Daggers.Add(new Spells.DaggerManager { Dagger = sender, Position = sender.Position }); } if (sender.Name.Contains("Katarina_Base_W_indicator_Ally")) { Daggers.Add(new Spells.DaggerManager { Dagger = sender, Position = sender.Position }); } if (sender.Name.Contains("Katarina_Base_E_Beam")) { Daggers.Add(new Spells.DaggerManager { Dagger = sender, Position = sender.Position }); } if (sender.Name.Contains("Katarina_Base_Dagger_PickUp_Cas")) { Daggers.RemoveAll(x => x.Dagger.NetworkId == sender.NetworkId); } }