[Core] Improve EventAI code engine a little bit to be more effective with EVENT_T_RANGE (c2564)