It's probably in BarbarianCombat.cs, this function:
ShouldWaitForCallOfTheAncients yields true or false, true if:
you have CotA, UseOOCBuff is false (my guess to not distrupt anything), you are not currently avoiding anything, you can cast it, you have elites in range, you don't already...