private void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (sender.IsAlly || !Enabled) { return; } HidObject ho = HidObjects.IsSpellHidObj(args.SData.Name); if (ho != null) { var endPosition = ObjectManager.Player.GetPath(args.End).ToList().Last(); allObjects.Add(new ListedHO(ho.Duration, ho.ObjColor, ho.Range, endPosition, Game.Time)); } }
private void OnCreateObject(GameObject sender, EventArgs args) { if (sender.Name.Contains("missile") || sender.Name.Contains("Minion") || sender.IsAlly || !Enabled) { return; } Obj_AI_Base objis = ObjectManager.GetUnitByNetworkId <Obj_AI_Base>(sender.NetworkId); HidObject ho = HidObjects.IsHidObj(objis.SkinName); if (ho != null) { foreach (var lho in allObjects) { if (GetNearestWard(lho.Position) != null) { lho.WardObj = GetNearestWard(lho.Position); break; } } } }