public bool CanDeleteObject(SceneObjectGroup sog, IClientAPI client) { bool result = true; DeleteObjectHandler handler = OnDeleteObject; if (handler != null) { if (sog == null || client == null || client.SceneAgent == null) { return(false); } ScenePresence sp = client.SceneAgent as ScenePresence; Delegate[] list = handler.GetInvocationList(); foreach (DeleteObjectHandler h in list) { if (h(sog, sp) == false) { result = false; break; } } } return(result); }
public bool CanDeleteObject(UUID objectID, UUID deleter) { DeleteObjectHandler handler = OnDeleteObject; if (handler != null) { Delegate[] list = handler.GetInvocationList(); return(list.Cast <DeleteObjectHandler>().All(h => h(objectID, deleter, m_scene) != false)); } return(true); }
public bool CanDeleteObject(UUID objectID, UUID deleter) { DeleteObjectHandler handler = OnDeleteObject; if (handler != null) { Delegate[] list = handler.GetInvocationList(); foreach (DeleteObjectHandler h in list) { if (h(objectID, deleter, m_scene) == false) { return(false); } } } return(true); }