I've always had the impression the TOS cast actually got on servicably
on the set. In particular, I recall Nichelle Nichols saying that she and Shatner worked well together (ie, they shared jokes with each other, solicalised off the set, etc), but that his habit of going to directors and stealing the other actors' lines created tension. Having a good
personal relationship doesn't always translate to having a equitable
professional relationship. The TNG cast, by all accounts, managed to have both.