public static void OnLogin(LoginEventArgs e) { if (e.Mobile is PlayerMobile) { PlayerMobile pm = (PlayerMobile)e.Mobile; pm.ClearVisibilityList(); } }
public static void VisClear_OnCommand(CommandEventArgs e) { if (e.Mobile is PlayerMobile) { PlayerMobile pm = (PlayerMobile)e.Mobile; ArrayList list = new ArrayList(pm.VisibilityList); pm.ClearVisibilityList(); pm.SendMessage("Your visibility list has been cleared."); for (int i = 0; i < list.Count; ++i) { Mobile m = (Mobile)list[i]; if (!m.CanSee(pm) && Utility.InUpdateRange(m, pm)) { m.Send(pm.RemovePacket); } } } }