protected int ImClearTrigger(int sound, int id)
{
int count = 0;
foreach (var trig in _snm_triggers)
{
if ((sound == -1 || trig.Sound == sound) && trig.Id != 0 && (id == -1 || trig.Id == id))
{
trig.Sound = trig.Id = 0;
++count;
}
}
return (count > 0) ? 0 : -1;
}