A man charged with the murder of two men at a first birthday party is withdrawing from drugs, his lawyer has told a court.